hugo without theme

This commit is contained in:
2020-10-13 21:44:56 +02:00
parent 611cdec8bd
commit a406d6a66e
723 changed files with 1253 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
{{/*
HeatMeterTile
This partial visualizes a value to it's max value in a small tile. Inputs are following items:
two number values "value" and "max" and integer "precision" and "unit" for printing the value, "color".
@return -
*/}}
{{ $x := 0 }}
{{ if gt .max 0 }}
{{ $x = mul ( div 100.0 (float .max ) ) (float .value ) }}
{{ else }}
{{ $x = 0 }}
{{ end }}
{{ $output := partial "func/NumberFormatter.html" ( dict "number" .value "precision" .precision ) }}
<svg width="98" height="50" xmlns="http://www.w3.org/2000/svg">
<!-- Created with Method Draw - http://github.com/duopixel/Method-Draw/ -->
<rect height="100%" width="100%" opacity="0.4" fill="{{ .color }}"/>
<rect height="100%" width="{{ $x }}" fill="{{ .color }}"/>
<text xml:space="preserve" text-anchor="middle" font-family="Helvetica, Arial, sans-serif"
class="f5 b" opacity="0.9" y="90%" x="40%" fill="#ffffff">{{ $output }}{{ .unit }}</text>
</svg>