Next.js mit App -Router für export zu statische dateien

This commit is contained in:
ISA
2024-09-23 10:32:17 +02:00
parent 7d0f59e280
commit c9e55dd66c
13 changed files with 961 additions and 27 deletions

View File

@@ -1,30 +1,21 @@
import localFont from "next/font/local";
import "./globals.css";
// src/components/Layout.jsx
import React from "react";
import Header from "../components/Header"; // Passe den Pfad an, falls nötig
import Navigation from "../components/Navigation"; // Passe den Pfad an, falls nötig
import Footer from "../components/Footer"; // Passe den Pfad an, falls nötig
const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
});
const geistMono = localFont({
src: "./fonts/GeistMonoVF.woff",
variable: "--font-geist-mono",
weight: "100 900",
});
export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
};
export default function RootLayout({ children }) {
function Layout({ children }) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
</body>
</html>
<div className="bg-gray-100 flex flex-col min-h-screen">
<Header className="bg-gray-300 p-4 flex-shrink-0" />
<div className="flex flex-grow w-full">
<Navigation />
{/* Der eigentliche Seiteninhalt */}
<main className="flex-1 p-8">{children}</main>
</div>
<Footer className="bg-gray-300 p-4 flex-shrink-0" />
</div>
);
}
export default Layout;