erynwells.me/layouts/partials/single_main.html

37 lines
1 KiB
HTML

<article class="post-single">
<header>
{{ partial "development/draft_tag.html" . }}
<div class="post-title">
<h1>{{ .Title }}</h1>
{{ if not (eq .Type "page") }}
<div class="post-date"><time>{{ .Date | time.Format "January 2, 2006" }}</time></div>
{{ end }}
</div>
</header>
<section class="post-content">
{{ .Content }}
</section>
<footer>
{{- if .Params.tags -}}
<ul class="tags">
{{- range (.GetTerms "tags") -}}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end -}}
</ul>
{{- end -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ if and (gt (len $pages) 1) (in $pages . ) }}
<nav class="post-nav">
{{ with $pages.Prev . }}
<a class="prev" href="{{ .Permalink }}"><span></span><span>{{ .Name }}</span></a>
{{ end }}
{{ with $pages.Next . }}
<a class="next" href="{{ .Permalink }}"><span>{{ .Name }}</span><span></span></a>
{{ end }}
</nav>
{{ end }}
</footer>
</article>