Upload 2 files
Browse files- src/components/SiteFooter.jsx +16 -0
- src/components/SiteHeader.jsx +42 -0
src/components/SiteFooter.jsx
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from "react";
|
| 2 |
+
|
| 3 |
+
export default function SiteFooter() {
|
| 4 |
+
return (
|
| 5 |
+
<footer className="border-t border-neutral-200/70 bg-white">
|
| 6 |
+
<div className="mx-auto max-w-6xl px-4 py-10 text-sm text-neutral-600">
|
| 7 |
+
<div className="flex flex-col gap-2 md:flex-row md:items-center md:justify-between">
|
| 8 |
+
<p>© {new Date().getFullYear()} iStore</p>
|
| 9 |
+
<p className="text-neutral-500">
|
| 10 |
+
Demo storefront UI. Not affiliated with Apple Inc.
|
| 11 |
+
</p>
|
| 12 |
+
</div>
|
| 13 |
+
</div>
|
| 14 |
+
</footer>
|
| 15 |
+
);
|
| 16 |
+
}
|
src/components/SiteHeader.jsx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from "react";
|
| 2 |
+
import { Link, NavLink } from "react-router-dom";
|
| 3 |
+
import { ShoppingBag, Search } from "lucide-react";
|
| 4 |
+
|
| 5 |
+
const navLink = ({ isActive }) =>
|
| 6 |
+
"text-sm transition " + (isActive ? "text-neutral-900" : "text-neutral-600 hover:text-neutral-900");
|
| 7 |
+
|
| 8 |
+
export default function SiteHeader() {
|
| 9 |
+
return (
|
| 10 |
+
<header className="sticky top-0 z-40 border-b border-neutral-200/70 bg-white/80 backdrop-blur">
|
| 11 |
+
<div className="mx-auto flex max-w-6xl items-center justify-between px-4 py-3">
|
| 12 |
+
<Link to="/" className="text-base font-semibold tracking-tight">
|
| 13 |
+
iStore
|
| 14 |
+
</Link>
|
| 15 |
+
|
| 16 |
+
<nav className="hidden items-center gap-6 md:flex">
|
| 17 |
+
<NavLink to="/store" className={navLink}>
|
| 18 |
+
Store
|
| 19 |
+
</NavLink>
|
| 20 |
+
<a
|
| 21 |
+
className="text-sm text-neutral-600 hover:text-neutral-900"
|
| 22 |
+
href="https://www.apple.com/"
|
| 23 |
+
target="_blank"
|
| 24 |
+
rel="noreferrer"
|
| 25 |
+
title="Official Apple site"
|
| 26 |
+
>
|
| 27 |
+
Official site
|
| 28 |
+
</a>
|
| 29 |
+
</nav>
|
| 30 |
+
|
| 31 |
+
<div className="flex items-center gap-3 text-neutral-700">
|
| 32 |
+
<button className="rounded-full p-2 hover:bg-neutral-100" aria-label="Search (demo)">
|
| 33 |
+
<Search size={18} />
|
| 34 |
+
</button>
|
| 35 |
+
<button className="rounded-full p-2 hover:bg-neutral-100" aria-label="Bag (demo)">
|
| 36 |
+
<ShoppingBag size={18} />
|
| 37 |
+
</button>
|
| 38 |
+
</div>
|
| 39 |
+
</div>
|
| 40 |
+
</header>
|
| 41 |
+
);
|
| 42 |
+
}
|