1
mirror of https://github.com/jlelse/GoBlog synced 2024-06-02 16:54:27 +00:00
GoBlog/templates/index.gohtml

21 lines
436 B
Plaintext

{{ define "title" }}
<title>{{ blog.Title }}</title>
{{ end }}
{{ define "main" }}
<main>
{{ range $i, $post := .Posts }}
{{ include "summary" . }}
{{ end }}
{{ if .HasPrev }}
<p><a href="{{ .Prev }}">Prev</a></p>
{{ end }}
{{ if .HasNext }}
<p><a href="{{ .Next }}">Next</a></p>
{{ end }}
</main>
{{ end }}
{{ define "index" }}
{{ template "base" . }}
{{ end }}