Use details-utils to force open or close ToC based on viewports
This commit is contained in:
parent
de01b43d42
commit
f4ed35b9fb
|
@ -32,6 +32,9 @@
|
||||||
<link rel="manifest" href="/assets/favicon/site.webmanifest">
|
<link rel="manifest" href="/assets/favicon/site.webmanifest">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{# JavaScript #}
|
||||||
|
<script src="/assets/js/details-utils.js" defer></script>
|
||||||
|
|
||||||
<title>
|
<title>
|
||||||
{% block pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endblock %}
|
{% block pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endblock %}
|
||||||
</title>
|
</title>
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<aside class="left-sidebar">
|
<aside class="left-sidebar">
|
||||||
<details class="toc__wrapper sidebar--sticky">
|
<details-utils force-open="(min-width: 60rem)" force-restore>
|
||||||
<summary class="toc__heading">
|
<details class="toc__wrapper sidebar--sticky">
|
||||||
On This Page
|
<summary class="toc__heading">
|
||||||
</summary>
|
Table of Contents
|
||||||
{{ content | toc | safe }}
|
</summary>
|
||||||
</details>
|
{{ content | toc | safe }}
|
||||||
|
</details>
|
||||||
|
</details-utils>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
Loading…
Reference in New Issue