Skip to content

Commit 9c7e4a8

Browse files
committed
update my frontend design kinna V1 changing it soon. tested and confirm Api working
1 parent d0453dd commit 9c7e4a8

24 files changed

+737
-223
lines changed

client/package-lock.json

Lines changed: 137 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@
1010
"preview": "vite preview"
1111
},
1212
"dependencies": {
13-
"@tailwindcss/vite": "^4.1.10",
13+
"@tailwindcss/vite": "^4.1.12",
1414
"@tanstack/react-query": "^5.80.7",
1515
"@tanstack/react-router": "^1.121.21",
1616
"@tanstack/react-router-devtools": "^1.121.21",
1717
"axios": "^1.10.0",
18+
"framer-motion": "^12.23.12",
1819
"react": "^19.1.0",
1920
"react-dom": "^19.1.0",
2021
"react-icons": "^5.5.0",
2122
"react-router-dom": "^7.6.2",
2223
"react-toastify": "^11.0.3",
23-
"tailwindcss": "^4.1.10",
24+
"tailwindcss": "^4.1.12",
2425
"zustand": "^5.0.5"
2526
},
2627
"devDependencies": {

client/src/App.css

Lines changed: 0 additions & 58 deletions
This file was deleted.

client/src/App.tsx

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import { Link, Outlet } from "@tanstack/react-router";
1+
import { Outlet, ScrollRestoration } from "@tanstack/react-router";
22
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
3-
import "./App.css";
3+
import "./index.css";
4+
import Header from "./components/Header";
5+
import Footer from "./components/Footer";
46

57
function App() {
68
return (
7-
<>
8-
<div className="p-2 flex gap-2">
9-
<Link to="/" className="[&.active]:font-bold">
10-
Home
11-
</Link>{" "}
12-
<Link to="/contact" className="[&.active]:font-bold">
13-
conatct
14-
</Link>
15-
</div>
16-
<hr />
17-
<Outlet />
18-
<TanStackRouterDevtools />
19-
</>
9+
<div className="min-h-dvh flex flex-col bg-white text-neutral-900">
10+
<Header />
11+
<main className="flex-1">
12+
<Outlet />
13+
</main>
14+
<Footer />
15+
<ScrollRestoration />
16+
17+
<TanStackRouterDevtools position="bottom-left" />
18+
</div>
2019
);
2120
}
2221

client/src/components/Footer.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const Footer = () => {
2+
return (
3+
<footer className="border-t border-black/10">
4+
<div className="container mx-auto px-4 py-10 text-sm text-neutral-600 flex flex-col md:flex-row gap-4 md:items-center md:justify-between">
5+
<p>© {new Date().getFullYear()} Aegis Express Logistics</p>
6+
<p className="opacity-80">Fast. Transparent. Global.</p>
7+
</div>
8+
</footer>
9+
);
10+
};
11+
12+
export default Footer;

client/src/components/Header.tsx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { Link, useRouterState } from "@tanstack/react-router";
2+
const Header = () => {
3+
const pathname = useRouterState({ select: (s) => s.location.pathname });
4+
return (
5+
<header className="sticky top-0 z-50 backdrop-blur supports-[backdrop-filter]:bg-white/60 border-b border-black/10">
6+
<div className="container mx-auto px-4 h-16 flex items-center justify-between">
7+
<Link to="/" className="font-extrabold tracking-tight text-2xl">
8+
Aegis<span className="text-primary">Express</span>
9+
</Link>
10+
<nav className="hidden md:flex items-center gap-6">
11+
<NavLink to="/" label="Home" active={pathname === "/"} />
12+
<NavLink
13+
to="/about"
14+
label="About"
15+
active={pathname.startsWith("/about")}
16+
/>
17+
<NavLink
18+
to="/blogs/"
19+
label="Blogs"
20+
active={pathname.startsWith("/blogs")}
21+
/>
22+
<NavLink
23+
to="/track/"
24+
label="Track"
25+
active={pathname.startsWith("/track")}
26+
/>
27+
<NavLink
28+
to="/contact"
29+
label="Contact"
30+
active={pathname.startsWith("/contact")}
31+
/>
32+
</nav>
33+
</div>
34+
</header>
35+
);
36+
};
37+
38+
function NavLink({
39+
to,
40+
label,
41+
active,
42+
}: {
43+
to: string;
44+
label: string;
45+
active: boolean;
46+
}) {
47+
return (
48+
<Link
49+
to={to as string}
50+
className={`text-sm font-medium hover:opacity-80 transition-opacity ${active ? "text-primary" : "text-neutral-700"}`}
51+
>
52+
{label}
53+
</Link>
54+
);
55+
}
56+
export default Header;

client/src/components/component.file.example.tsx

Whitespace-only changes.

client/src/index.css

Lines changed: 26 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,38 @@
1-
:root {
2-
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
3-
line-height: 1.5;
4-
font-weight: 400;
1+
@import "tailwindcss";
52

6-
color-scheme: light dark;
7-
color: rgba(255, 255, 255, 0.87);
8-
background-color: #242424;
9-
10-
font-synthesis: none;
11-
text-rendering: optimizeLegibility;
12-
-webkit-font-smoothing: antialiased;
13-
-moz-osx-font-smoothing: grayscale;
3+
@theme {
4+
--color-primary: #111827; /* near-black accent */
145
}
156

16-
a {
17-
font-weight: 500;
18-
color: #646cff;
19-
text-decoration: inherit;
20-
}
21-
a:hover {
22-
color: #535bf2;
7+
.container {
8+
@apply max-w-7xl;
239
}
2410

25-
body {
26-
margin: 0;
27-
display: flex;
28-
place-items: center;
29-
min-width: 320px;
30-
min-height: 100vh;
11+
/* Primitives */
12+
.input {
13+
@apply w-full rounded-xl border border-black/10 px-4 py-2 outline-none focus:ring-2 focus:ring-primary/20;
3114
}
32-
33-
h1 {
34-
font-size: 3.2em;
35-
line-height: 1.1;
15+
.btn-primary {
16+
@apply inline-flex items-center justify-center rounded-xl bg-primary px-5 py-2 font-semibold text-white shadow-sm active:scale-[0.99];
3617
}
37-
38-
button {
39-
border-radius: 8px;
40-
border: 1px solid transparent;
41-
padding: 0.6em 1.2em;
42-
font-size: 1em;
43-
font-weight: 500;
44-
font-family: inherit;
45-
background-color: #1a1a1a;
46-
cursor: pointer;
47-
transition: border-color 0.25s;
18+
.btn-outline {
19+
@apply inline-flex items-center justify-center rounded-xl border border-black/15 px-5 py-2 font-semibold text-neutral-900 hover:bg-black/5;
20+
}
21+
.card {
22+
@apply rounded-2xl border border-black/10 p-5 shadow-sm bg-white;
4823
}
49-
button:hover {
50-
border-color: #646cff;
24+
.badge {
25+
@apply inline-flex items-center rounded-full border border-black/10 px-2.5 py-1 text-xs font-medium;
5126
}
52-
button:focus,
53-
button:focus-visible {
54-
outline: 4px auto -webkit-focus-ring-color;
27+
.link {
28+
@apply text-primary underline underline-offset-4;
5529
}
5630

57-
@media (prefers-color-scheme: light) {
58-
:root {
59-
color: #213547;
60-
background-color: #ffffff;
61-
}
62-
a:hover {
63-
color: #747bff;
64-
}
65-
button {
66-
background-color: #f9f9f9;
67-
}
31+
/* Smooth scrolling & text rendering */
32+
html {
33+
scroll-behavior: smooth;
34+
}
35+
body {
36+
text-rendering: optimizeLegibility;
37+
-webkit-font-smoothing: antialiased;
6838
}

client/src/main.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { StrictMode } from "react";
22
import ReactDOM from "react-dom/client";
33
import { RouterProvider, createRouter } from "@tanstack/react-router";
4+
import {
5+
QueryClient,
6+
QueryClientProvider,
7+
HydrationBoundary,
8+
} from "@tanstack/react-query";
49

510
// Import the generated route tree
611
import { routeTree } from "./routeTree.gen";
@@ -15,13 +20,27 @@ declare module "@tanstack/react-router" {
1520
}
1621
}
1722

23+
const queryClient = new QueryClient({
24+
defaultOptions: {
25+
queries: {
26+
staleTime: 1000 * 60, // 1 min
27+
gcTime: 1000 * 60 * 5,
28+
refetchOnWindowFocus: false,
29+
},
30+
},
31+
});
1832
// Render the app
1933
const rootElement = document.getElementById("root")!;
2034
if (!rootElement.innerHTML) {
2135
const root = ReactDOM.createRoot(rootElement);
2236
root.render(
2337
<StrictMode>
24-
<RouterProvider router={router} />
38+
<QueryClientProvider client={queryClient}>
39+
{/* If you SSR later, hydrate here */}
40+
<HydrationBoundary>
41+
<RouterProvider router={router} />
42+
</HydrationBoundary>
43+
</QueryClientProvider>
2544
</StrictMode>
2645
);
2746
}

client/src/pages/About.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const About = () => {
2+
return (
3+
<section className="container mx-auto px-4 py-16">
4+
<h1 className="text-4xl font-bold tracking-tight">About Aegis Express</h1>
5+
<p className="mt-4 max-w-3xl text-balance text-neutral-600">
6+
We provide fast, reliable, and transparent logistics across the globe.
7+
Our platform offers real‑time tracking, seamless documentation, and
8+
delightful customer experience.
9+
</p>
10+
</section>
11+
);
12+
};
13+
14+
export default About;

0 commit comments

Comments
 (0)