filebrowser/assets/embed/templates/editor.tmpl

35 lines
905 B
Cheetah
Raw Normal View History

2016-06-23 22:21:44 +00:00
{{ define "content" }}
2016-08-21 19:10:12 +00:00
{{ with .Data }}
2016-06-28 09:01:00 +00:00
<div id="editor" class="container" data-kind="{{ .Class }}">
<form method="POST" action="./">
{{ if or (eq .Class "frontmatter-only") (eq .Class "complete") }}
<div class="frontmatter" data-type="parent">
{{ template "blocks" .FrontMatter }}
<div class="button add">Add field</div>
</div>
{{ end }}
2016-06-23 22:21:44 +00:00
2016-06-28 09:01:00 +00:00
{{ if or (eq .Class "content-only") (eq .Class "complete") }}
2016-06-28 09:01:00 +00:00
{{ if (eq .Class "complete")}}
<h3>Body</h3>
{{ end }}
<div class="content">
<div id="editor-source" data-mode="{{ .Mode }}"></div>
<textarea name="content">{{ .Content }}</textarea>
</div>
{{ end }}
2016-06-23 22:21:44 +00:00
2016-06-28 09:01:00 +00:00
<div>
<button id="submit" type="submit" data-type="{{ .Class }}">
<span>
<i class="material-icons" title="Save">save</i>
2016-06-28 09:01:00 +00:00
</span>
<span>save</span>
</button>
</div>
</form>
</div>
2016-06-23 22:21:44 +00:00
{{ end }}
2016-08-21 19:10:12 +00:00
{{ end }}