@vuepress/theme-default 2.0.0-beta.4 → 2.0.0-beta.40

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.
Files changed (132) hide show
  1. package/lib/{clientAppEnhance.d.ts → client/clientAppEnhance.d.ts} +0 -0
  2. package/lib/client/clientAppEnhance.js +34 -0
  3. package/lib/{clientAppSetup.d.ts → client/clientAppSetup.d.ts} +0 -0
  4. package/lib/client/clientAppSetup.js +6 -0
  5. package/lib/client/components/AutoLink.vue +113 -0
  6. package/lib/client/components/DropdownTransition.vue +21 -0
  7. package/lib/client/components/Home.vue +15 -0
  8. package/lib/client/components/HomeContent.vue +5 -0
  9. package/lib/client/components/HomeFeatures.vue +23 -0
  10. package/lib/client/components/HomeFooter.vue +17 -0
  11. package/lib/client/components/HomeHero.vue +97 -0
  12. package/lib/client/components/Navbar.vue +76 -0
  13. package/lib/client/components/NavbarBrand.vue +55 -0
  14. package/lib/client/components/NavbarDropdown.vue +126 -0
  15. package/lib/{components/NavbarLinks.vue → client/components/NavbarItems.vue} +27 -47
  16. package/lib/{components → client/components}/Page.vue +5 -15
  17. package/lib/{components → client/components}/PageMeta.vue +48 -59
  18. package/lib/{components → client/components}/PageNav.vue +43 -56
  19. package/lib/client/components/Sidebar.vue +13 -0
  20. package/lib/client/components/SidebarItem.vue +80 -0
  21. package/lib/client/components/SidebarItems.vue +54 -0
  22. package/lib/client/components/ToggleDarkModeButton.vue +57 -0
  23. package/lib/client/components/ToggleSidebarButton.vue +24 -0
  24. package/lib/client/components/global/Badge.vue +31 -0
  25. package/lib/client/components/global/CodeGroup.d.ts +5 -0
  26. package/lib/client/components/global/CodeGroup.js +107 -0
  27. package/lib/client/components/global/CodeGroupItem.vue +31 -0
  28. package/lib/{composables → client/composables}/index.d.ts +2 -0
  29. package/lib/{composables → client/composables}/index.js +2 -0
  30. package/lib/client/composables/useDarkMode.d.ts +12 -0
  31. package/lib/client/composables/useDarkMode.js +57 -0
  32. package/lib/{composables → client/composables}/useNavLink.d.ts +6 -1
  33. package/lib/{composables → client/composables}/useNavLink.js +0 -0
  34. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.d.ts +1 -1
  35. package/lib/{composables → client/composables}/useResolveRouteWithRedirect.js +1 -1
  36. package/lib/client/composables/useScrollPromise.d.ts +6 -0
  37. package/lib/client/composables/useScrollPromise.js +14 -0
  38. package/lib/{composables → client/composables}/useSidebarItems.d.ts +12 -7
  39. package/lib/client/composables/useSidebarItems.js +120 -0
  40. package/lib/{composables → client/composables}/useThemeData.d.ts +2 -2
  41. package/lib/{composables → client/composables}/useThemeData.js +1 -1
  42. package/lib/client/index.d.ts +4 -0
  43. package/lib/client/index.js +2 -0
  44. package/lib/client/layouts/404.vue +25 -0
  45. package/lib/client/layouts/Layout.vue +128 -0
  46. package/lib/{shim.d.ts → client/shim.d.ts} +0 -0
  47. package/lib/{styles/_wrapper.scss → client/styles/_mixins.scss} +7 -2
  48. package/lib/client/styles/_variables.scss +11 -0
  49. package/lib/{styles → client/styles}/arrow.scss +4 -6
  50. package/lib/{styles → client/styles}/badge.scss +9 -11
  51. package/lib/{styles → client/styles}/code-group.scss +9 -2
  52. package/lib/{styles → client/styles}/code.scss +21 -33
  53. package/lib/client/styles/custom-container.scss +88 -0
  54. package/lib/{styles → client/styles}/home.scss +27 -24
  55. package/lib/{styles → client/styles}/index.scss +4 -4
  56. package/lib/{styles → client/styles}/layout.scss +52 -35
  57. package/lib/{styles/dropdown.scss → client/styles/navbar-dropdown.scss} +37 -47
  58. package/lib/client/styles/navbar.scss +177 -0
  59. package/lib/client/styles/normalize.scss +172 -0
  60. package/lib/{styles → client/styles}/page.scss +15 -8
  61. package/lib/client/styles/sidebar.scss +134 -0
  62. package/lib/{styles → client/styles}/toc.scss +0 -0
  63. package/lib/client/styles/transitions.scss +22 -0
  64. package/lib/client/styles/vars-dark.scss +46 -0
  65. package/lib/client/styles/vars.scss +133 -0
  66. package/lib/{utils → client/utils}/index.d.ts +1 -0
  67. package/lib/{utils → client/utils}/index.js +1 -0
  68. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
  69. package/lib/client/utils/isActiveSidebarItem.js +20 -0
  70. package/lib/{utils → client/utils}/resolveEditLink.d.ts +1 -1
  71. package/lib/{utils → client/utils}/resolveEditLink.js +14 -8
  72. package/lib/client/utils/resolveRepoType.d.ts +2 -0
  73. package/lib/{utils → client/utils}/resolveRepoType.js +3 -1
  74. package/lib/node/defaultTheme.d.ts +10 -0
  75. package/lib/node/defaultTheme.js +122 -0
  76. package/lib/node/index.d.ts +5 -5
  77. package/lib/node/index.js +10 -6
  78. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +7 -0
  79. package/lib/node/{assignDefaultLocaleOptions.js → utils/assignDefaultLocaleOptions.js} +11 -9
  80. package/lib/node/utils/index.d.ts +2 -0
  81. package/lib/node/utils/index.js +18 -0
  82. package/lib/node/utils/resolveContainerPluginOptions.d.ts +8 -0
  83. package/lib/node/utils/resolveContainerPluginOptions.js +22 -0
  84. package/lib/{types → shared}/index.d.ts +0 -0
  85. package/lib/{types → shared}/index.js +5 -1
  86. package/lib/{types → shared}/nav.d.ts +11 -12
  87. package/lib/{types → shared}/nav.js +0 -0
  88. package/lib/{types → shared}/options.d.ts +42 -10
  89. package/lib/{types → shared}/options.js +0 -0
  90. package/lib/{types → shared}/page.d.ts +13 -5
  91. package/lib/{types → shared}/page.js +0 -0
  92. package/package.json +38 -29
  93. package/templates/build.html +33 -0
  94. package/CHANGELOG.md +0 -353
  95. package/lib/clientAppEnhance.js +0 -23
  96. package/lib/clientAppSetup.js +0 -11
  97. package/lib/components/DropdownLink.vue +0 -141
  98. package/lib/components/DropdownTransition.vue +0 -34
  99. package/lib/components/Home.vue +0 -133
  100. package/lib/components/NavLink.vue +0 -105
  101. package/lib/components/Navbar.vue +0 -113
  102. package/lib/components/Sidebar.vue +0 -38
  103. package/lib/components/SidebarChild.d.ts +0 -6
  104. package/lib/components/SidebarChild.js +0 -83
  105. package/lib/components/ToggleSidebarButton.vue +0 -27
  106. package/lib/components/global/Badge.vue +0 -37
  107. package/lib/components/global/CodeGroup.vue +0 -85
  108. package/lib/components/global/CodeGroupItem.vue +0 -25
  109. package/lib/components/global/OutboundLink.vue +0 -30
  110. package/lib/composables/useSidebarItems.js +0 -108
  111. package/lib/index.d.ts +0 -6
  112. package/lib/index.js +0 -67
  113. package/lib/layouts/404.vue +0 -38
  114. package/lib/layouts/Layout.vue +0 -132
  115. package/lib/node/assignDefaultLocaleOptions.d.ts +0 -5
  116. package/lib/node/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  117. package/lib/node/resolveActiveHeaderLinksPluginOptions.js +0 -16
  118. package/lib/node/resolveContainerPluginOptions.d.ts +0 -26
  119. package/lib/node/resolveContainerPluginOptions.js +0 -79
  120. package/lib/node/resolveGitPluginOptions.d.ts +0 -6
  121. package/lib/node/resolveGitPluginOptions.js +0 -22
  122. package/lib/node/resolveMediumZoomPluginOptions.d.ts +0 -6
  123. package/lib/node/resolveMediumZoomPluginOptions.js +0 -17
  124. package/lib/styles/_normalize.scss +0 -148
  125. package/lib/styles/_variables.scss +0 -34
  126. package/lib/styles/custom-container.scss +0 -78
  127. package/lib/styles/navbar.scss +0 -140
  128. package/lib/styles/plugins.scss +0 -18
  129. package/lib/styles/sidebar.scss +0 -147
  130. package/lib/styles/sr-only.scss +0 -12
  131. package/lib/styles/transitions.scss +0 -13
  132. package/lib/utils/resolveRepoType.d.ts +0 -2
