Core

/views/components/view/Int.html (633 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% import (
"{{{ .Package }}}/app/util"
"{{{ .Package }}}/views/components"
) %}

{% func Int(i any) %}{% stripspace %}
{%v i %}
{% endstripspace %}{% endfunc %}

{% func IntTable(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>{%= Int(value) %}</td>
{%= components.Indent(true, indent) %}
</tr>
{% endstripspace %}{% endfunc %}

{% func IntArray(value []any) %}{% stripspace %}
{%= StringArray(util.ArrayToStringArray(value)) %}
{% endstripspace %}{% endfunc %}