2015-09-18 23:49:53 +08:00
{{ define "content" }}
2015-09-19 02:12:47 +08:00
2015-09-18 23:49:53 +08:00
<div class="editor {{ .Class }}">
<form method="POST" action="">
2015-09-20 05:17:38 +08:00
<div class="full box scroll">
2015-09-18 23:49:53 +08:00
<main>
2015-09-20 05:17:38 +08:00
{{ if not (eq .Class "complete") }}
2015-09-18 23:49:53 +08:00
<header>
2015-09-20 05:17:38 +08:00
<div class="container">
<h1>{{ .Name }}{{ if eq .Class "frontmatter-only" }}
<span class="actions">
<button class="add"><i class="fa fa-plus"></i></button>
</span>{{ end }}
</h1>
2015-09-18 23:49:53 +08:00
</div>
</header>
2015-09-20 05:17:38 +08:00
{{ end }} {{ if eq .Class "frontmatter-only" }}
<div class="frontmatter">
<div class="container">
{{ template "frontmatter" .FrontMatter }}
2015-09-18 23:49:53 +08:00
</div>
</div>
{{ else if eq .Class "content-only" }}
<div class="container">
2015-09-20 05:17:38 +08:00
<textarea id="content-area" name="content" class="scroll" data-mode="{{ .Mode }}">{{ .Content }}</textarea>
<div id="preview-area" class="scroll hidden"></div>
2015-09-18 23:49:53 +08:00
</div>
{{ else }}
<div class="container">
2015-09-19 21:47:59 +08:00
<textarea id="content-area" name="content" class="scroll" data-mode="{{ .Mode }}">{{ .Content }}</textarea>
2015-09-18 23:49:53 +08:00
<div id="preview-area" class="scroll hidden"></div>
</div>
2015-09-20 05:17:38 +08:00
<div class="frontmatter scroll">
2015-09-21 03:42:22 +08:00
<h2>Metadata
<span class="actions">
<button class="add"><i class="fa fa-plus"></i></button>
</span>
</h2>
2015-09-18 23:49:53 +08:00
{{ template "frontmatter" .FrontMatter }}
</div>
{{ end }}
</main>
</div>
2015-09-20 05:17:38 +08:00
<div class="toolbar">
2015-09-26 04:06:29 +08:00
{{ if or (eq .Mode "markdown") (eq .Class "complete") }}
2015-09-18 23:49:53 +08:00
<button id="preview" class="left">Preview</button>
{{ else }}
<span class="left"></span>
{{ end }}
2015-09-27 05:06:07 +08:00
<input type="submit" data-type="{{ .Class }}" data-message="{{ if eq .Class "frontmatter-only" }}The fields were put on their way.{{ else if eq .Class "content-only" }}Every byte was saved.{{ else }}Post saved with pomp and circumstance.{{ end }}"
data-regenerate="false" value="Save"> {{ if and (eq .Class "complete") ( .IsPost ) }}
<input type="submit" data-type="{{ .Class }}" data-message="Post scheduled." data-schedule="true" value="Schedule"> {{ end }}
<input type="submit" data-type="{{ .Class }}" data-message="{{ if eq .Class "frontmatter-only" }}Saved and regenerated.{{ else if eq .Class "content-only" }}Done. What do you want more?{{ else }}Post published. Go and share it!{{ end }}" data-regenerate="true"
2015-09-20 05:17:38 +08:00
class="default" value="Publish">
2015-09-18 23:49:53 +08:00
</div>
</form>
</div>
{{ end }}