@@ -1,7 +1,7 @@
1
1
  @import '_variables';
2
2
 
3
- %wrapper {
4
- max-width: $contentWidth;
3
+ @mixin content_wrapper {
4
+ max-width: var(--content-width);
5
5
  margin: 0 auto;
6
6
  padding: 2rem 2.5rem;
7
7
 
@@ -13,3 +13,8 @@
13
13
  padding: 1.5rem;
14
14
  }
15
15
  }
16
+
17
+ @mixin dropdown_wrapper {
18
+ transition: height 0.1s ease-out;
19
+ overflow: hidden;
20
+ }
@@ -0,0 +1,11 @@
1
+ @import '@vuepress/plugin-palette/palette';
2
+
3
+ // responsive breakpoints
4
+ $MQNarrow: 959px !default;
5
+ $MQMobile: 719px !default;
6
+ $MQMobileNarrow: 419px !default;
7
+
8
+ // code languages
9
+ $codeLang: 'c' 'cpp' 'cs' 'css' 'dart' 'docker' 'fs' 'go' 'html' 'java' 'js'
10
+ 'json' 'kt' 'less' 'makefile' 'md' 'php' 'py' 'rb' 'rs' 'sass' 'scss' 'sh'
11
+ 'styl' 'ts' 'toml' 'vue' 'yml' !default;
@@ -1,5 +1,3 @@
1
- @import '_variables';
2
-
3
1
  .arrow {
4
2
  display: inline-block;
5
3
  width: 0;
@@ -9,7 +7,7 @@
9
7
  border: {
10
8
  left: 4px solid transparent;
11
9
  right: 4px solid transparent;
12
- bottom: 6px solid $arrowBgColor;
10
+ bottom: 6px solid var(--c-bg-arrow);
13
11
  }
14
12
  }
