1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| {% import ( "{{{ .Package }}}/app/util" "{{{ .Package }}}/views/components" ) %}
{% func Float(f any) %}{% stripspace %} {%v f %} {% endstripspace %}{% endfunc %}
{% func FloatTable(title string, value any, indent int) %}{% stripspace %} <tr> {%= components.Indent(true, indent + 1) %} <th class="shrink">{%s title %}</th> {%= components.Indent(true, indent + 1) %} <td>{%= Float(value) %}</td> {%= components.Indent(true, indent) %} </tr> {% endstripspace %}{% endfunc %}
{% func FloatArray(value []any) %}{% stripspace %} {%= StringArray(util.ArrayToStringArray(value)) %} {% endstripspace %}{% endfunc %}
{% func Percent(f float64) %}{% stripspace %} {%s util.Percent(f) %} {% endstripspace %}{% endfunc %}
|