1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | @import 'variables';
|
22 |
|
23 | .toc {
|
24 | position: fixed;
|
25 | width: $toc-width;
|
26 | height: calc(100% - #{$topbar-height});
|
27 |
|
28 | padding: 1rem;
|
29 |
|
30 | flex-shrink: 0;
|
31 |
|
32 | z-index: 1;
|
33 | overflow-y: auto;
|
34 | -webkit-overflow-scrolling: touch;
|
35 |
|
36 | background-color: #fff;
|
37 | border-right: 1px solid #e0e0e0;
|
38 | transition: all 300ms;
|
39 | white-space: nowrap;
|
40 |
|
41 | > div {
|
42 | padding-bottom: 80px;
|
43 | }
|
44 |
|
45 | .subpages {
|
46 | transition: max-height 0.3s;
|
47 | overflow: hidden;
|
48 | }
|
49 |
|
50 | li {
|
51 | list-style: none;
|
52 | line-height: 40px;
|
53 | }
|
54 |
|
55 | a {
|
56 | display: block;
|
57 | }
|
58 |
|
59 | .link {
|
60 | padding-left: 28px;
|
61 | color: $black-20;
|
62 | background: transparent;
|
63 | border-style: solid;
|
64 | border-width: 0 0 0 4px;
|
65 | border-color: transparent;
|
66 | &:hover {
|
67 | color: $white-40;
|
68 | }
|
69 | &.active {
|
70 | color: $primary;
|
71 | font-weight: bold;
|
72 | border-color: $primary;
|
73 | border-image: $gradient-2;
|
74 | border-image-slice: 2;
|
75 | }
|
76 | }
|
77 |
|
78 | .list-header {
|
79 | position: relative;
|
80 | font-weight: 600;
|
81 | font-size: 16px;
|
82 | line-height: 24px;
|
83 | padding: 24px 0 8px 24px;
|
84 | color: $white-40;
|
85 | }
|
86 |
|
87 | .list-header:not(.active):not(.expanded):before {
|
88 | content: '+';
|
89 | font-weight: 600;
|
90 | color: $white-40;
|
91 | position: absolute;
|
92 | top: 24px;
|
93 | right: 8px;
|
94 | font-size: 16px;
|
95 | line-height: 24px;
|
96 | }
|
97 |
|
98 | .list-header:not(.active):not(.expanded) + .subpages {
|
99 | max-height: 0 !important;
|
100 | }
|
101 | }
|
102 |
|
103 | .toc + * {
|
104 | margin-left: $toc-width;
|
105 | }
|
106 |
|
107 | @media screen and (max-width: $mobile) {
|
108 | .toc {
|
109 | position: absolute;
|
110 | width: 100vw;
|
111 | height: 0;
|
112 | padding: 0;
|
113 |
|
114 | > div {
|
115 | padding-top: $topbar-maxheight;
|
116 | padding-bottom: 1rem;
|
117 | }
|
118 |
|
119 | &.open {
|
120 | padding: 1rem;
|
121 | height: 100%;
|
122 | & + * {
|
123 | display: none;
|
124 | }
|
125 | }
|
126 |
|
127 | & + * {
|
128 | margin-left: 0;
|
129 | }
|
130 | }
|
131 | }
|