Initial commit - Route Commerce platform
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
type LayoutContainerProps = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export default function LayoutContainer({
|
||||
children,
|
||||
}: LayoutContainerProps) {
|
||||
return (
|
||||
<div className="relative mx-auto max-w-7xl px-6">
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import Link from "next/link";
|
||||
|
||||
export default function SiteFooter() {
|
||||
return (
|
||||
<footer className="glass border-t border-white/10 mt-auto">
|
||||
<div className="mx-auto max-w-6xl px-6 py-8">
|
||||
<div className="flex flex-col gap-6 sm:flex-row sm:items-center sm:justify-between">
|
||||
<p className="text-sm text-zinc-500">
|
||||
© {new Date().getFullYear()} Route Commerce. All rights reserved.
|
||||
</p>
|
||||
<nav className="flex gap-6 text-sm text-zinc-500">
|
||||
<Link href="/privacy-policy" className="hover:text-white transition-colors">
|
||||
Privacy Policy
|
||||
</Link>
|
||||
<Link href="/terms-and-conditions" className="hover:text-white transition-colors">
|
||||
Terms & Conditions
|
||||
</Link>
|
||||
<a
|
||||
href="https://cielohermosa.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="hover:text-white transition-colors"
|
||||
>
|
||||
Powered by Route Commerce
|
||||
</a>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { useCart } from "@/context/CartContext";
|
||||
import ThemeToggle from "@/components/shared/ThemeToggle";
|
||||
|
||||
const BRAND_NAMES: Record<string, string> = {
|
||||
tuxedo: "Tuxedo Corn",
|
||||
"indian-river-direct": "Indian River Direct",
|
||||
};
|
||||
|
||||
export default function SiteHeader() {
|
||||
const { cart } = useCart();
|
||||
const pathname = usePathname();
|
||||
|
||||
const showBrandName = pathname?.startsWith("/tuxedo") || pathname?.startsWith("/indian-river-direct");
|
||||
const brandKey = pathname?.split("/")[1];
|
||||
const brandName = brandKey ? BRAND_NAMES[brandKey] : null;
|
||||
|
||||
return (
|
||||
<header className="glass border-b border-white/10 sticky top-0 z-50">
|
||||
<div className="mx-auto flex max-w-6xl items-center justify-between px-6 py-4">
|
||||
{showBrandName && brandName ? (
|
||||
<Link href={`/${brandKey}`} className="text-lg font-semibold tracking-tight text-white hover:text-emerald-400 transition-colors">
|
||||
{brandName}
|
||||
</Link>
|
||||
) : (
|
||||
<Link href="/" className="text-lg font-semibold tracking-tight text-white hover:text-emerald-400 transition-colors">
|
||||
Route Commerce
|
||||
</Link>
|
||||
)}
|
||||
|
||||
<nav className="flex items-center gap-6 text-sm font-medium text-zinc-400">
|
||||
<Link href="/tuxedo" className="hover:text-white transition-colors">
|
||||
Tuxedo
|
||||
</Link>
|
||||
|
||||
<Link href="/indian-river-direct" className="hover:text-white transition-colors">
|
||||
IRD
|
||||
</Link>
|
||||
|
||||
<Link href="/admin" className="hover:text-white transition-colors">
|
||||
Admin
|
||||
</Link>
|
||||
|
||||
<ThemeToggle />
|
||||
|
||||
<Link href="/cart" className="rounded-xl bg-gradient-to-r from-emerald-500 to-emerald-400 px-4 py-2 text-sm font-semibold text-white hover:from-emerald-400 hover:to-emerald-300 transition-all shadow-lg shadow-emerald-500/20">
|
||||
Cart ({cart.reduce((total, item) => total + item.quantity, 0)})
|
||||
</Link>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user