2015-09-18 15:49:53 +00:00
{{ define "content" }}
2016-02-07 09:55:16 +00:00
<div class="editor container {{ .Class }}">
2016-02-06 17:28:10 +00:00
{{ if eq .Class "complete" }}
<h1><textarea id="site-title">{{ .Name }}</textarea></h1>
{{ end }}
2015-09-18 15:49:53 +00:00
<form method="POST" action="">
2016-02-03 22:33:03 +00:00
<main>
{{ if not (eq .Class "complete") }}
2016-02-06 17:28:10 +00:00
<h1 id="site-title">{{ .Name }}</h1>
2016-02-03 22:33:03 +00:00
{{ end }}
2016-01-31 22:14:17 +00:00
2016-02-03 22:33:03 +00:00
{{ if eq .Class "frontmatter-only" }}
<div class="frontmatter blocks">
{{ template "frontmatter" .FrontMatter }}
2016-02-06 17:28:10 +00:00
<p class="actions">
<button class="add">Add field</button>
</p>
2016-02-07 09:12:16 +00:00
</div>
2016-02-03 22:33:03 +00:00
{{ else if eq .Class "content-only" }}
<div class="content">
2016-02-07 09:55:16 +00:00
<div id="editor-source" data-mode="{{ .Mode }}"></div>
<textarea name="content">{{ .Content }}</textarea>
2016-02-03 22:33:03 +00:00
</div>
{{ else }}
<div class="frontmatter">
<div class="blocks">
{{ template "frontmatter" .FrontMatter }}
2016-01-31 22:14:17 +00:00
</div>
2016-02-03 22:33:03 +00:00
<p class="actions">
<button class="add">Add field</button>
</p>
</div>
2016-01-31 22:14:17 +00:00
2016-02-03 22:33:03 +00:00
<div class="content">
2016-02-07 09:12:16 +00:00
{{ if eq .Mode "markdown" }}
2016-02-03 22:33:03 +00:00
<nav>
2016-02-08 20:15:55 +00:00
<a id="see-source" class="active"><i class="fa fa-code"></i> Source</a>
2016-02-03 22:33:03 +00:00
<a id="see-preview"><i class="fa fa-eye"></i> Preview</a>
</nav>
2016-02-07 09:12:16 +00:00
{{ end}}
2016-02-07 09:47:44 +00:00
<div id="editor-source" data-mode="{{ .Mode }}"></div>
<textarea name="content">{{ .Content }}</textarea>
2016-02-07 09:34:28 +00:00
<div id="editor-preview"></div>
2016-02-03 22:33:03 +00:00
</div>
{{ end }}
2015-09-18 15:49:53 +00:00
2016-02-01 22:30:29 +00:00
<p class="toolbar">
2016-03-11 20:38:57 +00:00
<input type="submit" data-type="{{ .Class }}" data-regenerate="false" data-schedule="false" 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 }}" value="Save">
2016-02-03 22:33:03 +00:00
<span class="right">
2016-03-11 20:38:57 +00:00
{{ if and (eq .Class "complete") ( .IsPost ) }}<input type="submit" data-type="{{ .Class }}" data-schedule="true" data-regenerate="false" data-message="Post scheduled." value="Schedule"> {{ end }}
2016-03-12 09:25:15 +00:00
<input type="submit" data-type="{{ .Class }}" data-regenerate="true" data-schedule="false" 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 }}" class="default" value="Publish">
2016-02-03 22:33:03 +00:00
</span>
2016-02-01 22:30:29 +00:00
</p>
2016-02-03 22:33:03 +00:00
</main>
2015-09-18 15:49:53 +00:00
</form>
</div>
{{ end }}