filebrowser/_assets/_old/templates/editor.tmpl
Henrique Dias 0a65393527 updates...
Former-commit-id: 2d19655aac80ec7033829b0b3d708bf86986252c [formerly b8bb006bd1a5492960c1d4793e15e80775ddc5fd] [formerly 4641277c14953bdb2ddab89ba866cf63f3dac0f9 [formerly 95b91a64a3]]
Former-commit-id: 5a6e07758bbe67fd202effa5b2975c65227eaebd [formerly 9a161548d270750b8da949189ad6f3b641779bfc]
Former-commit-id: 84e0bbcbbead53c5e91987574d5c854a9792515f
2017-06-28 11:45:41 +01:00

58 lines
1.9 KiB
Cheetah

{{ define "content" }}
{{- with .Data }}
<form id="editor" {{ if eq .Mode "markdown" }}class="markdown"{{ end }} data-kind="{{ .Class }}" data-rune="{{ if eq .Class "complete" }}{{ .FrontMatter.Rune }}{{ end }}">
{{- if or (eq .Class "frontmatter-only") (eq .Class "complete") }}
{{- if (eq .Class "complete")}}
<h2>Metadata</h2>
{{- end }}
<div class="frontmatter" data-type="parent">
{{- template "blocks" .FrontMatter.Content }}
<div class="button add">Add field</div>
</div>
{{- end }}
{{ if or (eq .Class "content-only") (eq .Class "complete") }}
{{ if (eq .Class "complete")}}
<h2>Body</h2>
{{ end }}
<div class="content">
<div id="ace" data-mode="{{ .Mode }}"></div>
<textarea class="source" name="content">{{ .Content }}</textarea>
</div>
{{ end }}
</form>
{{- 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>
</div>
</template>
<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>
</div>
</template>
{{ end }}