Skip to content

Commit 9f5f747

Browse files
authored
adjust the height of sponsor images (#2980)
1 parent b0739f7 commit 9f5f747

File tree

5 files changed

+27
-16
lines changed

5 files changed

+27
-16
lines changed

themes/vue/layout/index.ejs

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
<div id="special">
3636
<h3>Special Sponsor</h3>
3737
<% var specialSponsor = theme.special[0]; %>
38-
<a href="<%- specialSponsor.url %>" target="_blank" rel="noopener sponsored">
39-
<img src="<%- logo(specialSponsor.img) %>" style="width:160px" alt="Special sponsor <%- specialSponsor.name %>">
38+
<a href="<%- specialSponsor.url %>" target="_blank" rel="noopener sponsored" class="sponsor" style="width: 160px; height: 80px; line-height: 80px;">
39+
<img src="<%- logo(specialSponsor.img) %>" alt="Special sponsor <%- specialSponsor.name %>">
4040
<br>
4141
<!-- <span><%- specialSponsor.description %></span> -->
4242
</a>

themes/vue/layout/partials/sponsors.ejs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
<h3>Patreon Sponsors</h3>
44

55
<%_ for (const sponsor of theme.platinum) {_%>
6-
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" style="width: 160px;">
7-
<img src="<%- logo(sponsor.img) %>" style="width: 160px;" alt="<%-sponsor.name-%>">
6+
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="sponsor" style="width: 160px; height: 80px; line-height: 80px;">
7+
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
88
</a>
99
<%_ } _%>
1010
<br>
1111
<br>
1212
<%_ for (const sponsor of theme.gold) {_%>
13-
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" style="width: 120px;">
14-
<img src="<%- logo(sponsor.img) %>" style="width:auto;max-width:120px;max-height:60px;" alt="<%-sponsor.name-%>">
13+
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="sponsor" style="width: 120px; height: 60px; line-height: 60px;">
14+
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
1515
</a>
1616
<%_ } _%>
1717
<br>

themes/vue/source/css/_sponsors-index.styl

+8-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@
1111
a
1212
margin: 20px 15px 0
1313
position: relative
14-
a, img
15-
width: 100px
1614
display: inline-block
17-
vertical-align: middle
15+
&.sponsor
16+
width: 100px
17+
height: 60px
18+
line-height: 60px
1819
img
20+
max-width: 100%
21+
max-height: 100%
22+
vertical-align: middle
1923
transition: all .3s ease
2024
filter: grayscale(100%)
2125
opacity: 0.66
@@ -26,8 +30,7 @@
2630
display: block
2731
margin: 30px auto 15px
2832
width: 200px
29-
img
30-
width: 200px
33+
height: auto
3134
.become-sponsor
3235
margin-top: 40px
3336
font-size: .9em

themes/vue/source/css/_sponsors-sidebar.styl

+8-5
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
font-size: .85em
44
.logo
55
color: $light
6-
margin-top: 10px
7-
text-align: center
6+
width: 125px
7+
height: 50px
88
font-weight: bold
9-
display block
9+
display flex
10+
align-items center
11+
justify-content center
1012
&:first-child
1113
margin-top: 18px
1214
&:last-child
1315
margin-bottom: 20px
14-
img, a
15-
width: 125px
16+
img
17+
max-width: 125px
18+
max-height: 50px
1619

1720
.become-backer
1821
border: 1px solid $green

themes/vue/source/css/index.styl

+5
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,16 @@ body
120120
margin 0
121121
a
122122
color $light
123+
width: 160px
124+
height: 80px
125+
line-height: 80px
123126
a, span, img
124127
display: inline-block
125128
vertical-align: middle
126129
img
127130
margin: 15px 0 0
131+
max-width: 100%
132+
max-height: 100%
128133

129134
#highlights
130135
background-color: #fff

0 commit comments

Comments
 (0)