Compare commits

...

5 Commits

Author SHA1 Message Date
1b25bad850 add sponsors to menu 2025-08-11 18:45:29 +02:00
c8b0c99d8d only show newsletter block on front page for now 2025-08-11 00:04:24 +02:00
55d9bcbef8 add newsletter block 2025-08-10 22:01:40 +02:00
1209562e0b fix event item line height 2025-08-10 21:10:40 +02:00
d5d3c6b936 style sponsor list 2025-08-08 15:21:00 +02:00
8 changed files with 213 additions and 48 deletions

View File

@@ -5,6 +5,7 @@ import { HomeFragment } from "@/gql/graphql";
import { getClient } from "@/app/client"; import { getClient } from "@/app/client";
import { FeaturedEvents } from "@/components/events/FeaturedEvents"; import { FeaturedEvents } from "@/components/events/FeaturedEvents";
import { NewsList } from "@/components/news/NewsList"; import { NewsList } from "@/components/news/NewsList";
import { Newsletter } from "@/components/general/Newsletter";
import { UpcomingEvents } from "@/components/events/UpcomingEvents"; import { UpcomingEvents } from "@/components/events/UpcomingEvents";
import { Pig } from "@/components/general/Pig"; import { Pig } from "@/components/general/Pig";
import Link from "next/link"; import Link from "next/link";
@@ -58,36 +59,39 @@ export default async function Home() {
]; ];
return ( return (
<main className="site-main index" id="main"> <>
<FeaturedEvents events={featuredEvents} /> <main className="site-main index" id="main">
<UpcomingEvents events={events} /> <FeaturedEvents events={featuredEvents} />
<div className="infoBlock"> <UpcomingEvents events={events} />
<SectionHeader heading="Besøk oss" link="/praktisk" linkText="Praktisk info" /> <div className="infoBlock">
<div> <SectionHeader heading="Besøk oss" link="/praktisk" linkText="Praktisk info" />
<h2 className="title">Skal du besøke Chateau Neuf?</h2> <div>
<p> <h2 className="title">Skal du besøke Chateau Neuf?</h2>
Vi hjelper deg med å finne frem, og sørger for at du har en fin <p>
opplevelse. Vi hjelper deg med å finne frem, og sørger for at du har en fin
</p> opplevelse.
<Link href="/praktisk#adkomst" className="button"> </p>
<span>Adresse og adkomst</span> <Link href="/praktisk#adkomst" className="button">
<Icon type="arrowRight" /> <span>Adresse og adkomst</span>
</Link> <Icon type="arrowRight" />
<Link href="/praktisk#billetter" className="button"> </Link>
<span>Billetter</span> <Link href="/praktisk#billetter" className="button">
<Icon type="arrowRight" /> <span>Billetter</span>
</Link> <Icon type="arrowRight" />
<Link href="/praktisk#apningstider" className="button"> </Link>
<span>Åpningstider</span> <Link href="/praktisk#apningstider" className="button">
<Icon type="arrowRight" /> <span>Åpningstider</span>
</Link> <Icon type="arrowRight" />
</Link>
</div>
<div className="pig">
<Pig type="point" />
</div>
<SectionFooter link="/praktisk" linkText="Praktisk info" />
</div> </div>
<div className="pig"> <NewsList heading="Siste nytt" featured news={news} />
<Pig type="point" /> </main>
</div> <Newsletter />
<SectionFooter link="/praktisk" linkText="Praktisk info" /> </>
</div>
<NewsList heading="Siste nytt" featured news={news} />
</main>
); );
} }

View File

@@ -157,6 +157,7 @@
.dates, .dates,
.details { .details {
font-family: var(--font-serif); font-family: var(--font-serif);
line-height: 1.24;
} }

View File

