vitepress 0.22.2 → 1.0.0-draft.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/README.md +4 -4
- package/client.d.ts +2 -3
- package/dist/client/app/components/ClientOnly.js +1 -1
- package/dist/client/app/index.js +5 -7
- package/dist/client/app/router.js +11 -5
- package/dist/client/theme-default/Layout.vue +25 -183
- package/dist/client/theme-default/NotFound.vue +9 -8
- package/dist/client/theme-default/components/VPAlgoliaSearchBox.vue +127 -0
- package/dist/client/theme-default/components/VPBackdrop.vue +39 -0
- package/dist/client/theme-default/components/VPContent.vue +44 -0
- package/dist/client/theme-default/components/VPContentDoc.vue +173 -0
- package/dist/client/theme-default/components/VPContentDocFooter.vue +140 -0
- package/dist/client/theme-default/components/VPContentDocOutline.vue +108 -0
- package/dist/client/theme-default/components/VPFlyout.vue +149 -0
- package/dist/client/theme-default/components/VPLink.vue +37 -0
- package/dist/client/theme-default/components/VPLocalNav.vue +106 -0
- package/dist/client/theme-default/components/VPMenu.vue +79 -0
- package/dist/client/theme-default/components/VPMenuGroup.vue +35 -0
- package/dist/client/theme-default/components/VPMenuLink.vue +30 -0
- package/dist/client/theme-default/components/VPNav.vue +33 -0
- package/dist/client/theme-default/components/VPNavBar.vue +109 -0
- package/dist/client/theme-default/components/VPNavBarAppearance.vue +22 -0
- package/dist/client/theme-default/components/VPNavBarExtra.vue +107 -0
- package/dist/client/theme-default/components/VPNavBarHamburger.vue +79 -0
- package/dist/client/theme-default/components/VPNavBarMenu.vue +29 -0
- package/dist/client/theme-default/components/VPNavBarMenuGroup.vue +18 -0
- package/dist/client/theme-default/components/VPNavBarMenuLink.vue +56 -0
- package/dist/client/theme-default/components/VPNavBarSearch.vue +269 -0
- package/dist/client/theme-default/components/VPNavBarSocialLinks.vue +27 -0
- package/dist/client/theme-default/components/VPNavBarTitle.vue +44 -0
- package/dist/client/theme-default/components/VPNavBarTranslations.vue +74 -0
- package/dist/client/theme-default/components/VPNavScreen.vue +100 -0
- package/dist/client/theme-default/components/VPNavScreenAppearance.vue +30 -0
- package/dist/client/theme-default/components/VPNavScreenMenu.vue +24 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroup.vue +118 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroupLink.vue +33 -0
- package/dist/client/theme-default/components/VPNavScreenMenuGroupSection.vue +35 -0
- package/dist/client/theme-default/components/VPNavScreenMenuLink.vue +34 -0
- package/dist/client/theme-default/components/VPNavScreenSocialLinks.vue +14 -0
- package/dist/client/theme-default/components/VPNavScreenTranslations.vue +73 -0
- package/dist/client/theme-default/components/VPSidebar.vue +118 -0
- package/dist/client/theme-default/components/VPSidebarGroup.vue +44 -0
- package/dist/client/theme-default/components/VPSidebarLink.vue +57 -0
- package/dist/client/theme-default/components/VPSkipLink.vue +72 -0
- package/dist/client/theme-default/components/VPSocialLink.vue +63 -0
- package/dist/client/theme-default/components/VPSocialLinks.vue +27 -0
- package/dist/client/theme-default/components/VPSwitch.vue +66 -0
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +74 -0
- package/dist/client/theme-default/components/icons/VPIconAlignJustify.vue +8 -0
- package/dist/client/theme-default/components/icons/VPIconAlignLeft.vue +8 -0
- package/dist/client/theme-default/components/icons/VPIconAlignRight.vue +8 -0
- package/dist/client/theme-default/components/icons/{ArrowLeft.vue → VPIconArrowLeft.vue} +0 -0
- package/dist/client/theme-default/components/icons/{ArrowRight.vue → VPIconArrowRight.vue} +0 -0
- package/dist/client/theme-default/components/icons/VPIconChevronDown.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronLeft.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronRight.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconChevronUp.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconDiscord.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconEdit.vue +6 -0
- package/dist/client/theme-default/components/icons/VPIconExternalLink.vue +13 -0
- package/dist/client/theme-default/components/icons/VPIconFacebook.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconGitHub.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconInstagram.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconLanguages.vue +9 -0
- package/dist/client/theme-default/components/icons/VPIconLinkedIn.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconMoon.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconMoreHorizontal.vue +7 -0
- package/dist/client/theme-default/components/icons/VPIconPlus.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconSlack.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconSun.vue +13 -0
- package/dist/client/theme-default/components/icons/VPIconTwitter.vue +5 -0
- package/dist/client/theme-default/components/icons/VPIconYouTube.vue +5 -0
- package/dist/client/theme-default/composables/edit-link.js +22 -0
- package/dist/client/theme-default/composables/flyout.js +40 -0
- package/dist/client/theme-default/composables/nav.js +27 -1
- package/dist/client/theme-default/composables/outline.js +130 -0
- package/dist/client/theme-default/composables/prev-next.js +18 -0
- package/dist/client/theme-default/composables/sidebar.js +57 -0
- package/dist/client/theme-default/fonts/inter-cyrillic-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-cyrillic.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-greek-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-greek.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-latin-ext.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-latin.woff2 +0 -0
- package/dist/client/theme-default/fonts/inter-vietnamese.woff2 +0 -0
- package/dist/client/theme-default/index.js +4 -4
- package/dist/client/theme-default/styles/base.css +200 -0
- package/dist/client/theme-default/styles/fonts.css +67 -0
- package/dist/client/theme-default/styles/utils.css +9 -0
- package/dist/client/theme-default/styles/vars.css +206 -66
- package/dist/client/theme-default/styles/vp-doc.css +419 -0
- package/dist/client/theme-default/support/sidebar.js +29 -0
- package/dist/client/theme-default/support/utils.js +43 -0
- package/dist/node/cli.js +1 -1
- package/dist/node/index.d.ts +106 -81
- package/dist/node/index.js +1 -1
- package/dist/node/{serve-cf4b2162.js → serve-428d4610.js} +27 -10
- package/package.json +31 -27
- package/types/default-theme.d.ts +105 -80
- package/dist/client/theme-default/components/AlgoliaSearchBox.vue +0 -195
- package/dist/client/theme-default/components/BuySellAds.vue +0 -152
- package/dist/client/theme-default/components/CarbonAds.vue +0 -99
- package/dist/client/theme-default/components/EditLink.vue +0 -38
- package/dist/client/theme-default/components/Home.vue +0 -31
- package/dist/client/theme-default/components/HomeFeatures.vue +0 -143
- package/dist/client/theme-default/components/HomeFooter.vue +0 -50
- package/dist/client/theme-default/components/HomeHero.vue +0 -161
- package/dist/client/theme-default/components/LastUpdated.vue +0 -60
- package/dist/client/theme-default/components/NavBar.vue +0 -60
- package/dist/client/theme-default/components/NavBarTitle.vue +0 -41
- package/dist/client/theme-default/components/NavDropdownLink.vue +0 -135
- package/dist/client/theme-default/components/NavDropdownLinkItem.vue +0 -76
- package/dist/client/theme-default/components/NavLink.vue +0 -61
- package/dist/client/theme-default/components/NavLinks.vue +0 -52
- package/dist/client/theme-default/components/NextAndPrevLinks.vue +0 -88
- package/dist/client/theme-default/components/Page.vue +0 -53
- package/dist/client/theme-default/components/PageFooter.vue +0 -44
- package/dist/client/theme-default/components/SideBar.vue +0 -60
- package/dist/client/theme-default/components/SideBarLink.js +0 -68
- package/dist/client/theme-default/components/SideBarLinks.vue +0 -12
- package/dist/client/theme-default/components/ToggleSideBarButton.vue +0 -46
- package/dist/client/theme-default/components/icons/OutboundLink.vue +0 -31
- package/dist/client/theme-default/composables/activeSidebarLink.js +0 -99
- package/dist/client/theme-default/composables/editLink.js +0 -49
- package/dist/client/theme-default/composables/navLink.js +0 -42
- package/dist/client/theme-default/composables/nextAndPrevLinks.js +0 -37
- package/dist/client/theme-default/composables/repo.js +0 -38
- package/dist/client/theme-default/composables/sideBar.js +0 -57
- package/dist/client/theme-default/styles/code.css +0 -299
- package/dist/client/theme-default/styles/custom-blocks.css +0 -76
- package/dist/client/theme-default/styles/layout.css +0 -236
- package/dist/client/theme-default/styles/sidebar-links.css +0 -107
- package/dist/client/theme-default/support/sideBar.js +0 -46
- package/dist/client/theme-default/utils.js +0 -63
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useData } from 'vitepress';
|
|
3
|
-
import { endingSlashRE, isExternal } from '../utils';
|
|
4
|
-
const bitbucketRE = /bitbucket.org/;
|
|
5
|
-
export function useEditLink() {
|
|
6
|
-
const { page, theme, frontmatter } = useData();
|
|
7
|
-
const url = computed(() => {
|
|
8
|
-
const { repo, docsDir = '', docsBranch = 'master', docsRepo = repo, editLinks } = theme.value;
|
|
9
|
-
const showEditLink = frontmatter.value.editLink != null
|
|
10
|
-
? frontmatter.value.editLink
|
|
11
|
-
: editLinks;
|
|
12
|
-
const { relativePath } = page.value;
|
|
13
|
-
if (!showEditLink || !relativePath || !repo) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
return createUrl(repo, docsRepo, docsDir, docsBranch, relativePath);
|
|
17
|
-
});
|
|
18
|
-
const text = computed(() => {
|
|
19
|
-
return theme.value.editLinkText || 'Edit this page';
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
url,
|
|
23
|
-
text
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
function createUrl(repo, docsRepo, docsDir, docsBranch, path) {
|
|
27
|
-
return bitbucketRE.test(repo)
|
|
28
|
-
? createBitbucketUrl(repo, docsRepo, docsDir, docsBranch, path)
|
|
29
|
-
: createGitHubUrl(repo, docsRepo, docsDir, docsBranch, path);
|
|
30
|
-
}
|
|
31
|
-
function createGitHubUrl(repo, docsRepo, docsDir, docsBranch, path) {
|
|
32
|
-
const base = isExternal(docsRepo)
|
|
33
|
-
? docsRepo
|
|
34
|
-
: `https://github.com/${docsRepo}`;
|
|
35
|
-
return (base.replace(endingSlashRE, '') +
|
|
36
|
-
`/edit` +
|
|
37
|
-
`/${docsBranch}/` +
|
|
38
|
-
(docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '') +
|
|
39
|
-
path);
|
|
40
|
-
}
|
|
41
|
-
function createBitbucketUrl(repo, docsRepo, docsDir, docsBranch, path) {
|
|
42
|
-
const base = isExternal(docsRepo) ? docsRepo : repo;
|
|
43
|
-
return (base.replace(endingSlashRE, '') +
|
|
44
|
-
`/src` +
|
|
45
|
-
`/${docsBranch}/` +
|
|
46
|
-
(docsDir ? docsDir.replace(endingSlashRE, '') + '/' : '') +
|
|
47
|
-
path +
|
|
48
|
-
`?mode=edit&spa=0&at=${docsBranch}&fileviewer=file-view-default`);
|
|
49
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useRoute, withBase } from 'vitepress';
|
|
3
|
-
import { isExternal as isExternalCheck } from '../utils';
|
|
4
|
-
export function useNavLink(item) {
|
|
5
|
-
const route = useRoute();
|
|
6
|
-
const isExternal = isExternalCheck(item.value.link);
|
|
7
|
-
const props = computed(() => {
|
|
8
|
-
const routePath = normalizePath(`/${route.data.relativePath}`);
|
|
9
|
-
let active = false;
|
|
10
|
-
if (item.value.activeMatch) {
|
|
11
|
-
active = new RegExp(item.value.activeMatch).test(routePath);
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
const itemPath = normalizePath(item.value.link);
|
|
15
|
-
active =
|
|
16
|
-
itemPath === '/'
|
|
17
|
-
? itemPath === routePath
|
|
18
|
-
: routePath.startsWith(itemPath);
|
|
19
|
-
}
|
|
20
|
-
return {
|
|
21
|
-
class: {
|
|
22
|
-
active,
|
|
23
|
-
isExternal
|
|
24
|
-
},
|
|
25
|
-
href: isExternal ? item.value.link : withBase(item.value.link),
|
|
26
|
-
target: item.value.target || (isExternal ? `_blank` : null),
|
|
27
|
-
rel: item.value.rel || (isExternal ? `noopener noreferrer` : null),
|
|
28
|
-
'aria-label': item.value.ariaLabel
|
|
29
|
-
};
|
|
30
|
-
});
|
|
31
|
-
return {
|
|
32
|
-
props,
|
|
33
|
-
isExternal
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function normalizePath(path) {
|
|
37
|
-
return path
|
|
38
|
-
.replace(/#.*$/, '')
|
|
39
|
-
.replace(/\?.*$/, '')
|
|
40
|
-
.replace(/\.(html|md)$/, '')
|
|
41
|
-
.replace(/\/index$/, '/');
|
|
42
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useData } from 'vitepress';
|
|
3
|
-
import { isArray, ensureStartingSlash, removeExtention } from '../utils';
|
|
4
|
-
import { getSideBarConfig, getFlatSideBarLinks } from '../support/sideBar';
|
|
5
|
-
export function useNextAndPrevLinks() {
|
|
6
|
-
const { page, theme } = useData();
|
|
7
|
-
const path = computed(() => {
|
|
8
|
-
return removeExtention(ensureStartingSlash(page.value.relativePath));
|
|
9
|
-
});
|
|
10
|
-
const candidates = computed(() => {
|
|
11
|
-
const config = getSideBarConfig(theme.value.sidebar, path.value);
|
|
12
|
-
return isArray(config) ? getFlatSideBarLinks(config) : [];
|
|
13
|
-
});
|
|
14
|
-
const index = computed(() => {
|
|
15
|
-
return candidates.value.findIndex((item) => {
|
|
16
|
-
return item.link === path.value;
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
const next = computed(() => {
|
|
20
|
-
if (theme.value.nextLinks !== false &&
|
|
21
|
-
index.value > -1 &&
|
|
22
|
-
index.value < candidates.value.length - 1) {
|
|
23
|
-
return candidates.value[index.value + 1];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
const prev = computed(() => {
|
|
27
|
-
if (theme.value.prevLinks !== false && index.value > 0) {
|
|
28
|
-
return candidates.value[index.value - 1];
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const hasLinks = computed(() => !!next.value || !!prev.value);
|
|
32
|
-
return {
|
|
33
|
-
next,
|
|
34
|
-
prev,
|
|
35
|
-
hasLinks
|
|
36
|
-
};
|
|
37
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useData } from 'vitepress';
|
|
3
|
-
import { EXTERNAL_URL_RE } from '../../shared';
|
|
4
|
-
export const platforms = ['GitHub', 'GitLab', 'Bitbucket'].map((platform) => {
|
|
5
|
-
return [platform, new RegExp(platform, 'i')];
|
|
6
|
-
});
|
|
7
|
-
export function useRepo() {
|
|
8
|
-
const { site } = useData();
|
|
9
|
-
return computed(() => {
|
|
10
|
-
const theme = site.value.themeConfig;
|
|
11
|
-
const name = theme.docsRepo || theme.repo;
|
|
12
|
-
if (!name) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
const link = getRepoUrl(name);
|
|
16
|
-
const text = getRepoText(link, theme.repoLabel);
|
|
17
|
-
return { text, link };
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
function getRepoUrl(repo) {
|
|
21
|
-
// if the full url is not provided, default to GitHub repo
|
|
22
|
-
return EXTERNAL_URL_RE.test(repo) ? repo : `https://github.com/${repo}`;
|
|
23
|
-
}
|
|
24
|
-
function getRepoText(url, text) {
|
|
25
|
-
if (text) {
|
|
26
|
-
return text;
|
|
27
|
-
}
|
|
28
|
-
// if no label is provided, deduce it from the repo url
|
|
29
|
-
const hosts = url.match(/^https?:\/\/[^/]+/);
|
|
30
|
-
if (!hosts) {
|
|
31
|
-
return 'Source';
|
|
32
|
-
}
|
|
33
|
-
const platform = platforms.find(([_p, re]) => re.test(hosts[0]));
|
|
34
|
-
if (platform && platform[0]) {
|
|
35
|
-
return platform[0];
|
|
36
|
-
}
|
|
37
|
-
return 'Source';
|
|
38
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { useRoute, useData } from 'vitepress';
|
|
3
|
-
import { useActiveSidebarLinks } from '../composables/activeSidebarLink';
|
|
4
|
-
import { getSideBarConfig } from '../support/sideBar';
|
|
5
|
-
export function useSideBar() {
|
|
6
|
-
const route = useRoute();
|
|
7
|
-
const { site } = useData();
|
|
8
|
-
useActiveSidebarLinks();
|
|
9
|
-
return computed(() => {
|
|
10
|
-
// at first, we'll check if we can find the sidebar setting in frontmatter.
|
|
11
|
-
const headers = route.data.headers;
|
|
12
|
-
const frontSidebar = route.data.frontmatter.sidebar;
|
|
13
|
-
const sidebarDepth = route.data.frontmatter.sidebarDepth;
|
|
14
|
-
// if it's `false`, we'll just return an empty array here.
|
|
15
|
-
if (frontSidebar === false) {
|
|
16
|
-
return [];
|
|
17
|
-
}
|
|
18
|
-
// if it's `auto`, render headers of the current page
|
|
19
|
-
if (frontSidebar === 'auto') {
|
|
20
|
-
return resolveAutoSidebar(headers, sidebarDepth);
|
|
21
|
-
}
|
|
22
|
-
// now, there's no sidebar setting at frontmatter; let's see the configs
|
|
23
|
-
const themeSidebar = getSideBarConfig(site.value.themeConfig.sidebar, route.data.relativePath);
|
|
24
|
-
if (themeSidebar === false) {
|
|
25
|
-
return [];
|
|
26
|
-
}
|
|
27
|
-
if (themeSidebar === 'auto') {
|
|
28
|
-
return resolveAutoSidebar(headers, sidebarDepth);
|
|
29
|
-
}
|
|
30
|
-
return themeSidebar;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function resolveAutoSidebar(headers, depth) {
|
|
34
|
-
const ret = [];
|
|
35
|
-
if (headers === undefined) {
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
let lastH2 = undefined;
|
|
39
|
-
headers.forEach(({ level, title, slug }) => {
|
|
40
|
-
if (level - 1 > depth) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
const item = {
|
|
44
|
-
text: title,
|
|
45
|
-
link: `#${slug}`
|
|
46
|
-
};
|
|
47
|
-
if (level === 2) {
|
|
48
|
-
lastH2 = item;
|
|
49
|
-
ret.push(item);
|
|
50
|
-
}
|
|
51
|
-
else if (lastH2) {
|
|
52
|
-
;
|
|
53
|
-
(lastH2.children || (lastH2.children = [])).push(item);
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
return ret;
|
|
57
|
-
}
|
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
code {
|
|
2
|
-
margin: 0;
|
|
3
|
-
border-radius: 3px;
|
|
4
|
-
padding: 0.25rem 0.5rem;
|
|
5
|
-
font-family: var(--code-font-family);
|
|
6
|
-
font-size: 0.85em;
|
|
7
|
-
color: var(--c-text-light);
|
|
8
|
-
background-color: var(--code-inline-bg-color);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
code .token.deleted {
|
|
12
|
-
color: #ec5975;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
code .token.inserted {
|
|
16
|
-
color: var(--c-brand);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
div[class*='language-'] {
|
|
20
|
-
position: relative;
|
|
21
|
-
margin: 1rem -1.5rem;
|
|
22
|
-
background-color: var(--code-bg-color);
|
|
23
|
-
overflow-x: auto;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
li > div[class*='language-'] {
|
|
27
|
-
border-radius: 6px 0 0 6px;
|
|
28
|
-
margin: 1rem -1.5rem 1rem -1.25rem;
|
|
29
|
-
line-height: initial;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@media (min-width: 420px) {
|
|
33
|
-
div[class*='language-'] {
|
|
34
|
-
margin: 1rem 0;
|
|
35
|
-
border-radius: 6px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
li > div[class*='language-'] {
|
|
39
|
-
margin: 1rem 0 1rem 0rem;
|
|
40
|
-
border-radius: 6px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[class*='language-'] pre,
|
|
45
|
-
[class*='language-'] code {
|
|
46
|
-
text-align: left;
|
|
47
|
-
white-space: pre;
|
|
48
|
-
word-spacing: normal;
|
|
49
|
-
word-break: normal;
|
|
50
|
-
word-wrap: normal;
|
|
51
|
-
-moz-tab-size: 4;
|
|
52
|
-
-o-tab-size: 4;
|
|
53
|
-
tab-size: 4;
|
|
54
|
-
-webkit-hyphens: none;
|
|
55
|
-
-moz-hyphens: none;
|
|
56
|
-
-ms-hyphens: none;
|
|
57
|
-
hyphens: none;
|
|
58
|
-
background: transparent;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
[class*='language-'] pre {
|
|
62
|
-
position: relative;
|
|
63
|
-
z-index: 1;
|
|
64
|
-
margin: 0;
|
|
65
|
-
padding: 1.25rem 1.5rem;
|
|
66
|
-
overflow-x: auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
[class*='language-'] code {
|
|
70
|
-
padding: 0;
|
|
71
|
-
line-height: var(--code-line-height);
|
|
72
|
-
font-size: var(--code-font-size);
|
|
73
|
-
color: #eee;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* Line highlighting */
|
|
77
|
-
|
|
78
|
-
.highlight-lines {
|
|
79
|
-
position: absolute;
|
|
80
|
-
top: 0;
|
|
81
|
-
bottom: 0;
|
|
82
|
-
left: 0;
|
|
83
|
-
padding: 1.25rem 0;
|
|
84
|
-
width: 100%;
|
|
85
|
-
line-height: var(--code-line-height);
|
|
86
|
-
font-family: var(--code-font-family);
|
|
87
|
-
font-size: var(--code-font-size);
|
|
88
|
-
user-select: none;
|
|
89
|
-
overflow: hidden;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.highlight-lines .highlighted {
|
|
93
|
-
background-color: rgba(0, 0, 0, 0.66);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/* Line numbers mode */
|
|
97
|
-
|
|
98
|
-
div[class*='language-'].line-numbers-mode {
|
|
99
|
-
padding-left: 3.5rem;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.line-numbers-wrapper {
|
|
103
|
-
position: absolute;
|
|
104
|
-
top: 0;
|
|
105
|
-
bottom: 0;
|
|
106
|
-
left: 0;
|
|
107
|
-
z-index: 3;
|
|
108
|
-
border-right: 1px solid rgba(0, 0, 0, 0.5);
|
|
109
|
-
padding: 1.25rem 0;
|
|
110
|
-
width: 3.5rem;
|
|
111
|
-
text-align: center;
|
|
112
|
-
line-height: var(--code-line-height);
|
|
113
|
-
font-family: var(--code-font-family);
|
|
114
|
-
font-size: var(--code-font-size);
|
|
115
|
-
color: #888;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* Language marker */
|
|
119
|
-
|
|
120
|
-
div[class*='language-']:before {
|
|
121
|
-
position: absolute;
|
|
122
|
-
top: 0.6em;
|
|
123
|
-
right: 1em;
|
|
124
|
-
z-index: 2;
|
|
125
|
-
font-size: 0.8rem;
|
|
126
|
-
color: #888;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
div[class~='language-html']:before,
|
|
130
|
-
div[class~='language-markup']:before {
|
|
131
|
-
content: 'html';
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
div[class~='language-md']:before,
|
|
135
|
-
div[class~='language-markdown']:before {
|
|
136
|
-
content: 'md';
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
div[class~='language-css']:before {
|
|
140
|
-
content: 'css';
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
div[class~='language-sass']:before {
|
|
144
|
-
content: 'sass';
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
div[class~='language-scss']:before {
|
|
148
|
-
content: 'scss';
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
div[class~='language-less']:before {
|
|
152
|
-
content: 'less';
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
div[class~='language-stylus']:before {
|
|
156
|
-
content: 'styl';
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
div[class~='language-js']:before,
|
|
160
|
-
div[class~='language-javascript']:before {
|
|
161
|
-
content: 'js';
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
div[class~='language-ts']:before,
|
|
165
|
-
div[class~='language-typescript']:before {
|
|
166
|
-
content: 'ts';
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
div[class~='language-json']:before {
|
|
170
|
-
content: 'json';
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
div[class~='language-rb']:before,
|
|
174
|
-
div[class~='language-ruby']:before {
|
|
175
|
-
content: 'rb';
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
div[class~='language-py']:before,
|
|
179
|
-
div[class~='language-python']:before {
|
|
180
|
-
content: 'py';
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
div[class~='language-sh']:before,
|
|
184
|
-
div[class~='language-bash']:before {
|
|
185
|
-
content: 'sh';
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
div[class~='language-php']:before {
|
|
189
|
-
content: 'php';
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
div[class~='language-go']:before {
|
|
193
|
-
content: 'go';
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
div[class~='language-rust']:before {
|
|
197
|
-
content: 'rust';
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
div[class~='language-java']:before {
|
|
201
|
-
content: 'java';
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
div[class~='language-c']:before {
|
|
205
|
-
content: 'c';
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
div[class~='language-yaml']:before {
|
|
209
|
-
content: 'yaml';
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
div[class~='language-dockerfile']:before {
|
|
213
|
-
content: 'dockerfile';
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
div[class~='language-vue']:before {
|
|
217
|
-
content: 'vue';
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML.
|
|
222
|
-
* Based on https://github.com/chriskempson/tomorrow-theme
|
|
223
|
-
*
|
|
224
|
-
* @author Rose Pritchard
|
|
225
|
-
*/
|
|
226
|
-
.token.comment,
|
|
227
|
-
.token.block-comment,
|
|
228
|
-
.token.prolog,
|
|
229
|
-
.token.doctype,
|
|
230
|
-
.token.cdata {
|
|
231
|
-
color: #999;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
.token.punctuation {
|
|
235
|
-
color: #ccc;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.token.tag,
|
|
239
|
-
.token.attr-name,
|
|
240
|
-
.token.namespace,
|
|
241
|
-
.token.deleted {
|
|
242
|
-
color: #e2777a;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.token.function-name {
|
|
246
|
-
color: #6196cc;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.token.boolean,
|
|
250
|
-
.token.number,
|
|
251
|
-
.token.function {
|
|
252
|
-
color: #f08d49;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
.token.property,
|
|
256
|
-
.token.class-name,
|
|
257
|
-
.token.constant,
|
|
258
|
-
.token.symbol {
|
|
259
|
-
color: #f8c555;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
.token.selector,
|
|
263
|
-
.token.important,
|
|
264
|
-
.token.atrule,
|
|
265
|
-
.token.keyword,
|
|
266
|
-
.token.builtin {
|
|
267
|
-
color: #cc99cd;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.token.string,
|
|
271
|
-
.token.char,
|
|
272
|
-
.token.attr-value,
|
|
273
|
-
.token.regex,
|
|
274
|
-
.token.variable {
|
|
275
|
-
color: #7ec699;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.token.operator,
|
|
279
|
-
.token.entity,
|
|
280
|
-
.token.url {
|
|
281
|
-
color: #67cdcc;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.token.important,
|
|
285
|
-
.token.bold {
|
|
286
|
-
font-weight: bold;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.token.italic {
|
|
290
|
-
font-style: italic;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.token.entity {
|
|
294
|
-
cursor: help;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.token.inserted {
|
|
298
|
-
color: green;
|
|
299
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
.custom-block.tip,
|
|
2
|
-
.custom-block.info,
|
|
3
|
-
.custom-block.warning,
|
|
4
|
-
.custom-block.danger {
|
|
5
|
-
margin: 1rem 0;
|
|
6
|
-
border-left: 0.5rem solid;
|
|
7
|
-
padding: 0.1rem 1.5rem;
|
|
8
|
-
overflow-x: auto;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.custom-block.tip {
|
|
12
|
-
background-color: #f3f5f7;
|
|
13
|
-
border-color: var(--c-brand);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.custom-block.info {
|
|
17
|
-
background-color: #f3f5f7;
|
|
18
|
-
border-color: var(--c-text-light-2);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.custom-block.warning {
|
|
22
|
-
border-color: #e7c000;
|
|
23
|
-
color: #6b5900;
|
|
24
|
-
background-color: rgba(255, 229, 100, 0.3);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.custom-block.warning .custom-block-title {
|
|
28
|
-
color: #b29400;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.custom-block.warning a {
|
|
32
|
-
color: var(--c-text);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.custom-block.danger {
|
|
36
|
-
border-color: #c00;
|
|
37
|
-
color: #4d0000;
|
|
38
|
-
background-color: #ffe6e6;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.custom-block.danger .custom-block-title {
|
|
42
|
-
color: #900;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.custom-block.danger a {
|
|
46
|
-
color: var(--c-text);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.custom-block.details {
|
|
50
|
-
position: relative;
|
|
51
|
-
display: block;
|
|
52
|
-
border-radius: 2px;
|
|
53
|
-
margin: 1.6em 0;
|
|
54
|
-
padding: 1.6em;
|
|
55
|
-
background-color: #eee;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.custom-block.details h4 {
|
|
59
|
-
margin-top: 0;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.custom-block.details figure:last-child,
|
|
63
|
-
.custom-block.details p:last-child {
|
|
64
|
-
margin-bottom: 0;
|
|
65
|
-
padding-bottom: 0;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.custom-block.details summary {
|
|
69
|
-
outline: none;
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.custom-block-title {
|
|
74
|
-
margin-bottom: -0.4rem;
|
|
75
|
-
font-weight: 600;
|
|
76
|
-
}
|