Skip to content

Commit d010ab5

Browse files
committed
Merge remote-tracking branch 'origin/main' into studio->root.
Fix broken lockfile
2 parents b70cbb2 + a414bea commit d010ab5

42 files changed

Lines changed: 6982 additions & 3033 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/(root)/arrangement/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const EventPage: AsyncPage<Params> = async ({ params }) => {
2929

3030
let icsEvent = undefined
3131
if (isFuture(event.start_time)) {
32-
icsEvent = await createIcsEvent(event)
32+
icsEvent = createIcsEvent(event)
3333
}
3434

3535
return (

app/(root)/arrangement/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const className = "sm:w-[550px] w-full mx-1 h-min"
2323
const EventsPage: AsyncPage = async () => {
2424
const { past, future } = await getPastAndFutureEvents(nrOfEvents)
2525
return (
26-
<div className={"flex flex-wrap items-baseline justify-center gap-5 pt-3 sm:p-5"}>
26+
<div className={"flex flex-wrap items-baseline justify-center gap-5"}>
2727
<EventCardPaginated
2828
cardTitle={"Kommende arrangementer"}
2929
className={className}

app/(root)/galleri/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ const ImageGalleryListPage: AsyncPage = async () => {
3030
title={gallery.title}
3131
alt={gallery.images?.[0].alt}
3232
/>
33-
<div className="m-2 flex w-full justify-center text-black">
34-
<h3>{gallery.title}</h3>
33+
<div className="m-2 flex w-full justify-center">
34+
<h3 className={"text-dark-title dark:text-white"}>
35+
{gallery.title}
36+
</h3>
3537
</div>
3638
</GalleryItem>
3739
</Link>

app/(root)/globals.css

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@import url("https://cdn.jsdelivr.net/npm/@xz/fonts@1/serve/cascadia-code.min.css");
2+
13
@tailwind base;
24
@tailwind components;
35
@tailwind utilities;
@@ -27,13 +29,17 @@
2729
*/
2830
.logo-backdrop {
2931
height: calc(100% * 2);
30-
@apply w-64 rounded-r-full bg-white sm:w-80;
31-
@apply absolute -left-10 -top-14;
32+
@apply w-64 rounded-r-full bg-white dark:bg-default-dark-background sm:w-80;
33+
@apply absolute -left-14 -top-14;
3234
}
3335

3436
.header-gradient {
3537
@apply bg-gradient-to-r from-root-primary via-root-primary to-root-secondary;
3638
}
39+
40+
.header-gradient-dark {
41+
@apply bg-gradient-to-r from-root-primary-dark via-default-dark-background to-default-dark-background;
42+
}
3743
}
3844

3945
/*
@@ -51,7 +57,7 @@ a[role="button"] {
5157

5258
.link,
5359
a {
54-
@apply text-root-primary no-underline hover:text-root-primary-dark;
60+
@apply text-root-primary no-underline hover:text-root-primary-dark dark:text-root-light;
5561
}
5662

5763
/*
@@ -75,23 +81,23 @@ br {
7581
}
7682

7783
h1 {
78-
@apply text-4xl font-bold text-dark-title;
84+
@apply text-4xl font-bold light:text-dark-title;
7985
}
8086

8187
h2 {
82-
@apply text-3xl font-bold text-dark-title;
88+
@apply text-3xl font-bold light:text-dark-title;
8389
}
8490

8591
h3 {
86-
@apply text-2xl font-bold text-dark-title;
92+
@apply text-2xl font-bold light:text-dark-title;
8793
}
8894

8995
h4 {
90-
@apply text-xl font-bold text-dark-title;
96+
@apply text-xl font-bold light:text-dark-title;
9197
}
9298

9399
h5 {
94-
@apply text-lg font-bold text-dark-title;
100+
@apply text-lg font-bold light:text-dark-title;
95101
}
96102

97103
h6 {

app/(root)/layout.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,19 @@ export const viewport: Viewport = {
4444
/**
4545
* RootLayout er en layout-komponent som brukes av alle sidene i nettsiden.
4646
* HTML som blir returnert fra de andre sidene blir plassert i <main> taggen.
47+
* suppresseHydrationWarning er brukt siden dark class blir lagt til i html tag client-side.
4748
* @param children - HTML som skal plasseres i <main> taggen.
4849
*/
4950
const RootLayout: FC<{ children: ReactNode }> = ({ children }) => (
50-
<html lang="nb">
51+
<html lang="nb" suppressHydrationWarning>
5152
<head>
5253
{/*Gir tilgang til Google Search Console*/}
5354
<meta
5455
name="google-site-verification"
5556
content="ff3j07lovsouc9oLEt871sodlGdi8VtTUeiitYbQs2Q"
5657
/>
5758
</head>
58-
<body className="relative bg-default-background">
59+
<body className="relative bg-default-background font-cascadia-code dark:bg-default-dark-background dark:text-white">
5960
<Providers>
6061
<div className={"flex min-h-screen flex-col"}>
6162
<div>

app/(root)/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const metadata: Metadata = {
1616
export const revalidate = 30 // 30 sek
1717

1818
const Home: Page = () => (
19-
<div className={"flex flex-wrap justify-center gap-5 py-5"}>
19+
<div className={"flex flex-wrap justify-center gap-5 pb-5"}>
2020
<EventCard eventTitle={"Arrangementer"} className={"mx-2 w-full sm:w-[550px]"} />
2121
<div className={"flex w-full flex-col gap-5 sm:w-[550px]"}>
2222
<AdsCard className={"mx-2"} />

app/(root)/providers.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
"use client"
22

33
import { NextUIProvider } from "@nextui-org/react"
4-
import { type ReactNode } from "react"
4+
import { ThemeProvider } from "next-themes"
5+
import { type ReactNode, useEffect } from "react"
56

67
/**
78
* En komponent som inneholder alle providers som skal brukes i nettsiden.
89
* NextUIProvider er en provider som brukes av NextUI for å style komponenter.
10+
* ThemeProvider er en provider som brukes av next-themes for light mode og dark mode.
911
* @param children Innholdet som skal rendres i komponenten
1012
* @see https://nextui.org/docs/frameworks/nextjs
1113
*/
12-
export function Providers({ children }: { children: ReactNode }) {
13-
return <NextUIProvider>{children}</NextUIProvider>
14-
}
14+
export const Providers = ({ children }: { children: ReactNode }) => (
15+
<NextUIProvider>
16+
<ThemeProvider attribute={"class"} enableSystem>
17+
{children}
18+
</ThemeProvider>
19+
</NextUIProvider>
20+
)

app/icon.ico

-4.19 KB
Binary file not shown.

app/icon.svg

Lines changed: 121 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)