hide TOC on narrow screens
This commit is contained in:
parent
ce4ddf5a17
commit
7b3ae4dea8
@ -102,7 +102,9 @@
|
||||
</div>
|
||||
|
||||
<div class="left-gutter">
|
||||
{#if toc?.length !== 0}
|
||||
<Toc items={toc} />
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="post">
|
||||
|
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user