15
13
 
@@ -17,7 +15,7 @@
17
15
  border: {
18
16
  left: 4px solid transparent;
19
17
  right: 4px solid transparent;
20
- top: 6px solid $arrowBgColor;
18
+ top: 6px solid var(--c-bg-arrow);
21
19
  }
22
20
  }
23
21
 
@@ -25,7 +23,7 @@
25
23
  border: {
26
24
  top: 4px solid transparent;
27
25
  bottom: 4px solid transparent;
28
- left: 6px solid $arrowBgColor;
26
+ left: 6px solid var(--c-bg-arrow);
29
27
  }
30
28
  }
31
29
 
@@ -33,7 +31,7 @@
33
31
  border: {
34
32
  top: 4px solid transparent;
35
33
  bottom: 4px solid transparent;
36
- right: 6px solid $arrowBgColor;
34
+ right: 6px solid var(--c-bg-arrow);
37
35
  }
38
36
  }
39
37
  }
@@ -1,5 +1,3 @@
1
- @import '_variables';
2
-
3
1
  .badge {
4
2
  display: inline-block;
5
3
  font-size: 14px;
@@ -7,24 +5,24 @@
7
5
  line-height: 18px;
8
6
  border-radius: 3px;
9
7
  padding: 0 6px;
10
- color: white;
11
- background-color: #42b983;
8
+ color: var(--c-bg);
12
9
  vertical-align: top;
13
-
14
- .table-of-contents & {
15
- vertical-align: middle;
16
- }
10
+ transition: color var(--t-color), background-color var(--t-color);
17
11
 
18
12
  &.tip {
19
- background-color: $badgeTipColor;
13
+ background-color: var(--c-badge-tip);
20
14
  }
21
15
 
22
16
  &.warning {
23
- background-color: $badgeWarningColor;
17
+ background-color: var(--c-badge-warning);
24
18
  }
25
19
 
26
20
  &.danger {
27
- background-color: $badgeDangerColor;
21
+ background-color: var(--c-badge-danger);
22
+ }
23
+
24
+ .table-of-contents & {
25
+ vertical-align: middle;
28
26
  }
29
27
 
30
28
  & + & {
@@ -1,5 +1,8 @@
1
1
  @import '_variables';
2
2
 
3
+ /**
4
+ * code-group
5
+ */
3
6
  .code-group__nav {
4
7
  margin-top: 0.85rem;
5
8
  // 2 * margin + border-radius of <pre> tag
@@ -9,7 +12,7 @@
9
12
  padding-top: 10px;
10
13
  border-top-left-radius: 6px;
11
14
  border-top-right-radius: 6px;
12
- background-color: $codeBgColor;
15
+ background-color: var(--code-bg-color);
13
16
  }
14
17
 
15
18
  .code-group__ul {
@@ -34,8 +37,12 @@
34
37
  outline: none;
35
38
  }
36
39
 
40
+ .code-group__nav-tab:focus-visible {
41
+ outline: 1px solid rgba(255, 255, 255, 0.9);
42
+ }
43
+
37
44
  .code-group__nav-tab-active {
38
- border-bottom: $accentColor 1px solid;
45
+ border-bottom: var(--c-brand) 1px solid;
39
46
  }
40
47
 
41
48
  @media (max-width: $MQMobileNarrow) {
@@ -1,5 +1,3 @@
1
- @use 'sass:color';
2
-
3
1
  @import '_variables';
4
2
 
5
3
  // ===============================
@@ -9,7 +7,7 @@ code[class*='language-'],
9
7
  pre[class*='language-'] {
10
8
  color: #ccc;
11
9
  background: none;
12
- font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
10
+ font-family: var(--font-family-code);
13
11
  font-size: 1em;
14
12
  text-align: left;
15
13
  white-space: pre;
@@ -118,29 +116,17 @@ pre[class*='language-'] {
118
116
  }
119
117
 
120
118
  .token.inserted {
121
- color: $accentColor;
119
+ color: #3eaf7c;
122
120
  }
123
121
 
124
122
  // ===============================
125
123
 
126
- #{$contentClass} {
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} {
124
+ .theme-default-content {
138
125
  pre,
139
126
  pre[class*='language-'] {
140
127
  line-height: 1.4;
141
- padding: 1.25rem 1.5rem;
128
+ padding: 1.3rem 1.5rem;
142
129
  margin: 0.85rem 0;
143
- background-color: $codeBgColor;
144
130
  border-radius: 6px;
145
131
  overflow: auto;
146
132
 
@@ -149,18 +135,20 @@ pre[class*='language-'] {
149
135
  padding: 0;
150
136
  background-color: transparent;
151
137
  border-radius: 0;
138
+ overflow-wrap: unset;
139
+ -webkit-font-smoothing: auto;
140
+ -moz-osx-font-smoothing: auto;
152
141
  }
153
142
  }
154
143
 
155
144
  .line-number {
156
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
157
- monospace;
145
+ font-family: var(--font-family-code);
158
146
  }
159
147
  }
160
148
 
161
149
  div[class*='language-'] {
162
150
  position: relative;
163
- background-color: $codeBgColor;
151
+ background-color: var(--code-bg-color);
164
152
  border-radius: 6px;
165
153
 
166
154
  &::before {
@@ -169,12 +157,13 @@ div[class*='language-'] {
169
157
  top: 0.8em;
170
158
  right: 1em;
171
159
  font-size: 0.75rem;
172
- color: rgba(255, 255, 255, 0.4);
160
+ color: var(--code-ln-color);
173
161
  }
174
162
 
175
163
  pre,
176
164
  pre[class*='language-'] {
177
- background: transparent;
165
+ // force override the background color to be compatible with shiki
166
+ background: transparent !important;
178
167
  position: relative;
179
168
  z-index: 1;
180
169
  }
@@ -189,7 +178,7 @@ div[class*='language-'] {
189
178
  line-height: 1.4;
190
179
 
191
180
  .highlight-line {
192
- background-color: rgba(0, 0, 0, 66%);
181
+ background-color: var(--code-hl-bg-color);
193
182
  }
194
183
  }
195
184
 
@@ -210,14 +199,13 @@ div[class*='language-'] {
210
199
  left: 0;
211
200
  top: 0;
212
201
  display: block;
213
- width: $lineNumbersWrapperWidth;
202
+ width: var(--code-ln-wrapper-width);
214
203
  height: 100%;
215
- background-color: rgba(0, 0, 0, 66%);
216
204
  }
217
205
  }
218
206
 
219
207
  pre {
220
- margin-left: $lineNumbersWrapperWidth;
208
+ margin-left: var(--code-ln-wrapper-width);
221
209
  padding-left: 1rem;
222
210
  vertical-align: middle;
223
211
  }
@@ -225,9 +213,9 @@ div[class*='language-'] {
225
213
  .line-numbers {
226
214
  position: absolute;
227
215
  top: 0;
228
- width: $lineNumbersWrapperWidth;
216
+ width: var(--code-ln-wrapper-width);
229
217
  text-align: center;
230
- color: rgba(255, 255, 255, 0.3);
218
+ color: var(--code-ln-color);
231
219
  padding-top: 1.25rem;
232
220
  line-height: 1.4;
233
221
 
@@ -240,6 +228,7 @@ div[class*='language-'] {
240
228
  z-index: 3;
241
229
  user-select: none;
242
230
  font-size: 0.85em;
231
+ line-height: 0;
243
232
  }
244
233
  }
245
234
 
@@ -248,11 +237,10 @@ div[class*='language-'] {
248
237
  position: absolute;
249
238
  top: 0;
250
239
  left: 0;
251
- width: $lineNumbersWrapperWidth;
240
+ width: var(--code-ln-wrapper-width);
252
241
  height: 100%;
253
242
  border-radius: 6px 0 0 6px;
254
- border-right: 1px solid rgba(0, 0, 0, 66%);
255
- background-color: $codeBgColor;
243
+ border-right: 1px solid var(--code-hl-bg-color);
256
244
  }
257
245
  }
258
246
  }
@@ -267,7 +255,7 @@ div[class*='language-'] {
267
255
 
268
256
  // narrow mobile
269
257
  @media (max-width: $MQMobileNarrow) {
270
- #{$contentClass} {
258
+ .theme-default-content {
271
259
  div[class*='language-'] {
272
260
  margin: 0.85rem -1.5rem;
273
261
  border-radius: 0;
@@ -0,0 +1,88 @@
1
+ .custom-container {
2
+ transition: color var(--t-color), border-color var(--t-color),
3
+ background-color var(--t-color);
4
+
5
+ .custom-container-title {
6
+ font-weight: 600;
7
+ &:not(:only-child) {
8
+ margin-bottom: -0.4rem;
9
+ }
10
+ }
11
+
12
+ &.tip,
13
+ &.warning,
14
+ &.danger {
15
+ padding: 0.1rem 1.5rem;
16
+ border-left-width: 0.5rem;
17
+ border-left-style: solid;
18
+ margin: 1rem 0;
19
+ }
20
+
21
+ &.tip {
22
+ border-color: var(--c-tip);
23
+ background-color: var(--c-tip-bg);
24
+ color: var(--c-tip-text);
25
+
26
+ .custom-container-title {
27
+ color: var(--c-tip-title);
28
+ }
29
+
30
+ a {
31
+ color: var(--c-tip-text-accent);
32
+ }
33
+ }
34
+
35
+ &.warning {
36
+ border-color: var(--c-warning);
37
+ background-color: var(--c-warning-bg);
38
+ color: var(--c-warning-text);
39
+
40
+ .custom-container-title {
41
+ color: var(--c-warning-title);
42
+ }
43
+
44
+ a {
45
+ color: var(--c-warning-text-accent);
46
+ }
47
+ }
48
+
49
+ &.danger {
50
+ border-color: var(--c-danger);
51
+ background-color: var(--c-danger-bg);
52
+ color: var(--c-danger-text);
53
+
54
+ .custom-container-title {
55
+ color: var(--c-danger-title);
56
+ }
57
+
58
+ a {
59
+ color: var(--c-danger-text-accent);
60
+ }
61
+ }
62
+
63
+ &.details {
64
+ display: block;
65
+ position: relative;
66
+ border-radius: 2px;
67
+ margin: 1.6em 0;
68
+ padding: 1.6em;
69
+ background-color: var(--c-details-bg);
70
+
71
+ h4 {
72
+ margin-top: 0;
73
+ }
74
+
75
+ figure,
76
+ p {
77
+ &:last-child {
78
+ margin-bottom: 0;
79
+ padding-bottom: 0;
80
+ }
81
+ }
82
+
83
+ summary {
84
+ outline: none;
85
+ cursor: pointer;
86
+ }
87
+ }
88
+ }
@@ -1,10 +1,8 @@
1
- @use 'sass:color';
2
-
3
1
  @import '_variables';
4
2
 
5
3
  .home {
6
- padding: $navbarHeight 2rem 0;
7
- max-width: $homePageWidth;
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: color.scale($textColor, $lightness: 40%);
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 0.1s ease;
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: #fff;
54
- background-color: $accentColor;
55
- border-color: $accentColor;
54
+ color: var(--c-bg);
55
+ background-color: var(--c-brand);
56
+ border-color: var(--c-brand);
56
57
  &:hover {
57
- background-color: color.scale($accentColor, $lightness: 10%);
58
+ background-color: var(--c-brand-light);
58
59
  }
59
60
  }
60
61
 
61
62
  &.secondary {
62
- color: $accentColor;
63
- background-color: #fff;
64
- border-color: $accentColor;
63
+ color: var(--c-brand);
64
+ background-color: var(--c-bg);
65
+ border-color: var(--c-brand);
65
66
  &:hover {
66
- color: #fff;
67
- background-color: color.scale($accentColor, $lightness: 10%);
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 $borderColor;
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,20 @@
91
93
  font-weight: 500;
92
94
  border-bottom: none;
93
95
  padding-bottom: 0;
94
- color: color.scale($textColor, $lightness: 10%);
96
+ color: var(--c-text-light);
95
97
  }
96
98
 
97
99
  p {
98
- color: color.scale($textColor, $lightness: 25%);
100
+ color: var(--c-text-lighter);
99
101
  }
100
102
  }
101
103
 
102
104
  .footer {
103
105
  padding: 2.5rem;
104
- border-top: 1px solid $borderColor;
106
+ border-top: 1px solid var(--c-border);
105
107
  text-align: center;
106
- color: color.scale($textColor, $lightness: 25%);
108
+ color: var(--c-text-lighter);
109
+ transition: border-color var(--t-color);
107
110
  }
108
111
  }
109
112
 
@@ -1,18 +1,18 @@
1
- @use '_normalize';
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-left: $sidebarWidth;
5
+ padding-top: var(--navbar-height);
6
+ padding-left: var(--sidebar-width);
8
7
  }
9
8
 
10
9
  .navbar {
@@ -13,35 +12,38 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
13
12
  top: 0;
14
13
  left: 0;
15
14
  right: 0;
16
- height: $navbarHeight;
17
- background-color: #fff;
15
+ height: var(--navbar-height);
18
16
  box-sizing: border-box;
19
- border-bottom: 1px solid $borderColor;
17
+ border-bottom: 1px solid var(--c-border);
18
+ background-color: var(--c-bg-navbar);
19
+ transition: background-color var(--t-color), border-color var(--t-color);
20
20
  }
21
21
 
22
22
  .sidebar {
23
23
  font-size: 16px;
24
- background-color: #fff;
25
- width: $sidebarWidth;
24
+ width: var(--sidebar-width);
26
25
  position: fixed;
27
26
  z-index: 10;
28
27
  margin: 0;
29
- top: $navbarHeight;
28
+ top: var(--navbar-height);
30
29
  left: 0;
31
30
  bottom: 0;
32
31
  box-sizing: border-box;
33
- border-right: 1px solid $borderColor;
32
+ border-right: 1px solid var(--c-border);
34
33
  overflow-y: auto;
35
34
  scrollbar-width: thin;
36
- scrollbar-color: $accentColor $borderColor;
35
+ scrollbar-color: var(--c-brand) var(--c-border);
36
+ background-color: var(--c-bg-sidebar);
37
+ transition: transform var(--t-transform), background-color var(--t-color),
38
+ border-color var(--t-color);
37
39
  &::-webkit-scrollbar {
38
40
  width: 7px;
39
41
  }
40
42
  &::-webkit-scrollbar-track {
41
- background-color: $borderColor;
43
+ background-color: var(--c-border);
42
44
  }
43
45
  &::-webkit-scrollbar-thumb {
44
- background-color: $accentColor;
46
+ background-color: var(--c-brand);
45
47
  }
46
48
  }
47
49
 
@@ -60,10 +62,31 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
60
62
  .sidebar-mask {
61
63
  display: block;
62
64
  }
65
+
66
+ .navbar > .toggle-sidebar-button .icon {
67
+ span {
68
+ &:nth-child(1) {
69
+ transform: rotate(45deg) translate3d(5.5px, 5.5px, 0);
70
+ }
71
+
72
+ &:nth-child(2) {
73
+ transform: scale3d(0, 1, 1);
74
+ }
75
+
76
+ &:nth-child(3) {
77
+ transform: rotate(-45deg) translate3d(6px, -6px, 0);
78
+ }
79
+
80
+ &:nth-child(1),
81
+ &:nth-child(3) {
82
+ transform-origin: center;
83
+ }
84
+ }
85
+ }
63
86
  }
64
87
 
65
88
  &.no-navbar {
66
- #{$contentClass}:not(.custom) > h1,
89
+ .theme-default-content:not(.custom) > h1,
67
90
  h2,
68
91
  h3,
69
92
  h4,
@@ -73,6 +96,10 @@ $mobileSidebarWidth: $sidebarWidth * 0.82;
73
96
  padding-top: 0;
74
97
  }
75
98
 
99
+ .page {
100
+ padding-top: 0;
101
+ }
102
+
76
103
  .sidebar {
77
104
  top: 0;
78
105
  }
@@ -97,13 +124,12 @@ h3,
97
124
  h4,
98
125
  h5,
99
126
  h6 {
100
- #{$contentClass}:not(.custom) > & {
101
- margin-top: 0.5rem - $navbarHeight;
102
- padding-top: ($navbarHeight + 1rem);
127
+ .theme-default-content:not(.custom) > & {
128
+ margin-top: calc(0.5rem - var(--navbar-height));
129
+ padding-top: calc(1rem + var(--navbar-height));
103
130
  margin-bottom: 0;
104
131
 
105
132
  &:first-child {
106
- margin-top: -1.5rem;
107
133
  margin-bottom: 1rem;
108
134
 
109
135
  + p,
@@ -115,29 +141,21 @@ h6 {
115
141
  }
116
142
  }
117
143
 
118
- #{$contentClass}:not(.custom) {
119
- @extend %wrapper;
144
+ .theme-default-content:not(.custom) {
145
+ @include content_wrapper;
120
146
 
121
- > *:first-child {
122
- margin-top: $navbarHeight;
123
- }
147
+ padding-top: 0;
124
148
 
125
149
  a:hover {
126
150
  text-decoration: underline;
127
151
  }
128
152
 
129
- p.demo {
130
- padding: 1rem 1.5rem;
131
- border: 1px solid #ddd;
132
- border-radius: 4px;
133
- }
134
-
135
153
  img {
136
154
  max-width: 100%;
137
155
  }
138
156
  }
139
157
 
140
- #{$contentClass}.custom {
158
+ .theme-default-content.custom {
141
159
  padding: 0;
142
160
  margin: 0;
143
161
 
@@ -150,11 +168,11 @@ h6 {
150
168
  @media (max-width: $MQNarrow) {
151
169
  .sidebar {
152
170
  font-size: 15px;
153
- width: $mobileSidebarWidth;
171
+ width: var(--sidebar-width-mobile);
154
172
  }
155
173
 
156
174
  .page {
157
- padding-left: $mobileSidebarWidth;
175
+ padding-left: var(--sidebar-width-mobile);
158
176
  }
159
177
  }
160
178
 
@@ -162,9 +180,8 @@ h6 {
162
180
  @media (max-width: $MQMobile) {
163
181
  .sidebar {
164
182
  top: 0;
165
- padding-top: $navbarHeight;
183
+ padding-top: var(--navbar-height);
166
184
  transform: translateX(-100%);
167
- transition: transform 0.2s ease;
168
185
  }
169
186
 
170
187
  .page {