hide TOC on narrow screens

This commit is contained in:
Joseph Montanaro 2023-09-23 20:03:00 -07:00
parent ce4ddf5a17
commit 7b3ae4dea8
2 changed files with 9 additions and 1 deletions

View File

@ -102,7 +102,9 @@
</div>
<div class="left-gutter">
{#if toc?.length !== 0}
<Toc items={toc} />
{/if}
</div>
<div class="post">

View File

@ -37,8 +37,10 @@
<style>
#toc {
display: none;
position: sticky;
top: 1.5rem;
margin-left: 1rem;
margin-right: 2rem;
max-width: 14rem;
@ -49,6 +51,10 @@
animation-fill-mode: forwards;
}
@media(min-width: 1300px) {
#toc { display: block }
}
@keyframes fade-in {
from {opacity: 0}
to {opacity: 1}