updates
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<div id="container">
|
||||
{{ template "content" . }}
|
||||
</div>
|
||||
<footer>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
{{ define "content" }}
|
||||
|
||||
<main>
|
||||
<a href="/admin/settings">Settings</a>
|
||||
</main>
|
||||
{{ end }}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<main class="editor">
|
||||
<form method="POST" action="">
|
||||
<div class="sidebar data scroll">
|
||||
<div class="sidebar scroll data">
|
||||
<h2>Metadata</h2>
|
||||
{{ template "frontmatter" .FrontMatter }}
|
||||
</div>
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
<div class="action-bar">
|
||||
<button id="preview" class="left">Preview</button>
|
||||
<input type="submit" value="Save">
|
||||
<input type="submit" class="default" value="Publish">
|
||||
<input type="submit" data-message="Post saved." value="Save">
|
||||
<input type="submit" data-message="Post published successfully." class="default" value="Publish">
|
||||
</div>
|
||||
</form>
|
||||
</main>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
{{ define "frontmatter" }}
|
||||
{{ range $key, $value := . }}
|
||||
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
||||
<fieldset name="{{ $value.Name }}" type="{{ $value.Type }}">
|
||||
<h3>{{ splitCapitalize $value.Name }} <button class="add"><i class="fa fa-plus"></i></button></h3>
|
||||
{{ template "frontmatter" $value.Content }}
|
||||
</fieldset>
|
||||
{{ else }}
|
||||
{{ if not (eq $value.Parent "array") }}
|
||||
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Name }}</label>
|
||||
{{ end }}
|
||||
<input name="{{ $value.Name }}" id="{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
|
||||
{{ end }}
|
||||
{{ range $key, $value := . }}
|
||||
{{ if or (eq $value.Type "object") (eq $value.Type "array") }}
|
||||
<fieldset name="{{ $value.Name }}" type="{{ $value.Type }}">
|
||||
<h3>{{ splitCapitalize $value.Name }} <button class="add"><i class="fa fa-plus"></i></button></h3>
|
||||
{{ template "frontmatter" $value.Content }}
|
||||
</fieldset>
|
||||
{{ else }}
|
||||
{{ if not (eq $value.Parent "array") }}
|
||||
<label for="{{ $value.Name }}">{{ splitCapitalize $value.Name }}</label>
|
||||
{{ end }}
|
||||
<input name="{{ $value.Name }}" id="{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
<div class="content">
|
||||
<h1>Settings</h1>
|
||||
<form method="POST" action="/admin/settings">
|
||||
{{ template "frontmatter" . }}
|
||||
<input type="submit" value="Save">
|
||||
<div class="data">
|
||||
{{ template "frontmatter" . }}
|
||||
</div>
|
||||
<input type="submit" data-message="Settings updated." value="Save">
|
||||
</form>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user