filebrowser/templates/frontmatter.tmpl

16 lines
585 B
Cheetah
Raw Normal View History

2015-09-14 13:00:12 +00:00
{{ define "frontmatter" }}
2015-09-16 20:48:08 +00:00
{{ range $key, $value := . }}
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
2015-09-17 10:32:27 +00:00
<fieldset>
<h3>{{ splitCapitalize $value.Title }} <button class="add"><i class="fa fa-plus"></i></button></h3>
{{ template "frontmatter" $value.Content }}
</fieldset>
2015-09-16 20:48:08 +00:00
{{ else }}
2015-09-17 10:32:27 +00:00
{{ if not (eq $value.Parent.Type "array") }}
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Title }}</label>
2015-09-14 13:00:12 +00:00
{{ end }}
2015-09-18 08:47:02 +00:00
<input name="{{ $value.Name }}:auto" id="{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
2015-09-16 20:48:08 +00:00
{{ end }}
{{ end }}
2015-09-14 13:00:12 +00:00
{{ end }}