summaryrefslogtreecommitdiff
path: root/src/http/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/tpl')
-rw-r--r--src/http/tpl/image.html5
-rw-r--r--src/http/tpl/post-edit.html25
2 files changed, 29 insertions, 1 deletions
diff --git a/src/http/tpl/image.html b/src/http/tpl/image.html
index ba9b75d..c6c19b3 100644
--- a/src/http/tpl/image.html
+++ b/src/http/tpl/image.html
@@ -1,5 +1,8 @@
<div style="text-align: center;">
<a href="{{ AssetURL .ID }}" target="_blank">
- <img src="{{ AssetURL .ID }}{{ if .Resizable }}?w=800{{ end }}" />
+ <img
+ src="{{ AssetURL .ID }}{{ if .Resizable }}?w=800{{ end }}"
+ alt="{{ .Descr }}"
+ />
</a>
</div>
diff --git a/src/http/tpl/post-edit.html b/src/http/tpl/post-edit.html
index 4c08744..c66b60a 100644
--- a/src/http/tpl/post-edit.html
+++ b/src/http/tpl/post-edit.html
@@ -25,6 +25,7 @@
<input
name="id"
type="text"
+ required
placeholder="e.g. how-to-fly-a-kite"
value="{{ .Payload.Post.ID }}" />
{{ else if .Payload.IsDraft }}
@@ -43,6 +44,7 @@
<input
name="tags"
type="text"
+ required
value="{{- range $i, $tag := .Payload.Post.Tags -}}
{{- if ne $i 0 }} {{ end }}{{ $tag -}}
{{- end -}}
@@ -75,6 +77,7 @@
<input
name="title"
type="text"
+ required
value="{{ .Payload.Post.Title }}" />
</td>
</tr>
@@ -89,11 +92,33 @@
</td>
</tr>
+ <tr>
+ <td>Format</td>
+ <td>
+ <select name="format" required>
+ <option value=""></option>
+
+ {{ $format := .Payload.Post.Format }}
+ {{ range .Payload.Formats -}}
+ <option
+ {{- if eq . $format }}
+ selected
+ {{- end }}
+ value="{{ . }}" >
+ {{ . }}
+ </option>
+ {{- end }}
+
+ </select>
+ </td>
+ </tr>
+
</table>
<p>
<textarea
name="body"
+ required
placeholder="Post body"
style="width:100%;height: 75vh;"
>