Core

/views/components/Indent.html (602 B)

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{% import "{{{ .Package }}}/app/util" %}

{% func Indent(br bool, level int) %}{% stripspace %}
{% if br %}{% newline %}{% endif %}
{% for i := 0; i < level; i ++ %}
{% space %}{% space %}
{% endfor %}
{% endstripspace %}{% endfunc %}

{% func PlaceholderFor(phs []string) %}{% stripspace %}
{% if len(phs) > 0 %}{% space %}placeholder="{%s util.StringJoin(phs, "; ") %}"{% endif %}
{% endstripspace %}{% endfunc %}

{% func TitleFor(help []string) %}{% stripspace %}
{% if len(help) > 0 %}{% space %}title="{%s util.StringJoin(help, "; ") %}"{% endif %}
{% endstripspace %}{% endfunc %}