Skip to content

Commit

Permalink
Add navbar
Browse files Browse the repository at this point in the history
  • Loading branch information
nicsaw committed Sep 9, 2024
1 parent 7ac91ec commit 8dbb2ab
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
20 changes: 10 additions & 10 deletions next-app/src/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import localFont from "next/font/local";
import "./globals.css";
import localFont from 'next/font/local';
import './globals.css';

const geistSans = localFont({
src: "./fonts/GeistVF.woff",
variable: "--font-geist-sans",
weight: "100 900",
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",
src: './fonts/GeistMonoVF.woff',
variable: '--font-geist-mono',
weight: '100 900',
});

export const metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: 'Create Next App',
description: 'Generated by create next app',
};

export default function RootLayout({ children }) {
Expand Down
8 changes: 6 additions & 2 deletions next-app/src/app/page.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Image from 'next/image';
import Navbar from '../components/Navbar.jsx';

export default function Home() {
return <></>;
return (
<>
<Navbar />
</>
);
}
25 changes: 25 additions & 0 deletions next-app/src/components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// src/components/Navbar.js

import Link from 'next/link';

export default function Navbar() {
return (
<nav className="bg-gray-800 p-4 flex justify-between items-center mx-auto">
<Link
href="/"
className="text-gray-300 hover:text-white text-lg font-bold"
>
Your Name
</Link>

<div className="space-x-4">
<Link href="/about" className="text-gray-300 hover:text-white">
About Me
</Link>
<Link href="/contact" className="text-gray-300 hover:text-white">
Contact
</Link>
</div>
</nav>
);
}

0 comments on commit 8dbb2ab

Please sign in to comment.