update template

pull/48/head
Henrique Dias 2016-02-06 17:28:10 +00:00
parent 846799dacf
commit 121127ec69
1 changed files with 8 additions and 4 deletions

View File

@ -1,24 +1,28 @@
{{ define "content" }} {{ define "content" }}
<div class="editor {{ .Class }} container"> <div class="editor {{ .Class }} container">
{{ if eq .Class "complete" }}
<h1><textarea id="site-title">{{ .Name }}</textarea></h1>
{{ end }}
<form method="POST" action=""> <form method="POST" action="">
<main> <main>
{{ if not (eq .Class "complete") }} {{ if not (eq .Class "complete") }}
<h1>{{ .Name }}</h1> <h1 id="site-title">{{ .Name }}</h1>
{{ end }} {{ end }}
{{ if eq .Class "frontmatter-only" }} {{ if eq .Class "frontmatter-only" }}
<div class="frontmatter blocks"> <div class="frontmatter blocks">
{{ template "frontmatter" .FrontMatter }} {{ template "frontmatter" .FrontMatter }}
</div> <p class="actions">
<button class="add">Add field</button>
</p>
</div>
{{ else if eq .Class "content-only" }} {{ else if eq .Class "content-only" }}
<div class="content"> <div class="content">
<textarea id="source-area" name="content" data-mode="{{ .Mode }}">{{ .Content }}</textarea> <textarea id="source-area" name="content" data-mode="{{ .Mode }}">{{ .Content }}</textarea>
</div> </div>
{{ else }} {{ else }}
<div class="frontmatter"> <div class="frontmatter">
<h1><textarea>{{ .Name }}</textarea></h1>
<div class="blocks"> <div class="blocks">
{{ template "frontmatter" .FrontMatter }} {{ template "frontmatter" .FrontMatter }}
</div> </div>