@brillout/docpress 0.0.45
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/cli.mjs +2 -0
- package/dist/cli/chunk-KZROB63P.js +8 -0
- package/dist/cli/configFile.js +6 -0
- package/dist/cli/devServer.js +31 -0
- package/dist/cli/index.js +37 -0
- package/index.ts +2 -0
- package/mdx.d.ts +6 -0
- package/package.json +73 -0
- package/readme.md +3 -0
- package/src/MobileHeader.tsx +68 -0
- package/src/PageLayout.css +32 -0
- package/src/PageLayout.tsx +43 -0
- package/src/algolia/DocSearch.css +29 -0
- package/src/algolia/DocSearch.ts +37 -0
- package/src/autoScrollNav.ts +22 -0
- package/src/components/ContactUs.tsx +19 -0
- package/src/components/DocLink.tsx +108 -0
- package/src/components/EditPageNote.tsx +18 -0
- package/src/components/HorizontalLine.tsx +20 -0
- package/src/components/ImportMeta.tsx +11 -0
- package/src/components/Info.tsx +12 -0
- package/src/components/Link.tsx +18 -0
- package/src/components/Note.tsx +31 -0
- package/src/components/P.css +8 -0
- package/src/components/P.tsx +8 -0
- package/src/components/ReadingRecommendation.tsx +53 -0
- package/src/components/RepoLink.tsx +24 -0
- package/src/components/Sponsors/companyLogos/ccoli-logo.svg +1 -0
- package/src/components/Sponsors/companyLogos/ccoli-text.svg +1 -0
- package/src/components/Sponsors/companyLogos/ccoli.svg +9 -0
- package/src/components/Sponsors/companyLogos/contra.svg +1 -0
- package/src/components/Sponsors/companyLogos/mfqs.svg +1 -0
- package/src/components/Sponsors/label.draft.svg +108 -0
- package/src/components/Sponsors/label.svg +5 -0
- package/src/components/Sponsors/medalBronze.svg +65 -0
- package/src/components/Sponsors/medalGold.svg +65 -0
- package/src/components/Sponsors/medalSilver.svg +65 -0
- package/src/components/Sponsors.tsx +240 -0
- package/src/components/TextContactUs.tsx +15 -0
- package/src/components/features/FeatureList.css +117 -0
- package/src/components/features/FeatureList.tsx +114 -0
- package/src/components/features/chevron.svg +7 -0
- package/src/components/features/initFeatureList.ts +61 -0
- package/src/components/index.ts +14 -0
- package/src/config/Config.ts +30 -0
- package/src/config/getConfig.ts +18 -0
- package/src/config/resolveConfig/resolveHeading.ts +0 -0
- package/src/config/resolvePageContext.ts +156 -0
- package/src/css/Inter-Var.ttf +0 -0
- package/src/css/button.css +7 -0
- package/src/css/code/block.css +36 -0
- package/src/css/code/inline.css +27 -0
- package/src/css/code.css +20 -0
- package/src/css/colorize-on-hover.css +29 -0
- package/src/css/font.css +19 -0
- package/src/css/heading.css +25 -0
- package/src/css/index.css +10 -0
- package/src/css/link.css +17 -0
- package/src/css/note.css +26 -0
- package/src/css/reset.css +12 -0
- package/src/css/table.css +14 -0
- package/src/css/tooltip.css +11 -0
- package/src/headings.ts +206 -0
- package/src/icons/changelog.svg +2 -0
- package/src/icons/discord.svg +10 -0
- package/src/icons/github.svg +74 -0
- package/src/icons/heart.svg +1 -0
- package/src/icons/twitter.svg +16 -0
- package/src/index.ts +3 -0
- package/src/installSectionUrlHashs.ts +50 -0
- package/src/navigation/Navigation-highlight.css +41 -0
- package/src/navigation/Navigation-items.css +122 -0
- package/src/navigation/Navigation-layout.css +119 -0
- package/src/navigation/Navigation.client.old.ts +303 -0
- package/src/navigation/Navigation.client.ts +19 -0
- package/src/navigation/Navigation.css +8 -0
- package/src/navigation/Navigation.tsx +228 -0
- package/src/navigation/NavigationHeader.tsx +97 -0
- package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.css +32 -0
- package/src/navigation/navigation-fullscreen/NavigationFullscreenButton.tsx +44 -0
- package/src/navigation/navigation-fullscreen/chevron.svg +1 -0
- package/src/navigation/navigation-fullscreen/close.svg +4 -0
- package/src/navigation/navigation-fullscreen/initNavigationFullscreen.ts +115 -0
- package/src/parseEmojis.ts +33 -0
- package/src/renderer/_default.page.client.ts +7 -0
- package/src/renderer/_default.page.server.tsx +69 -0
- package/src/renderer/usePageContext.tsx +25 -0
- package/src/types.ts +2 -0
- package/src/utils/Emoji/Emoji.ts +216 -0
- package/src/utils/Emoji/assets.ts +9 -0
- package/src/utils/Emoji/compass.svg +1 -0
- package/src/utils/Emoji/engine.png +0 -0
- package/src/utils/Emoji/index.ts +1 -0
- package/src/utils/Emoji/mechanical-arm.svg +1 -0
- package/src/utils/Emoji/mountain.svg +1 -0
- package/src/utils/Emoji/road-fork.svg +17 -0
- package/src/utils/Emoji/shield.svg +1 -0
- package/src/utils/Emoji/typescript.svg +1 -0
- package/src/utils/assert.ts +39 -0
- package/src/utils/determineSectionUrlHash.ts +35 -0
- package/src/utils/filter.ts +12 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/isBrowser.ts +5 -0
- package/src/utils/jsxToTextContent.ts +11 -0
- package/src/utils/objectAssign.ts +6 -0
- package/vite.config/markdownHeadings.ts +128 -0
- package/vite.config.ts +42 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
4
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
5
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
6
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
9
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
10
|
+
version="1.1"
|
|
11
|
+
id="svg370"
|
|
12
|
+
xml:space="preserve"
|
|
13
|
+
width="250.81488"
|
|
14
|
+
height="244.62376"
|
|
15
|
+
viewBox="0 0 250.81488 244.62376"
|
|
16
|
+
sodipodi:docname="github.svg"
|
|
17
|
+
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"><metadata
|
|
18
|
+
id="metadata376"><rdf:RDF><cc:Work
|
|
19
|
+
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
|
20
|
+
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
|
21
|
+
id="defs374" /><sodipodi:namedview
|
|
22
|
+
pagecolor="#ffffff"
|
|
23
|
+
bordercolor="#666666"
|
|
24
|
+
borderopacity="1"
|
|
25
|
+
objecttolerance="10"
|
|
26
|
+
gridtolerance="10"
|
|
27
|
+
guidetolerance="10"
|
|
28
|
+
inkscape:pageopacity="0"
|
|
29
|
+
inkscape:pageshadow="2"
|
|
30
|
+
inkscape:window-width="1366"
|
|
31
|
+
inkscape:window-height="731"
|
|
32
|
+
id="namedview372"
|
|
33
|
+
showgrid="false"
|
|
34
|
+
fit-margin-top="0"
|
|
35
|
+
fit-margin-left="0"
|
|
36
|
+
fit-margin-right="0"
|
|
37
|
+
fit-margin-bottom="0"
|
|
38
|
+
inkscape:zoom="0.2365918"
|
|
39
|
+
inkscape:cx="288.55216"
|
|
40
|
+
inkscape:cy="872.45836"
|
|
41
|
+
inkscape:window-x="0"
|
|
42
|
+
inkscape:window-y="0"
|
|
43
|
+
inkscape:window-maximized="1"
|
|
44
|
+
inkscape:current-layer="g378" /><g
|
|
45
|
+
id="g378"
|
|
46
|
+
inkscape:groupmode="layer"
|
|
47
|
+
inkscape:label="ink_ext_XXXXXX"
|
|
48
|
+
transform="matrix(1.3333333,0,0,-1.3333333,224.39255,1704.88)"><g
|
|
49
|
+
id="g663"
|
|
50
|
+
transform="translate(-524.0424,525.41914)"><path
|
|
51
|
+
d="m 449.80434,753.24092 c -51.93909,0 -94.05636,-42.10949 -94.05636,-94.05636 0,-41.55656 26.95001,-76.8129 64.32148,-89.24981 4.70064,-0.87066 6.42638,2.04037 6.42638,4.52463 0,2.24285 -0.0872,9.65204 -0.12771,17.51136 -26.16657,-5.68967 -31.68803,11.09743 -31.68803,11.09743 -4.27855,10.87159 -10.44327,13.76237 -10.44327,13.76237 -8.53373,5.83764 0.64326,5.71771 0.64326,5.71771 9.44489,-0.66196 14.4181,-9.6941 14.4181,-9.6941 8.38887,-14.37759 22.00328,-10.22053 27.37054,-7.81726 0.84418,6.07906 3.28173,10.22988 5.97159,12.57709 -20.89121,2.37835 -42.85244,10.44326 -42.85244,46.48304 0,10.26882 3.67423,18.65926 9.69098,25.24607 -0.97657,2.37057 -4.196,11.93538 0.91116,24.89095 0,0 7.89825,2.52788 25.87219,-9.64113 7.50265,2.08398 15.54887,3.12908 23.54213,3.16491 7.99327,-0.0358 16.04572,-1.08093 23.56238,-3.16491 17.95213,12.16901 25.83948,9.64113 25.83948,9.64113 5.11962,-12.95557 1.89864,-22.52038 0.92206,-24.89095 6.03078,-6.58681 9.68008,-14.97725 9.68008,-25.24607 0,-36.12544 -22.00328,-44.07977 -42.94744,-46.40828 3.37361,-2.91882 6.37966,-8.64276 6.37966,-17.4179 0,-12.58488 -0.10903,-22.71352 -0.10903,-25.81146 0,-2.50295 1.69304,-5.43579 6.46065,-4.51217 37.35122,12.45092 64.26697,47.6948 64.26697,89.23735 0,51.94687 -42.11105,94.05636 -94.05481,94.05636"
|
|
52
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.155753"
|
|
53
|
+
id="path386" /><path
|
|
54
|
+
d="m 391.3719,618.1965 c -0.20716,-0.46882 -0.94231,-0.60744 -1.61205,-0.28659 -0.6822,0.30683 -1.06536,0.94386 -0.84419,1.41268 0.20248,0.47972 0.9392,0.61367 1.61984,0.29438 0.68376,-0.3084 1.07314,-0.95166 0.8364,-1.42047 v 0"
|
|
55
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
56
|
+
id="path388" /><path
|
|
57
|
+
d="m 395.18162,613.94754 c -0.44857,-0.41586 -1.32546,-0.22272 -1.92044,0.43455 -0.61522,0.65573 -0.73048,1.53262 -0.27568,1.95471 0.46259,0.4143 1.313,0.21961 1.92979,-0.43455 0.61522,-0.66351 0.73515,-1.53417 0.26633,-1.95471 v 0"
|
|
58
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
59
|
+
id="path390" /><path
|
|
60
|
+
d="m 398.89011,608.53044 c -0.57629,-0.40029 -1.51859,-0.0249 -2.10111,0.81147 -0.57629,0.8364 -0.57629,1.83945 0.0125,2.2413 0.58407,0.40184 1.51236,0.0389 2.10267,-0.78967 0.57473,-0.85042 0.57473,-1.85347 -0.014,-2.2631 v 0"
|
|
61
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
62
|
+
id="path392" /><path
|
|
63
|
+
d="m 403.97079,603.29713 c -0.51555,-0.5685 -1.61361,-0.41587 -2.41729,0.35979 -0.82238,0.75851 -1.05134,1.83477 -0.53424,2.40327 0.52178,0.57006 1.62607,0.40963 2.43598,-0.35979 0.81615,-0.75696 1.06536,-1.84101 0.51555,-2.40327 v 0"
|
|
64
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
65
|
+
id="path394" /><path
|
|
66
|
+
d="m 410.97969,600.25838 c -0.2274,-0.73672 -1.28496,-1.07159 -2.35032,-0.75852 -1.06379,0.32241 -1.76001,1.18528 -1.54507,1.92978 0.22117,0.74139 1.28341,1.09028 2.35655,0.75541 1.06224,-0.32086 1.76001,-1.1775 1.53884,-1.92667 v 0"
|
|
67
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
68
|
+
id="path396" /><path
|
|
69
|
+
d="m 418.67702,599.69455 c 0.0265,-0.77565 -0.87689,-1.41891 -1.9952,-1.43293 -1.12454,-0.0249 -2.03414,0.60276 -2.0466,1.36596 0,0.78343 0.88313,1.42047 2.00766,1.43916 1.11831,0.0218 2.03414,-0.60121 2.03414,-1.37219 v 0"
|
|
70
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
71
|
+
id="path398" /><path
|
|
72
|
+
d="m 425.84012,600.9141 c 0.13395,-0.75696 -0.64326,-1.53417 -1.75378,-1.74132 -1.09183,-0.19937 -2.10267,0.26789 -2.24129,1.01862 -0.13551,0.77565 0.65572,1.55286 1.74599,1.75379 1.11208,0.19313 2.10735,-0.26167 2.24908,-1.03109 v 0"
|
|
73
|
+
style="fill:#1b1817;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.155753"
|
|
74
|
+
id="path400" /></g></g></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon" stroke="rgb(248, 113, 113)" fill="rgb(248, 113, 113)"><path d="M12,22.2c-0.3,0-0.5-0.1-0.7-0.3l-8.8-8.8c-2.5-2.5-2.5-6.7,0-9.2c2.5-2.5,6.7-2.5,9.2,0L12,4.3l0.4-0.4c0,0,0,0,0,0C13.6,2.7,15.2,2,16.9,2c0,0,0,0,0,0c1.7,0,3.4,0.7,4.6,1.9l0,0c1.2,1.2,1.9,2.9,1.9,4.6c0,1.7-0.7,3.4-1.9,4.6l-8.8,8.8C12.5,22.1,12.3,22.2,12,22.2zM7,4C5.9,4,4.7,4.4,3.9,5.3c-1.8,1.8-1.8,4.6,0,6.4l8.1,8.1l8.1-8.1c0.9-0.9,1.3-2,1.3-3.2c0-1.2-0.5-2.3-1.3-3.2l0,0C19.3,4.5,18.2,4,17,4c0,0,0,0,0,0c-1.2,0-2.3,0.5-3.2,1.3c0,0,0,0,0,0l-1.1,1.1c-0.4,0.4-1,0.4-1.4,0l-1.1-1.1C9.4,4.4,8.2,4,7,4z"></path></svg>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 24.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<svg version="1.1" id="Logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
4
|
+
viewBox="0 0 248 204" style="enable-background:new 0 0 248 204;" xml:space="preserve">
|
|
5
|
+
<style type="text/css">
|
|
6
|
+
.st0{fill:#1D9BF0;}
|
|
7
|
+
</style>
|
|
8
|
+
<g id="Logo_1_">
|
|
9
|
+
<path id="white_background" class="st0" d="M221.95,51.29c0.15,2.17,0.15,4.34,0.15,6.53c0,66.73-50.8,143.69-143.69,143.69v-0.04
|
|
10
|
+
C50.97,201.51,24.1,193.65,1,178.83c3.99,0.48,8,0.72,12.02,0.73c22.74,0.02,44.83-7.61,62.72-21.66
|
|
11
|
+
c-21.61-0.41-40.56-14.5-47.18-35.07c7.57,1.46,15.37,1.16,22.8-0.87C27.8,117.2,10.85,96.5,10.85,72.46c0-0.22,0-0.43,0-0.64
|
|
12
|
+
c7.02,3.91,14.88,6.08,22.92,6.32C11.58,63.31,4.74,33.79,18.14,10.71c25.64,31.55,63.47,50.73,104.08,52.76
|
|
13
|
+
c-4.07-17.54,1.49-35.92,14.61-48.25c20.34-19.12,52.33-18.14,71.45,2.19c11.31-2.23,22.15-6.38,32.07-12.26
|
|
14
|
+
c-3.77,11.69-11.66,21.62-22.2,27.93c10.01-1.18,19.79-3.86,29-7.95C240.37,35.29,231.83,44.14,221.95,51.29z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { assert } from './utils'
|
|
2
|
+
|
|
3
|
+
installSectionUrlHashs()
|
|
4
|
+
/* Let browser restore previous scroll
|
|
5
|
+
jumpToSection()
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
function installSectionUrlHashs() {
|
|
9
|
+
const pageContainer = document.querySelector('.doc-page #page-container')
|
|
10
|
+
if (!pageContainer) {
|
|
11
|
+
assert(window.location.pathname === '/')
|
|
12
|
+
return
|
|
13
|
+
}
|
|
14
|
+
const navigationEl = document.getElementById('navigation-content')
|
|
15
|
+
assert(navigationEl)
|
|
16
|
+
const docSections = Array.from(document.querySelectorAll('h2'))
|
|
17
|
+
docSections.forEach((docSection) => {
|
|
18
|
+
const docTitle = docSection.textContent
|
|
19
|
+
assert(docTitle)
|
|
20
|
+
assert(docSection.id, { docSection })
|
|
21
|
+
const urlHash = '#' + docSection.id
|
|
22
|
+
assertNavLink(navigationEl, urlHash)
|
|
23
|
+
docSection.onclick = () => {
|
|
24
|
+
window.location.hash = urlHash
|
|
25
|
+
// The browser doesn't jump if hash doesn't change
|
|
26
|
+
jumpToSection()
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function assertNavLink(navigationEl: HTMLElement, urlHash: string) {
|
|
32
|
+
const parentNavLinkMatch = Array.from(navigationEl.querySelectorAll(`a[href="${window.location.pathname}"]`))
|
|
33
|
+
assert(parentNavLinkMatch.length <= 1)
|
|
34
|
+
if (parentNavLinkMatch.length === 0) return
|
|
35
|
+
const navLinks: HTMLElement[] = Array.from(navigationEl.querySelectorAll(`a[href="${urlHash}"]`))
|
|
36
|
+
assert(navLinks.length === 1, { urlHash })
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function jumpToSection() {
|
|
40
|
+
const { hash } = window.location
|
|
41
|
+
if (hash === '' || hash === '#') {
|
|
42
|
+
return
|
|
43
|
+
}
|
|
44
|
+
assert(hash.startsWith('#'))
|
|
45
|
+
const target = document.getElementById(hash.slice(1))
|
|
46
|
+
if (!target) {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
target.scrollIntoView()
|
|
50
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
.nav-item {
|
|
3
|
+
border-top: 1px solid transparent;
|
|
4
|
+
}
|
|
5
|
+
.nav-item.is-active {
|
|
6
|
+
border-color: #eaeaea;
|
|
7
|
+
}
|
|
8
|
+
.nav-item[is-active] {
|
|
9
|
+
background-color: attr(is-active)
|
|
10
|
+
}
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/*
|
|
14
|
+
#navigation-container:not(:hover) ::-webkit-scrollbar {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
#navigation-container ::-webkit-scrollbar-thumb {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
#navigation-container ::-webkit-scrollbar-track {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
}
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
.nav-tree:not(.expanded) > .nav-tree {
|
|
27
|
+
edisplay: none;
|
|
28
|
+
background:red;
|
|
29
|
+
}
|
|
30
|
+
*/
|
|
31
|
+
/*
|
|
32
|
+
.nav-tree.expanded,
|
|
33
|
+
.nav-tree.expanded > .nav-tree {
|
|
34
|
+
display: inherit;
|
|
35
|
+
}
|
|
36
|
+
.nav-tree.expanded,
|
|
37
|
+
.nav-tree.expanded > .nav-tree {
|
|
38
|
+
display: inherit;
|
|
39
|
+
background:red;
|
|
40
|
+
}
|
|
41
|
+
*/
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
.nav-item {
|
|
2
|
+
display: block;
|
|
3
|
+
white-space: nowrap;
|
|
4
|
+
overflow-x: hidden;
|
|
5
|
+
--padding-left-global: 9px;
|
|
6
|
+
--padding-left-additional: 0px;
|
|
7
|
+
}
|
|
8
|
+
.nav-item code {
|
|
9
|
+
font-size: 0.9em;
|
|
10
|
+
}
|
|
11
|
+
.nav-item-h1 + .nav-item-h4 {
|
|
12
|
+
margin-top: -2px;
|
|
13
|
+
}
|
|
14
|
+
.nav-item-h4 {
|
|
15
|
+
margin-top: 14px;
|
|
16
|
+
margin-bottom: -1px;
|
|
17
|
+
color: #999;
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
letter-spacing: 0.15ch;
|
|
21
|
+
padding-left: var(--padding-left-global);
|
|
22
|
+
padding-right: 4px;
|
|
23
|
+
text-decoration: none;
|
|
24
|
+
}
|
|
25
|
+
.nav-column:first-of-type > .nav-h1-group:first-of-type > .nav-item-h1:first-of-type {
|
|
26
|
+
margin-top: 20px;
|
|
27
|
+
}
|
|
28
|
+
.nav-item-h1 {
|
|
29
|
+
margin-top: 30px;
|
|
30
|
+
font-size: 15.4px;
|
|
31
|
+
text-transform: uppercase;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
letter-spacing: 0.15ch;
|
|
34
|
+
color: var(--color-text);
|
|
35
|
+
padding: 12px 0;
|
|
36
|
+
padding-left: calc(var(--padding-left-global) - 2px);
|
|
37
|
+
padding-right: 4px;
|
|
38
|
+
text-decoration: none;
|
|
39
|
+
}
|
|
40
|
+
.nav-item-h2 {
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
font-size: 14.4px;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
letter-spacing: 0.15ch;
|
|
45
|
+
color: var(--color-text);
|
|
46
|
+
padding-left: var(--padding-left-global);
|
|
47
|
+
padding-right: 0;
|
|
48
|
+
--padding: 4px;
|
|
49
|
+
padding-top: var(--padding);
|
|
50
|
+
padding-bottom: var(--padding);
|
|
51
|
+
}
|
|
52
|
+
.nav-item-h3 {
|
|
53
|
+
font-size: 12px;
|
|
54
|
+
font-weight: 400;
|
|
55
|
+
letter-spacing: 0.15ch;
|
|
56
|
+
color: var(--color-text);
|
|
57
|
+
text-decoration: none;
|
|
58
|
+
--padding: 5px;
|
|
59
|
+
|
|
60
|
+
background-color: #f9f9f9;
|
|
61
|
+
padding: var(--padding) 0;
|
|
62
|
+
padding-left: calc(var(--padding-left-global) + var(--padding-left-additional));
|
|
63
|
+
}
|
|
64
|
+
html.navigation-fullscreen .nav-item-h3 {
|
|
65
|
+
border-right: 4px solid #eee;
|
|
66
|
+
}
|
|
67
|
+
.nav-item-h3.nav-item-first-of-its-kind {
|
|
68
|
+
padding-top: calc(var(--padding) * 1.6);
|
|
69
|
+
}
|
|
70
|
+
.nav-item-h3.nav-item-last-of-its-kind {
|
|
71
|
+
padding-bottom: calc(var(--padding) * 2);
|
|
72
|
+
}
|
|
73
|
+
.nav-item-h2,
|
|
74
|
+
.nav-item-h3 {
|
|
75
|
+
position: relative;
|
|
76
|
+
}
|
|
77
|
+
/*
|
|
78
|
+
.nav-item-h2.is-active .nav-item-text{
|
|
79
|
+
background-color: var(--background-color);
|
|
80
|
+
}
|
|
81
|
+
*/
|
|
82
|
+
.nav-item-h2.is-active {
|
|
83
|
+
background-color: var(--background-color);
|
|
84
|
+
}
|
|
85
|
+
.nav-item-h3.is-active:before {
|
|
86
|
+
display: block;
|
|
87
|
+
content: '';
|
|
88
|
+
position: absolute;
|
|
89
|
+
width: 4px;
|
|
90
|
+
left: 0;
|
|
91
|
+
top: 0;
|
|
92
|
+
height: 100%;
|
|
93
|
+
background-color: var(--background-color);
|
|
94
|
+
z-index: 10;
|
|
95
|
+
}
|
|
96
|
+
.nav-item-h3.is-active-last:after {
|
|
97
|
+
display: block;
|
|
98
|
+
content: '';
|
|
99
|
+
position: absolute;
|
|
100
|
+
height: 4px;
|
|
101
|
+
left: 0;
|
|
102
|
+
bottom: 0;
|
|
103
|
+
width: 100%;
|
|
104
|
+
background-color: var(--background-color);
|
|
105
|
+
z-index: 10;
|
|
106
|
+
border-bottom-left-radius: 5px;
|
|
107
|
+
}
|
|
108
|
+
html.navigation-fullscreen .nav-item {
|
|
109
|
+
--expend-border-radius: 5px;
|
|
110
|
+
}
|
|
111
|
+
.nav-item.is-active-first {
|
|
112
|
+
border-top-left-radius: 5px;
|
|
113
|
+
border-top-right-radius: var(--expend-border-radius);
|
|
114
|
+
}
|
|
115
|
+
.nav-item.is-active-last,
|
|
116
|
+
.nav-item.is-active-last:before {
|
|
117
|
+
border-bottom-left-radius: 5px;
|
|
118
|
+
border-bottom-right-radius: var(--expend-border-radius);
|
|
119
|
+
}
|
|
120
|
+
.nav-item-h3.nav-item-parent-is-list-heading {
|
|
121
|
+
--padding-left-additional: 21px;
|
|
122
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--mobile-header-height: 60px;
|
|
3
|
+
--navigation-min-height: 300px;
|
|
4
|
+
--navigation-max-height: 350px;
|
|
5
|
+
}
|
|
6
|
+
#navigation-wrapper {
|
|
7
|
+
min-width: var(--navigation-min-height);
|
|
8
|
+
flex-grow: 1;
|
|
9
|
+
}
|
|
10
|
+
.doc-page #navigation-wrapper {
|
|
11
|
+
max-width: var(--navigation-max-height);
|
|
12
|
+
}
|
|
13
|
+
.landing-page #navigation-wrapper {
|
|
14
|
+
/* prettier-ignore */
|
|
15
|
+
max-width: min(var(--navigation-max-height), max(var(--navigation-min-height), calc(var(--navigation-min-height) + 100vw - 1240px)));
|
|
16
|
+
}
|
|
17
|
+
#navigation-container {
|
|
18
|
+
/* `position: fixed` doesn't inherit the parent's width */
|
|
19
|
+
position: sticky;
|
|
20
|
+
overflow-y: auto;
|
|
21
|
+
overscroll-behavior: contain;
|
|
22
|
+
border-right: 1px solid #eee;
|
|
23
|
+
}
|
|
24
|
+
#navigation-mask {
|
|
25
|
+
position: fixed;
|
|
26
|
+
width: 100vw;
|
|
27
|
+
height: 100vh;
|
|
28
|
+
top: 0;
|
|
29
|
+
left: 0;
|
|
30
|
+
z-index: 2;
|
|
31
|
+
}
|
|
32
|
+
/* `1140px` is the breaking point that preserves the width of code blocks. */
|
|
33
|
+
/* BEFORE EDITING THIS: also change the `1139px` value below */
|
|
34
|
+
@media screen and (min-width: 1140px) {
|
|
35
|
+
#mobile-header {
|
|
36
|
+
display: none !important;
|
|
37
|
+
}
|
|
38
|
+
#navigation-container {
|
|
39
|
+
height: 100vh;
|
|
40
|
+
top: 0;
|
|
41
|
+
}
|
|
42
|
+
#navigation-mask {
|
|
43
|
+
display: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
#navigation-container {
|
|
47
|
+
transition: transform 0.25s ease;
|
|
48
|
+
background: white;
|
|
49
|
+
z-index: 3;
|
|
50
|
+
}
|
|
51
|
+
#page-wrapper {
|
|
52
|
+
margin-left: calc(-1 * var(--navigation-fullscreen-button-width));
|
|
53
|
+
}
|
|
54
|
+
@media screen and (max-width: 1139px) {
|
|
55
|
+
#navigation-header-logo,
|
|
56
|
+
#docsearch {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
#navigation-wrapper {
|
|
60
|
+
min-width: 0px !important;
|
|
61
|
+
max-width: 0px !important;
|
|
62
|
+
}
|
|
63
|
+
#navigation-fullscreen-button {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
#page-wrapper {
|
|
67
|
+
margin-left: 0!important;
|
|
68
|
+
}
|
|
69
|
+
#navigation-container {
|
|
70
|
+
--width: min(100vw, 350px);
|
|
71
|
+
width: var(--width);
|
|
72
|
+
left: 0;
|
|
73
|
+
height: calc(100vh - var(--mobile-header-height));
|
|
74
|
+
top: var(--mobile-header-height);
|
|
75
|
+
padding-top: 20px;
|
|
76
|
+
/* `position: sticky` doesn't seem to work on mobile */
|
|
77
|
+
position: fixed;
|
|
78
|
+
}
|
|
79
|
+
body:not(.show-menu) #navigation-container {
|
|
80
|
+
transform: translateX(calc(-1 * var(--width)));
|
|
81
|
+
}
|
|
82
|
+
body:not(.show-menu) #navigation-mask {
|
|
83
|
+
display: none;
|
|
84
|
+
}
|
|
85
|
+
#mobile-header {
|
|
86
|
+
display: inherit;
|
|
87
|
+
}
|
|
88
|
+
.doc-page h2 {
|
|
89
|
+
--padding-top: calc(var(--mobile-header-height) + 12px) !important;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
html.navigation-fullscreen #navigation-container {
|
|
94
|
+
width: 100vw;
|
|
95
|
+
height: 100vh;
|
|
96
|
+
overflow-y: scroll;
|
|
97
|
+
position: fixed;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
background-color: white;
|
|
101
|
+
}
|
|
102
|
+
html.navigation-fullscreen #navigation-header {
|
|
103
|
+
display: none !important;
|
|
104
|
+
}
|
|
105
|
+
html.navigation-fullscreen #navigation-content {
|
|
106
|
+
display: flex;
|
|
107
|
+
margin: auto; /* A `max-width` is set by src/navigation/navigation-fullscreen/initNavigationFullscreen.ts */
|
|
108
|
+
}
|
|
109
|
+
html.navigation-fullscreen #navigation-content > .nav-column {
|
|
110
|
+
flex-grow: 1;
|
|
111
|
+
max-width: 350px;
|
|
112
|
+
}
|
|
113
|
+
html.navigation-fullscreen .nav-column > .nav-h1-group:first-child > .nav-item-h1:first-child {
|
|
114
|
+
margin-top: 0px;
|
|
115
|
+
}
|
|
116
|
+
html.navigation-fullscreen {
|
|
117
|
+
/* disable scroll of main view */
|
|
118
|
+
overflow: hidden !important;
|
|
119
|
+
}
|