add a TOC, more nutrition info stuff, update some styles and templates

This commit is contained in:
Joshua Seigler 2025-06-19 15:54:29 -04:00
parent 863ed9c128
commit a29ee38e0e
18 changed files with 534 additions and 86 deletions

View file

@ -1,27 +1,29 @@
---
layout: "base.njk"
---
{{ content | safe }}
{%- for name, collection in collections -%}
{%- if name in ["posts"] -%}
<h2>{{name | capitalize }}</h2>
<ul class="collection">
{%- for item in collection | reverse -%}
{%- if (loop.index <= 5) -%}
<li>
<a href="{{item.url}}">{{item.data.title}}</a>
{%- if item.data.date -%}
<aside>{{item.data.date | formatDate("MMMM DD, YYYY") }}</aside>
{%- endif -%}
<p>{{item.data.description | safe}}</p>
</li>
{%- endif -%}
{%- if (loop.index == 6) -%}
<li>
<a href="/{{name}}/">More {{name}}&hellip;</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
{%- endif -%}
{%- endfor -%}
<main data-pagefind-body>
{{ content | safe }}
{%- for name, collection in collections -%}
{%- if name in ["posts"] -%}
<h2>{{name | capitalize }}</h2>
<ul class="collection">
{%- for item in collection | reverse -%}
{%- if (loop.index <= 5) -%}
<li>
<a href="{{item.url}}">{{item.data.title}}</a>
{%- if item.data.date -%}
<aside>{{item.data.date | formatDate("MMMM DD, YYYY") }}</aside>
{%- endif -%}
<p>{{item.data.description | safe}}</p>
</li>
{%- endif -%}
{%- if (loop.index == 6) -%}
<li>
<a href="/{{name}}/">More {{name}}&hellip;</a>
</li>
{%- endif -%}
{%- endfor -%}
</ul>
{%- endif -%}
{%- endfor -%}
</main>