Fix styling issue with toc and search regression

This commit is contained in:
2026-04-20 12:48:10 -05:00
parent 72f8eee9cd
commit f4f3cb4e91
3 changed files with 22 additions and 9 deletions

View File

@@ -66,16 +66,23 @@
<section> <section>
<article data-pagefind-body> <article data-pagefind-body>
<h1>{{ h1 }}</h1> <h1>{{ h1 }}</h1>
<section>
<details class="toc"> <details class="toc">
<summary>Table of Contents</summary> <summary>Table of Contents</summary>
{{ content | toc(tags=['h2', 'h3', 'h4'], wrapper='div') | removeHash | safe }} {{ content | toc(tags=['h2', 'h3', 'h4'], wrapper='div') | removeHash | safe }}
</details> </details>
</article>
</section> </section>
{% endif %}
<section> <section>
{{ content | safe }} {{ content | safe }}
</section> </section>
</article>
</section>
{% endif %}
{% if not includeTOC %}
<section>
{{ content | safe }}
</section>
{% endif %}
</main> </main>
{% include "footer.njk" %} {% include "footer.njk" %}
{% include "weather.njk" %} {% include "weather.njk" %}

View File

@@ -10,6 +10,7 @@ pagination:
- galleryImages - galleryImages
- post - post
- posts - posts
- profilepic
- tagList - tagList
- tags - tags
- feed - feed

View File

@@ -1,5 +1,10 @@
details.toc {
padding-bottom: var(--space-m);
}
.toc { .toc {
& ol { & ol {
margin-bottom: 0;
margin-top: 0; margin-top: 0;
padding-left: var(--space-m); padding-left: var(--space-m);
} }