@vuepress/theme-default 2.0.0-rc.11 → 2.0.0-rc.111
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/lib/client/components/VPAutoLink.vue +32 -0
- package/lib/client/components/VPDarkIcon.vue +8 -0
- package/lib/client/components/VPDropdownTransition.vue +43 -0
- package/lib/client/components/VPEditIcon.vue +12 -0
- package/lib/client/components/VPFadeSlideYTransition.vue +23 -0
- package/lib/client/components/VPHome.vue +37 -0
- package/lib/client/components/VPHomeFeatures.vue +65 -0
- package/lib/client/components/VPHomeFooter.vue +30 -0
- package/lib/client/components/VPHomeHero.vue +186 -0
- package/lib/client/components/VPLightIcon.vue +28 -0
- package/lib/client/components/VPNavbar.vue +138 -0
- package/lib/client/components/{NavbarBrand.vue → VPNavbarBrand.vue} +39 -15
- package/lib/client/components/VPNavbarDropdown.vue +329 -0
- package/lib/client/components/VPNavbarItems.vue +111 -0
- package/lib/client/components/VPPage.vue +69 -0
- package/lib/client/components/VPPageMeta.vue +139 -0
- package/lib/client/components/VPPageNav.vue +123 -0
- package/lib/client/components/VPSidebar.vue +120 -0
- package/lib/client/components/VPSidebarItem.vue +185 -0
- package/lib/client/components/{SidebarItems.vue → VPSidebarItems.vue} +27 -7
- package/lib/client/components/VPToggleColorModeButton.vue +55 -0
- package/lib/client/components/VPToggleSidebarButton.vue +92 -0
- package/lib/client/components/global/Badge.vue +83 -22
- package/lib/client/components/global/index.d.ts +1 -3
- package/lib/client/components/global/index.js +1 -3
- package/lib/client/composables/index.d.ts +7 -1
- package/lib/client/composables/index.js +7 -1
- package/lib/client/composables/useDarkMode.d.ts +1 -3
- package/lib/client/composables/useDarkMode.js +20 -17
- package/lib/client/composables/useData.d.ts +8 -0
- package/lib/client/composables/useData.js +7 -0
- package/lib/client/composables/useEditLink.d.ts +3 -0
- package/lib/client/composables/useEditLink.js +28 -0
- package/lib/client/composables/useHeaders.d.ts +9 -0
- package/lib/client/composables/useHeaders.js +38 -0
- package/lib/client/composables/useNavbarConfig.d.ts +3 -0
- package/lib/client/composables/useNavbarConfig.js +29 -0
- package/lib/client/composables/useNavbarRepo.d.ts +6 -0
- package/lib/client/composables/useNavbarRepo.js +38 -0
- package/lib/client/composables/useNavbarSelectLanguage.d.ts +6 -0
- package/lib/client/composables/useNavbarSelectLanguage.js +59 -0
- package/lib/client/composables/useNavigate.d.ts +1 -0
- package/lib/client/composables/useNavigate.js +22 -0
- package/lib/client/composables/useRelatedLinks.d.ts +8 -0
- package/lib/client/composables/useRelatedLinks.js +90 -0
- package/lib/client/composables/useScrollPromise.js +3 -1
- package/lib/client/composables/useSidebarItems.d.ts +21 -20
- package/lib/client/composables/useSidebarItems.js +96 -85
- package/lib/client/composables/useUpdateDeviceStatus.d.ts +1 -1
- package/lib/client/composables/useUpdateDeviceStatus.js +10 -5
- package/lib/client/config.d.ts +3 -2
- package/lib/client/config.js +8 -23
- package/lib/client/index.d.ts +1 -0
- package/lib/client/layouts/Layout.vue +126 -56
- package/lib/client/layouts/NotFound.vue +59 -12
- package/lib/client/shim.d.ts +6 -5
- package/lib/client/styles/_mixins.scss +4 -4
- package/lib/client/styles/_variables.module.scss +1 -1
- package/lib/client/styles/_variables.scss +2 -1
- package/lib/client/styles/arrow.scss +24 -22
- package/lib/client/styles/code-group.scss +34 -30
- package/lib/client/styles/content/code.scss +43 -0
- package/lib/client/styles/content/index.scss +3 -0
- package/lib/client/styles/content/normalize.scss +39 -0
- package/lib/client/styles/{toc.scss → content/toc.scss} +1 -1
- package/lib/client/styles/external-link-icon.scss +36 -0
- package/lib/client/styles/index.scss +3 -13
- package/lib/client/styles/layout.scss +5 -197
- package/lib/client/styles/normalize.scss +1 -194
- package/lib/client/styles/plugins.scss +28 -0
- package/lib/client/styles/vars-dark.scss +20 -58
- package/lib/client/styles/vars.scss +54 -150
- package/lib/client/typings.d.ts +13 -0
- package/lib/client/typings.js +1 -0
- package/lib/client/utils/index.d.ts +2 -1
- package/lib/client/utils/index.js +2 -1
- package/lib/client/utils/isActiveSidebarItem.d.ts +3 -3
- package/lib/client/utils/isActiveSidebarItem.js +1 -1
- package/lib/client/utils/resolveAutoLink.d.ts +9 -0
- package/lib/client/utils/{getNavLink.js → resolveAutoLink.js} +3 -3
- package/lib/client/utils/resolveEditLink.d.ts +3 -3
- package/lib/client/utils/resolveEditLink.js +3 -3
- package/lib/client/utils/resolvePrefix.d.ts +1 -0
- package/lib/client/utils/resolvePrefix.js +4 -0
- package/lib/client/utils/resolveRepoType.d.ts +1 -1
- package/lib/client/utils/resolveRepoType.js +4 -4
- package/lib/node/defaultTheme.d.ts +2 -1
- package/lib/node/defaultTheme.js +57 -64
- package/lib/node/index.d.ts +1 -3
- package/lib/node/index.js +0 -3
- package/lib/node/typings.d.ts +59 -0
- package/lib/node/typings.js +1 -0
- package/lib/node/utils/assignDefaultLocaleOptions.js +3 -8
- package/lib/node/utils/index.d.ts +1 -1
- package/lib/node/utils/index.js +1 -1
- package/lib/node/utils/resolveMarkdownHintLocales.d.ts +9 -0
- package/lib/node/utils/resolveMarkdownHintLocales.js +19 -0
- package/lib/shared/index.d.ts +5 -3
- package/lib/shared/index.js +1 -3
- package/lib/shared/nav.d.ts +19 -30
- package/lib/shared/navbar.d.ts +21 -0
- package/lib/shared/navbar.js +1 -0
- package/lib/shared/options.d.ts +36 -66
- package/lib/shared/page.d.ts +9 -6
- package/lib/shared/sidebar.d.ts +26 -0
- package/lib/shared/sidebar.js +1 -0
- package/package.json +34 -27
- package/templates/build.html +16 -10
- package/lib/client/components/AutoLink.vue +0 -113
- package/lib/client/components/DropdownTransition.vue +0 -25
- package/lib/client/components/Home.vue +0 -15
- package/lib/client/components/HomeContent.vue +0 -5
- package/lib/client/components/HomeFeatures.vue +0 -22
- package/lib/client/components/HomeFooter.vue +0 -17
- package/lib/client/components/HomeHero.vue +0 -97
- package/lib/client/components/Navbar.vue +0 -79
- package/lib/client/components/NavbarDropdown.vue +0 -126
- package/lib/client/components/NavbarItems.vue +0 -194
- package/lib/client/components/Page.vue +0 -31
- package/lib/client/components/PageMeta.vue +0 -124
- package/lib/client/components/PageNav.vue +0 -122
- package/lib/client/components/Sidebar.vue +0 -18
- package/lib/client/components/SidebarItem.vue +0 -87
- package/lib/client/components/ToggleColorModeButton.vue +0 -57
- package/lib/client/components/ToggleSidebarButton.vue +0 -24
- package/lib/client/components/global/CodeGroup.d.ts +0 -6
- package/lib/client/components/global/CodeGroup.js +0 -120
- package/lib/client/components/global/CodeGroupItem.vue +0 -27
- package/lib/client/composables/useThemeData.d.ts +0 -4
- package/lib/client/composables/useThemeData.js +0 -3
- package/lib/client/styles/badge.scss +0 -36
- package/lib/client/styles/code.scss +0 -263
- package/lib/client/styles/custom-container.scss +0 -142
- package/lib/client/styles/home.scss +0 -168
- package/lib/client/styles/navbar-dropdown.scss +0 -183
- package/lib/client/styles/navbar.scss +0 -197
- package/lib/client/styles/page.scss +0 -87
- package/lib/client/styles/sidebar.scss +0 -134
- package/lib/client/styles/transitions.scss +0 -22
- package/lib/client/utils/getNavLink.d.ts +0 -9
- package/lib/node/utils/resolveContainerPluginOptions.d.ts +0 -8
- package/lib/node/utils/resolveContainerPluginOptions.js +0 -17
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useDarkMode, useThemeLocaleData } from '../composables/index.js'
|
|
3
|
-
|
|
4
|
-
const themeLocale = useThemeLocaleData()
|
|
5
|
-
const isDarkMode = useDarkMode()
|
|
6
|
-
|
|
7
|
-
const toggleColorMode = (): void => {
|
|
8
|
-
isDarkMode.value = !isDarkMode.value
|
|
9
|
-
}
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<template>
|
|
13
|
-
<button
|
|
14
|
-
class="toggle-color-mode-button"
|
|
15
|
-
:title="themeLocale.toggleColorMode"
|
|
16
|
-
@click="toggleColorMode"
|
|
17
|
-
>
|
|
18
|
-
<svg
|
|
19
|
-
v-show="!isDarkMode"
|
|
20
|
-
class="icon"
|
|
21
|
-
focusable="false"
|
|
22
|
-
viewBox="0 0 32 32"
|
|
23
|
-
>
|
|
24
|
-
<path
|
|
25
|
-
d="M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6z"
|
|
26
|
-
fill="currentColor"
|
|
27
|
-
/>
|
|
28
|
-
<path
|
|
29
|
-
d="M5.394 6.813l1.414-1.415l3.506 3.506L8.9 10.318z"
|
|
30
|
-
fill="currentColor"
|
|
31
|
-
/>
|
|
32
|
-
<path d="M2 15.005h5v2H2z" fill="currentColor" />
|
|
33
|
-
<path
|
|
34
|
-
d="M5.394 25.197L8.9 21.691l1.414 1.415l-3.506 3.505z"
|
|
35
|
-
fill="currentColor"
|
|
36
|
-
/>
|
|
37
|
-
<path d="M15 25.005h2v5h-2z" fill="currentColor" />
|
|
38
|
-
<path
|
|
39
|
-
d="M21.687 23.106l1.414-1.415l3.506 3.506l-1.414 1.414z"
|
|
40
|
-
fill="currentColor"
|
|
41
|
-
/>
|
|
42
|
-
<path d="M25 15.005h5v2h-5z" fill="currentColor" />
|
|
43
|
-
<path
|
|
44
|
-
d="M21.687 8.904l3.506-3.506l1.414 1.415l-3.506 3.505z"
|
|
45
|
-
fill="currentColor"
|
|
46
|
-
/>
|
|
47
|
-
<path d="M15 2.005h2v5h-2z" fill="currentColor" />
|
|
48
|
-
</svg>
|
|
49
|
-
|
|
50
|
-
<svg v-show="isDarkMode" class="icon" focusable="false" viewBox="0 0 32 32">
|
|
51
|
-
<path
|
|
52
|
-
d="M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z"
|
|
53
|
-
fill="currentColor"
|
|
54
|
-
/>
|
|
55
|
-
</svg>
|
|
56
|
-
</button>
|
|
57
|
-
</template>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useThemeLocaleData } from '../composables/index.js'
|
|
3
|
-
|
|
4
|
-
defineEmits<(e: 'toggle') => void>()
|
|
5
|
-
|
|
6
|
-
const themeLocale = useThemeLocaleData()
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div
|
|
11
|
-
class="toggle-sidebar-button"
|
|
12
|
-
:title="themeLocale.toggleSidebar"
|
|
13
|
-
aria-expanded="false"
|
|
14
|
-
role="button"
|
|
15
|
-
tabindex="0"
|
|
16
|
-
@click="$emit('toggle')"
|
|
17
|
-
>
|
|
18
|
-
<div class="icon" aria-hidden="true">
|
|
19
|
-
<span></span>
|
|
20
|
-
<span></span>
|
|
21
|
-
<span></span>
|
|
22
|
-
</div>
|
|
23
|
-
</div>
|
|
24
|
-
</template>
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { SlotsType, VNode } from 'vue';
|
|
2
|
-
export declare const CodeGroup: import("vue").DefineComponent<{}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}> | null, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, SlotsType<{
|
|
5
|
-
default: () => VNode[];
|
|
6
|
-
}>>;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { useStorage } from '@vueuse/core';
|
|
2
|
-
import { computed, defineComponent, h, onBeforeUpdate, onMounted, ref, watch, } from 'vue';
|
|
3
|
-
export const CodeGroup = defineComponent({
|
|
4
|
-
name: 'CodeGroup',
|
|
5
|
-
slots: Object,
|
|
6
|
-
setup(_, { slots }) {
|
|
7
|
-
// refs of the tab buttons
|
|
8
|
-
const tabRefs = ref([]);
|
|
9
|
-
if (__VUEPRESS_DEV__) {
|
|
10
|
-
// in dev mode, we need to clear the tabs ref to avoid HMR issues
|
|
11
|
-
// after removing a code-group-item
|
|
12
|
-
onBeforeUpdate(() => {
|
|
13
|
-
tabRefs.value = [];
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
// index of current active item
|
|
17
|
-
const activeIndex = ref(-1);
|
|
18
|
-
const codeGroupStorage = useStorage('vuepress-code-group', {});
|
|
19
|
-
const codeGroupKey = computed(() => tabRefs.value.map((tab) => tab.innerText).join(','));
|
|
20
|
-
onMounted(() => {
|
|
21
|
-
watch(() => codeGroupStorage.value[codeGroupKey.value], (val = -1) => {
|
|
22
|
-
if (activeIndex.value !== val) {
|
|
23
|
-
activeIndex.value = val;
|
|
24
|
-
}
|
|
25
|
-
}, { immediate: true });
|
|
26
|
-
watch(activeIndex, (val) => {
|
|
27
|
-
if (codeGroupStorage.value[codeGroupKey.value] !== val) {
|
|
28
|
-
codeGroupStorage.value[codeGroupKey.value] = val;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
// activate next tab
|
|
33
|
-
const activateNext = (i = activeIndex.value) => {
|
|
34
|
-
if (i < tabRefs.value.length - 1) {
|
|
35
|
-
activeIndex.value = i + 1;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
activeIndex.value = 0;
|
|
39
|
-
}
|
|
40
|
-
tabRefs.value[activeIndex.value].focus();
|
|
41
|
-
};
|
|
42
|
-
// activate previous tab
|
|
43
|
-
const activatePrev = (i = activeIndex.value) => {
|
|
44
|
-
if (i > 0) {
|
|
45
|
-
activeIndex.value = i - 1;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
activeIndex.value = tabRefs.value.length - 1;
|
|
49
|
-
}
|
|
50
|
-
tabRefs.value[activeIndex.value].focus();
|
|
51
|
-
};
|
|
52
|
-
// handle keyboard event
|
|
53
|
-
const keyboardHandler = (event, i) => {
|
|
54
|
-
if (event.key === ' ' || event.key === 'Enter') {
|
|
55
|
-
event.preventDefault();
|
|
56
|
-
activeIndex.value = i;
|
|
57
|
-
}
|
|
58
|
-
else if (event.key === 'ArrowRight') {
|
|
59
|
-
event.preventDefault();
|
|
60
|
-
activateNext(i);
|
|
61
|
-
}
|
|
62
|
-
else if (event.key === 'ArrowLeft') {
|
|
63
|
-
event.preventDefault();
|
|
64
|
-
activatePrev(i);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
return () => {
|
|
68
|
-
// get children code-group-item from default slots
|
|
69
|
-
const items = (slots.default?.() || [])
|
|
70
|
-
.filter((vnode) => vnode.type.name === 'CodeGroupItem')
|
|
71
|
-
.map((vnode) => {
|
|
72
|
-
if (vnode.props === null) {
|
|
73
|
-
vnode.props = {};
|
|
74
|
-
}
|
|
75
|
-
return vnode;
|
|
76
|
-
});
|
|
77
|
-
// do not render anything if there is no code-group-item
|
|
78
|
-
if (items.length === 0) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
// if activeIndex is invalid
|
|
82
|
-
if (activeIndex.value < 0 || activeIndex.value > items.length - 1) {
|
|
83
|
-
// find the index of the code-group-item with `active` props
|
|
84
|
-
activeIndex.value = items.findIndex((vnode) => vnode.props.active === '' || vnode.props.active === true);
|
|
85
|
-
// if there is no `active` props on code-group-item, set the first item active
|
|
86
|
-
if (activeIndex.value === -1) {
|
|
87
|
-
activeIndex.value = 0;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
// if activeIndex is valid
|
|
91
|
-
else {
|
|
92
|
-
// set the active item
|
|
93
|
-
items.forEach((vnode, i) => {
|
|
94
|
-
vnode.props.active = i === activeIndex.value;
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
return h('div', { class: 'code-group' }, [
|
|
98
|
-
h('div', { class: 'code-group__nav', role: 'tablist' }, items.map((vnode, i) => {
|
|
99
|
-
const isActive = i === activeIndex.value;
|
|
100
|
-
return h('button', {
|
|
101
|
-
ref: (element) => {
|
|
102
|
-
if (element) {
|
|
103
|
-
tabRefs.value[i] = element;
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
class: {
|
|
107
|
-
'code-group__nav-tab': true,
|
|
108
|
-
'code-group__nav-tab-active': isActive,
|
|
109
|
-
},
|
|
110
|
-
role: 'tab',
|
|
111
|
-
ariaSelected: isActive,
|
|
112
|
-
onClick: () => (activeIndex.value = i),
|
|
113
|
-
onKeydown: (e) => keyboardHandler(e, i),
|
|
114
|
-
}, vnode.props.title);
|
|
115
|
-
})),
|
|
116
|
-
items,
|
|
117
|
-
]);
|
|
118
|
-
};
|
|
119
|
-
},
|
|
120
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
defineOptions({
|
|
3
|
-
name: 'CodeGroupItem',
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
defineProps({
|
|
7
|
-
title: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
active: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
required: false,
|
|
14
|
-
default: false,
|
|
15
|
-
},
|
|
16
|
-
})
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<template>
|
|
20
|
-
<div
|
|
21
|
-
class="code-group-item"
|
|
22
|
-
:class="{ 'code-group-item__active': active }"
|
|
23
|
-
role="tabpanel"
|
|
24
|
-
>
|
|
25
|
-
<slot />
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ThemeDataRef, ThemeLocaleDataRef } from '@vuepress/plugin-theme-data/client';
|
|
2
|
-
import type { DefaultThemeData } from '../../shared/index.js';
|
|
3
|
-
export declare const useThemeData: () => ThemeDataRef<DefaultThemeData>;
|
|
4
|
-
export declare const useThemeLocaleData: () => ThemeLocaleDataRef<DefaultThemeData>;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
.badge {
|
|
2
|
-
display: inline-block;
|
|
3
|
-
font-size: 14px;
|
|
4
|
-
font-weight: 600;
|
|
5
|
-
height: 18px;
|
|
6
|
-
line-height: 18px;
|
|
7
|
-
border-radius: 3px;
|
|
8
|
-
padding: 0 6px;
|
|
9
|
-
color: var(--c-bg);
|
|
10
|
-
vertical-align: top;
|
|
11
|
-
transition:
|
|
12
|
-
color var(--t-color),
|
|
13
|
-
background-color var(--t-color);
|
|
14
|
-
|
|
15
|
-
&.tip {
|
|
16
|
-
background-color: var(--c-badge-tip);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
&.warning {
|
|
20
|
-
background-color: var(--c-badge-warning);
|
|
21
|
-
color: var(--c-badge-warning-text);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&.danger {
|
|
25
|
-
background-color: var(--c-badge-danger);
|
|
26
|
-
color: var(--c-badge-danger-text);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.table-of-contents & {
|
|
30
|
-
vertical-align: middle;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
& + & {
|
|
34
|
-
margin-left: 5px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
@import '_variables';
|
|
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
|
-
|
|
7
|
-
// ===============================
|
|
8
|
-
// Forked and modified from prismjs/themes/prism-tomorrow.css
|
|
9
|
-
|
|
10
|
-
code[class*='language-'],
|
|
11
|
-
pre[class*='language-'] {
|
|
12
|
-
color: #ccc;
|
|
13
|
-
background: none;
|
|
14
|
-
font-family: var(--font-family-code);
|
|
15
|
-
font-size: 1em;
|
|
16
|
-
text-align: left;
|
|
17
|
-
white-space: pre;
|
|
18
|
-
word-spacing: normal;
|
|
19
|
-
word-break: normal;
|
|
20
|
-
word-wrap: normal;
|
|
21
|
-
line-height: 1.5;
|
|
22
|
-
|
|
23
|
-
-moz-tab-size: 4;
|
|
24
|
-
-o-tab-size: 4;
|
|
25
|
-
tab-size: 4;
|
|
26
|
-
|
|
27
|
-
-webkit-hyphens: none;
|
|
28
|
-
-moz-hyphens: none;
|
|
29
|
-
-ms-hyphens: none;
|
|
30
|
-
hyphens: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/* Code blocks */
|
|
34
|
-
pre[class*='language-'] {
|
|
35
|
-
padding: 1em;
|
|
36
|
-
margin: 0.5em 0;
|
|
37
|
-
overflow: auto;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
:not(pre) > code[class*='language-'],
|
|
41
|
-
pre[class*='language-'] {
|
|
42
|
-
background: #2d2d2d;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/* Inline code */
|
|
46
|
-
:not(pre) > code[class*='language-'] {
|
|
47
|
-
padding: 0.1em;
|
|
48
|
-
border-radius: 0.3em;
|
|
49
|
-
white-space: normal;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.token.comment,
|
|
53
|
-
.token.block-comment,
|
|
54
|
-
.token.prolog,
|
|
55
|
-
.token.doctype,
|
|
56
|
-
.token.cdata {
|
|
57
|
-
color: #999;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.token.punctuation {
|
|
61
|
-
color: #ccc;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.token.tag,
|
|
65
|
-
.token.attr-name,
|
|
66
|
-
.token.namespace,
|
|
67
|
-
.token.deleted {
|
|
68
|
-
color: #ec5975;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.token.function-name {
|
|
72
|
-
color: #6196cc;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.token.boolean,
|
|
76
|
-
.token.number,
|
|
77
|
-
.token.function {
|
|
78
|
-
color: #f08d49;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.token.property,
|
|
82
|
-
.token.class-name,
|
|
83
|
-
.token.constant,
|
|
84
|
-
.token.symbol {
|
|
85
|
-
color: #f8c555;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.token.selector,
|
|
89
|
-
.token.important,
|
|
90
|
-
.token.atrule,
|
|
91
|
-
.token.keyword,
|
|
92
|
-
.token.builtin {
|
|
93
|
-
color: #cc99cd;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.token.string,
|
|
97
|
-
.token.char,
|
|
98
|
-
.token.attr-value,
|
|
99
|
-
.token.regex,
|
|
100
|
-
.token.variable {
|
|
101
|
-
color: #7ec699;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.token.operator,
|
|
105
|
-
.token.entity,
|
|
106
|
-
.token.url {
|
|
107
|
-
color: #67cdcc;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.token.important,
|
|
111
|
-
.token.bold {
|
|
112
|
-
font-weight: bold;
|
|
113
|
-
}
|
|
114
|
-
.token.italic {
|
|
115
|
-
font-style: italic;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.token.entity {
|
|
119
|
-
cursor: help;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.token.inserted {
|
|
123
|
-
color: #3eaf7c;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// ===============================
|
|
127
|
-
|
|
128
|
-
.theme-default-content {
|
|
129
|
-
pre,
|
|
130
|
-
pre[class*='language-'] {
|
|
131
|
-
line-height: $line-height;
|
|
132
|
-
padding: 1.3rem 1.5rem;
|
|
133
|
-
margin: 0.85rem 0;
|
|
134
|
-
border-radius: 6px;
|
|
135
|
-
overflow: auto;
|
|
136
|
-
|
|
137
|
-
code {
|
|
138
|
-
color: #fff;
|
|
139
|
-
padding: 0;
|
|
140
|
-
background-color: transparent !important;
|
|
141
|
-
border-radius: 0;
|
|
142
|
-
overflow-wrap: unset;
|
|
143
|
-
-webkit-font-smoothing: auto;
|
|
144
|
-
-moz-osx-font-smoothing: auto;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.line-number {
|
|
149
|
-
font-family: var(--font-family-code);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
div[class*='language-'] {
|
|
154
|
-
position: relative;
|
|
155
|
-
background-color: var(--code-bg-color);
|
|
156
|
-
border-radius: 6px;
|
|
157
|
-
|
|
158
|
-
&::before {
|
|
159
|
-
content: attr(data-title);
|
|
160
|
-
position: absolute;
|
|
161
|
-
z-index: 3;
|
|
162
|
-
top: 0.8em;
|
|
163
|
-
right: 1em;
|
|
164
|
-
font-size: 0.75rem;
|
|
165
|
-
color: var(--code-ln-color);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
pre,
|
|
169
|
-
pre[class*='language-'] {
|
|
170
|
-
// force override the background color to be compatible with shiki
|
|
171
|
-
background: transparent !important;
|
|
172
|
-
position: relative;
|
|
173
|
-
z-index: 1;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.highlight-lines {
|
|
177
|
-
user-select: none;
|
|
178
|
-
padding-top: 1.3rem;
|
|
179
|
-
position: absolute;
|
|
180
|
-
top: 0;
|
|
181
|
-
left: 0;
|
|
182
|
-
width: 100%;
|
|
183
|
-
line-height: $line-height;
|
|
184
|
-
|
|
185
|
-
.highlight-line {
|
|
186
|
-
background-color: var(--code-hl-bg-color);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
&:not(.line-numbers-mode) {
|
|
191
|
-
.line-numbers {
|
|
192
|
-
display: none;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
&.line-numbers-mode {
|
|
197
|
-
.highlight-lines .highlight-line {
|
|
198
|
-
position: relative;
|
|
199
|
-
|
|
200
|
-
&::before {
|
|
201
|
-
content: ' ';
|
|
202
|
-
position: absolute;
|
|
203
|
-
z-index: 2;
|
|
204
|
-
left: 0;
|
|
205
|
-
top: 0;
|
|
206
|
-
display: block;
|
|
207
|
-
width: var(--code-ln-wrapper-width);
|
|
208
|
-
height: 100%;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
pre {
|
|
213
|
-
margin-left: var(--code-ln-wrapper-width);
|
|
214
|
-
padding-left: 1rem;
|
|
215
|
-
vertical-align: middle;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.line-numbers {
|
|
219
|
-
position: absolute;
|
|
220
|
-
top: 0;
|
|
221
|
-
width: var(--code-ln-wrapper-width);
|
|
222
|
-
text-align: center;
|
|
223
|
-
color: var(--code-ln-color);
|
|
224
|
-
padding-top: 1.25rem;
|
|
225
|
-
line-height: $line-height;
|
|
226
|
-
counter-reset: line-number;
|
|
227
|
-
|
|
228
|
-
.line-number {
|
|
229
|
-
position: relative;
|
|
230
|
-
z-index: 3;
|
|
231
|
-
user-select: none;
|
|
232
|
-
height: #{$line-height}em;
|
|
233
|
-
|
|
234
|
-
&::before {
|
|
235
|
-
counter-increment: line-number;
|
|
236
|
-
content: counter(line-number);
|
|
237
|
-
font-size: 0.85em;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
&::after {
|
|
243
|
-
content: '';
|
|
244
|
-
position: absolute;
|
|
245
|
-
top: 0;
|
|
246
|
-
left: 0;
|
|
247
|
-
width: var(--code-ln-wrapper-width);
|
|
248
|
-
height: 100%;
|
|
249
|
-
border-radius: 6px 0 0 6px;
|
|
250
|
-
border-right: 1px solid var(--code-hl-bg-color);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
// narrow mobile
|
|
256
|
-
@media (max-width: $MQMobileNarrow) {
|
|
257
|
-
.theme-default-content {
|
|
258
|
-
div[class*='language-'] {
|
|
259
|
-
margin: 0.85rem -1.5rem;
|
|
260
|
-
border-radius: 0;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
.custom-container {
|
|
2
|
-
transition:
|
|
3
|
-
color var(--t-color),
|
|
4
|
-
border-color var(--t-color),
|
|
5
|
-
background-color var(--t-color);
|
|
6
|
-
|
|
7
|
-
.custom-container-title {
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
&:not(:only-child) {
|
|
10
|
-
margin-bottom: -0.4rem;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&.tip,
|
|
15
|
-
&.warning,
|
|
16
|
-
&.danger {
|
|
17
|
-
padding: 0.1rem 1.5rem;
|
|
18
|
-
border-left-width: 0.5rem;
|
|
19
|
-
border-left-style: solid;
|
|
20
|
-
margin: 1rem 0;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&.tip {
|
|
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
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.warning {
|
|
42
|
-
border-color: var(--c-warning);
|
|
43
|
-
background-color: var(--c-warning-bg);
|
|
44
|
-
color: var(--c-warning-text);
|
|
45
|
-
|
|
46
|
-
.custom-container-title {
|
|
47
|
-
color: var(--c-warning-title);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
a {
|
|
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);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&.danger {
|
|
78
|
-
border-color: var(--c-danger);
|
|
79
|
-
background-color: var(--c-danger-bg);
|
|
80
|
-
color: var(--c-danger-text);
|
|
81
|
-
|
|
82
|
-
.custom-container-title {
|
|
83
|
-
color: var(--c-danger-title);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
a {
|
|
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);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
&.details {
|
|
114
|
-
display: block;
|
|
115
|
-
position: relative;
|
|
116
|
-
border-radius: 2px;
|
|
117
|
-
margin: 1.6em 0;
|
|
118
|
-
padding: 1.6em;
|
|
119
|
-
background-color: var(--c-details-bg);
|
|
120
|
-
|
|
121
|
-
code {
|
|
122
|
-
background-color: var(--c-bg-darker);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
h4 {
|
|
126
|
-
margin-top: 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
figure,
|
|
130
|
-
p {
|
|
131
|
-
&:last-child {
|
|
132
|
-
margin-bottom: 0;
|
|
133
|
-
padding-bottom: 0;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
summary {
|
|
138
|
-
outline: none;
|
|
139
|
-
cursor: pointer;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|