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
@@ -0,0 +1,20 @@
{{/*
NumberFormatter
This partial exchanges the characters for thousends and decimals for the give integer,
used in Germany.
Use this for intergers and floats instead of Hugo's lang.NumFmt and float which are
not language specific.
Example
{{ partial "func/NumberFormatter.html" ( dict "number" 123456789.1234 "precision" 1 }}
will return 123.456.789,1
@return String with integer
*/}}
{{ $ret := strings.Replace ( lang.NumFmt .precision .number "- . ," ) "," "t" }}
{{ $ret = strings.Replace $ret "." "d" }}
{{ $ret = strings.Replace $ret "d" "," }}
{{ strings.Replace $ret "t" "." }}