@@ -318,6 +318,12 @@ export function DecorativeIcon ({
<path d="M271.35 281.16C271.68 277.97 272.05 276.11 272.57 276.99C272.86 277.49 273.18 276.92 273.48 276.94C275.53 277.04 277.58 277.21 279.63 277.27C280.51 277.3 281.39 277.12 282.27 277.05C283.76 276.94 285.25 276.8 286.73 276.78C287.49 276.77 288.25 277.09 289.01 277.09C290.53 277.09 292.06 276.89 293.58 276.89C294.36 276.89 295.14 277.19 295.91 277.27C296.2 277.3 296.48 277.04 296.77 276.98C296.89 276.96 297.01 276.94 297.12 277.26C297.43 278.14 297.53 280.9 297.34 283.41C297.2 285.33 297.01 286.62 296.74 286.61C295.48 286.54 294.23 286.5 292.97 286.53C292.46 286.54 291.96 286.86 291.45 286.86C290.65 286.86 289.86 286.67 289.06 286.59C287.89 286.48 286.72 286.32 285.56 286.35C284.22 286.38 282.88 286.58 281.54 286.7C281.12 286.74 280.7 286.76 280.27 286.76C278.95 286.78 277.62 286.78 276.3 286.82C274.93 286.87 273.55 286.96 272.18 287.02C272.08 287.02 271.98 287.03 271.87 286.92C271.46 286.46 271.41 285.87 271.32 281.15L271.35 281.16Z" fill="currentColor"/> <path d="M271.35 281.16C271.68 277.97 272.05 276.11 272.57 276.99C272.86 277.49 273.18 276.92 273.48 276.94C275.53 277.04 277.58 277.21 279.63 277.27C280.51 277.3 281.39 277.12 282.27 277.05C283.76 276.94 285.25 276.8 286.73 276.78C287.49 276.77 288.25 277.09 289.01 277.09C290.53 277.09 292.06 276.89 293.58 276.89C294.36 276.89 295.14 277.19 295.91 277.27C296.2 277.3 296.48 277.04 296.77 276.98C296.89 276.96 297.01 276.94 297.12 277.26C297.43 278.14 297.53 280.9 297.34 283.41C297.2 285.33 297.01 286.62 296.74 286.61C295.48 286.54 294.23 286.5 292.97 286.53C292.46 286.54 291.96 286.86 291.45 286.86C290.65 286.86 289.86 286.67 289.06 286.59C287.89 286.48 286.72 286.32 285.56 286.35C284.22 286.38 282.88 286.58 281.54 286.7C281.12 286.74 280.7 286.76 280.27 286.76C278.95 286.78 277.62 286.78 276.3 286.82C274.93 286.87 273.55 286.96 272.18 287.02C272.08 287.02 271.98 287.03 271.87 286.92C271.46 286.46 271.41 285.87 271.32 281.15L271.35 281.16Z" fill="currentColor"/>
</svg> </svg>
)} )}
{type === "email" && (
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M6.79833 18.8515C6.39828 18.9115 6.03892 18.8236 5.72025 18.5879C5.40157 18.3523 5.21228 18.0344 5.15237 17.6344L3.80227 8.61883C3.74237 8.21879 3.83024 7.85943 4.0659 7.54075C4.30157 7.22207 4.61942 7.03278 5.01947 6.97287L17.2026 5.14841C17.6027 5.0885 17.962 5.17638 18.2807 5.41204C18.5994 5.64771 18.7887 5.96556 18.8486 6.36561L20.1987 15.3811C20.2586 15.7812 20.1707 16.1405 19.9351 16.4592C19.6994 16.7779 19.3815 16.9672 18.9815 17.0271L6.79833 18.8515ZM12.0666 12.4417L5.12468 9.33937L6.34024 17.4565C6.35089 17.5276 6.38247 17.5826 6.43498 17.6214C6.48748 17.6602 6.54931 17.6743 6.62045 17.6637L18.8036 15.8392C18.8748 15.8286 18.9297 15.797 18.9686 15.7445C19.0074 15.692 19.0215 15.6302 19.0108 15.559L17.7953 7.44192L12.0666 12.4417ZM11.8819 11.2081L17.5025 6.31802L5.0754 8.179L11.8819 11.2081ZM5.12468 9.33937L4.95364 8.19724L6.34024 17.4565C6.35089 17.5276 6.38247 17.5826 6.43498 17.6214C6.48748 17.6602 6.54931 17.6743 6.62045 17.6637L6.37674 17.7002L5.12468 9.33937Z" fill="currentColor"/>
</svg>
)}
</div> </div>
); );
} }

View File

@@ -0,0 +1,23 @@
import { DecorativeIcon, Icon } from "./Icon";
import styles from "./newsletter.module.scss";
export const Newsletter = ({ url }: { url?: string }) => {
const link = url ?? "https://pub.dialogapi.no/s/MjQ0NTc6MmQyZjNjY2MtOGMzYy00NWQ0LThkY2MtZmUxYWQyODNhN2Vi";
return (
<div className={styles.newsletterWrapper}>
<div className={styles.newsletter}>
<div className={styles.textWrapper}>
<div className={styles.icon}>
<DecorativeIcon type="email" />
</div>
<h2>Nyhetsbrev</h2>
<p>Meld deg vårt nyhetsbrev og hold deg oppdatert program og nyheter!</p>
</div>
<a href={link} target="_blank" className="button primary">
Meld deg
<Icon type="arrowRight" />
</a>
</div>
</div>
);
};

