filebrowser/templates/frontmatter.tmpl

14 lines
489 B
Cheetah

{{ define "frontmatter" }}
{{ range $key, $value := . }}
{{ if $value.SubContent }}
<fieldset name="{{ $value.Name }}">
<legend>{{ splitCapitalize $value.Name }}</legend>
{{ template "frontmatter" $value.Content }}
</fieldset>
{{ else}}
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Name }}</label>
<input name="{{ $value.Name }}" id="{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
{{ end }}
{{ end }}
{{ end }}