@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.
Files changed (118) hide show
  1. package/LICENSE +1 -1
  2. package/lib/client/components/AutoLink.vue +113 -0
  3. package/lib/client/components/DropdownTransition.vue +15 -24
  4. package/lib/client/components/Home.vue +12 -130
  5. package/lib/client/components/HomeContent.vue +5 -0
  6. package/lib/client/components/HomeFeatures.vue +22 -0
  7. package/lib/client/components/HomeFooter.vue +17 -0
  8. package/lib/client/components/HomeHero.vue +97 -0
  9. package/lib/client/components/Navbar.vue +60 -95
  10. package/lib/client/components/NavbarBrand.vue +55 -0
  11. package/lib/client/components/NavbarDropdown.vue +126 -0
  12. package/lib/client/components/{NavbarLinks.vue → NavbarItems.vue} +81 -61
  13. package/lib/client/components/Page.vue +16 -15
  14. package/lib/client/components/PageMeta.vue +51 -66
  15. package/lib/client/components/PageNav.vue +61 -64
  16. package/lib/client/components/Sidebar.vue +12 -32
  17. package/lib/client/components/SidebarItem.vue +87 -0
  18. package/lib/client/components/SidebarItems.vue +57 -0
  19. package/lib/client/components/ToggleColorModeButton.vue +57 -0
  20. package/lib/client/components/ToggleSidebarButton.vue +21 -24
  21. package/lib/client/components/global/Badge.vue +24 -26
  22. package/lib/client/components/global/CodeGroup.d.ts +5 -4
  23. package/lib/client/components/global/CodeGroup.js +85 -17
  24. package/lib/client/components/global/CodeGroupItem.vue +22 -20
  25. package/lib/client/components/global/index.d.ts +4 -0
  26. package/lib/client/components/global/index.js +4 -0
  27. package/lib/client/composables/index.d.ts +5 -5
  28. package/lib/client/composables/index.js +5 -5
  29. package/lib/client/composables/useDarkMode.d.ts +12 -0
  30. package/lib/client/composables/useDarkMode.js +57 -0
  31. package/lib/client/composables/useScrollPromise.js +1 -1
  32. package/lib/client/composables/useSidebarItems.d.ts +14 -8
  33. package/lib/client/composables/useSidebarItems.js +49 -48
  34. package/lib/client/composables/useThemeData.d.ts +2 -2
  35. package/lib/client/composables/useThemeData.js +1 -1
  36. package/lib/client/composables/useUpdateDeviceStatus.d.ts +7 -0
  37. package/lib/client/composables/useUpdateDeviceStatus.js +25 -0
  38. package/lib/client/config.d.ts +4 -0
  39. package/lib/client/config.js +44 -0
  40. package/lib/client/index.d.ts +3 -4
  41. package/lib/client/index.js +3 -2
  42. package/lib/client/layouts/Layout.vue +133 -136
  43. package/lib/client/layouts/NotFound.vue +27 -0
  44. package/lib/client/shim.d.ts +5 -0
  45. package/lib/client/styles/{_wrapper.scss → _mixins.scss} +7 -2
  46. package/lib/client/styles/_variables.module.scss +5 -0
  47. package/lib/client/styles/_variables.scss +0 -34
  48. package/lib/client/styles/arrow.scss +4 -6
  49. package/lib/client/styles/badge.scss +14 -11
  50. package/lib/client/styles/code-group.scss +10 -10
  51. package/lib/client/styles/code.scss +33 -46
  52. package/lib/client/styles/custom-container.scss +82 -18
  53. package/lib/client/styles/home.scss +32 -24
  54. package/lib/client/styles/index.scss +4 -4
  55. package/lib/client/styles/layout.scss +82 -73
  56. package/lib/client/styles/{dropdown.scss → navbar-dropdown.scss} +36 -50
  57. package/lib/client/styles/navbar.scss +106 -50
  58. package/lib/client/styles/normalize.scss +199 -0
  59. package/lib/client/styles/page.scss +24 -8
  60. package/lib/client/styles/sidebar.scss +69 -87
  61. package/lib/client/styles/transitions.scss +13 -4
  62. package/lib/client/styles/vars-dark.scss +68 -0
  63. package/lib/client/styles/vars.scss +155 -0
  64. package/lib/client/utils/getNavLink.d.ts +15 -0
  65. package/lib/client/utils/getNavLink.js +18 -0
  66. package/lib/client/utils/getResolveRouteWithRedirect.d.ts +5 -0
  67. package/lib/client/{composables/useResolveRouteWithRedirect.js → utils/getResolveRouteWithRedirect.js} +4 -6
  68. package/lib/client/utils/index.d.ts +5 -2
  69. package/lib/client/utils/index.js +5 -2
  70. package/lib/client/utils/isActiveSidebarItem.d.ts +3 -0
  71. package/lib/client/utils/isActiveSidebarItem.js +20 -0
  72. package/lib/client/utils/resolveEditLink.d.ts +2 -2
  73. package/lib/client/utils/resolveEditLink.js +15 -9
  74. package/lib/client/utils/resolveRepoType.d.ts +1 -1
  75. package/lib/client/utils/resolveRepoType.js +4 -2
  76. package/lib/node/defaultTheme.d.ts +4 -4
  77. package/lib/node/defaultTheme.js +111 -48
  78. package/lib/node/index.d.ts +4 -4
  79. package/lib/node/index.js +5 -17
  80. package/lib/node/utils/assignDefaultLocaleOptions.d.ts +4 -2
  81. package/lib/node/utils/assignDefaultLocaleOptions.js +13 -13
  82. package/lib/node/utils/index.d.ts +2 -5
  83. package/lib/node/utils/index.js +2 -17
  84. package/lib/node/utils/resolveContainerPluginOptions.d.ts +2 -20
  85. package/lib/node/utils/resolveContainerPluginOptions.js +4 -66
  86. package/lib/shared/index.d.ts +3 -3
  87. package/lib/shared/index.js +3 -15
  88. package/lib/shared/nav.d.ts +16 -18
  89. package/lib/shared/nav.js +1 -2
  90. package/lib/shared/options.d.ts +51 -6
  91. package/lib/shared/options.js +1 -2
  92. package/lib/shared/page.d.ts +15 -6
  93. package/lib/shared/page.js +1 -2
  94. package/package.json +43 -25
  95. package/templates/build.html +34 -0
  96. package/CHANGELOG.md +0 -419
  97. package/lib/client/clientAppEnhance.d.ts +0 -3
  98. package/lib/client/clientAppEnhance.js +0 -28
  99. package/lib/client/clientAppSetup.d.ts +0 -2
  100. package/lib/client/clientAppSetup.js +0 -11
  101. package/lib/client/components/DropdownLink.vue +0 -141
  102. package/lib/client/components/NavLink.vue +0 -115
  103. package/lib/client/components/SidebarChild.d.ts +0 -6
  104. package/lib/client/components/SidebarChild.js +0 -91
  105. package/lib/client/components/global/OutboundLink.vue +0 -30
  106. package/lib/client/composables/useNavLink.d.ts +0 -9
  107. package/lib/client/composables/useNavLink.js +0 -15
  108. package/lib/client/composables/useResolveRouteWithRedirect.d.ts +0 -5
  109. package/lib/client/layouts/404.vue +0 -38
  110. package/lib/client/styles/_normalize.scss +0 -148
  111. package/lib/client/styles/plugins.scss +0 -18
  112. package/lib/client/styles/sr-only.scss +0 -12
  113. package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.d.ts +0 -6
  114. package/lib/node/utils/resolveActiveHeaderLinksPluginOptions.js +0 -16
  115. package/lib/node/utils/resolveGitPluginOptions.d.ts +0 -6
  116. package/lib/node/utils/resolveGitPluginOptions.js +0 -22
  117. package/lib/node/utils/resolveMediumZoomPluginOptions.d.ts +0 -6
  118. package/lib/node/utils/resolveMediumZoomPluginOptions.js +0 -17
