Set up framework for my content
remove all nextJS framework stuff, add in logo files, add in a healthcheck API endpoint, navbar component starter.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
import React, {ReactNode} from "react";
|
||||
import {useTheme} from "next-themes";
|
||||
import Head from "next/head";
|
||||
import Link from "next/link";
|
||||
|
||||
type Props = {
|
||||
children?: ReactNode
|
||||
title?: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
const NavBar = ({children, title = "nickbland.dev | Home", description = "A website made by Nick Bland."}: Props) => {
|
||||
const {theme, setTheme} = useTheme();
|
||||
return (
|
||||
<div>
|
||||
<Head>
|
||||
<title>{title}</title>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="author" content="Nick Bland" />
|
||||
<meta name="description" content={description} />
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
<header>
|
||||
<nav>
|
||||
<Link href="/">
|
||||
<a>nickbland.dev</a>
|
||||
</Link>
|
||||
<Link href="/about">
|
||||
<a>about</a>
|
||||
</Link>
|
||||
<button onClick={() => setTheme(theme === "dark" ? "light" : "dark")}>Toggle Theme</button>
|
||||
</nav>
|
||||
</header>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default NavBar
|
||||
Reference in New Issue
Block a user