hide TOC on narrow screens
This commit is contained in:
parent
ce4ddf5a17
commit
7b3ae4dea8
@ -102,7 +102,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="left-gutter">
|
<div class="left-gutter">
|
||||||
<Toc items={toc} />
|
{#if toc?.length !== 0}
|
||||||
|
<Toc items={toc} />
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="post">
|
<div class="post">
|
||||||
|
@ -37,8 +37,10 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
#toc {
|
#toc {
|
||||||
|
display: none;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 1.5rem;
|
top: 1.5rem;
|
||||||
|
margin-left: 1rem;
|
||||||
margin-right: 2rem;
|
margin-right: 2rem;
|
||||||
|
|
||||||
max-width: 14rem;
|
max-width: 14rem;
|
||||||
@ -49,6 +51,10 @@
|
|||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media(min-width: 1300px) {
|
||||||
|
#toc { display: block }
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes fade-in {
|
@keyframes fade-in {
|
||||||
from {opacity: 0}
|
from {opacity: 0}
|
||||||
to {opacity: 1}
|
to {opacity: 1}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user