Skip to content

Commit 6f26525

Browse files
authored
Fix special sponsors display (#2956)
1 parent 5c154aa commit 6f26525

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Diff for: themes/vue/_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ silver:
169169
img: localazy.png
170170
- name: AddWeb Solution
171171
url: http://addwebsolution.com/
172-
img: addweb_solution.png
172+
img: addweb_solution.png?v2
173173
- name: 1394TA
174174
url: https://1394ta.org
175175
img: 1394ta.png

Diff for: themes/vue/layout/index.ejs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<% function logo(img) { return `https://sponsors.vuejs.org/images/${img}` } %>
2+
13
<main role="main">
24
<div class="sidebar">
35
<div class="sidebar-inner-index">
@@ -29,12 +31,12 @@
2931
</div>
3032
</div>
3133

32-
<%_ if (theme.special_sponsors) { _%>
34+
<%_ if (theme.special) { _%>
3335
<div id="special">
3436
<h3>Special Sponsor</h3>
35-
<% var specialSponsor = theme.special_sponsors[0]; %>
37+
<% var specialSponsor = theme.special[0]; %>
3638
<a href="<%- specialSponsor.url %>" target="_blank" rel="noopener sponsored">
37-
<img src="<%- url_for(`/images/${specialSponsor.img}`) %>" style="width:160px" alt="Special sponsor <%- specialSponsor.name %>">
39+
<img src="<%- logo(specialSponsor.img) %>" style="width:160px" alt="Special sponsor <%- specialSponsor.name %>">
3840
<br>
3941
<!-- <span><%- specialSponsor.description %></span> -->
4042
</a>

Diff for: themes/vue/layout/partials/sponsors_sidebar.ejs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<%_ if (theme.special_sponsors) { _%>
1+
<% function logo(img) { return `https://sponsors.vuejs.org/images/${img}` } %>
2+
3+
<%_ if (theme.special) { _%>
24
<div id="sidebar-sponsors-special">
35
<div class="main-sponsor">
46
<span>Special Sponsor</span>
57
<div>
6-
<%_ for (const sponsor of theme.special_sponsors) {_%>
8+
<%_ for (const sponsor of theme.special) {_%>
79
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="logo">
8-
<img src="<%- url_for(`/images/${sponsor.wide_img || sponsor.img}`) %>" alt="<%-sponsor.name-%>">
10+
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
911
</a>
1012
<%_ } _%>
1113
</div>

0 commit comments

Comments
 (0)