genofire/hs_monolith
genofire
/
hs_monolith
Archived
1
0
Fork 0
This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
hs_monolith/contrib/good_availablity.svg

17 lines
854 B
XML

<!-- SVG to show the current stock with a traffic light food labeling system -->
<!-- Used functions -->
<!-- process_radius ANZAHL MAXANZAHL RADIUS -->
<!-- procent ANZAHL MAXANZAHL -->
<!-- ex. {procent .Count 10}%-->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<g class="arcs">
{{if eq .Count 0}}
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#b02" stroke-width="8"/>
{{else}}
<circle cx="50" cy="50" r="40" fill="#fff" stroke="#b02" stroke-width="8"/>
<circle cx="50" cy="50" r="40" fill="none" stroke="#093" stroke-width="8" stroke-dasharray="251.33" stroke-dashoffset="{{process_radius .Count 10 40}}"/>
{{end}}
</g>
<text x="50" y="65" fill="#555" text-anchor="middle" style="font: 50px Roboto,Verdana,sans-serif;">{{.Count}}</text>
</svg>