mediocre-blog/srv/src/http/tpl/index.html

32 lines
648 B
HTML
Raw Normal View History

{{ define "body" }}
2022-05-15 03:30:18 +00:00
{{ if ge .Payload.PrevPage 0 }}
2022-05-20 23:43:47 +00:00
<p>
<a href="?p={{ .Payload.PrevPage}}">&lt; &lt; Previous Page</a>
2022-05-20 23:43:47 +00:00
</p>
2022-08-17 03:55:32 +00:00
{{ else }}
<p>
Welcome to the Mediocre Blog! Posts are listed in chronological order.
</p>
{{ end }}
2022-05-20 23:43:47 +00:00
2022-08-17 04:24:39 +00:00
<table>
{{ range .Payload.Posts }}
2022-08-17 04:24:39 +00:00
<tr>
<td>{{ DateTimeFormat .PublishedAt }}</td>
<td><a href="{{ PostURL .ID }}">{{ .Title }}</td>
<td><em>{{ .Description }}</em></td>
</tr>
{{ end }}
2022-08-17 04:24:39 +00:00
</table>
{{ if ge .Payload.NextPage 0 }}
<p>
<a href="?p={{ .Payload.NextPage}}">Next Page &gt; &gt;</a>
</p>
2022-05-15 03:30:18 +00:00
{{ end }}
2022-05-15 02:42:43 +00:00
{{ end }}
{{ template "base.html" . }}