From 8fd75ffbfda30edd5a134a1fbf9b81ac3cebb2ff Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Jul 2023 00:42:00 +0000
Subject: [PATCH] support attachments folder

---
 quartz/components/styles/toc.scss |   56 ++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 38 insertions(+), 18 deletions(-)

diff --git a/quartz/components/styles/toc.scss b/quartz/components/styles/toc.scss
index 3003f40..3fac443 100644
--- a/quartz/components/styles/toc.scss
+++ b/quartz/components/styles/toc.scss
@@ -1,22 +1,40 @@
-details.toc {
-  & summary {
-    cursor: pointer;
+button#toc {
+  background-color: transparent;
+  border: none;
+  text-align: left;
+  cursor: pointer;
+  padding: 0;
+  color: var(--dark);
+  display: flex;
+  align-items: center;
 
-    list-style: none;
-    &::marker, &::-webkit-details-marker {
-      display: none;
-    }
-
-    & > * {
-      display: inline-block;
-      margin: 0;
-    }
-
-    & > h3 {
-      font-size: 1rem;
-    }
+  & h3 {
+    font-size: 1rem;
+    display: inline-block;
+    margin: 0;
   }
-    
+
+  & .fold {
+    margin-left: 0.5rem;
+    transition: transform 0.3s ease;
+    opacity: 0.8;
+  }
+
+  &.collapsed .fold {
+    transform: rotateZ(-90deg);
+  }
+}
+
+#toc-content {
+  list-style: none;
+  overflow: hidden;
+  max-height: none;
+  transition: max-height 0.5s ease;
+
+  &.collapsed > .overflow::after {
+    opacity: 0;
+  }
+
   & ul {
     list-style: none;
     margin: 0.5rem 0;
@@ -24,7 +42,9 @@
     & > li > a {
       color: var(--dark);
       opacity: 0.35;
-      transition: 0.5s ease opacity;
+      transition:
+        0.5s ease opacity,
+        0.3s ease color;
       &.in-view {
         opacity: 0.75;
       }

--
Gitblit v1.10.0