This commit is contained in:
2026-04-29 19:04:20 +08:00
parent df60e8dd42
commit 07d11a15af
58 changed files with 3937 additions and 520 deletions
+66
View File
@@ -0,0 +1,66 @@
// =============================================================================
// components/_toc.scss
// Article Table of Contents sidebar widget.
// =============================================================================
.toc {
background: var(--color-background);
border: 1px solid var(--color-border);
border-radius: var(--card-radius);
position: sticky;
top: 80px;
max-height: calc(100vh - 120px);
overflow-y: auto;
scrollbar-width: thin;
.card-header {
background: transparent;
border-bottom: 1px solid var(--color-border);
}
.card-header-title {
font-size: 0.9rem;
color: var(--color-text);
}
.card-content {
padding: var(--space-2);
}
}
#toc-list {
ol {
list-style: decimal;
padding-left: var(--space-4);
margin: 0;
}
li {
margin-bottom: var(--space-2);
font-size: 0.85rem;
}
a {
color: var(--color-text);
text-decoration: none;
line-height: 1.4;
transition: color var(--transition-base);
display: block;
&:hover,
&.toc-active {
color: var(--color-primary);
}
&.toc-active {
font-weight: 600;
}
}
// Second-level (h3).
.toc-level-3 {
padding-left: var(--space-3);
list-style: disc;
color: #6b7280;
}
}