Fix svg height, add conversion options and options to use differents data from GitHub account (#35)

* Display all features on web instance but disable them when they're not enabled

* Resize dynamically SVG output and add support to convert images to jpeg/png

* Disable animations when computing height

* Add option to disable animations

* Add options to specify different data from used GitHub account

* Update tests
This commit is contained in:
Simon Lecoq
2021-01-02 01:31:04 +01:00
committed by GitHub
parent 93839c6285
commit b649d4811e
19 changed files with 266 additions and 129 deletions

View File

@@ -1,11 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="<%= 0
+ (!!base.header)*42
+ (!!plugins.traffic)*18
+ (!!plugins.followup)*68
+ (!!base.metadata)*28
+ (!!plugins.projects)*22 + (plugins.projects?.list?.length ?? 0)*60 + (!!plugins.projects?.error)*22
+ Math.max(0, ((!!base.header)+(!!base.metadata)+(!!plugins.followup)+(!!plugins.projects))-1)*4
%>">
<svg xmlns="http://www.w3.org/2000/svg" width="480" height="99999" class="<%= !animated ? 'no-animations' : '' %>">
<defs><style><%= fonts %></style></defs>
@@ -216,6 +209,7 @@
</footer>
<% } %>
<div id="metrics-end"></div>
</div>
</foreignObject>
</svg>

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB