2023-09-01 17:38:59 +00:00
|
|
|
@use "variables";
|
|
|
|
|
|
|
|
.toc-wrapper {
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
2023-09-02 01:59:23 +00:00
|
|
|
|
|
|
|
.title {
|
|
|
|
margin-top: 20px;
|
|
|
|
}
|
2023-09-01 17:38:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.toc {
|
|
|
|
height: 100vh;
|
2023-09-02 03:25:11 +00:00
|
|
|
box-sizing: border-box;
|
2023-09-01 17:38:59 +00:00
|
|
|
|
|
|
|
ul {
|
|
|
|
list-style-type: none;
|
|
|
|
padding-inline-start: 0;
|
|
|
|
|
|
|
|
li {
|
|
|
|
font-size: 14px;
|
2023-09-02 01:59:23 +00:00
|
|
|
display: block;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
// background-color: var(--link-hover-color);
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
display: block;
|
2023-09-08 10:10:52 +00:00
|
|
|
// padding: 10px;
|
2023-09-02 01:59:23 +00:00
|
|
|
color: var(--text-color);
|
|
|
|
border-left: 4px solid transparent;
|
|
|
|
border-radius: unset;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: unset;
|
|
|
|
border-left-color: var(--link-color);
|
|
|
|
color: var(--link-color);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.active {
|
|
|
|
&:first {
|
|
|
|
border: 1px solid orange;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
background-color: var(--link-hover-color);
|
|
|
|
}
|
|
|
|
}
|
2023-09-01 17:38:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-02 03:25:11 +00:00
|
|
|
@media screen and (max-width: variables.$tocBreakpoint) {
|
2023-09-01 17:38:59 +00:00
|
|
|
.toc {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-09-02 03:25:11 +00:00
|
|
|
@media screen and (min-width: variables.$tocBreakpoint) {
|
2023-09-01 17:38:59 +00:00
|
|
|
.article {
|
|
|
|
flex-grow: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.toc {
|
2023-09-02 03:25:11 +00:00
|
|
|
flex: 0 0 variables.$tocWidth;
|
|
|
|
max-width: variables.$tocWidth;
|
2023-09-01 17:38:59 +00:00
|
|
|
|
|
|
|
position: sticky;
|
|
|
|
top: 0;
|
|
|
|
padding: 20px;
|
|
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
}
|