Restructure all pages under article tag

This commit is contained in:
Will Faught
2022-12-11 00:09:41 -08:00
parent 6356e860e4
commit f74704bb8a
9 changed files with 122 additions and 251 deletions

View File

@@ -1,40 +1,14 @@
{{ define "main" }}
{{ if not (or .Title .Pages) }}
{{ partial "paige_content.html" . }}
{{ if .Pages }}
<section>
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
</section>
{{ else }}
<section>
{{ if .Title }}
<header>
<div class="row text-center">
<div class="col">
<h1 class="display-5 fw-bold">
{{ if .Params.link }}
<a href="{{ .Params.link }}">{{ .Title | markdownify }}</a>
{{ else }}
{{ .Title | markdownify }}
{{ end }}
</h1>
</div>
</div>
</header>
{{ end }}
{{ if .Pages }}
<div class="row">
<div class="col">
<div class="mx-auto text-center">
<ul class="list-inline">
{{ range (sort .Pages "Title") }}
<li class="list-inline-item">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
</div>
{{ end }}
<ul class="list-inline text-center">
{{ range (sort .Pages "Title") }}
<li class="list-inline-item">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</section>
{{ end }}
{{ end }}