Skip to content

Fix special sponsors display #2956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion themes/vue/_config.yml
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ silver:
img: localazy.png
- name: AddWeb Solution
url: http://addwebsolution.com/
img: addweb_solution.png
img: addweb_solution.png?v2
- name: 1394TA
url: https://1394ta.org
img: 1394ta.png
8 changes: 5 additions & 3 deletions themes/vue/layout/index.ejs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% function logo(img) { return `https://sponsors.vuejs.org/images/${img}` } %>

<main role="main">
<div class="sidebar">
<div class="sidebar-inner-index">
@@ -29,12 +31,12 @@
</div>
</div>

<%_ if (theme.special_sponsors) { _%>
<%_ if (theme.special) { _%>
<div id="special">
<h3>Special Sponsor</h3>
<% var specialSponsor = theme.special_sponsors[0]; %>
<% var specialSponsor = theme.special[0]; %>
<a href="<%- specialSponsor.url %>" target="_blank" rel="noopener sponsored">
<img src="<%- url_for(`/images/${specialSponsor.img}`) %>" style="width:160px" alt="Special sponsor <%- specialSponsor.name %>">
<img src="<%- logo(specialSponsor.img) %>" style="width:160px" alt="Special sponsor <%- specialSponsor.name %>">
<br>
<!-- <span><%- specialSponsor.description %></span> -->
</a>
8 changes: 5 additions & 3 deletions themes/vue/layout/partials/sponsors_sidebar.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<%_ if (theme.special_sponsors) { _%>
<% function logo(img) { return `https://sponsors.vuejs.org/images/${img}` } %>

<%_ if (theme.special) { _%>
<div id="sidebar-sponsors-special">
<div class="main-sponsor">
<span>Special Sponsor</span>
<div>
<%_ for (const sponsor of theme.special_sponsors) {_%>
<%_ for (const sponsor of theme.special) {_%>
<a href="<%- sponsor.url %>" target="_blank" rel="sponsored noopener" class="logo">
<img src="<%- url_for(`/images/${sponsor.wide_img || sponsor.img}`) %>" alt="<%-sponsor.name-%>">
<img src="<%- logo(sponsor.img) %>" alt="<%-sponsor.name-%>">
</a>
<%_ } _%>
</div>