Skip to content

Commit ff6b63b

Browse files
committed
style: add footer and favicon
1 parent 0111ff7 commit ff6b63b

File tree

3 files changed

+53
-7
lines changed

3 files changed

+53
-7
lines changed

public/favicon.ico

334 KB
Binary file not shown.

src/AppRouter.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { BrowserRouter, Route, Routes } from "react-router-dom";
22
import { ScrollToTop } from "./components/ScrollToTop";
3+
import { Layout } from "./components/Layout";
34

45
import Index from "./pages/Index";
56
import { Inventory } from "./pages/Inventory";
@@ -12,13 +13,14 @@ export function AppRouter() {
1213
<BrowserRouter>
1314
<ScrollToTop />
1415
<Routes>
15-
<Route path="/" element={<Index />} />
16-
<Route path="/inventory" element={<Inventory />} />
17-
<Route path="/settings" element={<Settings />} />
18-
{/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */}
19-
<Route path="/:nip19" element={<NIP19Page />} />
20-
{/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
21-
<Route path="*" element={<NotFound />} />
16+
<Route element={<Layout />}>
17+
<Route path="/" element={<Index />} />
18+
<Route path="/inventory" element={<Inventory />} />
19+
<Route path="/settings" element={<Settings />} />
20+
{/* NIP-19 route for npub1, note1, naddr1, nevent1, nprofile1 */}
21+
<Route path="/:nip19" element={<NIP19Page />} />
22+
<Route path="*" element={<NotFound />} />
23+
</Route>
2224
</Routes>
2325
</BrowserRouter>
2426
);

src/components/Layout.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { Outlet } from "react-router-dom";
2+
import { Github } from "lucide-react";
3+
4+
export function Layout() {
5+
const currentYear = new Date().getFullYear();
6+
7+
return (
8+
<div className="flex flex-col min-h-screen">
9+
<main className="flex-1">
10+
<Outlet />
11+
</main>
12+
13+
<footer className="border-t bg-muted/50 py-6 mt-auto">
14+
<div className="container mx-auto px-4 flex flex-col md:flex-row justify-between items-center gap-4 text-sm text-muted-foreground">
15+
<div className="flex items-center gap-2">
16+
<span className="font-semibold text-foreground">Stock Yo Space</span>
17+
<span>&copy; {currentYear}</span>
18+
</div>
19+
20+
<div className="flex items-center gap-6">
21+
<a
22+
href="https://www.murdawkmedia.com"
23+
target="_blank"
24+
rel="noopener noreferrer"
25+
className="hover:text-primary transition-colors flex items-center gap-1"
26+
>
27+
Created by Murdawk Media
28+
</a>
29+
30+
<a
31+
href="https://github.com/murdawkmedia/inventory-tracker"
32+
target="_blank"
33+
rel="noopener noreferrer"
34+
className="hover:text-primary transition-colors flex items-center gap-2"
35+
>
36+
<Github className="h-4 w-4" />
37+
Source Code
38+
</a>
39+
</div>
40+
</div>
41+
</footer>
42+
</div>
43+
);
44+
}

0 commit comments

Comments
 (0)