Skip to content

Commit f9df217

Browse files
committed
Updting Buy me a Coffee button
1 parent 9973726 commit f9df217

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

_layouts/default.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020

2121
<!-- CSS Styles -->
2222
<link href="/assets/css/style.css" rel="stylesheet">
23-
24-
{% if page.layout == 'post' %}
25-
<link href="https://fonts.googleapis.com/css?family=Cookie" rel="stylesheet">
26-
{% endif %}
2723
</head>
2824

2925
{% capture layout %}{% if page.layout %}layout-{{ page.layout }}{% endif %}{% endcapture %}
@@ -47,7 +43,10 @@
4743
</div><!-- .site -->
4844
{% if page.layout == 'post' %}
4945
<a class="bmc-button" target="_blank" href="https://www.buymeacoffee.com/agileobjects">
50-
<img src="https://cdn.buymeacoffee.com/buttons/bmc-new-btn-logo.svg" alt="Buy me a coffee"><span style="margin-left:5px;font-size:28px !important;">Buy me a coffee</span>
46+
<span>
47+
Thanks for reading my blog!<br />Care to treat me to a coffee?
48+
<img src="https://cdn.buymeacoffee.com/buttons/bmc-new-btn-logo.svg" alt="Buy me a coffee" />
49+
</span>
5150
</a>
5251
{% endif %}
5352
<!-- Javascript Assets -->

_sass/_buy-me-a-coffee.scss

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
@import "_variables.scss";
22

3-
.bmc-button img {
4-
border: none !important;
5-
box-shadow: none !important;
6-
height: 34px !important;
7-
margin-bottom: 1px !important;
8-
vertical-align: middle !important;
9-
width: 35px !important;
10-
}
3+
$coffee-img-size: 40px;
4+
$coffee-img-margin-top: -($coffee-img-size / 2);
5+
$coffee-img-margin-right: -($coffee-img-size / 10);
116

127
.bmc-button {
138
background-color: #FFFFFF !important;
@@ -20,16 +15,29 @@
2015
box-sizing: border-box !important;
2116
color: #000000 !important;
2217
display: inline-flex !important;
23-
font-family: 'Cookie', cursive !important;
24-
font-size: 22px !important;
25-
height: 51px !important;
26-
letter-spacing: 0.6px !important;
27-
line-height: 35px !important;
28-
margin: 0 auto !important;
29-
padding: 7px 15px 7px 10px !important;
18+
padding: 7px 7px 7px 10px !important;
3019
position: fixed;
3120
right: 5%;
21+
text-align: center;
3222
text-decoration: none !important;
23+
24+
span {
25+
display: block;
26+
font-size: .8em;
27+
padding-right: $coffee-img-size;
28+
position: relative;
29+
}
30+
31+
img {
32+
border: none !important;
33+
box-shadow: none !important;
34+
height: $coffee-img-size !important;
35+
margin: $coffee-img-margin-top $coffee-img-margin-right 0 0;
36+
position: absolute;
37+
right: 0;
38+
top: 50%;
39+
width: $coffee-img-size !important;
40+
}
3341
}
3442

3543
.bmc-button:hover, .bmc-button:active, .bmc-button:focus {
@@ -38,4 +46,4 @@
3846
color: #000000 !important;
3947
opacity: 0.85 !important;
4048
text-decoration: none !important;
41-
}
49+
}

0 commit comments

Comments
 (0)