2023-06-18 02:07:40 +07:00
|
|
|
button#toc {
|
|
|
|
background-color: transparent;
|
|
|
|
border: none;
|
|
|
|
text-align: left;
|
|
|
|
cursor: pointer;
|
|
|
|
padding: 0;
|
|
|
|
color: var(--dark);
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2023-06-10 13:06:02 +07:00
|
|
|
|
2023-06-18 02:07:40 +07:00
|
|
|
& h3 {
|
|
|
|
font-size: 1rem;
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0;
|
|
|
|
}
|
2023-06-10 13:06:02 +07:00
|
|
|
|
2023-06-18 02:07:40 +07:00
|
|
|
& .fold {
|
2023-07-23 07:27:41 +07:00
|
|
|
margin-left: 0.5rem;
|
2023-06-18 02:07:40 +07:00
|
|
|
transition: transform 0.3s ease;
|
|
|
|
opacity: 0.8;
|
|
|
|
}
|
2023-06-17 09:41:59 +07:00
|
|
|
|
2023-06-18 02:07:40 +07:00
|
|
|
&.collapsed .fold {
|
2023-07-23 07:27:41 +07:00
|
|
|
transform: rotateZ(-90deg);
|
2023-06-10 13:06:02 +07:00
|
|
|
}
|
2023-06-18 02:07:40 +07:00
|
|
|
}
|
2023-07-23 07:27:41 +07:00
|
|
|
|
2023-06-18 02:07:40 +07:00
|
|
|
#toc-content {
|
|
|
|
list-style: none;
|
|
|
|
overflow: hidden;
|
|
|
|
max-height: none;
|
2024-08-09 08:07:47 +07:00
|
|
|
transition:
|
|
|
|
max-height 0.5s ease,
|
|
|
|
visibility 0s linear 0s;
|
2023-11-30 01:50:26 +07:00
|
|
|
position: relative;
|
2024-08-09 08:07:47 +07:00
|
|
|
visibility: visible;
|
|
|
|
|
|
|
|
&.collapsed {
|
|
|
|
transition:
|
|
|
|
max-height 0.5s ease,
|
|
|
|
visibility 0s linear 0.5s;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2023-06-18 02:07:40 +07:00
|
|
|
|
2023-07-10 09:32:24 +07:00
|
|
|
&.collapsed > .overflow::after {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2023-06-10 13:06:02 +07:00
|
|
|
& ul {
|
|
|
|
list-style: none;
|
2023-06-17 09:41:59 +07:00
|
|
|
margin: 0.5rem 0;
|
2023-06-10 13:06:02 +07:00
|
|
|
padding: 0;
|
2023-06-17 09:41:59 +07:00
|
|
|
& > li > a {
|
|
|
|
color: var(--dark);
|
|
|
|
opacity: 0.35;
|
2023-08-24 05:16:04 +07:00
|
|
|
transition:
|
|
|
|
0.5s ease opacity,
|
|
|
|
0.3s ease color;
|
2023-06-17 09:41:59 +07:00
|
|
|
&.in-view {
|
|
|
|
opacity: 0.75;
|
|
|
|
}
|
|
|
|
}
|
2023-06-10 13:06:02 +07:00
|
|
|
}
|
|
|
|
|
2023-06-17 09:41:59 +07:00
|
|
|
@for $i from 0 through 6 {
|
2023-06-10 13:06:02 +07:00
|
|
|
& .depth-#{$i} {
|
|
|
|
padding-left: calc(1rem * #{$i});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|