2015-09-19 21:17:38 +00:00
|
|
|
{{ define "frontmatter" }} {{ range $key, $value := . }} {{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
|
|
|
<fieldset id="{{ $value.Name }}" data-name="{{ $value.Name }}" data-type="{{ $value.Type }}">
|
|
|
|
<h3>{{ splitCapitalize $value.Title }}
|
|
|
|
<span class="actions">
|
|
|
|
<button class="delete"><i class="fa fa-minus"></i></button>
|
|
|
|
<button class="add"><i class="fa fa-plus"></i></button>
|
|
|
|
</span>
|
|
|
|
</h3>
|
|
|
|
{{ template "frontmatter" $value.Content }}
|
|
|
|
</fieldset>
|
|
|
|
{{ else }} {{ if not (eq $value.Parent.Type "array") }}
|
|
|
|
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Title }}
|
|
|
|
<span class="actions">
|
|
|
|
<button class="delete"><i class="fa fa-minus"></i></button>
|
|
|
|
</span>
|
|
|
|
</label>
|
2015-09-14 13:00:12 +00:00
|
|
|
{{ end }}
|
2015-09-19 21:17:38 +00:00
|
|
|
<input name="{{ $value.Name }}:{{ $value.Type }}" id="{{ $value.Name }}" value="{{ $value.Content }}"></input>
|
|
|
|
{{ end }} {{ end }} {{ end }}
|