summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl/index.html
blob: b71dc01564b5f644f2d3c5feee1897fb678ea0ae (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
{{ define "body" }}
<ul id="posts-list">

  {{ range .Posts }}
  <li>
    <h2>
      <a href="{{ .HTTPPath }}">{{ .Title }}</a>
    </h2>
    <span>{{ .PublishedAt.Format "2006-01-02" }}</span>
    {{ if not .LastUpdatedAt.IsZero }}
    <span>(Updated {{ .LastUpdatedAt.Format "2006-01-02" }})</span>
    {{ end }}
    <p>{{ .Description }}</p>
  </li>
  {{ end }}

</ul>
{{ end }}

{{ if ge .PrevPage 0 }}
<a href="?p={{ .PrevPage}}">Previous</a>
{{ end }}

{{ if ge .NextPage 0 }}
<a href="?p={{ .NextPage}}">Next</a>
{{ end }}

{{ template "base.html" . }}