Skip to content

Commit 5e518b6

Browse files
authored
Add navbar and footer (#2953)
1 parent e6ce463 commit 5e518b6

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"use client"
2+
3+
import { Text } from "@dotkomonline/ui"
4+
5+
export const Footer = () => {
6+
return (
7+
<header className="sticky backdrop-blur-xl top-4 z-50 flex flex-row justify-between items-center w-full max-w-screen-xl mt-4 p-3 rounded-full text-l font-mono font-bold">
8+
<Text>Til studentene ved NTNU, med kjærlighet, Online &lt;3</Text>
9+
<Text>Laget av Dotkom</Text>
10+
</header>
11+
)
12+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"use client"
2+
3+
import Link from "next/link"
4+
import { Title } from "@dotkomonline/ui"
5+
6+
export const Navbar = () => {
7+
return (
8+
<header className="sticky backdrop-blur-xxl top-4 underline z-50 flex justify-between w-full items-end max-w-screen-xl mt-4 p-4 rounded-full font-mono font-bold">
9+
<div className="flex items-baseline space-x-4">
10+
<Title className="text-2xl">Grades</Title>
11+
12+
<Link href="/" className="text-ml">
13+
Emner
14+
</Link>
15+
</div>
16+
17+
<div className="space-x-4">
18+
<Link href="/" className="text-ml">
19+
Om siden
20+
</Link>
21+
<Link href="/" className="text-ml">
22+
Logg inn
23+
</Link>
24+
</div>
25+
</header>
26+
)
27+
}

apps/grades-frontend/src/app/layout.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,23 @@ import "../globals.css"
55
import { setDefaultOptions as setDateFnsDefaultOptions } from "date-fns"
66
import { nb } from "date-fns/locale"
77
import PlausibleProvider from "next-plausible"
8+
import { Navbar } from "./Navbar"
9+
import { Footer } from "./Footer"
810

911
setDateFnsDefaultOptions({ locale: nb })
1012

1113
export default async function RootLayout({ children }: PropsWithChildren) {
1214
return (
1315
// suppressHydrationWarning is needed for next-themes, see https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app
1416
<html lang="no" suppressHydrationWarning>
15-
<body>
17+
<body className="dark:bg-[#141821] bg-pink-400">
1618
<PlausibleProvider domain="grades.no">
1719
<QueryProvider>
1820
<ThemeProvider defaultTheme="system" enableSystem attribute="data-theme">
1921
<div className="min-h-screen flex flex-col gap-8 w-full max-w-screen-xl mx-auto px-4 lg:px-12">
22+
<Navbar />
2023
<main className="grow">{children}</main>
24+
<Footer />
2125
</div>
2226
</ThemeProvider>
2327
</QueryProvider>

0 commit comments

Comments
 (0)