Commit 8a91c0ec authored by Jamie Tanna's avatar Jamie Tanna

List child sections in /events/

With help from [0], render each of the child sections nicely so viewers
can hit /events/ and see which events are around, without having to know
to go to /events/homebrew-website-club-nottingham/ etc.

Create a separate file `section-summary` for easier template
readability.

As part of jvt.me#395.

[0]: https://stackoverflow.com/a/47971998
parent e40cd87e
......@@ -2,8 +2,16 @@
<main>
<div class="catalogue">
{{ range (.Paginate .Pages).Pages }}
{{ .Render "summary" }}
{{ if (eq $.Title "Events") }}
{{ range (where .Site.Pages "Section" "events") }}
{{ range .Sections }}
{{ .Render "section-summary" }}
{{ end }}
{{ end }}
{{ else }}
{{ range (.Paginate .Pages).Pages }}
{{ .Render "summary" }}
{{ end }}
{{ end }}
</div>
......
<a href="{{ .Permalink }}" class="catalogue-item">
<div>
<h1 class="catalogue-title">{{ .Title }}</h1>
<div class="catalogue-line"></div>
<p>
{{ .Description | markdownify }}
</p>
</div>
</a>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment