Skip to content

Commit

Permalink
feat: add curtain to toc popup
Browse files Browse the repository at this point in the history
  • Loading branch information
cotes2020 committed Oct 11, 2024
1 parent ed2842c commit 8287f52
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _sass/layout/post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ header {
#toc-popup {
$slide-in: slide-in 0.3s ease-out;
$slide-out: slide-out 0.3s ease-out;
$curtain-height: 2rem;

border-color: var(--toc-popup-border-color);
border-width: 1px;
Expand Down Expand Up @@ -469,10 +470,19 @@ header {
backdrop-filter: blur(5px);
}

&::after {
display: flex;
content: '';
position: relative;
background: linear-gradient(transparent, var(--main-bg) 70%);
height: $curtain-height;
}

#toc-popup-content {
overflow: auto;
max-height: calc(100vh - 4 * $topbar-height);
font-family: $font-family-heading;
margin-bottom: -$curtain-height;
}
}

Expand Down

0 comments on commit 8287f52

Please sign in to comment.