michal-sapka-me

Codebase for my homepage.
git clone git://vcs.sapka.me/michal-sapka-me
Log | Files | Refs

commit df14504b05642b39ab84d91aaab0b5f96283f5dd
parent d1d59e5b53ceaf77e731555ab5f0a9148e6a7d93
Author: Michal Sapka <michal@sapka.me>
Date:   Sat,  6 Aug 2022 22:36:07 +0200

feat: topnav draft

Diffstat:
Acomponents/layout.tsx | 12++++++++++++
Acomponents/topnav.tsx | 17+++++++++++++++++
Apages/_document.tsx | 14++++++++++++++
Mpages/index.tsx | 9++++++---
4 files changed, 49 insertions(+), 3 deletions(-)

diff --git a/components/layout.tsx b/components/layout.tsx @@ -0,0 +1,12 @@ +import TopNav from '../components/topnav.tsx' + +export default function Layout({ children }) { + return ( + <> + <TopNav/> + <main className="mx-auto max-w-screen-lg px-3 py-6"> + {children} + </main> + </> + ) +} diff --git a/components/topnav.tsx b/components/topnav.tsx @@ -0,0 +1,17 @@ +export default function TopNav() { + return( + <> + <header className="flex flex-row mx-auto max-w-screen-lg px-3 py-6"> + <div className="basis-1/4"> + Michal Sapka + </div> + <nav className="basis-3/4 flex flex-row"> + <a clasName="basis-1/2" href="publications">Publications</a> + <a clasName="basis-1/2" rel="noreferrer" href="https://github.com/michalsapka/michal-sapka-pl" target="_blank"> + Code + </a> + </nav> + </header> + </> + ) +} diff --git a/pages/_document.tsx b/pages/_document.tsx @@ -0,0 +1,14 @@ +import { Html, Head, Main, NextScript } from 'next/document' + +export default function Document() { + return ( + <Html lang="en"> + <Head /> + <body> + <Main /> + <NextScript /> + </body> + </Html> + ) +} + diff --git a/pages/index.tsx b/pages/index.tsx @@ -1,13 +1,16 @@ import type { NextPage } from 'next' import Head from 'next/head' import Image from 'next/image' +import Layout from '../components/layout' import styles from '../styles/Home.module.css' const Home: NextPage = () => { return ( - <h1 className="text-3xl font-bold underline"> - Hello world! - </h1> + <Layout> + <h1 className="text-3xl font-bold underline"> + Hello world! + </h1> + </Layout> ) }