add basic home page + header

This commit is contained in:
csehviktor
2025-07-03 07:50:29 +02:00
parent 6c26f2f43f
commit 7bea3eb594
3 changed files with 57 additions and 3 deletions

View File

@@ -0,0 +1,42 @@
export type HeaderProps = {
title: string;
subtitle: string;
hasBackButton: boolean;
rightComponent?: React.ReactNode;
};
export function Header({ props }: { props: HeaderProps }) {
return (
<header className="bg-[#0f0f0f] border-b border-[#0e0e0e]">
<div className="max-w-7xl mx-auto py-4 flex justify-between items-center">
<div className="flex items-center space-x-3">
<div className="w-11 h-11 bg-pink-300 text-pink-500 p-1 rounded-lg flex">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="3"
stroke-linecap="round"
stroke-linejoin="round"
className="lucide lucide-chart-no-axes-column-increasing-icon lucide-chart-no-axes-column-increasing"
>
<line x1="12" x2="12" y1="20" y2="10" />
<line x1="18" x2="18" y1="20" y2="4" />
<line x1="6" x2="6" y1="20" y2="16" />
</svg>
</div>
<div>
<h1 className="text-xl font-bold">{props.title}</h1>
<p className="text-sm text-gray-400">
{props.subtitle}
</p>
</div>
</div>
<div className="flex items-center space-x-6">
{props.rightComponent}
</div>
</div>
</header>
);
}

View File

@@ -1,5 +1,5 @@
@import "tailwindcss"; @import "tailwindcss";
body { body {
@apply bg-gray-950 text-gray-300; @apply bg-[#0a0a0a] text-gray-300;
} }

View File

@@ -1,8 +1,20 @@
import { Header } from "@/components/Header";
export function HomePage() { export function HomePage() {
return ( return (
<div> <div>
<h1>Welcome to Status Monitor</h1> <Header
<p>This is the home page.</p> props={{
title: "Status Monitor",
subtitle: "Home",
hasBackButton: false,
}}
/>
<main className="max-w-7xl mx-auto py-8">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<h1>helo vilag</h1>
</div>
</main>
</div> </div>
); );
} }