View File

@@ -0,0 +1,64 @@
.newsletterWrapper {
padding: var(--spacing-sitepadding-block) var(--spacing-sitepadding-inline);
}
.newsletter {
width: 100%;
background: var(--color-background-secondary);
display: flex;
justify-content: space-between;
align-items: center;
gap: 4rem;
padding: var(--spacing-l);
a {
white-space: nowrap;
}
}
.textWrapper {
display: grid;
grid-template-columns: auto 1fr;
column-gap: calc(var(--spacing-l)*0.9);
align-items: center;
h2 {
margin-bottom: .5rem;
}
}
.icon {
grid-column: 1;
grid-row: span 2;
flex: none;
width: var(--size-icon-large);
height: var(--size-icon-large);
background: var(--color-goldenBeige);
border-radius: 100%;
display: flex;
align-items: center;
justify-content: center;
img, svg {
width: 100%;
}
}
@media (max-width: 800px) {
.newsletter {
padding: var(--spacing-m);
flex-wrap: wrap;
gap: 1rem;
justify-content: flex-end;
}
.icon {
grid-row: span 1;
}
.textWrapper {
column-gap: 1rem;
row-gap: 1rem;
p {
grid-column: span 2;
}
}
}

View File

@@ -145,6 +145,14 @@ export const Header = () => {
Foreninger Foreninger
</Link> </Link>
</li> </li>
<li>
<Link
href="/sponsorer"
data-active={pathname === "/sponsorer"}
>
Sponsorer
</Link>
</li>
<li className={styles.galtinn}> <li className={styles.galtinn}>
<a href="https://galtinn.neuf.no/" target="_blank"> <a href="https://galtinn.neuf.no/" target="_blank">
<span>Mitt medlemskap</span>&nbsp; <span>Mitt medlemskap</span>&nbsp;

View File

@@ -7,9 +7,8 @@ const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
const { name, logo, website, text } = sponsor; const { name, logo, website, text } = sponsor;
return ( return (
<li className={styles.sponsorItem}> <li className={styles.sponsorItem}>
<h2>{name}</h2> <div className={styles.image}>
{logo && ( {logo && (
<div className={styles.image}>
<Image <Image
src={logo.url} src={logo.url}
alt={`Logoen til ${name}`} alt={`Logoen til ${name}`}
@@ -17,21 +16,24 @@ const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
height={logo.height} height={logo.height}
sizes="20vw" sizes="20vw"
/> />
</div> )}
)} </div>
{text && ( <div className={styles.text}>
<p <h2>{name}</h2>
className={styles.sponsorText} {text && (
dangerouslySetInnerHTML={{ __html: text }} <p
/> className={styles.sponsorText}
)} dangerouslySetInnerHTML={{ __html: text }}
{website && ( />
<p> )}
<a href={website} target="_blank" rel="noopener"> {website && (
Besøk nettside <p className={styles.website}>
</a> <a href={website} target="_blank" rel="noopener">
</p> Besøk nettside
)} </a>
</p>
)}
</div>
</li> </li>
); );
}; };

View File

@@ -0,0 +1,57 @@
.sponsorList {
margin-bottom: var(--spacing-section-bottom);
ul {
list-style: none;
}
}
.sponsorItem {
//background: var(--color-background-secondary);
border-top: var(--border);
padding: var(--spacing-m) 0;
display: grid;
grid-template-columns: 1fr var(--size-width-p) 1fr;
align-items: center;
column-gap: var(--spacing-gap-column);
margin-bottom: var(--spacing-gap-row);
min-height: 10rem;
&:last-child {
border-bottom: var(--border);
}
h2 {
font-size: var(--font-size-h3);
margin-bottom: 1rem;
}
p {
font-size: var(--font-size-caption);
}
.website {
display: inline-block;
font-weight: 600;
margin-top: 1rem;
}
}
.image {
width: 10rem;
height: 10rem;
display: flex;
align-items: center;
}
@media (max-width: 1260px) {
.sponsorItem {
grid-template-columns: 10rem 1fr;
}
}
@media (max-width: 600px) {
.sponsorItem {
grid-template-columns: 5rem 1fr;
align-items: flex-start;
}
.image {
width: 5rem;
height: 5rem;
}
}