@brillout/docpress 0.8.12 → 0.8.13-commit-8740149
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 +33 -23
- package/MenuModal.tsx +22 -7
- package/css/colorize-on-hover.css +10 -1
- package/dist/Layout.js +19 -11
- package/dist/MenuModal.d.ts +2 -0
- package/dist/MenuModal.js +18 -10
- package/dist/docsearch/SearchLink.js +1 -2
- package/dist/navigation/Navigation.js +4 -2
- package/docsearch/SearchLink.tsx +3 -12
- package/navigation/Navigation.tsx +4 -2
- package/package.json +1 -1
package/Layout.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import { EditPageNote } from './components/EditPageNote'
|
|
|
9
9
|
import { parseTitle } from './parseTitle'
|
|
10
10
|
import { usePageContext, usePageContext2 } from './renderer/usePageContext'
|
|
11
11
|
import { Links } from './Links'
|
|
12
|
-
import { toggleMenuModal } from './MenuModal'
|
|
12
|
+
import { closeMenuModal, openMenuModal, toggleMenuModal } from './MenuModal'
|
|
13
13
|
import { MenuModal } from './MenuModal'
|
|
14
14
|
import { autoScrollNav_SSR } from './autoScrollNav'
|
|
15
15
|
import { SearchLink } from './docsearch/SearchLink'
|
|
@@ -58,6 +58,7 @@ function Layout({ children }: { children: React.ReactNode }) {
|
|
|
58
58
|
['--bg-color']: '#f5f5f7',
|
|
59
59
|
['--block-margin']: `${blockMargin}px`,
|
|
60
60
|
['--icon-text-padding']: '8px',
|
|
61
|
+
['--top-nav-height']: `${isLandingPage ? 70 : 60}px`,
|
|
61
62
|
}}
|
|
62
63
|
>
|
|
63
64
|
<MenuModal />
|
|
@@ -198,7 +199,7 @@ function PageContent({ children }: { children: React.ReactNode }) {
|
|
|
198
199
|
function NavMobile() {
|
|
199
200
|
return (
|
|
200
201
|
<div id="nav-mobile">
|
|
201
|
-
<NavigationHeader
|
|
202
|
+
<NavigationHeader iconSize={40} paddingLeft={12} style={{ justifyContent: 'center' }} />
|
|
202
203
|
</div>
|
|
203
204
|
)
|
|
204
205
|
}
|
|
@@ -255,7 +256,7 @@ function NavLeft() {
|
|
|
255
256
|
top: 0,
|
|
256
257
|
}}
|
|
257
258
|
>
|
|
258
|
-
<NavigationHeader
|
|
259
|
+
<NavigationHeader iconSize={39} paddingLeft={6} />
|
|
259
260
|
<div
|
|
260
261
|
style={{
|
|
261
262
|
backgroundColor: 'var(--bg-color)',
|
|
@@ -293,11 +294,10 @@ function NavLeft() {
|
|
|
293
294
|
}
|
|
294
295
|
|
|
295
296
|
function NavigationHeader({
|
|
296
|
-
headerHeight,
|
|
297
297
|
iconSize,
|
|
298
298
|
style,
|
|
299
299
|
paddingLeft,
|
|
300
|
-
}: {
|
|
300
|
+
}: { iconSize: number; paddingLeft: number; style?: React.CSSProperties }) {
|
|
301
301
|
const pageContext = usePageContext()
|
|
302
302
|
//*
|
|
303
303
|
const { projectName } = pageContext.meta
|
|
@@ -324,8 +324,9 @@ function NavigationHeader({
|
|
|
324
324
|
<div
|
|
325
325
|
style={{
|
|
326
326
|
display: 'flex',
|
|
327
|
-
height:
|
|
327
|
+
height: 'var(--top-nav-height)',
|
|
328
328
|
containerType: 'inline-size',
|
|
329
|
+
alignItems: 'center',
|
|
329
330
|
...navWidth,
|
|
330
331
|
}}
|
|
331
332
|
>
|
|
@@ -383,41 +384,50 @@ function NavigationHeader({
|
|
|
383
384
|
)
|
|
384
385
|
}
|
|
385
386
|
|
|
386
|
-
|
|
387
|
-
function MenuLink(props: PropsAnchor) {
|
|
387
|
+
function MenuLink({ style }: { style: React.CSSProperties }) {
|
|
388
388
|
return (
|
|
389
|
-
<
|
|
390
|
-
{...props}
|
|
389
|
+
<div
|
|
391
390
|
style={{
|
|
392
|
-
height: '100%',
|
|
391
|
+
height: 'calc(100% + 2 * var(--block-margin))',
|
|
393
392
|
display: 'flex',
|
|
394
393
|
alignItems: 'center',
|
|
395
|
-
|
|
396
|
-
...props.style,
|
|
394
|
+
...style,
|
|
397
395
|
}}
|
|
398
|
-
className="colorize-on-hover"
|
|
396
|
+
className="colorize-on-hover colorize-on-menu"
|
|
399
397
|
onClick={(ev) => {
|
|
400
398
|
ev.preventDefault()
|
|
401
399
|
toggleMenuModal()
|
|
402
400
|
}}
|
|
401
|
+
onMouseEnter={openMenuModal}
|
|
402
|
+
onMouseLeave={closeMenuModal}
|
|
403
403
|
aria-label={'Ctrl\xa0+\xa0M'}
|
|
404
404
|
>
|
|
405
|
+
{/* TODO/refactor
|
|
406
|
+
<style>{css`
|
|
407
|
+
`}</style>
|
|
408
|
+
*/}
|
|
409
|
+
<div
|
|
410
|
+
id="link-bg"
|
|
411
|
+
style={{
|
|
412
|
+
position: 'absolute',
|
|
413
|
+
width: '100%',
|
|
414
|
+
height: 'calc(100% - var(--block-margin))',
|
|
415
|
+
left: 0,
|
|
416
|
+
top: 0,
|
|
417
|
+
}}
|
|
418
|
+
></div>
|
|
405
419
|
<MenuIcon />
|
|
406
|
-
|
|
407
|
-
</
|
|
420
|
+
Docs
|
|
421
|
+
</div>
|
|
408
422
|
)
|
|
409
423
|
}
|
|
410
424
|
function MenuIcon() {
|
|
411
425
|
return (
|
|
412
|
-
<
|
|
426
|
+
<span
|
|
413
427
|
style={{ marginRight: 'calc(var(--icon-text-padding) + 2px)', lineHeight: 0, width: '1.3em' }}
|
|
414
428
|
className="decolorize-6"
|
|
415
|
-
viewBox="0 0 448 512"
|
|
416
429
|
>
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
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"
|
|
420
|
-
></path>
|
|
421
|
-
</svg>
|
|
430
|
+
📚
|
|
431
|
+
</span>
|
|
422
432
|
)
|
|
423
433
|
}
|
package/MenuModal.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { MenuModal }
|
|
2
2
|
export { toggleMenuModal }
|
|
3
|
+
export { openMenuModal }
|
|
3
4
|
export { closeMenuModal }
|
|
4
5
|
|
|
5
6
|
import React from 'react'
|
|
@@ -28,31 +29,39 @@ function MenuModal() {
|
|
|
28
29
|
* - https://stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser/72245072#72245072
|
|
29
30
|
height: '100dh',
|
|
30
31
|
/*/
|
|
31
|
-
height: '100vh',
|
|
32
|
-
maxHeight: '100dvh',
|
|
32
|
+
height: 'calc(100vh - var(--top-nav-height))',
|
|
33
33
|
//*/
|
|
34
|
-
top:
|
|
34
|
+
top: 'calc(var(--top-nav-height) + var(--block-margin))',
|
|
35
35
|
left: 0,
|
|
36
36
|
zIndex: 9999,
|
|
37
37
|
overflow: 'scroll',
|
|
38
|
-
background: '
|
|
38
|
+
background: '#eaeaea',
|
|
39
|
+
// background: '#ededef',
|
|
40
|
+
// boxShadow: 'rgba(0, 0, 0, 0.35) 0 0 13px 3px',
|
|
41
|
+
// boxShadow: 'rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 13px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset',
|
|
42
|
+
boxShadow:
|
|
43
|
+
'rgb(6 24 44 / 8%) 0px 0px 0px 3px, rgba(6, 24, 44, 0.65) 0px 4px 13px -1px, rgba(255, 255, 255, 0.28) 0px 1px 0px inset',
|
|
44
|
+
transition: 'opacity 0.3s ease-in-out',
|
|
39
45
|
}}
|
|
46
|
+
onMouseEnter={openMenuModal}
|
|
47
|
+
onMouseLeave={closeMenuModal}
|
|
40
48
|
>
|
|
41
49
|
<div
|
|
42
50
|
style={{
|
|
43
51
|
// Place <LinksBottom /> to the bottom
|
|
44
52
|
display: 'flex',
|
|
45
53
|
flexDirection: 'column',
|
|
46
|
-
minHeight: '
|
|
54
|
+
minHeight: 'calc(100vh - var(--top-nav-height))',
|
|
47
55
|
justifyContent: 'space-between',
|
|
48
56
|
// We don't set `container` to parent beacuse of a Chrome bug (showing a blank <MenuModal>)
|
|
49
57
|
containerType: 'inline-size',
|
|
50
58
|
}}
|
|
51
59
|
>
|
|
52
60
|
<Nav />
|
|
53
|
-
<LinksBottom />
|
|
54
61
|
</div>
|
|
62
|
+
{/* TODO: remove
|
|
55
63
|
<CloseButton />
|
|
64
|
+
*/}
|
|
56
65
|
</div>
|
|
57
66
|
</>
|
|
58
67
|
)
|
|
@@ -62,6 +71,7 @@ function Nav() {
|
|
|
62
71
|
const navItems = pageContext.navItemsAll
|
|
63
72
|
return <NavigationContent columnLayout={true} navItems={navItems} />
|
|
64
73
|
}
|
|
74
|
+
// TODO: remove
|
|
65
75
|
function LinksBottom() {
|
|
66
76
|
return (
|
|
67
77
|
<div
|
|
@@ -78,7 +88,8 @@ function LinksBottom() {
|
|
|
78
88
|
function getStyle() {
|
|
79
89
|
return css`
|
|
80
90
|
html:not(.menu-modal-show) #menu-modal {
|
|
81
|
-
|
|
91
|
+
opacity: 0;
|
|
92
|
+
pointer-events:none;
|
|
82
93
|
}
|
|
83
94
|
// disable scroll of main view
|
|
84
95
|
html.menu-modal-show {
|
|
@@ -92,6 +103,7 @@ html.menu-modal-show {
|
|
|
92
103
|
`
|
|
93
104
|
}
|
|
94
105
|
|
|
106
|
+
// TODO: remove?
|
|
95
107
|
function CloseButton() {
|
|
96
108
|
return (
|
|
97
109
|
<div
|
|
@@ -142,6 +154,9 @@ function autoScroll() {
|
|
|
142
154
|
inline: 'start',
|
|
143
155
|
})
|
|
144
156
|
}
|
|
157
|
+
function openMenuModal() {
|
|
158
|
+
document.documentElement.classList.add('menu-modal-show')
|
|
159
|
+
}
|
|
145
160
|
function closeMenuModal() {
|
|
146
161
|
document.documentElement.classList.remove('menu-modal-show')
|
|
147
162
|
}
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
@media (hover: hover) and (pointer: fine) {
|
|
6
6
|
.colorize-on-hover:hover [class^='decolorize-'],
|
|
7
|
-
.colorize-on-hover:hover [class*=' decolorize-']
|
|
7
|
+
.colorize-on-hover:hover [class*=' decolorize-'],
|
|
8
|
+
html.menu-modal-show .colorize-on-menu [class^='decolorize-'],
|
|
9
|
+
html.menu-modal-show .colorize-on-menu [class*=' decolorize-'] {
|
|
8
10
|
filter: grayscale(0) opacity(1) !important;
|
|
9
11
|
}
|
|
10
12
|
.link-hover-animation a:hover {
|
|
@@ -38,3 +40,10 @@
|
|
|
38
40
|
body {
|
|
39
41
|
--active-color: rgba(0, 0, 0, 0.03);
|
|
40
42
|
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
/* TODO/refactor: move */
|
|
46
|
+
:has(> #link-bg):hover > #link-bg,
|
|
47
|
+
html.menu-modal-show #link-bg {
|
|
48
|
+
background: var(--active-color)
|
|
49
|
+
}
|
package/dist/Layout.js
CHANGED
|
@@ -23,7 +23,7 @@ import { EditPageNote } from './components/EditPageNote';
|
|
|
23
23
|
import { parseTitle } from './parseTitle';
|
|
24
24
|
import { usePageContext, usePageContext2 } from './renderer/usePageContext';
|
|
25
25
|
import { Links } from './Links';
|
|
26
|
-
import { toggleMenuModal } from './MenuModal';
|
|
26
|
+
import { closeMenuModal, openMenuModal, toggleMenuModal } from './MenuModal';
|
|
27
27
|
import { MenuModal } from './MenuModal';
|
|
28
28
|
import { autoScrollNav_SSR } from './autoScrollNav';
|
|
29
29
|
import { SearchLink } from './docsearch/SearchLink';
|
|
@@ -68,6 +68,7 @@ function Layout(_a) {
|
|
|
68
68
|
_b['--bg-color'] = '#f5f5f7',
|
|
69
69
|
_b['--block-margin'] = "".concat(blockMargin, "px"),
|
|
70
70
|
_b['--icon-text-padding'] = '8px',
|
|
71
|
+
_b['--top-nav-height'] = "".concat(isLandingPage ? 70 : 60, "px"),
|
|
71
72
|
_b) },
|
|
72
73
|
React.createElement(MenuModal, null),
|
|
73
74
|
React.createElement("div", { className: isLandingPage ? '' : 'doc-page', style: __assign({
|
|
@@ -134,7 +135,7 @@ function PageContent(_a) {
|
|
|
134
135
|
}
|
|
135
136
|
function NavMobile() {
|
|
136
137
|
return (React.createElement("div", { id: "nav-mobile" },
|
|
137
|
-
React.createElement(NavigationHeader, {
|
|
138
|
+
React.createElement(NavigationHeader, { iconSize: 40, paddingLeft: 12, style: { justifyContent: 'center' } })));
|
|
138
139
|
}
|
|
139
140
|
function NavTop() {
|
|
140
141
|
var _a;
|
|
@@ -174,7 +175,7 @@ function NavLeft() {
|
|
|
174
175
|
position: 'sticky',
|
|
175
176
|
top: 0,
|
|
176
177
|
} },
|
|
177
|
-
React.createElement(NavigationHeader, {
|
|
178
|
+
React.createElement(NavigationHeader, { iconSize: 39, paddingLeft: 6 }),
|
|
178
179
|
React.createElement("div", { style: {
|
|
179
180
|
backgroundColor: 'var(--bg-color)',
|
|
180
181
|
display: 'flex',
|
|
@@ -187,7 +188,7 @@ function NavLeft() {
|
|
|
187
188
|
}
|
|
188
189
|
function NavigationHeader(_a) {
|
|
189
190
|
var _b;
|
|
190
|
-
var
|
|
191
|
+
var iconSize = _a.iconSize, style = _a.style, paddingLeft = _a.paddingLeft;
|
|
191
192
|
var pageContext = usePageContext();
|
|
192
193
|
//*
|
|
193
194
|
var projectName = pageContext.meta.projectName;
|
|
@@ -203,7 +204,7 @@ function NavigationHeader(_a) {
|
|
|
203
204
|
_b);
|
|
204
205
|
var marginLeft = -10;
|
|
205
206
|
return (React.createElement("div", { style: __assign({ backgroundColor: 'var(--bg-color)', display: 'flex', justifyContent: 'flex-end', borderBottom: 'var(--block-margin) solid white' }, style) },
|
|
206
|
-
React.createElement("div", { style: __assign({ display: 'flex', height:
|
|
207
|
+
React.createElement("div", { style: __assign({ display: 'flex', height: 'var(--top-nav-height)', containerType: 'inline-size', alignItems: 'center' }, navWidth) },
|
|
207
208
|
React.createElement("a", { style: __assign(__assign({ display: 'flex', alignItems: 'center', color: 'inherit', textDecoration: 'none', height: '100%', paddingLeft: paddingLeft + marginLeft * -1, marginLeft: marginLeft }, childrenStyle), { justifyContent: 'flex-start', flexGrow: 0.5 }), href: "/" },
|
|
208
209
|
React.createElement("img", { src: pageContext.meta.faviconUrl, height: iconSize, width: iconSize, onContextMenu: function (ev) {
|
|
209
210
|
if (!pageContext.config.pressKit)
|
|
@@ -220,16 +221,23 @@ function NavigationHeader(_a) {
|
|
|
220
221
|
React.createElement(SearchLink, { style: __assign(__assign({}, childrenStyle), { flexGrow: 0.5 }) }),
|
|
221
222
|
React.createElement(MenuLink, { style: __assign(__assign({}, childrenStyle), { flexGrow: 1 }) }))));
|
|
222
223
|
}
|
|
223
|
-
function MenuLink(
|
|
224
|
-
|
|
224
|
+
function MenuLink(_a) {
|
|
225
|
+
var style = _a.style;
|
|
226
|
+
return (React.createElement("div", { style: __assign({ height: 'calc(100% + 2 * var(--block-margin))', display: 'flex', alignItems: 'center' }, style), className: "colorize-on-hover colorize-on-menu", onClick: function (ev) {
|
|
225
227
|
ev.preventDefault();
|
|
226
228
|
toggleMenuModal();
|
|
227
|
-
}, "aria-label": 'Ctrl\xa0+\xa0M' }
|
|
229
|
+
}, onMouseEnter: openMenuModal, onMouseLeave: closeMenuModal, "aria-label": 'Ctrl\xa0+\xa0M' },
|
|
230
|
+
React.createElement("div", { id: "link-bg", style: {
|
|
231
|
+
position: 'absolute',
|
|
232
|
+
width: '100%',
|
|
233
|
+
height: 'calc(100% - var(--block-margin))',
|
|
234
|
+
left: 0,
|
|
235
|
+
top: 0,
|
|
236
|
+
} }),
|
|
228
237
|
React.createElement(MenuIcon, null),
|
|
229
|
-
"
|
|
238
|
+
"Docs"));
|
|
230
239
|
}
|
|
231
240
|
function MenuIcon() {
|
|
232
|
-
return (React.createElement("
|
|
233
|
-
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" })));
|
|
241
|
+
return (React.createElement("span", { style: { marginRight: 'calc(var(--icon-text-padding) + 2px)', lineHeight: 0, width: '1.3em' }, className: "decolorize-6" }, "\uD83D\uDCDA"));
|
|
234
242
|
}
|
|
235
243
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
package/dist/MenuModal.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { MenuModal };
|
|
2
2
|
export { toggleMenuModal };
|
|
3
|
+
export { openMenuModal };
|
|
3
4
|
export { closeMenuModal };
|
|
4
5
|
import React from 'react';
|
|
5
6
|
declare function MenuModal(): React.JSX.Element;
|
|
6
7
|
declare function toggleMenuModal(): void;
|
|
8
|
+
declare function openMenuModal(): void;
|
|
7
9
|
declare function closeMenuModal(): void;
|
package/dist/MenuModal.js
CHANGED
|
@@ -4,6 +4,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
export { MenuModal };
|
|
6
6
|
export { toggleMenuModal };
|
|
7
|
+
export { openMenuModal };
|
|
7
8
|
export { closeMenuModal };
|
|
8
9
|
import React from 'react';
|
|
9
10
|
import { usePageContext } from './renderer/usePageContext';
|
|
@@ -25,33 +26,36 @@ function MenuModal() {
|
|
|
25
26
|
* - https://stackoverflow.com/questions/37112218/css3-100vh-not-constant-in-mobile-browser/72245072#72245072
|
|
26
27
|
height: '100dh',
|
|
27
28
|
/*/
|
|
28
|
-
height: '100vh',
|
|
29
|
-
maxHeight: '100dvh',
|
|
29
|
+
height: 'calc(100vh - var(--top-nav-height))',
|
|
30
30
|
//*/
|
|
31
|
-
top:
|
|
31
|
+
top: 'calc(var(--top-nav-height) + var(--block-margin))',
|
|
32
32
|
left: 0,
|
|
33
33
|
zIndex: 9999,
|
|
34
34
|
overflow: 'scroll',
|
|
35
|
-
background: '
|
|
36
|
-
|
|
35
|
+
background: '#eaeaea',
|
|
36
|
+
// background: '#ededef',
|
|
37
|
+
// boxShadow: 'rgba(0, 0, 0, 0.35) 0 0 13px 3px',
|
|
38
|
+
// boxShadow: 'rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 13px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset',
|
|
39
|
+
boxShadow: 'rgb(6 24 44 / 8%) 0px 0px 0px 3px, rgba(6, 24, 44, 0.65) 0px 4px 13px -1px, rgba(255, 255, 255, 0.28) 0px 1px 0px inset',
|
|
40
|
+
transition: 'opacity 0.3s ease-in-out',
|
|
41
|
+
}, onMouseEnter: openMenuModal, onMouseLeave: closeMenuModal },
|
|
37
42
|
React.createElement("div", { style: {
|
|
38
43
|
// Place <LinksBottom /> to the bottom
|
|
39
44
|
display: 'flex',
|
|
40
45
|
flexDirection: 'column',
|
|
41
|
-
minHeight: '
|
|
46
|
+
minHeight: 'calc(100vh - var(--top-nav-height))',
|
|
42
47
|
justifyContent: 'space-between',
|
|
43
48
|
// We don't set `container` to parent beacuse of a Chrome bug (showing a blank <MenuModal>)
|
|
44
49
|
containerType: 'inline-size',
|
|
45
50
|
} },
|
|
46
|
-
React.createElement(Nav, null)
|
|
47
|
-
React.createElement(LinksBottom, null)),
|
|
48
|
-
React.createElement(CloseButton, null))));
|
|
51
|
+
React.createElement(Nav, null)))));
|
|
49
52
|
}
|
|
50
53
|
function Nav() {
|
|
51
54
|
var pageContext = usePageContext();
|
|
52
55
|
var navItems = pageContext.navItemsAll;
|
|
53
56
|
return React.createElement(NavigationContent, { columnLayout: true, navItems: navItems });
|
|
54
57
|
}
|
|
58
|
+
// TODO: remove
|
|
55
59
|
function LinksBottom() {
|
|
56
60
|
return (React.createElement("div", { style: {
|
|
57
61
|
display: 'flex',
|
|
@@ -60,8 +64,9 @@ function LinksBottom() {
|
|
|
60
64
|
React.createElement(Links, { style: { height: 70 } })));
|
|
61
65
|
}
|
|
62
66
|
function getStyle() {
|
|
63
|
-
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\nhtml:not(.menu-modal-show) #menu-modal {\n
|
|
67
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\nhtml:not(.menu-modal-show) #menu-modal {\n opacity: 0;\n pointer-events:none;\n}\n// disable scroll of main view\nhtml.menu-modal-show {\n overflow: hidden !important;\n}\n@container(min-width: ", "px) {\n #menu-modal .nav-item-level-3 {\n display: none;\n }\n}\n"], ["\nhtml:not(.menu-modal-show) #menu-modal {\n opacity: 0;\n pointer-events:none;\n}\n// disable scroll of main view\nhtml.menu-modal-show {\n overflow: hidden !important;\n}\n@container(min-width: ", "px) {\n #menu-modal .nav-item-level-3 {\n display: none;\n }\n}\n"])), containerQueryMobile);
|
|
64
68
|
}
|
|
69
|
+
// TODO: remove?
|
|
65
70
|
function CloseButton() {
|
|
66
71
|
return (React.createElement("div", { onClick: toggleMenuModal, style: { position: 'fixed', top: 0, right: 0, zIndex: 10, padding: 11, cursor: 'pointer' }, "aria-label": 'Escape\nCtrl\xa0+\xa0M', "data-label-shift": true },
|
|
67
72
|
React.createElement("svg", { width: "48.855", height: "48.855", version: "1.1", viewBox: "0 0 22.901 22.901", xmlns: "http://www.w3.org/2000/svg" },
|
|
@@ -87,6 +92,9 @@ function autoScroll() {
|
|
|
87
92
|
inline: 'start',
|
|
88
93
|
});
|
|
89
94
|
}
|
|
95
|
+
function openMenuModal() {
|
|
96
|
+
document.documentElement.classList.add('menu-modal-show');
|
|
97
|
+
}
|
|
90
98
|
function closeMenuModal() {
|
|
91
99
|
document.documentElement.classList.remove('menu-modal-show');
|
|
92
100
|
}
|
|
@@ -21,6 +21,5 @@ function SearchLink(props) {
|
|
|
21
21
|
"Search"));
|
|
22
22
|
}
|
|
23
23
|
function SearchIcon() {
|
|
24
|
-
return (React.createElement("
|
|
25
|
-
React.createElement("path", { d: "M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z", fill: "none", stroke: "currentColor", strokeWidth: "2" })));
|
|
24
|
+
return (React.createElement("span", { style: { marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }, className: "decolorize-7" }, "\uD83D\uDD0D"));
|
|
26
25
|
}
|
|
@@ -43,6 +43,7 @@ function NavigationColumnLayout(props) {
|
|
|
43
43
|
window.addEventListener('resize', updateviewportwidth, { passive: true });
|
|
44
44
|
});
|
|
45
45
|
var navItemsByColumnLayouts = getNavItemsByColumnLayouts(props.navItemsWithComputed, viewportWidth);
|
|
46
|
+
var margin = 40;
|
|
46
47
|
return (React.createElement(React.Fragment, null, navItemsByColumnLayouts.map(function (_a, i) {
|
|
47
48
|
var columns = _a.columns, isFullWidth = _a.isFullWidth;
|
|
48
49
|
return (React.createElement("div", { key: i, style: {
|
|
@@ -51,7 +52,8 @@ function NavigationColumnLayout(props) {
|
|
|
51
52
|
justifyContent: 'space-between',
|
|
52
53
|
maxWidth: '100%',
|
|
53
54
|
margin: 'auto',
|
|
54
|
-
|
|
55
|
+
marginTop: i === 0 ? -1 * margin : undefined,
|
|
56
|
+
marginBottom: margin,
|
|
55
57
|
} },
|
|
56
58
|
columns.map(function (columnEntry, j) { return (React.createElement("div", { key: j, style: {
|
|
57
59
|
flexGrow: 1,
|
|
@@ -59,7 +61,7 @@ function NavigationColumnLayout(props) {
|
|
|
59
61
|
display: 'flex',
|
|
60
62
|
flexDirection: 'column',
|
|
61
63
|
paddingTop: isFullWidth && j !== 0 ? 36 : undefined,
|
|
62
|
-
} }, columnEntry.map(function (navItems, k) { return (React.createElement("div", { key: k },
|
|
64
|
+
} }, columnEntry.map(function (navItems, k) { return (React.createElement("div", { key: k, style: { marginTop: isFullWidth ? undefined : margin } },
|
|
63
65
|
navItems.map(function (navItem, l) { return (React.createElement(NavItemComponent, { navItem: navItem, key: l })); }),
|
|
64
66
|
React.createElement(CategoryBorder, { navItemLevel1: isFullWidth ? undefined : navItems[0] }))); }))); }),
|
|
65
67
|
React.createElement(CategoryBorder, { navItemLevel1: !isFullWidth ? undefined : columns[0][0][0] })));
|
package/docsearch/SearchLink.tsx
CHANGED
|
@@ -29,17 +29,8 @@ function SearchLink(props: PropsAnchor) {
|
|
|
29
29
|
}
|
|
30
30
|
function SearchIcon() {
|
|
31
31
|
return (
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
viewBox="0 0 20 20"
|
|
36
|
-
>
|
|
37
|
-
<path
|
|
38
|
-
d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z"
|
|
39
|
-
fill="none"
|
|
40
|
-
stroke="currentColor"
|
|
41
|
-
strokeWidth="2"
|
|
42
|
-
></path>
|
|
43
|
-
</svg>
|
|
32
|
+
<span style={{ marginRight: 'var(--icon-text-padding)', fontSize: '1.1em' }} className="decolorize-7">
|
|
33
|
+
🔍
|
|
34
|
+
</span>
|
|
44
35
|
)
|
|
45
36
|
}
|
|
@@ -59,6 +59,7 @@ function NavigationColumnLayout(props: { navItemsWithComputed: NavItemComputed[]
|
|
|
59
59
|
})
|
|
60
60
|
|
|
61
61
|
const navItemsByColumnLayouts = getNavItemsByColumnLayouts(props.navItemsWithComputed, viewportWidth)
|
|
62
|
+
const margin = 40
|
|
62
63
|
|
|
63
64
|
return (
|
|
64
65
|
<>
|
|
@@ -71,7 +72,8 @@ function NavigationColumnLayout(props: { navItemsWithComputed: NavItemComputed[]
|
|
|
71
72
|
justifyContent: 'space-between',
|
|
72
73
|
maxWidth: '100%',
|
|
73
74
|
margin: 'auto',
|
|
74
|
-
|
|
75
|
+
marginTop: i === 0 ? -1 * margin : undefined,
|
|
76
|
+
marginBottom: margin,
|
|
75
77
|
}}
|
|
76
78
|
>
|
|
77
79
|
{columns.map((columnEntry, j) => (
|
|
@@ -86,7 +88,7 @@ function NavigationColumnLayout(props: { navItemsWithComputed: NavItemComputed[]
|
|
|
86
88
|
}}
|
|
87
89
|
>
|
|
88
90
|
{columnEntry.map((navItems, k) => (
|
|
89
|
-
<div key={k}>
|
|
91
|
+
<div key={k} style={{ marginTop: isFullWidth ? undefined : margin }}>
|
|
90
92
|
{navItems.map((navItem, l) => (
|
|
91
93
|
<NavItemComponent navItem={navItem} key={l} />
|
|
92
94
|
))}
|