Add config_display option to support regular and large renders (#310)

This commit is contained in:
Simon Lecoq
2021-05-18 22:31:53 +02:00
committed by GitHub
parent 04bf1f0316
commit ed0da41973
36 changed files with 586 additions and 402 deletions

View File

@@ -48,15 +48,15 @@
</section>
<% } %>
</div>
<% if (progress.enabled) { %>
<% if (progress.enabled) { const width = 460 * (1 + large) %>
<div class="field center horizontal-wrap ">
<svg class="bar" xmlns="http://www.w3.org/2000/svg" width="460" height="8">
<svg class="bar" xmlns="http://www.w3.org/2000/svg" width="<%= width %>" height="8">
<mask id="project-bar">
<rect x="0" y="0" width="460" height="8" fill="white" rx="5"/>
<rect x="0" y="0" width="<%= width %>" height="8" fill="white" rx="5"/>
</mask>
<rect mask="url(#project-bar)" x="0" y="0" width="<%= (progress.done/progress.total)*460 %>" height="8" fill="#28A745"/>
<rect mask="url(#project-bar)" x="<%= (progress.done/progress.total)*460 %>" y="0" width="<%= (progress.doing/progress.total)*460 %>" height="8" fill="#6F42C1"/>
<rect mask="url(#project-bar)" x="<%= ((progress.done+progress.doing)/progress.total)*460 %>" y="0" width="<%= (progress.todo/progress.total)*460 %>" height="8" fill="#d1d5da"/>
<rect mask="url(#project-bar)" x="0" y="0" width="<%= (progress.done/progress.total)*width %>" height="8" fill="#28A745"/>
<rect mask="url(#project-bar)" x="<%= (progress.done/progress.total)*width %>" y="0" width="<%= (progress.doing/progress.total)*width %>" height="8" fill="#6F42C1"/>
<rect mask="url(#project-bar)" x="<%= ((progress.done+progress.doing)/progress.total)*width %>" y="0" width="<%= (progress.todo/progress.total)*width %>" height="8" fill="#d1d5da"/>
</svg>
</div>
<% } %>