@brillout/docpress 0.9.4 → 0.9.6
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/Layout.tsx +35 -16
- package/NavSecondaryContent.tsx +2 -1
- package/components/RepoLink.tsx +3 -2
- package/dist/Layout.d.ts +1 -1
- package/dist/Layout.js +26 -20
- package/dist/NavSecondaryContent.d.ts +0 -1
- package/dist/NavSecondaryContent.js +1 -1
- package/dist/components/RepoLink.js +3 -1
- package/dist/docsearch/SearchLink.js +1 -1
- package/dist/types/Config.d.ts +1 -0
- package/docsearch/SearchLink.tsx +1 -1
- package/package.json +1 -1
- package/types/Config.ts +1 -0
package/Layout.tsx
CHANGED
|
@@ -26,13 +26,10 @@ const mainViewPadding = 20
|
|
|
26
26
|
const mainViewWidthMax = 800
|
|
27
27
|
const navLeftWidthMax = 370
|
|
28
28
|
const navLeftWidthMin = 300
|
|
29
|
-
// 840 = 800 + 20 * 2
|
|
30
|
-
const mainViewMax = mainViewWidthMax + mainViewPadding * 2
|
|
29
|
+
const mainViewMax = (mainViewWidthMax + mainViewPadding * 2) as 840 // 840 = 800 + 20 * 2
|
|
31
30
|
const containerQueryMobileMenu = 1000
|
|
32
|
-
// 1143 = 840 + 300
|
|
33
|
-
const
|
|
34
|
-
// 1213 = 840 + 370 + 3
|
|
35
|
-
const containerQueryExtraSpace = mainViewMax + navLeftWidthMax + blockMargin
|
|
31
|
+
const containerQueryMobileLayout = (mainViewMax + navLeftWidthMin) as 1143 // 1143 = 840 + 300
|
|
32
|
+
const containerQueryExtraSpace = (mainViewMax + navLeftWidthMax + blockMargin) as 1213 // 1213 = 840 + 370 + 3
|
|
36
33
|
|
|
37
34
|
// Avoid whitespace at the bottom of pages with almost no content
|
|
38
35
|
const whitespaceBuster1: React.CSSProperties = {
|
|
@@ -61,7 +58,8 @@ function Layout({ children }: { children: React.ReactNode }) {
|
|
|
61
58
|
['--bg-color']: '#f5f5f7',
|
|
62
59
|
['--block-margin']: `${blockMargin}px`,
|
|
63
60
|
['--icon-text-padding']: '8px',
|
|
64
|
-
['--nav-head-height']: `${isLandingPage ? 70 : 60}px`,
|
|
61
|
+
// ['--nav-head-height']: `${isLandingPage ? 70 : 60}px`,
|
|
62
|
+
['--nav-head-height']: `60px`,
|
|
65
63
|
}}
|
|
66
64
|
>
|
|
67
65
|
<MenuModal isTopNav={isLandingPage} />
|
|
@@ -250,6 +248,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
250
248
|
const pageContext2 = usePageContext2()
|
|
251
249
|
const { projectName } = pageContext.meta
|
|
252
250
|
const { isLandingPage } = pageContext
|
|
251
|
+
const { navMaxWidth } = pageContext.config
|
|
253
252
|
|
|
254
253
|
const linkStyle: React.CSSProperties = {
|
|
255
254
|
height: '100%',
|
|
@@ -260,7 +259,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
260
259
|
const TopNavigation = pageContext2.config.TopNavigation || PassThrough
|
|
261
260
|
const navSecondaryContent = (
|
|
262
261
|
<div
|
|
263
|
-
className={isNavLeft ? 'show-on-nav-hover add-transition' : 'hide-on-shrink'}
|
|
262
|
+
className={isNavLeft ? 'show-on-nav-hover add-transition' : 'hide-on-shrink desktop-grow'}
|
|
264
263
|
style={{
|
|
265
264
|
padding: 0,
|
|
266
265
|
display: 'flex',
|
|
@@ -278,6 +277,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
278
277
|
}}
|
|
279
278
|
>
|
|
280
279
|
<TopNavigation />
|
|
280
|
+
{!isNavLeft && <div className="desktop-grow" />}
|
|
281
281
|
<NavSecondaryContent
|
|
282
282
|
style={{
|
|
283
283
|
display: 'inline-flex',
|
|
@@ -313,6 +313,8 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
313
313
|
className="nav-head-content"
|
|
314
314
|
style={{
|
|
315
315
|
width: '100%',
|
|
316
|
+
maxWidth: navMaxWidth,
|
|
317
|
+
margin: 'auto',
|
|
316
318
|
height: 'var(--nav-head-height)',
|
|
317
319
|
fontSize: `min(16.96px, ${isProjectNameShort(projectName) ? '4.8cqw' : '4.5cqw'})`,
|
|
318
320
|
color: '#666',
|
|
@@ -321,9 +323,10 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
321
323
|
justifyContent: 'center',
|
|
322
324
|
}}
|
|
323
325
|
>
|
|
324
|
-
<NavLogo className="grow-half" />
|
|
325
|
-
<
|
|
326
|
-
<
|
|
326
|
+
<NavLogo className="mobile-grow-half" />
|
|
327
|
+
{!isNavLeft && <div className="desktop-grow" />}
|
|
328
|
+
<SearchLink className="mobile-grow-half" style={linkStyle} />
|
|
329
|
+
<MenuLink className="mobile-grow-full" style={linkStyle} />
|
|
327
330
|
{navSecondaryContent}
|
|
328
331
|
</div>
|
|
329
332
|
</div>
|
|
@@ -334,10 +337,10 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
334
337
|
function getStyle() {
|
|
335
338
|
let style = css`
|
|
336
339
|
@container container-nav-head (max-width: 550px) {
|
|
337
|
-
.grow-full {
|
|
340
|
+
.mobile-grow-full {
|
|
338
341
|
flex-grow: 1;
|
|
339
342
|
}
|
|
340
|
-
.grow-half {
|
|
343
|
+
.mobile-grow-half {
|
|
341
344
|
flex-grow: 0.5;
|
|
342
345
|
}
|
|
343
346
|
.nav-head-content {
|
|
@@ -362,7 +365,23 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
362
365
|
}
|
|
363
366
|
}
|
|
364
367
|
`
|
|
365
|
-
if (
|
|
368
|
+
if (navMaxWidth) {
|
|
369
|
+
style += css`
|
|
370
|
+
@media(min-width: ${containerQueryMobileMenu + 1}px) {
|
|
371
|
+
.desktop-grow {
|
|
372
|
+
flex-grow: 1;
|
|
373
|
+
}
|
|
374
|
+
.desktop-fade {
|
|
375
|
+
transition: opacity 0.3s ease-in-out !important;
|
|
376
|
+
}
|
|
377
|
+
html:not(.menu-modal-show) .nav-head-top:not(:hover) .desktop-fade {
|
|
378
|
+
transition: opacity 0.3s ease-in-out !important;
|
|
379
|
+
opacity: 0.5;
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
`
|
|
383
|
+
}
|
|
384
|
+
if (isLandingPage && !navMaxWidth)
|
|
366
385
|
style += css`
|
|
367
386
|
@media(min-width: ${containerQueryMobileMenu + 1}px) {
|
|
368
387
|
.nav-logo {
|
|
@@ -525,7 +544,7 @@ function MenuLink(props: PropsDiv) {
|
|
|
525
544
|
}
|
|
526
545
|
function DocsIcon() {
|
|
527
546
|
return (
|
|
528
|
-
<span style={{ marginRight: 'calc(var(--icon-text-padding) + 2px)' }} className="decolorize-6">
|
|
547
|
+
<span style={{ marginRight: 'calc(var(--icon-text-padding) + 2px)' }} className="decolorize-6 desktop-fade">
|
|
529
548
|
📚
|
|
530
549
|
</span>
|
|
531
550
|
)
|
|
@@ -534,7 +553,7 @@ function MenuIcon() {
|
|
|
534
553
|
return (
|
|
535
554
|
<svg
|
|
536
555
|
style={{ marginRight: 'calc(var(--icon-text-padding) + 2px)', verticalAlign: 'top', width: '1.3em' }}
|
|
537
|
-
className="decolorize-6"
|
|
556
|
+
className="decolorize-6 desktop-fade"
|
|
538
557
|
viewBox="0 0 448 512"
|
|
539
558
|
>
|
|
540
559
|
<path
|
package/NavSecondaryContent.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import iconLanguages from './icons/languages.svg'
|
|
|
9
9
|
import { usePageContext } from './renderer/usePageContext'
|
|
10
10
|
import '@docsearch/css'
|
|
11
11
|
|
|
12
|
-
function NavSecondaryContent(props: { style?: React.CSSProperties
|
|
12
|
+
function NavSecondaryContent(props: { style?: React.CSSProperties }) {
|
|
13
13
|
const pageContext = usePageContext()
|
|
14
14
|
const { projectInfo, i18n } = pageContext.config
|
|
15
15
|
const iconI18n = !i18n ? null : (
|
|
@@ -28,6 +28,7 @@ function NavSecondaryContent(props: { style?: React.CSSProperties; className?: s
|
|
|
28
28
|
alignItems: 'center',
|
|
29
29
|
...props.style,
|
|
30
30
|
}}
|
|
31
|
+
className="desktop-fade"
|
|
31
32
|
>
|
|
32
33
|
{iconI18n}
|
|
33
34
|
{projectInfo.discordInvite && (
|
package/components/RepoLink.tsx
CHANGED
|
@@ -16,9 +16,10 @@ function RepoLink({ path, text, editMode }: { path: string; text?: string | JSX.
|
|
|
16
16
|
if (!path.startsWith('/')) {
|
|
17
17
|
path = '/' + path
|
|
18
18
|
}
|
|
19
|
-
const viewMode = path.endsWith('/')
|
|
19
|
+
const viewMode = path.endsWith('/') && !editMode ? 'tree' : 'blob'
|
|
20
20
|
const { githubRepository } = pageContext.config.projectInfo
|
|
21
21
|
assert(githubRepository.startsWith('https://github.com/'))
|
|
22
|
-
|
|
22
|
+
let href = `${githubRepository}/${viewMode}/main${path}`
|
|
23
|
+
if (editMode) href += '?plain=1'
|
|
23
24
|
return <a href={href}>{text}</a>
|
|
24
25
|
}
|
package/dist/Layout.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import React from 'react';
|
|
|
8
8
|
declare const navLeftWidthMax = 370;
|
|
9
9
|
declare const navLeftWidthMin = 300;
|
|
10
10
|
declare const containerQueryMobileMenu = 1000;
|
|
11
|
-
declare const containerQueryMobileLayout:
|
|
11
|
+
declare const containerQueryMobileLayout: 1143;
|
|
12
12
|
declare function Layout({ children }: {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
}): React.JSX.Element;
|
package/dist/Layout.js
CHANGED
|
@@ -39,13 +39,10 @@ var mainViewPadding = 20;
|
|
|
39
39
|
var mainViewWidthMax = 800;
|
|
40
40
|
var navLeftWidthMax = 370;
|
|
41
41
|
var navLeftWidthMin = 300;
|
|
42
|
-
// 840 = 800 + 20 * 2
|
|
43
|
-
var mainViewMax = mainViewWidthMax + mainViewPadding * 2;
|
|
42
|
+
var mainViewMax = (mainViewWidthMax + mainViewPadding * 2); // 840 = 800 + 20 * 2
|
|
44
43
|
var containerQueryMobileMenu = 1000;
|
|
45
|
-
// 1143 = 840 + 300
|
|
46
|
-
var
|
|
47
|
-
// 1213 = 840 + 370 + 3
|
|
48
|
-
var containerQueryExtraSpace = mainViewMax + navLeftWidthMax + blockMargin;
|
|
44
|
+
var containerQueryMobileLayout = (mainViewMax + navLeftWidthMin); // 1143 = 840 + 300
|
|
45
|
+
var containerQueryExtraSpace = (mainViewMax + navLeftWidthMax + blockMargin); // 1213 = 840 + 370 + 3
|
|
49
46
|
// Avoid whitespace at the bottom of pages with almost no content
|
|
50
47
|
var whitespaceBuster1 = {
|
|
51
48
|
minHeight: '100vh',
|
|
@@ -71,7 +68,8 @@ function Layout(_a) {
|
|
|
71
68
|
_b['--bg-color'] = '#f5f5f7',
|
|
72
69
|
_b['--block-margin'] = "".concat(blockMargin, "px"),
|
|
73
70
|
_b['--icon-text-padding'] = '8px',
|
|
74
|
-
|
|
71
|
+
// ['--nav-head-height']: `${isLandingPage ? 70 : 60}px`,
|
|
72
|
+
_b['--nav-head-height'] = "60px",
|
|
75
73
|
_b) },
|
|
76
74
|
React.createElement(MenuModal, { isTopNav: isLandingPage }),
|
|
77
75
|
React.createElement("div", { className: isLandingPage ? '' : 'doc-page', style: __assign({
|
|
@@ -168,13 +166,14 @@ function NavHead(_a) {
|
|
|
168
166
|
var pageContext2 = usePageContext2();
|
|
169
167
|
var projectName = pageContext.meta.projectName;
|
|
170
168
|
var isLandingPage = pageContext.isLandingPage;
|
|
169
|
+
var navMaxWidth = pageContext.config.navMaxWidth;
|
|
171
170
|
var linkStyle = {
|
|
172
171
|
height: '100%',
|
|
173
172
|
padding: '0 var(--padding-side)',
|
|
174
173
|
justifyContent: 'center',
|
|
175
174
|
};
|
|
176
175
|
var TopNavigation = pageContext2.config.TopNavigation || PassThrough;
|
|
177
|
-
var navSecondaryContent = (React.createElement("div", { className: isNavLeft ? 'show-on-nav-hover add-transition' : 'hide-on-shrink', style: __assign({ padding: 0, display: 'flex', height: '100%' }, (!isNavLeft
|
|
176
|
+
var navSecondaryContent = (React.createElement("div", { className: isNavLeft ? 'show-on-nav-hover add-transition' : 'hide-on-shrink desktop-grow', style: __assign({ padding: 0, display: 'flex', height: '100%' }, (!isNavLeft
|
|
178
177
|
? {}
|
|
179
178
|
: {
|
|
180
179
|
position: 'absolute',
|
|
@@ -185,6 +184,7 @@ function NavHead(_a) {
|
|
|
185
184
|
width: mainViewMax, // guaranteed real estate
|
|
186
185
|
})) },
|
|
187
186
|
React.createElement(TopNavigation, null),
|
|
187
|
+
!isNavLeft && React.createElement("div", { className: "desktop-grow" }),
|
|
188
188
|
React.createElement(NavSecondaryContent, { style: {
|
|
189
189
|
display: 'inline-flex',
|
|
190
190
|
fontSize: '1.06em',
|
|
@@ -207,6 +207,8 @@ function NavHead(_a) {
|
|
|
207
207
|
} },
|
|
208
208
|
React.createElement("div", { className: "nav-head-content", style: (_b = {
|
|
209
209
|
width: '100%',
|
|
210
|
+
maxWidth: navMaxWidth,
|
|
211
|
+
margin: 'auto',
|
|
210
212
|
height: 'var(--nav-head-height)',
|
|
211
213
|
fontSize: "min(16.96px, ".concat(isProjectNameShort(projectName) ? '4.8cqw' : '4.5cqw', ")"),
|
|
212
214
|
color: '#666'
|
|
@@ -215,17 +217,21 @@ function NavHead(_a) {
|
|
|
215
217
|
_b.display = 'flex',
|
|
216
218
|
_b.justifyContent = 'center',
|
|
217
219
|
_b) },
|
|
218
|
-
React.createElement(NavLogo, { className: "grow-half" }),
|
|
219
|
-
React.createElement(
|
|
220
|
-
React.createElement(
|
|
220
|
+
React.createElement(NavLogo, { className: "mobile-grow-half" }),
|
|
221
|
+
!isNavLeft && React.createElement("div", { className: "desktop-grow" }),
|
|
222
|
+
React.createElement(SearchLink, { className: "mobile-grow-half", style: linkStyle }),
|
|
223
|
+
React.createElement(MenuLink, { className: "mobile-grow-full", style: linkStyle }),
|
|
221
224
|
navSecondaryContent)),
|
|
222
225
|
getStyle()));
|
|
223
226
|
function getStyle() {
|
|
224
|
-
var style = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n@container container-nav-head (max-width: 550px) {\n .grow-full {\n flex-grow: 1;\n }\n .grow-half {\n flex-grow: 0.5;\n }\n .nav-head-content {\n --padding-side: 0px;\n }\n .nav-logo {\n padding-left: 15px;\n margin-left: -10px;\n }\n}\n@container container-nav-head (min-width: 501px) {\n .nav-head-content {\n --padding-side: 35px;\n }\n .nav-logo {\n padding: 0 var(--padding-side);\n }\n}\n@media(max-width: ", "px) {\n .hide-on-shrink {\n display: none !important;\n }\n}\n"], ["\n@container container-nav-head (max-width: 550px) {\n .grow-full {\n flex-grow: 1;\n }\n .grow-half {\n flex-grow: 0.5;\n }\n .nav-head-content {\n --padding-side: 0px;\n }\n .nav-logo {\n padding-left: 15px;\n margin-left: -10px;\n }\n}\n@container container-nav-head (min-width: 501px) {\n .nav-head-content {\n --padding-side: 35px;\n }\n .nav-logo {\n padding: 0 var(--padding-side);\n }\n}\n@media(max-width: ", "px) {\n .hide-on-shrink {\n display: none !important;\n }\n}\n"])), containerQueryMobileMenu);
|
|
225
|
-
if (
|
|
226
|
-
style += css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n@media(min-width: ", "px) {\n .nav-
|
|
227
|
+
var style = css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n@container container-nav-head (max-width: 550px) {\n .mobile-grow-full {\n flex-grow: 1;\n }\n .mobile-grow-half {\n flex-grow: 0.5;\n }\n .nav-head-content {\n --padding-side: 0px;\n }\n .nav-logo {\n padding-left: 15px;\n margin-left: -10px;\n }\n}\n@container container-nav-head (min-width: 501px) {\n .nav-head-content {\n --padding-side: 35px;\n }\n .nav-logo {\n padding: 0 var(--padding-side);\n }\n}\n@media(max-width: ", "px) {\n .hide-on-shrink {\n display: none !important;\n }\n}\n"], ["\n@container container-nav-head (max-width: 550px) {\n .mobile-grow-full {\n flex-grow: 1;\n }\n .mobile-grow-half {\n flex-grow: 0.5;\n }\n .nav-head-content {\n --padding-side: 0px;\n }\n .nav-logo {\n padding-left: 15px;\n margin-left: -10px;\n }\n}\n@container container-nav-head (min-width: 501px) {\n .nav-head-content {\n --padding-side: 35px;\n }\n .nav-logo {\n padding: 0 var(--padding-side);\n }\n}\n@media(max-width: ", "px) {\n .hide-on-shrink {\n display: none !important;\n }\n}\n"])), containerQueryMobileMenu);
|
|
228
|
+
if (navMaxWidth) {
|
|
229
|
+
style += css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n@media(min-width: ", "px) {\n .desktop-grow {\n flex-grow: 1;\n }\n .desktop-fade {\n transition: opacity 0.3s ease-in-out !important;\n }\n html:not(.menu-modal-show) .nav-head-top:not(:hover) .desktop-fade {\n transition: opacity 0.3s ease-in-out !important;\n opacity: 0.5;\n }\n}\n"], ["\n@media(min-width: ", "px) {\n .desktop-grow {\n flex-grow: 1;\n }\n .desktop-fade {\n transition: opacity 0.3s ease-in-out !important;\n }\n html:not(.menu-modal-show) .nav-head-top:not(:hover) .desktop-fade {\n transition: opacity 0.3s ease-in-out !important;\n opacity: 0.5;\n }\n}\n"])), containerQueryMobileMenu + 1);
|
|
230
|
+
}
|
|
231
|
+
if (isLandingPage && !navMaxWidth)
|
|
232
|
+
style += css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n@media(min-width: ", "px) {\n .nav-logo {\n display: none !important;\n }\n}\n"], ["\n@media(min-width: ", "px) {\n .nav-logo {\n display: none !important;\n }\n}\n"])), containerQueryMobileMenu + 1);
|
|
227
233
|
if (isNavLeft) {
|
|
228
|
-
style += css(
|
|
234
|
+
style += css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n\n.show-on-nav-hover {\n opacity: 0;\n transition-property: opacity;\n pointer-events: none;\n}\nhtml:not(.unexpand-nav) :has(.nav-head-full-width:hover) .show-on-nav-hover,\nhtml:not(.unexpand-nav) :has(.show-on-nav-hover:hover) .show-on-nav-hover,\nhtml:not(.unexpand-nav).menu-modal-show .show-on-nav-hover {\n opacity: 1;\n pointer-events: all;\n}\n"], ["\n\n.show-on-nav-hover {\n opacity: 0;\n transition-property: opacity;\n pointer-events: none;\n}\nhtml:not(.unexpand-nav) :has(.nav-head-full-width:hover) .show-on-nav-hover,\nhtml:not(.unexpand-nav) :has(.show-on-nav-hover:hover) .show-on-nav-hover,\nhtml:not(.unexpand-nav).menu-modal-show .show-on-nav-hover {\n opacity: 1;\n pointer-events: all;\n}\n"])));
|
|
229
235
|
}
|
|
230
236
|
return React.createElement(Style, null, style);
|
|
231
237
|
}
|
|
@@ -251,7 +257,7 @@ function NavHeaderLeftFullWidthBackground() {
|
|
|
251
257
|
} }),
|
|
252
258
|
React.createElement(Style, null,
|
|
253
259
|
// (min-width: 0px) => trick to always apply => @container seems to always require a condition
|
|
254
|
-
css(
|
|
260
|
+
css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"], ["\n@container container-viewport (min-width: 0px) {\n .nav-bg {\n width: 100cqw;\n }\n}\n"]))))));
|
|
255
261
|
}
|
|
256
262
|
function NavLogo(_a) {
|
|
257
263
|
var className = _a.className;
|
|
@@ -305,13 +311,13 @@ function MenuLink(props) {
|
|
|
305
311
|
React.createElement("span", { className: "text-menu" },
|
|
306
312
|
React.createElement(MenuIcon, null),
|
|
307
313
|
" Menu"),
|
|
308
|
-
React.createElement(Style, null, css(
|
|
314
|
+
React.createElement(Style, null, css(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n@media(max-width: ", "px) {\n .text-docs {\n display: none;\n }\n}\n@media(min-width: ", "px) {\n .text-menu {\n display: none;\n }\n}\n"], ["\n@media(max-width: ", "px) {\n .text-docs {\n display: none;\n }\n}\n@media(min-width: ", "px) {\n .text-menu {\n display: none;\n }\n}\n"])), containerQueryMobileMenu, containerQueryMobileMenu + 1))));
|
|
309
315
|
}
|
|
310
316
|
function DocsIcon() {
|
|
311
|
-
return (React.createElement("span", { style: { marginRight: 'calc(var(--icon-text-padding) + 2px)' }, className: "decolorize-6" }, "\uD83D\uDCDA"));
|
|
317
|
+
return (React.createElement("span", { style: { marginRight: 'calc(var(--icon-text-padding) + 2px)' }, className: "decolorize-6 desktop-fade" }, "\uD83D\uDCDA"));
|
|
312
318
|
}
|
|
313
319
|
function MenuIcon() {
|
|
314
|
-
return (React.createElement("svg", { style: { marginRight: 'calc(var(--icon-text-padding) + 2px)', verticalAlign: 'top', width: '1.3em' }, className: "decolorize-6", viewBox: "0 0 448 512" },
|
|
320
|
+
return (React.createElement("svg", { style: { marginRight: 'calc(var(--icon-text-padding) + 2px)', verticalAlign: 'top', width: '1.3em' }, className: "decolorize-6 desktop-fade", viewBox: "0 0 448 512" },
|
|
315
321
|
React.createElement("path", { fill: "currentColor", d: "M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z" })));
|
|
316
322
|
}
|
|
317
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
323
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
@@ -22,7 +22,7 @@ function NavSecondaryContent(props) {
|
|
|
22
22
|
var pageContext = usePageContext();
|
|
23
23
|
var _a = pageContext.config, projectInfo = _a.projectInfo, i18n = _a.i18n;
|
|
24
24
|
var iconI18n = !i18n ? null : (React.createElement(LinkIcon, { className: "decolorize-4", icon: iconLanguages, href: '/languages', style: { height: 21, position: 'relative', top: 0, left: 0 } }));
|
|
25
|
-
return (React.createElement("div", __assign({}, props, { style: __assign({ display: 'flex', alignItems: 'center' }, props.style) }),
|
|
25
|
+
return (React.createElement("div", __assign({}, props, { style: __assign({ display: 'flex', alignItems: 'center' }, props.style), className: "desktop-fade" }),
|
|
26
26
|
iconI18n,
|
|
27
27
|
projectInfo.discordInvite && (React.createElement(LinkIcon, { className: "decolorize-6", icon: iconDiscord, href: projectInfo.discordInvite })),
|
|
28
28
|
React.createElement(LinkIcon, { className: "decolorize-4", icon: iconTwitter, href: projectInfo.twitterProfile }),
|
|
@@ -14,9 +14,11 @@ function RepoLink(_a) {
|
|
|
14
14
|
if (!path.startsWith('/')) {
|
|
15
15
|
path = '/' + path;
|
|
16
16
|
}
|
|
17
|
-
var viewMode = path.endsWith('/')
|
|
17
|
+
var viewMode = path.endsWith('/') && !editMode ? 'tree' : 'blob';
|
|
18
18
|
var githubRepository = pageContext.config.projectInfo.githubRepository;
|
|
19
19
|
assert(githubRepository.startsWith('https://github.com/'));
|
|
20
20
|
var href = "".concat(githubRepository, "/").concat(viewMode, "/main").concat(path);
|
|
21
|
+
if (editMode)
|
|
22
|
+
href += '?plain=1';
|
|
21
23
|
return React.createElement("a", { href: href }, text);
|
|
22
24
|
}
|
|
@@ -21,5 +21,5 @@ function SearchLink(props) {
|
|
|
21
21
|
"Search"));
|
|
22
22
|
}
|
|
23
23
|
function SearchIcon() {
|
|
24
|
-
return (React.createElement("span", { style: { marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }, className: "decolorize-7" }, "\uD83D\uDD0D"));
|
|
24
|
+
return (React.createElement("span", { style: { marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }, className: "decolorize-7 desktop-fade" }, "\uD83D\uDD0D"));
|
|
25
25
|
}
|
package/dist/types/Config.d.ts
CHANGED
package/docsearch/SearchLink.tsx
CHANGED
|
@@ -29,7 +29,7 @@ function SearchLink(props: PropsAnchor) {
|
|
|
29
29
|
}
|
|
30
30
|
function SearchIcon() {
|
|
31
31
|
return (
|
|
32
|
-
<span style={{ marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }} className="decolorize-7">
|
|
32
|
+
<span style={{ marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }} className="decolorize-7 desktop-fade">
|
|
33
33
|
🔍
|
|
34
34
|
</span>
|
|
35
35
|
)
|
package/package.json
CHANGED