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

33 lines
720 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>
2022-08-17 04:37:11 +00:00
Welcome to the Mediocre Blog! Posts are listed in chronological order. If
you aren't sure of where to start I recommend picking at random.
2022-08-17 03:55:32 +00:00
</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" . }}