mirror of https://github.com/jlelse/GoBlog
24 lines
587 B
Plaintext
24 lines
587 B
Plaintext
{{ define "title" }}
|
|
<title>{{ blog.Title }}</title>
|
|
{{ end }}
|
|
|
|
{{ define "main" }}
|
|
<main>
|
|
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
|
{{ with .Description }}{{ md . }}{{ end }}
|
|
{{ if (or .Title .Description) }}<hr>{{ end }}
|
|
{{ 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 }} |