@brillout/docpress 0.15.13-commit-9b3f898 → 0.15.13-commit-f8fc961
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 +11 -20
- package/package.json +1 -1
package/Layout.tsx
CHANGED
|
@@ -280,8 +280,8 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
280
280
|
style={{
|
|
281
281
|
display: 'inline-flex',
|
|
282
282
|
fontSize: '1.06em',
|
|
283
|
-
|
|
284
|
-
|
|
283
|
+
paddingRight: 'var(--main-view-padding)',
|
|
284
|
+
paddingLeft: 'var(--padding-side)',
|
|
285
285
|
}}
|
|
286
286
|
/>
|
|
287
287
|
</div>
|
|
@@ -321,7 +321,7 @@ function NavHead({ isNavLeft }: { isNavLeft?: true }) {
|
|
|
321
321
|
justifyContent: 'center',
|
|
322
322
|
}}
|
|
323
323
|
>
|
|
324
|
-
{!hideNavHeadLogo && <NavHeadLogo />}
|
|
324
|
+
{!hideNavHeadLogo && <NavHeadLogo isNavLeft={isNavLeft} />}
|
|
325
325
|
<div className="desktop-grow" style={{ display: 'none' }} />
|
|
326
326
|
{algolia && <SearchLink className="always-shown" style={menuLinkStyle} />}
|
|
327
327
|
<MenuToggleMain className="always-shown nav-head-menu-toggle" style={menuLinkStyle} />
|
|
@@ -338,10 +338,6 @@ function getStyleNav() {
|
|
|
338
338
|
style += css`
|
|
339
339
|
@container container-viewport (max-width: ${viewMobile}px) {
|
|
340
340
|
.nav-head:not(.is-nav-left) {
|
|
341
|
-
.nav-head-logo {
|
|
342
|
-
always-shown: flex-start !important;
|
|
343
|
-
padding-left: var(--main-view-padding);
|
|
344
|
-
}
|
|
345
341
|
.nav-head-menu-toggle {
|
|
346
342
|
justify-content: flex-end !important;
|
|
347
343
|
padding-right: var(--main-view-padding) !important;
|
|
@@ -373,9 +369,6 @@ function getStyleNav() {
|
|
|
373
369
|
--icon-text-padding: 8px;
|
|
374
370
|
--padding-side: 20px;
|
|
375
371
|
}
|
|
376
|
-
.nav-head-logo {
|
|
377
|
-
padding: 0 var(--padding-side);
|
|
378
|
-
}
|
|
379
372
|
}
|
|
380
373
|
}`
|
|
381
374
|
|
|
@@ -385,10 +378,7 @@ function getStyleNav() {
|
|
|
385
378
|
.nav-head:not(.is-nav-left) {
|
|
386
379
|
.nav-head-content {
|
|
387
380
|
--icon-text-padding: min(8px, 0.5cqw);
|
|
388
|
-
--padding-side: min(20px, 1.
|
|
389
|
-
}
|
|
390
|
-
.nav-head-logo {
|
|
391
|
-
padding: 0 var(--padding-side);
|
|
381
|
+
--padding-side: min(20px, 1.2cqw);
|
|
392
382
|
}
|
|
393
383
|
&.has-max-width {
|
|
394
384
|
.desktop-grow {
|
|
@@ -423,10 +413,6 @@ function getStyleNav() {
|
|
|
423
413
|
flex-grow: 1;
|
|
424
414
|
}
|
|
425
415
|
}
|
|
426
|
-
.nav-head-logo {
|
|
427
|
-
padding-left: 15px;
|
|
428
|
-
margin-left: -15px;
|
|
429
|
-
}
|
|
430
416
|
}
|
|
431
417
|
.show-on-nav-hover {
|
|
432
418
|
opacity: 0;
|
|
@@ -512,7 +498,7 @@ function NavHeadLeftFullWidthBackground() {
|
|
|
512
498
|
)
|
|
513
499
|
}
|
|
514
500
|
|
|
515
|
-
function NavHeadLogo({
|
|
501
|
+
function NavHeadLogo({ isNavLeft }: { isNavLeft?: true }) {
|
|
516
502
|
const pageContext = usePageContext()
|
|
517
503
|
|
|
518
504
|
const { navLogo } = pageContext.globalContext.config.docpress
|
|
@@ -546,12 +532,17 @@ function NavHeadLogo({ className }: { className?: string }) {
|
|
|
546
532
|
|
|
547
533
|
return (
|
|
548
534
|
<a
|
|
549
|
-
className={cls(['nav-head-logo', className])}
|
|
550
535
|
style={{
|
|
551
536
|
display: 'flex',
|
|
552
537
|
alignItems: 'center',
|
|
553
538
|
height: '100%',
|
|
554
539
|
color: 'inherit',
|
|
540
|
+
...(!isNavLeft
|
|
541
|
+
? {
|
|
542
|
+
paddingLeft: 'var(--main-view-padding)',
|
|
543
|
+
paddingRight: 'var(--padding-side)',
|
|
544
|
+
}
|
|
545
|
+
: {}),
|
|
555
546
|
}}
|
|
556
547
|
href="/"
|
|
557
548
|
onContextMenu={!navLogo ? undefined : onContextMenu}
|