16 lines
580 B
Cheetah
16 lines
580 B
Cheetah
{{ define "frontmatter" }}
|
|
{{ range $key, $value := . }}
|
|
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
|
<fieldset>
|
|
<h3>{{ splitCapitalize $value.Title }} <button class="add"><i class="fa fa-plus"></i></button></h3>
|
|
{{ template "frontmatter" $value.Content }}
|
|
</fieldset>
|
|
{{ else }}
|
|
{{ if not (eq $value.Parent.Type "array") }}
|
|
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Title }}</label>
|
|
{{ end }}
|
|
<input name="{{ $value.Name }}" id="{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|