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">
|
||||
{% endblock %}
|
||||
|
||||
{# JavaScript #}
|
||||
<script src="/assets/js/details-utils.js" defer></script>
|
||||
|
||||
<title>
|
||||
{% block pageTitle %}{{ title + " | " if title }}{{ sitemeta.siteName | safe }}{% endblock %}
|
||||
</title>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
<aside class="left-sidebar">
|
||||
<details-utils force-open="(min-width: 60rem)" force-restore>
|
||||
<details class="toc__wrapper sidebar--sticky">
|
||||
<summary class="toc__heading">
|
||||
On This Page
|
||||
Table of Contents
|
||||
</summary>
|
||||
{{ content | toc | safe }}
|
||||
</details>
|
||||
</details-utils>
|
||||
</aside>
|
||||
|
||||
<style>
|
||||
|
|
Loading…
Reference in New Issue