Change empty lists to show page title

master
Will Faught 3 years ago
parent 94427ba093
commit a37377f940

@ -57,8 +57,7 @@ Single pages use the `link` front matter parameter, if any, as the
reference for an anchor around the page title, if any. reference for an anchor around the page title, if any.
List and term pages show page titles and descriptions per month and year List and term pages show page titles and descriptions per month and year
in descending order. An empty list has a "Nothing Here" header, and no in descending order. An empty list has a "Nothing here" body.
body.
Taxonomy pages list term links in an inline, unordered, sorted list. Taxonomy pages list term links in an inline, unordered, sorted list.

@ -0,0 +1,3 @@
---
title: Projects
---

@ -1,9 +1,4 @@
{{ define "main" }} {{ define "main" }}
{{ if not (or .Title .Description .Content .Pages) }}
<section>
<h1 class="display-5 fw-bold text-center">Nothing Here</h1>
</section>
{{ else }}
<section> <section>
{{ if or .Title .Description }} {{ if or .Title .Description }}
<header> <header>
@ -68,6 +63,8 @@
</footer> </footer>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if not (or .Content .Pages) }}
<p class="lead text-center">Nothing here</p>
{{ end }}
</section> </section>
{{ end }} {{ end }}
{{ end }}

Loading…
Cancel
Save