Compare commits
8 Commits
87562b491d
...
main
Author | SHA1 | Date | |
---|---|---|---|
09e69a7093 | |||
d3f8b8f0bb | |||
fcd5231c28 | |||
1b25bad850 | |||
c8b0c99d8d | |||
55d9bcbef8 | |||
1209562e0b | |||
d5d3c6b936 |
@@ -5,6 +5,7 @@ import { HomeFragment } from "@/gql/graphql";
|
||||
import { getClient } from "@/app/client";
|
||||
import { FeaturedEvents } from "@/components/events/FeaturedEvents";
|
||||
import { NewsList } from "@/components/news/NewsList";
|
||||
import { Newsletter } from "@/components/general/Newsletter";
|
||||
import { UpcomingEvents } from "@/components/events/UpcomingEvents";
|
||||
import { Pig } from "@/components/general/Pig";
|
||||
import Link from "next/link";
|
||||
@@ -58,36 +59,39 @@ export default async function Home() {
|
||||
];
|
||||
|
||||
return (
|
||||
<main className="site-main index" id="main">
|
||||
<FeaturedEvents events={featuredEvents} />
|
||||
<UpcomingEvents events={events} />
|
||||
<div className="infoBlock">
|
||||
<SectionHeader heading="Besøk oss" link="/praktisk" linkText="Praktisk info" />
|
||||
<div>
|
||||
<h2 className="title">Skal du besøke Chateau Neuf?</h2>
|
||||
<p>
|
||||
Vi hjelper deg med å finne frem, og sørger for at du har en fin
|
||||
opplevelse.
|
||||
</p>
|
||||
<Link href="/praktisk#adkomst" className="button">
|
||||
<span>Adresse og adkomst</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
<Link href="/praktisk#billetter" className="button">
|
||||
<span>Billetter</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
<Link href="/praktisk#apningstider" className="button">
|
||||
<span>Åpningstider</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
<>
|
||||
<main className="site-main index" id="main">
|
||||
<FeaturedEvents events={featuredEvents} />
|
||||
<UpcomingEvents events={events} />
|
||||
<div className="infoBlock">
|
||||
<SectionHeader heading="Besøk oss" link="/praktisk" linkText="Praktisk info" />
|
||||
<div>
|
||||
<h2 className="title">Skal du besøke Chateau Neuf?</h2>
|
||||
<p>
|
||||
Vi hjelper deg med å finne frem, og sørger for at du har en fin
|
||||
opplevelse.
|
||||
</p>
|
||||
<Link href="/praktisk#adkomst" className="button">
|
||||
<span>Adresse og adkomst</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
<Link href="/praktisk#billetter" className="button">
|
||||
<span>Billetter</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
<Link href="/praktisk#apningstider" className="button">
|
||||
<span>Åpningstider</span>
|
||||
<Icon type="arrowRight" />
|
||||
</Link>
|
||||
</div>
|
||||
<div className="pig">
|
||||
<Pig type="point" />
|
||||
</div>
|
||||
<SectionFooter link="/praktisk" linkText="Praktisk info" />
|
||||
</div>
|
||||
<div className="pig">
|
||||
<Pig type="point" />
|
||||
</div>
|
||||
<SectionFooter link="/praktisk" linkText="Praktisk info" />
|
||||
</div>
|
||||
<NewsList heading="Siste nytt" featured news={news} />
|
||||
</main>
|
||||
<NewsList heading="Siste nytt" featured news={news} />
|
||||
</main>
|
||||
<Newsletter />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
@@ -157,6 +157,7 @@
|
||||
.dates,
|
||||
.details {
|
||||
font-family: var(--font-serif);
|
||||
line-height: 1.24;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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"/>
|
||||
</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>
|
||||
);
|
||||
}
|
||||
|
23
web/src/components/general/Newsletter.tsx
Normal file
23
web/src/components/general/Newsletter.tsx
Normal 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 på vårt nyhetsbrev og hold deg oppdatert på arrangementer og siste nytt!</p>
|
||||
</div>
|
||||
<a href={link} target="_blank" className="button primary">
|
||||
Meld deg på
|
||||
<Icon type="arrowRight" />
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
68
web/src/components/general/newsletter.module.scss
Normal file
68
web/src/components/general/newsletter.module.scss
Normal file
@@ -0,0 +1,68 @@
|
||||
.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;
|
||||
}
|
||||
|
||||
p {
|
||||
max-width: 48rem;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
@@ -145,6 +145,14 @@ export const Header = () => {
|
||||
Foreninger
|
||||
</Link>
|
||||
</li>
|
||||
<li>
|
||||
<Link
|
||||
href="/sponsorer"
|
||||
data-active={pathname === "/sponsorer"}
|
||||
>
|
||||
Sponsorer
|
||||
</Link>
|
||||
</li>
|
||||
<li className={styles.galtinn}>
|
||||
<a href="https://galtinn.neuf.no/" target="_blank">
|
||||
<span>Mitt medlemskap</span>
|
||||
|
@@ -7,9 +7,8 @@ const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
|
||||
const { name, logo, website, text } = sponsor;
|
||||
return (
|
||||
<li className={styles.sponsorItem}>
|
||||
<h2>{name}</h2>
|
||||
{logo && (
|
||||
<div className={styles.image}>
|
||||
<div className={styles.image}>
|
||||
{logo && (
|
||||
<Image
|
||||
src={logo.url}
|
||||
alt={`Logoen til ${name}`}
|
||||
@@ -17,21 +16,24 @@ const SponsorItem = ({ sponsor }: { sponsor: SponsorBlock }) => {
|
||||
height={logo.height}
|
||||
sizes="20vw"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{text && (
|
||||
<p
|
||||
className={styles.sponsorText}
|
||||
dangerouslySetInnerHTML={{ __html: text }}
|
||||
/>
|
||||
)}
|
||||
{website && (
|
||||
<p>
|
||||
<a href={website} target="_blank" rel="noopener">
|
||||
Besøk nettside
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
)}
|
||||
</div>
|
||||
<div className={styles.text}>
|
||||
<h2>{name}</h2>
|
||||
{text && (
|
||||
<p
|
||||
className={styles.sponsorText}
|
||||
dangerouslySetInnerHTML={{ __html: text }}
|
||||
/>
|
||||
)}
|
||||
{website && (
|
||||
<p className={styles.website}>
|
||||
<a href={website} target="_blank" rel="noopener">
|
||||
Besøk nettside
|
||||
</a>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
};
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
@@ -44,7 +44,9 @@ export function formatExtendedDateTime(
|
||||
const timePart = dateOnly ? "" : " 'kl.' HH:mm";
|
||||
const isCurrentYear = parsed.getFullYear() === new Date().getFullYear();
|
||||
const yearPart = (!isCurrentYear || alwaysIncludeYear) ? " yyyy" : "";
|
||||
return formatDate(parsed, `EEEE d. MMMM${yearPart}${timePart}`);
|
||||
const formatStr = `EEEE d. MMMM${yearPart}${timePart}`;
|
||||
const formatted = format(parsed, formatStr, { timeZone, locale: nb });
|
||||
return formatted;
|
||||
}
|
||||
|
||||
export function isTodayOrFuture(
|
||||
|
Reference in New Issue
Block a user