zudoku 0.3.0-dev.61 → 0.3.0-dev.62
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/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/navigation/SideNavigationItem.d.ts +0 -4
- package/dist/lib/components/navigation/SideNavigationItem.js +2 -2
- package/dist/lib/components/navigation/SideNavigationItem.js.map +1 -1
- package/lib/zudoku.components.js +63 -63
- package/lib/zudoku.components.js.map +1 -1
- package/package.json +1 -1
- package/src/lib/components/Header.tsx +26 -22
- package/src/lib/components/navigation/SideNavigationItem.tsx +2 -2
package/package.json
CHANGED
|
@@ -54,28 +54,32 @@ export const Header = memo(function HeaderInner() {
|
|
|
54
54
|
<header className="fixed top-0 w-full z-10 bg-background/80 backdrop-blur">
|
|
55
55
|
<div className="max-w-screen-2xl mx-auto">
|
|
56
56
|
<div className="grid grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-12 h-[--top-header-height]">
|
|
57
|
-
<div className="flex
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
57
|
+
<div className="flex">
|
|
58
|
+
<Link to="/">
|
|
59
|
+
<div className="flex items-center gap-3.5">
|
|
60
|
+
{page?.logo && (
|
|
61
|
+
<>
|
|
62
|
+
<img
|
|
63
|
+
src={page.logo.src.light}
|
|
64
|
+
alt={page.logo.alt ?? page.pageTitle}
|
|
65
|
+
style={{ width: page.logo.width }}
|
|
66
|
+
className={cn("h-10", isDark && "hidden")}
|
|
67
|
+
loading="lazy"
|
|
68
|
+
/>
|
|
69
|
+
<img
|
|
70
|
+
src={page.logo.src.dark}
|
|
71
|
+
alt={page.logo.alt ?? page.pageTitle}
|
|
72
|
+
style={{ width: page.logo.width }}
|
|
73
|
+
className={cn("h-10", !isDark && "hidden")}
|
|
74
|
+
loading="lazy"
|
|
75
|
+
/>
|
|
76
|
+
</>
|
|
77
|
+
)}
|
|
78
|
+
<span className="font-bold text-2xl text-foreground/85 tracking-wide">
|
|
79
|
+
{page?.pageTitle}
|
|
80
|
+
</span>
|
|
81
|
+
</div>
|
|
82
|
+
</Link>
|
|
79
83
|
</div>
|
|
80
84
|
<div className="grid grid-cols-[--sidecar-grid-cols] items-center gap-8">
|
|
81
85
|
<div className="w-full max-w-prose">
|
|
@@ -14,7 +14,7 @@ import { AnchorLink } from "../AnchorLink.js";
|
|
|
14
14
|
import { useNavigationCollapsibleState } from "./useNavigationCollapsibleState.js";
|
|
15
15
|
import { checkHasActiveItem, isLinkItem, isPathItem } from "./util.js";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
const navigationListItem = cva(
|
|
18
18
|
"flex px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
|
|
19
19
|
{
|
|
20
20
|
variants: {
|
|
@@ -51,7 +51,7 @@ export const SideNavigationItem = ({
|
|
|
51
51
|
const [isOpen, setIsOpen] = useNavigationCollapsibleState({
|
|
52
52
|
item,
|
|
53
53
|
path: currentPath,
|
|
54
|
-
defaultOpen: () => checkHasActiveItem(item, location.pathname,
|
|
54
|
+
defaultOpen: () => checkHasActiveItem(item, location.pathname, basePath),
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
if (isLinkItem(item)) {
|