From 8889ab63ebf579d7f134d4e83ab21533ad5bda87 Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sat, 28 Sep 2024 16:38:19 +0000
Subject: [PATCH] fix: provide default pageTitleSuffix (closes #1452)
---
quartz/components/styles/toc.scss | 40 +++++++++++++++++++++++++++++++++-------
1 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss
index 9c0a4b2..512b01d 100644
--- a/quartz/components/styles/toc.scss
+++ b/quartz/components/styles/toc.scss
@@ -1,3 +1,12 @@
+.toc {
+ display: flex;
+ flex-direction: column;
+ &.desktop-only {
+ display: flex;
+ max-height: 40%;
+ }
+}
+
button#toc {
background-color: transparent;
border: none;
@@ -15,21 +24,34 @@
}
& .fold {
- margin-left: 0.5rem;
+ margin-left: 0.5rem;
transition: transform 0.3s ease;
opacity: 0.8;
}
&.collapsed .fold {
- transform: rotateZ(-90deg)
+ transform: rotateZ(-90deg);
}
}
-
+
#toc-content {
list-style: none;
overflow: hidden;
- max-height: none;
- transition: max-height 0.5s ease;
+ overflow-y: auto;
+ max-height: 100%;
+ transition:
+ max-height 0.35s ease,
+ visibility 0s linear 0s;
+ position: relative;
+ visibility: visible;
+
+ &.collapsed {
+ max-height: 0;
+ transition:
+ max-height 0.35s ease,
+ visibility 0s linear 0.35s;
+ visibility: hidden;
+ }
&.collapsed > .overflow::after {
opacity: 0;
@@ -42,12 +64,17 @@
& > li > a {
color: var(--dark);
opacity: 0.35;
- transition: 0.5s ease opacity, 0.3s ease color;
+ transition:
+ 0.5s ease opacity,
+ 0.3s ease color;
&.in-view {
opacity: 0.75;
}
}
}
+ > ul.overflow {
+ max-height: none;
+ }
@for $i from 0 through 6 {
& .depth-#{$i} {
@@ -55,4 +82,3 @@
}
}
}
-
--
Gitblit v1.10.0