erynwells.me/layouts/_default/single.html
Eryn Wells 501dc6ed51 Rearrange the post header
Dates will flow below the header if the header is too long.

Move the draft up to the top, above the header.
2022-03-25 23:24:29 -07:00

37 lines
1.1 KiB
HTML

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