diff options
-rw-r--r-- | components/layout.tsx | 12 | ||||
-rw-r--r-- | components/topnav.tsx | 17 | ||||
-rw-r--r-- | pages/_document.tsx | 14 | ||||
-rw-r--r-- | pages/index.tsx | 9 |
4 files changed, 49 insertions, 3 deletions
diff --git a/components/layout.tsx b/components/layout.tsx new file mode 100644 index 0000000..baf62dd --- /dev/null +++ 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 new file mode 100644 index 0000000..70814b3 --- /dev/null +++ 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 new file mode 100644 index 0000000..e2f593f --- /dev/null +++ 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 index b984cae..7e72bc2 100644 --- 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> ) } |