mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-01 04:24:27 +00:00
59 lines
2.2 KiB
Plaintext
59 lines
2.2 KiB
Plaintext
{{ define "title" }}
|
|
<title>{{ string .Blog.Lang "editor" }} - {{ .Blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main>
|
|
<h1>{{ string .Blog.Lang "editor" }}</h1>
|
|
<h2>{{ string .Blog.Lang "create" }}</h2>
|
|
<form class="fw-form p" method="post">
|
|
<input type="hidden" name="h" value="entry">
|
|
<textarea name="content" class="monospace h400p">---
|
|
title:
|
|
section:
|
|
slug:
|
|
blog:
|
|
---
|
|
</textarea>
|
|
<input class="fw" type="submit" value="{{ string .Blog.Lang "create" }}">
|
|
</form>
|
|
<h2>{{ string .Blog.Lang "update" }}</h2>
|
|
<form class="fw-form p" method="post">
|
|
{{ if .Data.UpdatePostURL }}
|
|
<input type="hidden" name="editoraction" value="updatepost">
|
|
<input type="hidden" name="url" value="{{ .Data.UpdatePostURL }}">
|
|
<textarea name="content" class="monospace h400p">{{ .Data.UpdatePostContent }}</textarea>
|
|
{{ else }}
|
|
<input type="hidden" name="editoraction" value="loadupdate">
|
|
<input type="url" name="url" placeholder="URL">
|
|
{{ end }}
|
|
<input class="fw" type="submit" value="{{ string .Blog.Lang "update" }}">
|
|
</form>
|
|
<h2>{{ string .Blog.Lang "delete" }}</h2>
|
|
<form class="fw-form p" method="post">
|
|
<input type="hidden" name="action" value="delete">
|
|
<input type="url" name="url" placeholder="URL">
|
|
<input class="fw" type="submit" value="{{ string .Blog.Lang "delete" }}">
|
|
</form>
|
|
<h2>{{ string .Blog.Lang "upload" }}</h2>
|
|
<form class="fw-form p" method="post" enctype="multipart/form-data">
|
|
<input type="hidden" name="editoraction" value="upload">
|
|
<input class="fw" type="file" name="file">
|
|
<input class="fw" type="submit" value="{{ string .Blog.Lang "upload" }}">
|
|
</form>
|
|
<h2>{{ string .Blog.Lang "drafts" }}</h2>
|
|
<form class="fw-form p" method="post">
|
|
<input type="hidden" name="editoraction" value="loadupdate">
|
|
<select name="url" class="fw">
|
|
{{ range $i, $draft := .Data.Drafts }}
|
|
<option value="{{ absolute $draft.Path }}">{{ (title $draft) | default $draft.Path }}</option>
|
|
{{ end }}
|
|
</select>
|
|
<input class="fw" type="submit" value="{{ string .Blog.Lang "update" }}">
|
|
</form>
|
|
</main>
|
|
{{ end }}
|
|
|
|
{{ define "editor" }}
|
|
{{ template "base" . }}
|
|
{{ end }} |