@vuepress/theme-default 2.0.0-beta.9 → 2.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/lib/client/components/AutoLink.vue +113 -0
- package/lib/client/components/DropdownTransition.vue +15 -24
- package/lib/client/components/Home.vue +12 -130
- package/lib/client/components/HomeContent.vue +5 -0
- package/lib/client/components/HomeFeatures.vue +22 -0
- package/lib/client/components/HomeFooter.vue +17 -0
- package/lib/client/components/HomeHero.vue +97 -0
- package/lib/client/components/Navbar.vue +60 -95
- package/lib/client/components/NavbarBrand.vue +55 -0
- package/lib/client/components/NavbarDropdown.vue +126 -0
- package/lib/client/components/{NavbarLinks.vue → NavbarItems.vue} +81 -61
- package/lib/client/components/Page.vue +16 -15
- package/lib/client/components/PageMeta.vue +51 -66
- package/lib/client/components/PageNav.vue +61 -64
- package/lib/client/components/Sidebar.vue +12 -32
- package/lib/client/components/SidebarItem.vue +87 -0
- package/lib/client/components/SidebarItems.vue +57 -0
- package/lib/client/components/ToggleColorModeButton.vue +57 -0
- package/lib/client/components/ToggleSidebarButton.vue +21 -24
- package/lib/client/components/global/Badge.vue +24 -26
- package/lib/client/components/global/CodeGroup.d.ts +5 -4
- package/lib/client/components/global/CodeGroup.js +85 -17
- package/lib/client/components/global/CodeGroupItem.vue +22 -20
- package/lib/client/components/global/index.d.ts +4 -0
- package/lib/client/components/global/index.js +4 -0
- package/lib/client/composables/index.d.ts +5 -5
- package/lib/client/composables/index.js +5 -5
- package/lib/client/composables/useDarkMode.d.ts +12 -0
- package/lib/client/composables/useDarkMode.js +57 -0
- package/lib/client/composables/useScrollPromise.js +1 -1
- package/lib/client/composables/useSidebarItems.d.ts +14 -8
- package/lib/client/composables/useSidebarItems.js +49 -48
- package/lib/client/composables/useThemeData.d.ts +2 -2
- package/lib/client/composables/useThemeData.js +1 -1
- package/lib/client/composables/useUpdateDeviceStatus.d.ts +7 -0
- package/lib/client/composables/useUpdateDeviceStatus.js +25 -0
- package/lib/client/config.d.ts +4 -0
- package/lib/client/config.js +44 -0
- package/lib/client/index.d.ts +3 -4
- package/lib/client/index.js +3 -2
- package/lib/client/layouts/Layout.vue +133 -136
- package/lib/client/layouts/NotFound.vue +27 -0
- package/lib/client/shim.d.ts +5 -0
- package/lib/client/styles/{_wrapper.scss → _mixins.scss} +7 -2
- package/lib/client/styles/_variables.module.scss +5 -0
- package/lib/client/styles/_variables.scss +0 -34
- package/lib/client/styles/arrow.scss +4 -6
- package/lib/client/styles/badge.scss +14 -11
- package/lib/client/styles/code-group.scss +10 -10
- package/lib/client/styles/code.scss +33 -46
- package/lib/client/styles/custom-container.scss +82 -18
- package/lib/client/styles/home.scss +32 -24
- package/lib/client/styles/index.scss +4 -4
- package/lib/client/styles/layout.scss +82 -73
- package/lib/client/styles/{dropdown.scss → navbar-dropdown.scss} +36 -50
- package/lib/client/styles/navbar.scss +106 -50
- package/lib/client/styles/normalize.scss +199 -0
- package/lib/client/styles/page.scss +24 -8
- package/lib/client/styles/sidebar.scss +69 -87
- package/lib/client/styles/transitions.scss +13 -4
- package/lib/client/styles/vars-dark.scss +68 -0
- package/lib/client/styles/vars.scss +155 -0
- package/lib/client/utils/getNavLink.d.ts +15 -0
- package/lib/client/utils/getNavLink.js +18 -0
- package/lib/client/utils/getResolveRouteWithRedirect.d.ts +5 -0
- package/lib/client/{composables/useResolveRouteWithRedirect.js → utils/getResolveRouteWithRedirect.js} +4 -6
- package/lib/client/utils/index.d.ts +5 -2
- package/lib/client/utils/index.js +5 -2
- package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
- package/lib/client/utils/isActiveSidebarItem.js +20 -0
- package/lib/client/utils/resolveEditLink.d.ts +2 -2
- package/lib/client/utils/resolveEditLink.js +15 -9
- package/lib/client/utils/resolveRepoType.d.ts +1 -1
- package/lib/client/utils/resolveRepoType.js +4 -2
- package/lib/node/defaultTheme.d.ts +4 -4
- package/lib/node/defaultTheme.js +111 -48
- package/lib/node/index.d.ts +4 -4
- package/lib/node/index.js +5 -17
- package/lib/node/utils/assignDefaultLocaleOptions.d.ts +4 -2
- package/lib/node/utils/assignDefaultLocaleOptions.js +13 -13
- package/lib/node/utils/index.d.ts +2 -5
- package/lib/node/utils/index.js +2 -17
- package/lib/node/utils/resolveContainerPluginOptions.d.ts +2 -20
- package/lib/node/utils/resolveContainerPluginOptions.js +4 -66
- package/lib/shared/index.d.ts +3 -3
- package/lib/shared/index.js +3 -15
- package/lib/shared/nav.d.ts +16 -18
- package/lib/shared/nav.js +1 -2
- package/lib/shared/options.d.ts +51 -6
- package/lib/shared/options.js +1 -2
- package/lib/shared/page.d.ts +15 -6
- package/lib/shared/page.js +1 -2
- package/package.json +43 -25
- package/templates/build.html +34 -0
- package/CHANGELOG.md +0 -419
- package/lib/client/clientAppEnhance.d.ts +0 -3
- package/lib/client/clientAppEnhance.js +0 -28
- package/lib/client/clientAppSetup.d.ts +0 -2
- package/lib/client/clientAppSetup.js +0 -11
- package/lib/client/components/DropdownLink.vue +0 -141
- package/lib/client/components/NavLink.vue +0 -115
- package/lib/client/components/SidebarChild.d.ts +0 -6
- package/lib/client/components/SidebarChild.js +0 -91
- package/lib/client/components/global/OutboundLink.vue +0 -30
- package/lib/client/composables/useNavLink.d.ts +0 -9
- package/lib/client/composables/useNavLink.js +0 -15
- package/lib/client/composables/useResolveRouteWithRedirect.d.ts +0 -5
- package/lib/client/layouts/404.vue +0 -38
- package/lib/client/styles/_normalize.scss +0 -148
- package/lib/client/styles/plugins.scss +0 -18
- package/lib/client/styles/sr-only.scss +0 -12
- package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.js +0 -16
- package/lib/node/utils/resolveGitPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveGitPluginOptions.js +0 -22
- package/lib/node/utils/resolveMediumZoomPluginOptions.d.ts +0 -6
- package/lib/node/utils/resolveMediumZoomPluginOptions.js +0 -17
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
|
|
3
1
|
@import '_variables';
|
|
4
2
|
|
|
3
|
+
// Safari only support integer pixel value for line-height
|
|
4
|
+
// the original font-size is 16px, 1.375 will make line-height be 22px
|
|
5
|
+
$line-height: 1.375;
|
|
6
|
+
|
|
5
7
|
// ===============================
|
|
6
8
|
// Forked and modified from prismjs/themes/prism-tomorrow.css
|
|
7
9
|
|
|
@@ -9,7 +11,7 @@ code[class*='language-'],
|
|
|
9
11
|
pre[class*='language-'] {
|
|
10
12
|
color: #ccc;
|
|
11
13
|
background: none;
|
|
12
|
-
font-family:
|
|
14
|
+
font-family: var(--font-family-code);
|
|
13
15
|
font-size: 1em;
|
|
14
16
|
text-align: left;
|
|
15
17
|
white-space: pre;
|
|
@@ -118,27 +120,16 @@ pre[class*='language-'] {
|
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
.token.inserted {
|
|
121
|
-
color:
|
|
123
|
+
color: #3eaf7c;
|
|
122
124
|
}
|
|
123
125
|
|
|
124
126
|
// ===============================
|
|
125
127
|
|
|
126
|
-
|
|
127
|
-
code {
|
|
128
|
-
color: color.scale($textColor, $lightness: 20%);
|
|
129
|
-
padding: 0.25rem 0.5rem;
|
|
130
|
-
margin: 0;
|
|
131
|
-
font-size: 0.85em;
|
|
132
|
-
background-color: rgba(27, 31, 35, 0.05);
|
|
133
|
-
border-radius: 3px;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
#{$contentClass} {
|
|
128
|
+
.theme-default-content {
|
|
138
129
|
pre,
|
|
139
130
|
pre[class*='language-'] {
|
|
140
|
-
line-height:
|
|
141
|
-
padding: 1.
|
|
131
|
+
line-height: $line-height;
|
|
132
|
+
padding: 1.3rem 1.5rem;
|
|
142
133
|
margin: 0.85rem 0;
|
|
143
134
|
border-radius: 6px;
|
|
144
135
|
overflow: auto;
|
|
@@ -146,31 +137,32 @@ pre[class*='language-'] {
|
|
|
146
137
|
code {
|
|
147
138
|
color: #fff;
|
|
148
139
|
padding: 0;
|
|
149
|
-
background-color: transparent;
|
|
140
|
+
background-color: transparent !important;
|
|
150
141
|
border-radius: 0;
|
|
142
|
+
overflow-wrap: unset;
|
|
151
143
|
-webkit-font-smoothing: auto;
|
|
152
144
|
-moz-osx-font-smoothing: auto;
|
|
153
145
|
}
|
|
154
146
|
}
|
|
155
147
|
|
|
156
148
|
.line-number {
|
|
157
|
-
font-family:
|
|
158
|
-
monospace;
|
|
149
|
+
font-family: var(--font-family-code);
|
|
159
150
|
}
|
|
160
151
|
}
|
|
161
152
|
|
|
162
153
|
div[class*='language-'] {
|
|
163
154
|
position: relative;
|
|
164
|
-
background-color:
|
|
155
|
+
background-color: var(--code-bg-color);
|
|
165
156
|
border-radius: 6px;
|
|
166
157
|
|
|
167
158
|
&::before {
|
|
159
|
+
content: attr(data-title);
|
|
168
160
|
position: absolute;
|
|
169
161
|
z-index: 3;
|
|
170
162
|
top: 0.8em;
|
|
171
163
|
right: 1em;
|
|
172
164
|
font-size: 0.75rem;
|
|
173
|
-
color:
|
|
165
|
+
color: var(--code-ln-color);
|
|
174
166
|
}
|
|
175
167
|
|
|
176
168
|
pre,
|
|
@@ -188,10 +180,10 @@ div[class*='language-'] {
|
|
|
188
180
|
top: 0;
|
|
189
181
|
left: 0;
|
|
190
182
|
width: 100%;
|
|
191
|
-
line-height:
|
|
183
|
+
line-height: $line-height;
|
|
192
184
|
|
|
193
185
|
.highlight-line {
|
|
194
|
-
background-color:
|
|
186
|
+
background-color: var(--code-hl-bg-color);
|
|
195
187
|
}
|
|
196
188
|
}
|
|
197
189
|
|
|
@@ -212,13 +204,13 @@ div[class*='language-'] {
|
|
|
212
204
|
left: 0;
|
|
213
205
|
top: 0;
|
|
214
206
|
display: block;
|
|
215
|
-
width:
|
|
207
|
+
width: var(--code-ln-wrapper-width);
|
|
216
208
|
height: 100%;
|
|
217
209
|
}
|
|
218
210
|
}
|
|
219
211
|
|
|
220
212
|
pre {
|
|
221
|
-
margin-left:
|
|
213
|
+
margin-left: var(--code-ln-wrapper-width);
|
|
222
214
|
padding-left: 1rem;
|
|
223
215
|
vertical-align: middle;
|
|
224
216
|
}
|
|
@@ -226,21 +218,24 @@ div[class*='language-'] {
|
|
|
226
218
|
.line-numbers {
|
|
227
219
|
position: absolute;
|
|
228
220
|
top: 0;
|
|
229
|
-
width:
|
|
221
|
+
width: var(--code-ln-wrapper-width);
|
|
230
222
|
text-align: center;
|
|
231
|
-
color:
|
|
223
|
+
color: var(--code-ln-color);
|
|
232
224
|
padding-top: 1.25rem;
|
|
233
|
-
line-height:
|
|
234
|
-
|
|
235
|
-
br {
|
|
236
|
-
user-select: none;
|
|
237
|
-
}
|
|
225
|
+
line-height: $line-height;
|
|
226
|
+
counter-reset: line-number;
|
|
238
227
|
|
|
239
228
|
.line-number {
|
|
240
229
|
position: relative;
|
|
241
230
|
z-index: 3;
|
|
242
231
|
user-select: none;
|
|
243
|
-
|
|
232
|
+
height: #{$line-height}em;
|
|
233
|
+
|
|
234
|
+
&::before {
|
|
235
|
+
counter-increment: line-number;
|
|
236
|
+
content: counter(line-number);
|
|
237
|
+
font-size: 0.85em;
|
|
238
|
+
}
|
|
244
239
|
}
|
|
245
240
|
}
|
|
246
241
|
|
|
@@ -249,25 +244,17 @@ div[class*='language-'] {
|
|
|
249
244
|
position: absolute;
|
|
250
245
|
top: 0;
|
|
251
246
|
left: 0;
|
|
252
|
-
width:
|
|
247
|
+
width: var(--code-ln-wrapper-width);
|
|
253
248
|
height: 100%;
|
|
254
249
|
border-radius: 6px 0 0 6px;
|
|
255
|
-
border-right: 1px solid
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
@each $lang in $codeLang {
|
|
261
|
-
div[class*='language-'].ext-#{$lang} {
|
|
262
|
-
&:before {
|
|
263
|
-
content: '' + $lang;
|
|
250
|
+
border-right: 1px solid var(--code-hl-bg-color);
|
|
264
251
|
}
|
|
265
252
|
}
|
|
266
253
|
}
|
|
267
254
|
|
|
268
255
|
// narrow mobile
|
|
269
256
|
@media (max-width: $MQMobileNarrow) {
|
|
270
|
-
|
|
257
|
+
.theme-default-content {
|
|
271
258
|
div[class*='language-'] {
|
|
272
259
|
margin: 0.85rem -1.5rem;
|
|
273
260
|
border-radius: 0;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
|
|
3
|
-
@import '_variables';
|
|
4
|
-
|
|
5
1
|
.custom-container {
|
|
2
|
+
transition:
|
|
3
|
+
color var(--t-color),
|
|
4
|
+
border-color var(--t-color),
|
|
5
|
+
background-color var(--t-color);
|
|
6
|
+
|
|
6
7
|
.custom-container-title {
|
|
7
8
|
font-weight: 600;
|
|
8
|
-
|
|
9
|
+
&:not(:only-child) {
|
|
10
|
+
margin-bottom: -0.4rem;
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
&.tip,
|
|
@@ -18,35 +21,92 @@
|
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
&.tip {
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
border-color: var(--c-tip);
|
|
25
|
+
background-color: var(--c-tip-bg);
|
|
26
|
+
color: var(--c-tip-text);
|
|
27
|
+
|
|
28
|
+
.custom-container-title {
|
|
29
|
+
color: var(--c-tip-title);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
a {
|
|
33
|
+
color: var(--c-tip-text-accent);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
code {
|
|
37
|
+
background-color: var(--c-bg-dark);
|
|
38
|
+
}
|
|
23
39
|
}
|
|
24
40
|
|
|
25
41
|
&.warning {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
color:
|
|
42
|
+
border-color: var(--c-warning);
|
|
43
|
+
background-color: var(--c-warning-bg);
|
|
44
|
+
color: var(--c-warning-text);
|
|
29
45
|
|
|
30
46
|
.custom-container-title {
|
|
31
|
-
color:
|
|
47
|
+
color: var(--c-warning-title);
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
a {
|
|
35
|
-
color:
|
|
51
|
+
color: var(--c-warning-text-accent);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
blockquote {
|
|
55
|
+
border-left-color: var(--c-warning-border-dark);
|
|
56
|
+
color: var(--c-warning-text-quote);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
code {
|
|
60
|
+
color: var(--c-warning-text-light);
|
|
61
|
+
background-color: var(--c-warning-bg-light);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
details {
|
|
65
|
+
background-color: var(--c-warning-details-bg);
|
|
66
|
+
|
|
67
|
+
code {
|
|
68
|
+
background-color: var(--c-warning-bg-lighter);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.external-link-icon {
|
|
73
|
+
--external-link-icon-color: var(--c-warning-text-quote);
|
|
36
74
|
}
|
|
37
75
|
}
|
|
38
76
|
|
|
39
77
|
&.danger {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
color:
|
|
78
|
+
border-color: var(--c-danger);
|
|
79
|
+
background-color: var(--c-danger-bg);
|
|
80
|
+
color: var(--c-danger-text);
|
|
43
81
|
|
|
44
82
|
.custom-container-title {
|
|
45
|
-
color:
|
|
83
|
+
color: var(--c-danger-title);
|
|
46
84
|
}
|
|
47
85
|
|
|
48
86
|
a {
|
|
49
|
-
color:
|
|
87
|
+
color: var(--c-danger-text-accent);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
blockquote {
|
|
91
|
+
border-left-color: var(--c-danger-border-dark);
|
|
92
|
+
color: var(--c-danger-text-quote);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
code {
|
|
96
|
+
color: var(--c-danger-text-light);
|
|
97
|
+
background-color: var(--c-danger-bg-light);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
details {
|
|
101
|
+
background-color: var(--c-danger-details-bg);
|
|
102
|
+
|
|
103
|
+
code {
|
|
104
|
+
background-color: var(--c-danger-bg-lighter);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.external-link-icon {
|
|
109
|
+
--external-link-icon-color: var(--c-danger-text-quote);
|
|
50
110
|
}
|
|
51
111
|
}
|
|
52
112
|
|
|
@@ -56,7 +116,11 @@
|
|
|
56
116
|
border-radius: 2px;
|
|
57
117
|
margin: 1.6em 0;
|
|
58
118
|
padding: 1.6em;
|
|
59
|
-
background-color:
|
|
119
|
+
background-color: var(--c-details-bg);
|
|
120
|
+
|
|
121
|
+
code {
|
|
122
|
+
background-color: var(--c-bg-darker);
|
|
123
|
+
}
|
|
60
124
|
|
|
61
125
|
h4 {
|
|
62
126
|
margin-top: 0;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
|
|
3
1
|
@import '_variables';
|
|
4
2
|
|
|
5
3
|
.home {
|
|
6
|
-
padding:
|
|
7
|
-
max-width:
|
|
4
|
+
padding: var(--navbar-height) 2rem 0;
|
|
5
|
+
max-width: var(--homepage-width);
|
|
8
6
|
margin: 0px auto;
|
|
9
7
|
display: block;
|
|
10
8
|
|
|
@@ -28,11 +26,18 @@
|
|
|
28
26
|
margin: 1.8rem auto;
|
|
29
27
|
}
|
|
30
28
|
|
|
29
|
+
.actions {
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-wrap: wrap;
|
|
32
|
+
gap: 1rem;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
.description {
|
|
32
37
|
max-width: 35rem;
|
|
33
38
|
font-size: 1.6rem;
|
|
34
39
|
line-height: 1.3;
|
|
35
|
-
color:
|
|
40
|
+
color: var(--c-text-lightest);
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
.action-button {
|
|
@@ -42,36 +47,33 @@
|
|
|
42
47
|
border-width: 2px;
|
|
43
48
|
border-style: solid;
|
|
44
49
|
border-radius: 4px;
|
|
45
|
-
transition: background-color
|
|
50
|
+
transition: background-color var(--t-color);
|
|
46
51
|
box-sizing: border-box;
|
|
47
52
|
|
|
48
|
-
&:not(:first-child) {
|
|
49
|
-
margin-left: 1.5rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
53
|
&.primary {
|
|
53
|
-
color:
|
|
54
|
-
background-color:
|
|
55
|
-
border-color:
|
|
54
|
+
color: var(--c-bg);
|
|
55
|
+
background-color: var(--c-brand);
|
|
56
|
+
border-color: var(--c-brand);
|
|
56
57
|
&:hover {
|
|
57
|
-
background-color:
|
|
58
|
+
background-color: var(--c-brand-light);
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
&.secondary {
|
|
62
|
-
color:
|
|
63
|
-
background-color:
|
|
64
|
-
border-color:
|
|
63
|
+
color: var(--c-brand);
|
|
64
|
+
background-color: var(--c-bg);
|
|
65
|
+
border-color: var(--c-brand);
|
|
65
66
|
&:hover {
|
|
66
|
-
color:
|
|
67
|
-
background-color:
|
|
67
|
+
color: var(--c-bg);
|
|
68
|
+
background-color: var(--c-brand-light);
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
.features {
|
|
74
|
-
border-top: 1px solid
|
|
75
|
+
border-top: 1px solid var(--c-border);
|
|
76
|
+
transition: border-color var(--t-color);
|
|
75
77
|
padding: 1.2rem 0;
|
|
76
78
|
margin-top: 2.5rem;
|
|
77
79
|
display: flex;
|
|
@@ -91,19 +93,25 @@
|
|
|
91
93
|
font-weight: 500;
|
|
92
94
|
border-bottom: none;
|
|
93
95
|
padding-bottom: 0;
|
|
94
|
-
color:
|
|
96
|
+
color: var(--c-text-light);
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
p {
|
|
98
|
-
color:
|
|
100
|
+
color: var(--c-text-lighter);
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
|
|
104
|
+
.theme-default-content {
|
|
105
|
+
padding: 0;
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
102
109
|
.footer {
|
|
103
110
|
padding: 2.5rem;
|
|
104
|
-
border-top: 1px solid
|
|
111
|
+
border-top: 1px solid var(--c-border);
|
|
105
112
|
text-align: center;
|
|
106
|
-
color:
|
|
113
|
+
color: var(--c-text-lighter);
|
|
114
|
+
transition: border-color var(--t-color);
|
|
107
115
|
}
|
|
108
116
|
}
|
|
109
117
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use 'vars';
|
|
2
|
+
@use 'vars-dark';
|
|
3
|
+
@use 'normalize';
|
|
2
4
|
|
|
3
5
|
@use 'arrow';
|
|
4
6
|
@use 'badge';
|
|
5
7
|
@use 'code';
|
|
6
8
|
@use 'code-group';
|
|
7
9
|
@use 'custom-container';
|
|
8
|
-
@use 'dropdown';
|
|
9
10
|
@use 'home';
|
|
10
11
|
@use 'layout';
|
|
11
12
|
@use 'navbar';
|
|
13
|
+
@use 'navbar-dropdown';
|
|
12
14
|
@use 'page';
|
|
13
|
-
@use 'plugins';
|
|
14
15
|
@use 'sidebar';
|
|
15
|
-
@use 'sr-only';
|
|
16
16
|
@use 'toc';
|
|
17
17
|
@use 'transitions';
|
|
18
18
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
@import '_mixins';
|
|
1
2
|
@import '_variables';
|
|
2
|
-
@import '_wrapper';
|
|
3
|
-
|
|
4
|
-
$mobileSidebarWidth: $sidebarWidth * 0.82;
|
|
5
3
|
|
|
6
4
|
.page {
|
|
7
|
-
padding-
|
|
5
|
+
padding-top: var(--navbar-height);
|
|
6
|
+
padding-left: var(--sidebar-width);
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.navbar {
|
|
@@ -13,35 +12,42 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
|
|
|
13
12
|
top: 0;
|
|
14
13
|
left: 0;
|
|
15
14
|
right: 0;
|
|
16
|
-
height:
|
|
17
|
-
background-color: #fff;
|
|
15
|
+
height: var(--navbar-height);
|
|
18
16
|
box-sizing: border-box;
|
|
19
|
-
border-bottom: 1px solid
|
|
17
|
+
border-bottom: 1px solid var(--c-border);
|
|
18
|
+
background-color: var(--c-bg-navbar);
|
|
19
|
+
transition:
|
|
20
|
+
background-color var(--t-color),
|
|
21
|
+
border-color var(--t-color);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.sidebar {
|
|
23
25
|
font-size: 16px;
|
|
24
|
-
|
|
25
|
-
width: $sidebarWidth;
|
|
26
|
+
width: var(--sidebar-width);
|
|
26
27
|
position: fixed;
|
|
27
28
|
z-index: 10;
|
|
28
29
|
margin: 0;
|
|
29
|
-
top:
|
|
30
|
+
top: var(--navbar-height);
|
|
30
31
|
left: 0;
|
|
31
32
|
bottom: 0;
|
|
32
33
|
box-sizing: border-box;
|
|
33
|
-
border-right: 1px solid
|
|
34
|
+
border-right: 1px solid var(--c-border);
|
|
34
35
|
overflow-y: auto;
|
|
35
36
|
scrollbar-width: thin;
|
|
36
|
-
scrollbar-color:
|
|
37
|
+
scrollbar-color: var(--c-brand) var(--c-border);
|
|
38
|
+
background-color: var(--c-bg-sidebar);
|
|
39
|
+
transition:
|
|
40
|
+
transform var(--t-transform),
|
|
41
|
+
background-color var(--t-color),
|
|
42
|
+
border-color var(--t-color);
|
|
37
43
|
&::-webkit-scrollbar {
|
|
38
44
|
width: 7px;
|
|
39
45
|
}
|
|
40
46
|
&::-webkit-scrollbar-track {
|
|
41
|
-
background-color:
|
|
47
|
+
background-color: var(--c-border);
|
|
42
48
|
}
|
|
43
49
|
&::-webkit-scrollbar-thumb {
|
|
44
|
-
background-color:
|
|
50
|
+
background-color: var(--c-brand);
|
|
45
51
|
}
|
|
46
52
|
}
|
|
47
53
|
|
|
@@ -60,16 +66,43 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
|
|
|
60
66
|
.sidebar-mask {
|
|
61
67
|
display: block;
|
|
62
68
|
}
|
|
69
|
+
|
|
70
|
+
.navbar > .toggle-sidebar-button .icon {
|
|
71
|
+
span {
|
|
72
|
+
&:nth-child(1) {
|
|
73
|
+
transform: rotate(45deg) translate3d(5.5px, 5.5px, 0);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:nth-child(2) {
|
|
77
|
+
transform: scale3d(0, 1, 1);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:nth-child(3) {
|
|
81
|
+
transform: rotate(-45deg) translate3d(6px, -6px, 0);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:nth-child(1),
|
|
85
|
+
&:nth-child(3) {
|
|
86
|
+
transform-origin: center;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
63
90
|
}
|
|
64
91
|
|
|
65
92
|
&.no-navbar {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
93
|
+
.theme-default-content {
|
|
94
|
+
h1,
|
|
95
|
+
h2,
|
|
96
|
+
h3,
|
|
97
|
+
h4,
|
|
98
|
+
h5,
|
|
99
|
+
h6 {
|
|
100
|
+
margin-top: 1.5rem;
|
|
101
|
+
padding-top: 0;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.page {
|
|
73
106
|
padding-top: 0;
|
|
74
107
|
}
|
|
75
108
|
|
|
@@ -78,32 +111,40 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
|
|
|
78
111
|
}
|
|
79
112
|
}
|
|
80
113
|
}
|
|
114
|
+
.theme-container.no-sidebar {
|
|
115
|
+
.sidebar {
|
|
116
|
+
display: none;
|
|
81
117
|
|
|
82
|
-
@media (
|
|
83
|
-
|
|
84
|
-
.sidebar {
|
|
85
|
-
display: none;
|
|
118
|
+
@media (max-width: $MQMobile) {
|
|
119
|
+
display: block;
|
|
86
120
|
}
|
|
121
|
+
}
|
|
87
122
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
123
|
+
.page {
|
|
124
|
+
padding-left: 0;
|
|
91
125
|
}
|
|
92
126
|
}
|
|
93
127
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
128
|
+
.theme-default-content {
|
|
129
|
+
a:not(.header-anchor):hover {
|
|
130
|
+
text-decoration: underline;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
img {
|
|
134
|
+
max-width: 100%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
h1,
|
|
138
|
+
h2,
|
|
139
|
+
h3,
|
|
140
|
+
h4,
|
|
141
|
+
h5,
|
|
142
|
+
h6 {
|
|
143
|
+
margin-top: calc(0.5rem - var(--navbar-height));
|
|
144
|
+
padding-top: calc(1rem + var(--navbar-height));
|
|
103
145
|
margin-bottom: 0;
|
|
104
146
|
|
|
105
147
|
&:first-child {
|
|
106
|
-
margin-top: -1.5rem;
|
|
107
148
|
margin-bottom: 1rem;
|
|
108
149
|
|
|
109
150
|
+ p,
|
|
@@ -115,46 +156,15 @@ h6 {
|
|
|
115
156
|
}
|
|
116
157
|
}
|
|
117
158
|
|
|
118
|
-
#{$contentClass}:not(.custom) {
|
|
119
|
-
@extend %wrapper;
|
|
120
|
-
|
|
121
|
-
> *:first-child {
|
|
122
|
-
margin-top: $navbarHeight;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
a:hover {
|
|
126
|
-
text-decoration: underline;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
p.demo {
|
|
130
|
-
padding: 1rem 1.5rem;
|
|
131
|
-
border: 1px solid #ddd;
|
|
132
|
-
border-radius: 4px;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
img {
|
|
136
|
-
max-width: 100%;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
#{$contentClass}.custom {
|
|
141
|
-
padding: 0;
|
|
142
|
-
margin: 0;
|
|
143
|
-
|
|
144
|
-
img {
|
|
145
|
-
max-width: 100%;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
159
|
// narrow desktop / iPad
|
|
150
160
|
@media (max-width: $MQNarrow) {
|
|
151
161
|
.sidebar {
|
|
152
162
|
font-size: 15px;
|
|
153
|
-
width:
|
|
163
|
+
width: var(--sidebar-width-mobile);
|
|
154
164
|
}
|
|
155
165
|
|
|
156
166
|
.page {
|
|
157
|
-
padding-left:
|
|
167
|
+
padding-left: var(--sidebar-width-mobile);
|
|
158
168
|
}
|
|
159
169
|
}
|
|
160
170
|
|
|
@@ -162,9 +172,8 @@ h6 {
|
|
|
162
172
|
@media (max-width: $MQMobile) {
|
|
163
173
|
.sidebar {
|
|
164
174
|
top: 0;
|
|
165
|
-
padding-top:
|
|
175
|
+
padding-top: var(--navbar-height);
|
|
166
176
|
transform: translateX(-100%);
|
|
167
|
-
transition: transform 0.2s ease;
|
|
168
177
|
}
|
|
169
178
|
|
|
170
179
|
.page {
|