|
14 | 14 | </section> |
15 | 15 | </div> |
16 | 16 | <% } else { %> |
17 | | - <% for (const section of plugins.sponsors.sections) { %> |
18 | | - <% if ((section === "goal")&&(plugins.sponsors.goal)) { %> |
| 17 | + <% for (const section of plugins.sponsors.sections) { if ((plugins.sponsors.sections.includes("goal"))&&(plugins.sponsors.sections.includes("list"))&&(section === "list")) continue%> |
| 18 | + <% if ((section === "goal")||(section === "list")) { %> |
19 | 19 | <div class="fill-width"> |
20 | 20 | <section class="sponsors goal"> |
21 | | - <div class="markdown"> |
22 | | - <%= plugins.sponsors.goal.description %> |
23 | | - </div> |
24 | | - <% { const width = 440 * (1 + large) %> |
25 | | - <div class="center horizontal-wrap "> |
26 | | - <svg class="bar" xmlns="http://www.w3.org/2000/svg" width="<%= width %>" height="8"> |
27 | | - <mask id="project-bar"> |
28 | | - <rect x="0" y="0" width="<%= width %>" height="8" fill="white" rx="5"/> |
29 | | - </mask> |
30 | | - <rect mask="url(#project-bar)" x="0" y="0" width="<%= (plugins.sponsors.goal.progress/100)*width %>" height="8" fill="#ec6cb9"/> |
31 | | - <rect mask="url(#project-bar)" x="<%= (plugins.sponsors.goal.progress/100)*width %>" y="0" width="<%= ((100-plugins.sponsors.goal.progress)/100)*width %>" height="8" fill="#d1d5da"/> |
32 | | - </svg> |
| 21 | + <% if ((section === "goal")&&(plugins.sponsors.goal)) { %> |
| 22 | + <div class="markdown"> |
| 23 | + <%= plugins.sponsors.goal.description %> |
33 | 24 | </div> |
| 25 | + <% { const width = 440 * (1 + large) %> |
| 26 | + <div class="center horizontal-wrap "> |
| 27 | + <svg class="bar" xmlns="http://www.w3.org/2000/svg" width="<%= width %>" height="8"> |
| 28 | + <mask id="project-bar"> |
| 29 | + <rect x="0" y="0" width="<%= width %>" height="8" fill="white" rx="5"/> |
| 30 | + </mask> |
| 31 | + <rect mask="url(#project-bar)" x="0" y="0" width="<%= (plugins.sponsors.goal.progress/100)*width %>" height="8" fill="#ec6cb9"/> |
| 32 | + <rect mask="url(#project-bar)" x="<%= (plugins.sponsors.goal.progress/100)*width %>" y="0" width="<%= ((100-plugins.sponsors.goal.progress)/100)*width %>" height="8" fill="#d1d5da"/> |
| 33 | + </svg> |
| 34 | + </div> |
| 35 | + <% } %> |
34 | 36 | <% } %> |
35 | 37 | <div class="goal-text"> |
36 | 38 | <span> |
37 | 39 | <% if (plugins.sponsors.count.active.total) { %> |
38 | 40 | <%= plugins.sponsors.count.active.total %> sponsor<%= plugins.sponsors.count.active.total !== 1 ? "s are" : " is" %> funding <%= user.login %>'s work |
39 | 41 | <% } %> |
40 | 42 | </span> |
41 | | - <span><%= plugins.sponsors.goal.title %></span> |
42 | | - </div> |
43 | | - <div class="row"> |
44 | | - <% for (const user of plugins.sponsors.list) { %><img class="avatar <%= user.type === "organization" ? "organization" : "" %> <%= user.past ? "past" : "" %>" src="<%= user.avatar %>" width="24" height="24" alt="" /><% } %> |
| 43 | + <% if ((section === "goal")&&(plugins.sponsors.goal)) { %> |
| 44 | + <span><%= plugins.sponsors.goal.title %></span> |
| 45 | + <% } %> |
45 | 46 | </div> |
| 47 | + <% if ((section === "list")||(plugins.sponsors.sections.includes("list"))) { %> |
| 48 | + <div class="row"> |
| 49 | + <% for (const user of plugins.sponsors.list) { %><img class="avatar <%= user.type === "organization" ? "organization" : "" %> <%= user.past ? "past" : "" %>" src="<%= user.avatar %>" width="24" height="24" alt="" /><% } %> |
| 50 | + </div> |
| 51 | + <% } %> |
46 | 52 | </section> |
47 | 53 | </div> |
48 | 54 | <% } else if (section === "about") { %> |
|
0 commit comments