feat: add layout and home page components

The commit includes a new layout component that contains the basic structure of the application, including Header, Footer, and ThemeProvider. Also, a new Home page component has been created including a basic "Hello World" greeting.
This commit is contained in:
Mathis H (Avnyr) 2024-06-06 14:10:31 +02:00
parent 427fc265ec
commit 3d8a1ab677
2 changed files with 46 additions and 0 deletions

37
src/app/layout.tsx Normal file
View File

@ -0,0 +1,37 @@
import type { Metadata } from "next";
import '@fontsource-variable/kode-mono';
import "./globals.css";
import {ThemeProvider} from "@/components/providers/theme-provider";
import type React from "react";
import {Footer} from "@/components/footer";
import {Header} from "@/components/header";
export const metadata: Metadata = {
title: "YeloBit",
description: "Generated by create next app",
icons: "yellow-bit.svg"};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en">
<head>
<link rel="icon" href="/public/favicon.ico" sizes="any"/>
</head>
<body className={"w-full min-h-screen flex flex-col items-center justify-between"}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
>
<Header></Header>
{children}
<Footer/>
</ThemeProvider>
</body>
</html>
);
}

9
src/app/page.tsx Normal file
View File

@ -0,0 +1,9 @@
import Image from "next/image";
export default function Home() {
return (
<main className="flex flex-col items-center justify-between p-24">
<h1>Hello world !</h1>
</main>
);
}