Initial Commit
[ancientarts.git] / hugo / themes / ancientarts / layouts / _default / single.html
1 {{- define "main" -}}
2 {{- if (gt (len (findRE "<h1" .Content)) 0) }}
3 <section>
4 {{ replaceRE "(<h1.*</h1>)" "</section>\n$1\n<section>" .Content | strings.TrimLeft "\n " | safeHTML }}
5 {{- else -}}
6 <section>
7 {{ .Content | replaceRE "\n" "\n " | safeHTML }}
8 {{- end }}
9 </section>
10 {{ if .Params.categories }}[{{ range .Params.categories }} <a href="/categories/{{ . }}">@{{ . }}</a> {{ end }}]{{ end }}
11 {{ if .Params.tags }}[{{ range .Params.tags }} <a href="/tags/{{ . }}">#{{ . }}</a> {{ end}}]{{ end }}
12 <div class="last-modified">Last modified {{ dateFormat "January 2 2006 15:04 MST" .Lastmod }}</div>
13 <div class="page-nav" align="center">
14 {{- if .NextInSection }}
15 <a href="{{ .NextInSection.Permalink }}">Newer</a>
16 {{- end }}
17 <a href="{{ .Parent.Permalink }}">&lt;{{ .Parent.Name }}&gt;</a>
18 {{- if .PrevInSection }}
19 <a href="{{ .PrevInSection.Permalink }}">Older</a>
20 {{- end }}
21 </div>
22 {{- end -}}