filebrowser/_embed/templates/editor.tmpl

57 lines
1.8 KiB
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-12-31 10:39:31 +00:00
<div id="editor" class="container" data-kind="{{ .Class }}">
2016-12-31 10:53:48 +00:00
<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-12-31 10:39:31 +00:00
2016-12-31 10:53:48 +00:00
{{ if or (eq .Class "content-only") (eq .Class "complete") }}
{{ 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 }}
</form>
2016-12-31 10:39:31 +00:00
</div>
{{ end }}
<template id="base-template">
<fieldset id="" data-type="">
<h3></h3>
<div class="action add">
<i class="material-icons">add</i>
</div>
<div class="action delete" data-delete="">
<i class="material-icons">close</i>
</div>
<div class="group"></div>
</fieldset>
</template>
<template id="object-item-template">
<div class="block" id="block-${bid}" data-content="${bid}">
<label for="${bid}">${name}</label>
<input name="${bid}" id="${bid}" type="text" data-parent-type="object"></input>
<div class="action delete" data-delete="block-${bid}">
<i class="material-icons">close</i>
</div>
2016-06-28 09:01:00 +00:00
</div>
2016-12-31 10:39:31 +00:00
</template>
2016-06-23 22:21:44 +00:00
2016-12-31 10:39:31 +00:00
<template id="array-item-template">
<div id="" data-type="array-item">
<input name="" id="" type="text" data-parent-type="array"></input>
<div class="action delete" data-delete="">
<i class="material-icons">close</i>
</div>
2016-06-28 09:01:00 +00:00
</div>
2016-12-31 10:39:31 +00:00
</template>
2016-08-21 19:10:12 +00:00
{{ end }}