A grid layout

This commit is contained in:
Eryn Wells 2022-08-31 20:11:59 -07:00
parent d281f22242
commit ce530b20a1
6 changed files with 168 additions and 54 deletions

View file

@ -1,5 +1,5 @@
{{ define "main" }}
<article class="post-single">
<article class="single">
<header>
{{ partial "development/draft_tag.html" . }}
<div class="post-title">
@ -7,11 +7,11 @@
<div class="post-date"><time>{{ .Date | time.Format "January 2, 2006" }}</time></div>
</div>
</header>
<section class="post-content">
<section>
{{ .Content }}
</section>
<!-- Post Tags -->
{{ if .Params.tags }}
<footer>
<ul class="post-tags">
@ -19,19 +19,18 @@
<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>
{{ $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 }}
</nav>
</footer>
{{ end }}
</article>
{{ end }}