summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl/edit-post.html
blob: 9e30d4dad23bb1ee4b00203084da3b0e22b57d48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{{ define "body" }}

  <form method="POST" action="{{ BlogURL "posts/" }}">

    <div class="row">

      <div class="columns six">
        <label for="idInput">Unique ID (e.g. "how-to-fly-a-kite")</label>
        <input
            id="idInput"
            name="id"
            class="u-full-width"
            type="text"
            value="{{ .Payload.ID }}" />
      </div>

      <div class="columns three">
        <label for="tagsInput">Tags (space separated)</label>
        <input
            id="tagsInput"
            name="tags"
            class="u-full-width"
            type="text"
            value="{{ range $i, $tag := .Payload.Tags }}{{ if ne $i 0 }} {{ end }}{{ $tag }}{{ end }}" />
      </div>

      <div class="columns three">
        <label for="seriesInput">Series</label>
        <input
            id="seriesInput"
            name="series"
            class="u-full-width"
            type="text"
            value="{{ .Payload.Series }}" />
      </div>

    </div>

    <div class="row">

      <div class="columns six">
        <label for="titleInput">Title</label>
        <input
            id="titleInput"
            name="title"
            class="u-full-width"
            type="text"
            value="{{ .Payload.Title }}" />
      </div>

      <div class="columns six">
        <label for="descrInput">Description</label>
        <input
            id="descrInput"
            name="description"
            class="u-full-width"
            type="text"
            value="{{ .Payload.Description }}" />
      </div>

    </div>

    <div class="row">
      <div class="columns twelve">
       <textarea
         name="body"
         class="u-full-width"
         placeholder="Blog body"
         style="height: 50vh;"
         >
         {{ .Payload.Body }}
       </textarea>
      </div>
    </div>

    <input type="submit" value="Save" />

  </form>

{{ end }}

{{ template "base.html" . }}