@@ -1,141 +0,0 @@
1
- <template>
2
- <div class="dropdown-wrapper" :class="{ open }">
3
- <button
4
- class="dropdown-title"
5
- type="button"
6
- :aria-label="dropdownAriaLabel"
7
- @click="handleDropdown"
8
- >
9
- <span class="title">{{ item.text }}</span>
10
- <span class="arrow down" />
11
- </button>
12
-
13
- <button
14
- class="mobile-dropdown-title"
15
- type="button"
16
- :aria-label="dropdownAriaLabel"
17
- @click="open = !open"
18
- >
19
- <span class="title">{{ item.text }}</span>
20
- <span class="arrow" :class="open ? 'down' : 'right'" />
21
- </button>
22
-
23
- <!-- Transition will somehow break the Select Languages dropdown -->
24
- <!-- So we remove DropdownTransition until we figure out the reason -->
25
- <ul v-show="open" class="nav-dropdown">
26
- <li
27
- v-for="(child, index) in item.children"
28
- :key="child.link || index"
29
- class="dropdown-item"
30
- >
31
- <template v-if="child.children">
32
- <h4 class="dropdown-subtitle">
33
- <NavLink
34
- v-if="child.link"
35
- :item="child"
36
- @focusout="
37
- isLastItemOfArray(child, item.children) &&
38
- child.children.length === 0 &&
39
- (open = false)
40
- "
41
- />
42
-
43
- <span v-else>{{ child.text }}</span>
44
- </h4>
45
-
46
- <ul class="dropdown-subitem-wrapper">
47
- <li
48
- v-for="grandchild in child.children"
49
- :key="grandchild.link"
50
- class="dropdown-subitem"
51
- >
52
- <NavLink
53
- :item="grandchild"
54
- @focusout="
55
- isLastItemOfArray(grandchild, child.children) &&
56
- isLastItemOfArray(child, item.children) &&
57
- (open = false)
58
- "
59
- />
60
- </li>
61
- </ul>
62
- </template>
63
-
64
- <template v-else>
65
- <NavLink
66
- :item="child"
67
- @focusout="
68
- isLastItemOfArray(child, item.children) && (open = false)
69
- "
70
- />
71
- </template>
72
- </li>
73
- </ul>
74
- </div>
75
- </template>
76
-
77
- <script lang="ts">
78
- import { computed, defineComponent, ref, toRefs, watch } from 'vue'
79
- import type { PropType } from 'vue'
80
- import { useRoute } from 'vue-router'
81
- import type { NavGroup, NavItem } from '../../shared'
82
- import NavLink from './NavLink.vue'
83
-
84
- export default defineComponent({
85
- name: 'DropdownLink',
86
-
87
- components: {
88
- NavLink,
89
- },
90
-
91
- props: {
92
- item: {
93
- type: Object as PropType<NavGroup<NavItem>>,
94
- required: true,
95
- },
96
- },
97
-
98
- setup(props) {
99
- const { item } = toRefs(props)
100
- const dropdownAriaLabel = computed(
101
- () => item.value.ariaLabel || item.value.text
102
- )
103
-
104
- const open = ref(false)
105
- const route = useRoute()
106
- watch(
107
- () => route.path,
108
- () => {
109
- open.value = false
110
- }
111
- )
112
-
113
- /**
114
- * Open the dropdown when user tab and click from keyboard.
115
- *
116
- * Use event.detail to detect tab and click from keyboard.
117
- * The Tab + Click is UIEvent > KeyboardEvent, so the detail is 0.
118
- *
119
- * @see https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail
120
- */
121
- const handleDropdown = (e): void => {
122
- const isTriggerByTab = e.detail === 0
123
- if (isTriggerByTab) {
124
- open.value = !open.value
125
- } else {
126
- open.value = false
127
- }
128
- }
129
-
130
- const isLastItemOfArray = (item: unknown, arr: unknown[]): boolean =>
131
- arr[arr.length - 1] === item
132
-
133
- return {
134
- open,
135
- dropdownAriaLabel,
136
- handleDropdown,
137
- isLastItemOfArray,
138
- }
139
- },
140
- })
141
- </script>
@@ -1,115 +0,0 @@
1
- <template>
2
- <RouterLink
3
- v-if="isRouterLink"
4
- class="nav-link"
5
- :class="{ 'router-link-active': isActiveInSubpath }"
6
- :to="item.link"
7
- :aria-label="linkAriaLabel"
8
- v-bind="$attrs"
9
- >
10
- <slot name="before" />
11
- {{ item.text }}
12
- <slot name="after" />
13
- </RouterLink>
14
- <a
15
- v-else
16
- class="nav-link external"
17
- :href="item.link"
18
- :rel="linkRel"
19
- :target="linkTarget"
20
- :aria-label="linkAriaLabel"
21
- v-bind="$attrs"
22
- >
23
- <slot name="before" />
24
- {{ item.text }}
25
- <OutboundLink v-if="isBlankTarget" />
26
- <slot name="after" />
27
- </a>
28
- </template>
29
-
30
- <script lang="ts">
31
- import { computed, defineComponent, toRefs } from 'vue'
32
- import type { PropType } from 'vue'
33
- import { useRoute } from 'vue-router'
34
- import { useSiteData } from '@vuepress/client'
35
- import { isLinkHttp, isLinkMailto, isLinkTel } from '@vuepress/shared'
36
- import type { NavLink } from '../../shared'
37
-
38
- export default defineComponent({
39
- name: 'NavLink',
40
-
41
- inheritAttrs: false,
42
-
43
- props: {
44
- item: {
45
- type: Object as PropType<NavLink>,
46
- required: true,
47
- },
48
- },
49
-
50
- setup(props) {
51
- const route = useRoute()
52
- const site = useSiteData()
53
- const { item } = toRefs(props)
54
-
55
- // if the link has http protocol
56
- const hasHttpProtocol = computed(() => isLinkHttp(item.value.link))
57
- // if the link has non-http protocol
58
- const hasNonHttpProtocal = computed(
59
- () => isLinkMailto(item.value.link) || isLinkTel(item.value.link)
60
- )
61
- // resolve the `target` attr
62
- const linkTarget = computed(() => {
63
- if (hasNonHttpProtocal.value) return undefined
64
- if (item.value.target) return item.value.target
65
- if (hasHttpProtocol.value) return '_blank'
66
- return undefined
67
- })
68
- // if the `target` attr is '_blank'
69
- const isBlankTarget = computed(() => linkTarget.value === '_blank')
70
- // is `<RouterLink>` or not
71
- const isRouterLink = computed(
72
- () =>
73
- !hasHttpProtocol.value &&
74
- !hasNonHttpProtocal.value &&
75
- !isBlankTarget.value
76
- )
77
- // resolve the `rel` attr
78
- const linkRel = computed(() => {
79
- if (hasNonHttpProtocal.value) return undefined
80
- if (item.value.rel) return item.value.rel
81
- if (isBlankTarget.value) return 'noopener noreferrer'
82
- return undefined
83
- })
84
- // resolve the `aria-label` attr
85
- const linkAriaLabel = computed(
86
- () => item.value.ariaLabel || item.value.text
87
- )
88
-
89
- // should be active when current route is a subpath of this link
90
- const shouldBeActiveInSubpath = computed(() => {
91
- const localeKeys = Object.keys(site.value.locales)
92
- if (localeKeys.length) {
93
- return !localeKeys.some((key) => key === item.value.link)
94
- }
95
- return item.value.link !== '/'
96
- })
97
- // if this link is active in subpath
98
- const isActiveInSubpath = computed(() => {
99
- if (!isRouterLink.value || !shouldBeActiveInSubpath.value) {
100
- return false
101
- }
102
- return route.path.startsWith(item.value.link)
103
- })
104
-
105
- return {
106
- isActiveInSubpath,
107
- isBlankTarget,
108
- isRouterLink,
109
- linkRel,
110
- linkTarget,
111
- linkAriaLabel,
112
- }
113
- },
114
- })
115
- </script>
@@ -1,6 +0,0 @@
1
- import type { FunctionalComponent } from 'vue';
2
- import type { ResolvedSidebarItem } from '../../shared';
3
- export declare const SidebarChild: FunctionalComponent<{
4
- item: ResolvedSidebarItem;
5
- depth?: number;
6
- }>;
@@ -1,91 +0,0 @@
1
- import { h } from 'vue';
2
- import { useRoute } from 'vue-router';
3
- import NavLink from './NavLink.vue';
4
- const normalizePath = (path) => decodeURI(path)
5
- .replace(/#.*$/, '')
6
- .replace(/(index)?\.(md|html)$/, '');
7
- const isActiveLink = (route, link) => {
8
- if (link === undefined) {
9
- return false;
10
- }
11
- if (route.hash === link) {
12
- return true;
13
- }
14
- const currentPath = normalizePath(route.path);
15
- const targetPath = normalizePath(link);
16
- return currentPath === targetPath;
17
- };
18
- const isActiveItem = (route, item) => {
19
- if (isActiveLink(route, item.link)) {
20
- return true;
21
- }
22
- if (item.children) {
23
- return item.children.some((child) => isActiveItem(route, child));
24
- }
25
- return false;
26
- };
27
- const renderItem = (item, props) => {
28
- // if the item has link, render it as `<NavLink>`
29
- if (item.link) {
30
- return h(NavLink, {
31
- ...props,
32
- item,
33
- });
34
- }
35
- // if the item only has text, render it as `<p>`
36
- return h('p', props, item.text);
37
- };
38
- const renderChildren = (item, depth) => {
39
- var _a;
40
- if (!((_a = item.children) === null || _a === void 0 ? void 0 : _a.length)) {
41
- return null;
42
- }
43
- return h('ul', {
44
- class: {
45
- 'sidebar-sub-headers': depth > 0,
46
- },
47
- }, item.children.map((child) => h('li', h(SidebarChild, {
48
- item: child,
49
- depth: depth + 1,
50
- }))));
51
- };
52
- export const SidebarChild = ({ item, depth = 0 }) => {
53
- const route = useRoute();
54
- const active = isActiveItem(route, item);
55
- if (item.isGroup) {
56
- return [
57
- h('section', {
58
- class: 'sidebar-group',
59
- }, [
60
- renderItem(item, {
61
- class: {
62
- 'sidebar-heading': true,
63
- active,
64
- },
65
- }),
66
- renderChildren(item, depth),
67
- ]),
68
- ];
69
- }
70
- return [
71
- renderItem(item, {
72
- class: {
73
- 'sidebar-link': true,
74
- active,
75
- },
76
- }),
77
- renderChildren(item, depth),
78
- ];
79
- };
80
- SidebarChild.displayName = 'SidebarChild';
81
- SidebarChild.props = {
82
- item: {
83
- type: Object,
84
- required: true,
85
- },
86
- depth: {
87
- type: Number,
88
- required: false,
89
- default: 0,
90
- },
91
- };
@@ -1,30 +0,0 @@
1
- <template>
2
- <RawOutboundLink>
3
- <span class="sr-only">{{ themeLocale.openInNewWindow }}</span>
4
- </RawOutboundLink>
5
- </template>
6
-
7
- <script>
8
- import { defineComponent } from 'vue'
9
- import { OutboundLink } from '@vuepress/client'
10
- import { useThemeLocaleData } from '../../composables'
11
-
12
- /**
13
- * Override the built-in `<OutboundLink>` for a11y
14
- */
15
- export default defineComponent({
16
- name: 'OutboundLink',
17
-
18
- components: {
19
- RawOutboundLink: OutboundLink,
20
- },
21
-
22
- setup() {
23
- const themeLocale = useThemeLocaleData()
24
-
25
- return {
26
- themeLocale,
27
- }
28
- },
29
- })
30
- </script>
@@ -1,9 +0,0 @@
1
- import type { NavLink } from '../../shared';
2
- /**
3
- * Resolve NavLink props from string
4
- *
5
- * @example
6
- * - Input: '/README.md'
7
- * - Output: { text: 'Home', link: '/' }
8
- */
9
- export declare const useNavLink: (item: string) => NavLink;
@@ -1,15 +0,0 @@
1
- import { useResolveRouteWithRedirect } from './useResolveRouteWithRedirect';
2
- /**
3
- * Resolve NavLink props from string
4
- *
5
- * @example
6
- * - Input: '/README.md'
7
- * - Output: { text: 'Home', link: '/' }
8
- */
9
- export const useNavLink = (item) => {
10
- const resolved = useResolveRouteWithRedirect(item);
11
- return {
12
- text: resolved.meta.title || item,
13
- link: resolved.name === '404' ? item : resolved.fullPath,
14
- };
15
- };
@@ -1,5 +0,0 @@
1
- import type { Router } from 'vue-router';
2
- /**
3
- * Resolve a route with redirection
4
- */
5
- export declare const useResolveRouteWithRedirect: (to: import("vue-router").RouteLocationRaw, currentLocation?: import("vue-router").RouteLocationNormalizedLoaded | undefined) => ReturnType<Router['resolve']>;
@@ -1,38 +0,0 @@
1
- <template>
2
- <div class="theme-container">
3
- <div class="theme-default-content">
4
- <h1>404</h1>
5
-
6
- <blockquote>{{ getMsg() }}</blockquote>
7
-
8
- <RouterLink :to="homeLink">{{ homeText }}</RouterLink>
9
- </div>
10
- </div>
11
- </template>
12
-
13
- <script lang="ts">
14
- import { defineComponent } from 'vue'
15
- import { useRouteLocale } from '@vuepress/client'
16
- import { useThemeLocaleData } from '../composables'
17
-
18
- export default defineComponent({
19
- name: '404',
20
-
21
- setup() {
22
- const routeLocale = useRouteLocale()
23
- const themeLocale = useThemeLocaleData()
24
-
25
- const messages = themeLocale.value.notFound ?? ['Not Found']
26
- const getMsg = (): string =>
27
- messages[Math.floor(Math.random() * messages.length)]
28
- const homeLink = themeLocale.value.home ?? routeLocale.value
29
- const homeText = themeLocale.value.backToHome ?? 'Back to home'
30
-
31
- return {
32
- getMsg,
33
- homeLink,
34
- homeText,
35
- }
36
- },
37
- })
38
- </script>
@@ -1,148 +0,0 @@
1
- @import '_variables';
2
-
3
- html,
4
- body {
5
- padding: 0;
6
- margin: 0;
7
- background-color: #fff;
8
- }
9
-
10
- body {
11
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
12
- Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
13
- -webkit-font-smoothing: antialiased;
14
- -moz-osx-font-smoothing: grayscale;
15
- font-size: 16px;
16
- color: $textColor;
17
- }
18
-
19
- a {
20
- font-weight: 500;
21
- color: $accentColor;
22
- text-decoration: none;
23
- }
24
-
25
- p a code {
26
- font-weight: 400;
27
- color: $accentColor;
28
- }
29
-
30
- kbd {
31
- background: #eee;
32
- border: solid 0.15rem #ddd;
33
- border-bottom: solid 0.25rem #ddd;
34
- border-radius: 0.15rem;
35
- padding: 0 0.15em;
36
- }
37
-
38
- blockquote {
39
- font-size: 1rem;
40
- color: #999;
41
- border-left: 0.2rem solid #dfe2e5;
42
- margin: 1rem 0;
43
- padding: 0.25rem 0 0.25rem 1rem;
44
-
45
- & > p {
46
- margin: 0;
47
- }
48
- }
49
-
50
- ul,
51
- ol {
52
- padding-left: 1.2em;
53
- }
54
-
55
- strong {
56
- font-weight: 600;
57
- }
58
-
59
- h1,
60
- h2,
61
- h3,
62
- h4,
63
- h5,
64
- h6 {
65
- font-weight: 600;
66
- line-height: 1.25;
67
-
68
- &:hover .header-anchor {
69
- opacity: 1;
70
- }
71
- }
72
-
73
- h1 {
74
- font-size: 2.2rem;
75
- }
76
-
77
- h2 {
78
- font-size: 1.65rem;
79
- padding-bottom: 0.3rem;
80
- border-bottom: 1px solid $borderColor;
81
- }
82
-
83
- h3 {
84
- font-size: 1.35rem;
85
- }
86
-
87
- h4 {
88
- font-size: 1.15rem;
89
- }
90
-
91
- h5 {
92
- font-size: 1.05rem;
93
- }
94
-
95
- h6 {
96
- font-size: 1rem;
97
- }
98
-
99
- a.header-anchor {
100
- font-size: 0.85em;
101
- float: left;
102
- margin-left: -0.87em;
103
- padding-right: 0.23em;
104
- margin-top: 0.125em;
105
- opacity: 0;
106
-
107
- &:hover {
108
- text-decoration: none;
109
- }
110
- }
111
-
112
- code,
113
- kbd {
114
- font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
115
- monospace;
116
- }
117
-
118
- p,
119
- ul,
120
- ol {
121
- line-height: 1.7;
122
- }
123
-
124
- hr {
125
- border: 0;
126
- border-top: 1px solid $borderColor;
127
- }
128
-
129
- table {
130
- border-collapse: collapse;
131
- margin: 1rem 0;
132
- display: block;
133
- overflow-x: auto;
134
- }
135
-
136
- tr {
137
- border-top: 1px solid #dfe2e5;
138
-
139
- &:nth-child(2n) {
140
- background-color: #f6f8fa;
141
- }
142
- }
143
-
144
- th,
145
- td {
146
- border: 1px solid #dfe2e5;
147
- padding: 0.6em 1em;
148
- }
@@ -1,18 +0,0 @@
1
- @use 'sass:color';
2
-
3
- @import '_variables';
4
-
5
- .back-to-top {
6
- --back-to-top-color: #{$accentColor};
7
- --back-to-top-color-hover: #{color.scale($accentColor, $lightness: 30%)};
8
- }
9
-
10
- #nprogress {
11
- --nprogress-color: #{$accentColor};
12
- }
13
-
14
- .DocSearch {
15
- --docsearch-primary-color: #{$accentColor};
16
- --docsearch-highlight-color: var(--docsearch-primary-color);
17
- --docsearch-searchbox-shadow: inset 0 0 0 2px var(--docsearch-primary-color);
18
- }
@@ -1,12 +0,0 @@
1
- .sr-only {
2
- position: absolute;
3
- width: 1px;
4
- height: 1px;
5
- padding: 0;
6
- margin: -1px;
7
- overflow: hidden;
8
- clip: rect(0, 0, 0, 0);
9
- white-space: nowrap;
10
- border-width: 0;
11
- user-select: none;
12
- }
@@ -1,6 +0,0 @@
1
- import type { ActiveHeaderLinksPluginOptions } from '@vuepress/plugin-active-header-links';
2
- import type { DefaultThemePluginsOptions } from '../../shared';
3
- /**
4
- * Resolve options for @vuepress/plugin-active-header-links
5
- */
6
- export declare const resolveActiveHeaderLinksPluginOptions: (themePlugins: DefaultThemePluginsOptions) => ActiveHeaderLinksPluginOptions | boolean;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveActiveHeaderLinksPluginOptions = void 0;
4
- /**
5
- * Resolve options for @vuepress/plugin-active-header-links
6
- */
7
- const resolveActiveHeaderLinksPluginOptions = (themePlugins) => {
8
- if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.activeHeaderLinks) === false) {
9
- return false;
10
- }
11
- return {
12
- headerLinkSelector: '.sidebar-link',
13
- headerAnchorSelector: '.header-anchor',
14
- };
15
- };
16
- exports.resolveActiveHeaderLinksPluginOptions = resolveActiveHeaderLinksPluginOptions;
@@ -1,6 +0,0 @@
1
- import type { GitPluginOptions } from '@vuepress/plugin-git';
2
- import type { DefaultThemePluginsOptions, DefaultThemeLocaleOptions } from '../../shared';
3
- /**
4
- * Resolve options for @vuepress/plugin-git
5
- */
6
- export declare const resolveGitPluginOptions: (themePlugins: DefaultThemePluginsOptions, localeOptions: DefaultThemeLocaleOptions) => GitPluginOptions | boolean;
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveGitPluginOptions = void 0;
4
- /**
5
- * Resolve options for @vuepress/plugin-git
6
- */
7
- const resolveGitPluginOptions = (themePlugins, localeOptions) => {
8
- if ((themePlugins === null || themePlugins === void 0 ? void 0 : themePlugins.git) === false) {
9
- return false;
10
- }
11
- const enableUpdatedTime = localeOptions.lastUpdated !== false;
12
- const enableContributors = localeOptions.contributors !== false;
13
- if (!enableUpdatedTime && !enableContributors) {
14
- return false;
15
- }
16
- return {
17
- createdTime: false,
18
- updatedTime: enableUpdatedTime,
19
- contributors: enableContributors,
20
- };
21
- };
22
- exports.resolveGitPluginOptions = resolveGitPluginOptions;