github.com/kyleu/dbaudit@v0.0.2-0.20240321155047-ff2f2c940496/views/components/Indent.html (about) 1 <!-- Content managed by Project Forge, see [projectforge.md] for details. --> 2 {% import "strings" %} 3 4 {% func Indent(br bool, level int) %}{% stripspace %} 5 {% if br %}{% newline %}{% endif %} 6 {% for i := 0; i < level; i ++ %} 7 {% space %}{% space %} 8 {% endfor %} 9 {% endstripspace %}{% endfunc %} 10 11 {% func PlaceholderFor(phs []string) %}{% stripspace %} 12 {% if len(phs) > 0 %}{% space %}placeholder="{%s strings.Join(phs, "; ") %}"{% endif %} 13 {% endstripspace %}{% endfunc %} 14 15 {% func TitleFor(help []string) %}{% stripspace %} 16 {% if len(help) > 0 %}{% space %}title="{%s strings.Join(help, "; ") %}"{% endif %} 17 {% endstripspace %}{% endfunc %}