diff --git a/components/layout/site-dock.tsx b/components/layout/site-dock.tsx index 2d0271f..153b9eb 100644 --- a/components/layout/site-dock.tsx +++ b/components/layout/site-dock.tsx @@ -5,6 +5,7 @@ import Image from "next/image"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useLocale, useTranslations } from "next-intl"; +import { useTheme } from "next-themes"; import { useState } from "react"; import { FloatingControls } from "@/components/layout/floating-controls"; @@ -28,17 +29,15 @@ type NavKey = "about" | "portfolio" | "products" | "contact"; type NavItem = { key: NavKey; path: string; - /** Icon file under /public. Swap these for real macOS app icons anytime. */ - icon: string; disabled?: boolean; }; // "Home" is intentionally omitted — the logo (first dock icon) is the home link. const navItems: NavItem[] = [ - { key: "about", path: "/about", icon: "/dock/about.svg" }, - { key: "portfolio", path: "/portfolio", icon: "/dock/portfolio.svg" }, - { key: "products", path: "/products", icon: "/dock/products.svg", disabled: true }, - { key: "contact", path: "/contact", icon: "/dock/contact.svg" }, + { key: "about", path: "/about" }, + { key: "portfolio", path: "/portfolio" }, + { key: "products", path: "/products", disabled: true }, + { key: "contact", path: "/contact" }, ]; function isNavItemActive(currentPath: string, itemPath: string) { @@ -54,6 +53,8 @@ export function SiteDock({ defaultLocale, isSuperAdmin = false }: SiteDockProps) const t = useTranslations("navigation"); const reducedMotion = useReducedMotion(); const [bouncing, setBouncing] = useState(null); + const { theme, resolvedTheme } = useTheme(); + const activeTheme = theme === "system" ? resolvedTheme : theme; const currentPath = stripLocalePrefix(pathname); const homeHref = getLocalizedPath(locale, "/", defaultLocale); @@ -111,23 +112,25 @@ export function SiteDock({ defaultLocale, isSuperAdmin = false }: SiteDockProps)
{/* ── Pages (icon art carries its own squircle shape) ── */} - {navItems.map(({ key, path, icon: iconSrc, disabled }) => { + {navItems.map(({ key, path, disabled }) => { const itemPath = path || "/"; const isActive = isNavItemActive(currentPath, itemPath); const label = t(key); + const variant = activeTheme === "dark" ? "dark" : "light"; + const src = `/dock/${key}-${variant}.png`; const icon = ( {label} ); diff --git a/public/dock/about-dark.png b/public/dock/about-dark.png new file mode 100644 index 0000000..3107200 Binary files /dev/null and b/public/dock/about-dark.png differ diff --git a/public/dock/about-light.png b/public/dock/about-light.png new file mode 100644 index 0000000..0cf46f7 Binary files /dev/null and b/public/dock/about-light.png differ diff --git a/public/dock/about.svg b/public/dock/about.svg deleted file mode 100644 index 257e793..0000000 --- a/public/dock/about.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/public/dock/contact-dark.png b/public/dock/contact-dark.png new file mode 100644 index 0000000..0799922 Binary files /dev/null and b/public/dock/contact-dark.png differ diff --git a/public/dock/contact-light.png b/public/dock/contact-light.png new file mode 100644 index 0000000..511a1c8 Binary files /dev/null and b/public/dock/contact-light.png differ diff --git a/public/dock/contact.svg b/public/dock/contact.svg deleted file mode 100644 index 1bf2d8c..0000000 --- a/public/dock/contact.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/public/dock/portfolio-dark.png b/public/dock/portfolio-dark.png new file mode 100644 index 0000000..5ec0bea Binary files /dev/null and b/public/dock/portfolio-dark.png differ diff --git a/public/dock/portfolio-light.png b/public/dock/portfolio-light.png new file mode 100644 index 0000000..20d0420 Binary files /dev/null and b/public/dock/portfolio-light.png differ diff --git a/public/dock/portfolio.svg b/public/dock/portfolio.svg deleted file mode 100644 index 350335c..0000000 --- a/public/dock/portfolio.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/public/dock/products-dark.png b/public/dock/products-dark.png new file mode 100644 index 0000000..7a70310 Binary files /dev/null and b/public/dock/products-dark.png differ diff --git a/public/dock/products-light.png b/public/dock/products-light.png new file mode 100644 index 0000000..8850aff Binary files /dev/null and b/public/dock/products-light.png differ diff --git a/public/dock/products.svg b/public/dock/products.svg deleted file mode 100644 index 76e32a8..0000000 --- a/public/dock/products.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file