forked from spf13/hyde
-
Notifications
You must be signed in to change notification settings - Fork 203
Expand file tree
/
Copy pathhugo-toc.scss
More file actions
64 lines (51 loc) · 964 Bytes
/
Copy pathhugo-toc.scss
File metadata and controls
64 lines (51 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Hugo {{ .TableOfContents }}
$toc-background-color: #eee;
$toc-font-size: 0.9rem;
.toc-wrapper {
font-size: $toc-font-size;
margin-right: 1rem;
padding: 0.2em 0.5em 0.5em 0.5em;
background: $toc-background-color;
label {
background: url(/img/menu-close-dark.svg) no-repeat right center;
display: block;
cursor: pointer;
padding-left: 1em;
}
}
#TableOfContents {
margin-top: 0;
max-height: 80vh;
overflow: scroll;
> ul {
list-style-type: none;
padding-left: 0;
> li ul {
list-style-type: none;
padding-left: 1em;
}
}
li {
line-height: 1.25rem;
}
}
#TableOfContents li a {
display: inline-block;
width: 95%;
overflow: hidden;
text-overflow: ellipsis;
}
input#tocToggle {
display: none;
+ label {
font-weight: bold;
}
&:checked {
+ label {
background-image: url(/img/menu-open-dark.svg);
}
~ #TableOfContents {
height: 0;
}
}
}