Compare commits

...

10 Commits

11 changed files with 158 additions and 65 deletions

42
src/assets/outland.svg Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 352.35999 69.986664"
height="69.986664"
width="352.35999"
xml:space="preserve"
id="svg2"
version="1.1"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6" /><g
transform="matrix(1.3333333,0,0,-1.3333333,0,69.986667)"
id="g10"><g
transform="scale(0.1)"
id="g12"><path
id="path14"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 418.199,259.699 c 0,23.903 -4.398,46.602 -13.097,68.199 -8.801,21.5 -21.301,40.704 -37.704,57.5 -16,16.602 -34.5,29.403 -55.597,38.301 -21.102,8.903 -43.301,13.403 -66.602,13.403 -23.301,0 -45.5,-4.403 -66.597,-13.204 -21.102,-8.796 -39.801,-21.699 -56.204,-38.5 C 106,368.801 93.3984,349.699 84.8008,328.199 c -8.6016,-21.5 -12.9024,-44.398 -12.9024,-68.5 0,-23.898 4.3008,-46.5 12.9024,-67.898 C 93.3984,170.5 106,151.398 122.398,134.602 138.801,117.801 157.5,105 178.5,96.1992 c 21,-8.8008 43.199,-13.3008 66.699,-13.3008 23.102,0 45.102,4.4024 65.903,13.3008 20.796,8.8008 39.597,21.6018 56.199,38.4028 16.398,16.796 29,35.898 37.699,57.398 8.898,21.398 13.199,43.898 13.199,67.699 z m 71.903,-0.199 c 0,-32.898 -6.102,-64 -18.301,-93.301 -12.199,-29.301 -30,-55.5 -53.403,-78.4998 -23.597,-23 -50.199,-40.5976 -79.796,-52.8984 -29.704,-12.1992 -60.801,-18.4024 -93.301,-18.4024 -33,0 -64.5,6.2032 -94.403,18.5 C 120.898,47.3008 94.5,64.8008 71.5,87.6016 48.1016,110.602 30.3984,136.602 18.3008,165.699 6,194.898 0,226.102 0,259.5 c 0,33.102 6,64.301 18.1992,93.699 12.1016,29.301 29.9024,55.602 53.1992,78.801 23.4024,23 49.9026,40.5 79.4996,52.5 29.704,12 61.102,18 94.301,18 33,0 64.199,-6 93.801,-18 29.5,-12 56,-29.5 79.398,-52.5 23.403,-23.398 41.204,-49.801 53.403,-79.301 12.097,-29.398 18.301,-60.398 18.301,-93.199" /><path
id="path16"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 503.102,495.602 h 69.097 V 212.199 c 0,-42.097 8.801,-73.801 26.403,-94.898 17.597,-21.1994 42.097,-31.6994 77.097,-31.6994 34.801,0 59.199,10.5976 76.801,31.6994 17.602,21.097 26.398,52.801 26.398,94.898 v 283.403 h 70 v -290.5 c 0,-63 -18.097,-101.102 -46.796,-132.3012 C 773.301,41.5 733.801,18.6992 675.898,18.6992 618,18.6992 572.5,46.1016 543.898,77.3008 515.301,108.5 503.199,142 503.199,205.199 l -0.097,290.403 v 0" /><path
id="path18"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 1040.9,430.898 V 27.6016 H 973.398 V 430.898 H 862.801 v 64.704 H 1151.5 V 431 l -110.6,-0.102 v 0" /><path
id="path20"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 1165.9,27.5 v 467.898 h 69.7 V 93.3008 h 138.8 V 27.5 h -208.5" /><path
id="path22"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 1532.8,206.898 73.3,159.704 69.5,-159.704 z M 1607.3,522.102 1377.2,27.5 h 74.6 l 52.2,112.602 200,0.597 50.2,-113.199 77.1,0.3984 -224,494.2036" /><path
id="path24"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 1833.7,524.898 V 28 h 69.4 V 353.398 L 2244.2,0 v 495.301 h -69.9 V 170.5 l -340.6,354.398" /><path
id="path26"
style="fill:#040606;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="m 2352.9,92 h 41.8 c 26.3,0 49.3,3.1016 69,9.398 19.7,6.301 37.6,16.204 53.8,29.903 18.6,15.801 33,35 43.1,57.5 10.1,22.5 15.2,46.699 15.2,72.699 0,36.398 -9.5,69 -28.5,97.602 -31.9,48.296 -82.7,72.5 -152.5,72.5 H 2353 L 2352.9,92 Z m -66.8,-64 v 467.301 h 98.4 c 49.8,0 90.7,-7.403 122.8,-21.602 47.3,-21 83,-53.597 107.4,-97.801 18.7,-33.898 28,-72 28,-114.097 0,-74.102 -28,-133.903 -84,-179.1994 C 2529.9,59.3008 2499.2,43.8984 2466.5,36.5 2442.6,31.1992 2415,28 2383.7,28 h -97.6 v 0" /></g></g></svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -8,7 +8,7 @@ const t = translations[lang].about;
<main class="flex gap-8 flex-col max-w-prose">
<h1 class="text-4xl font-bold">{t.title}</h1>
<div class="flex gap-2 text-lg flex-col">
<div class="flex gap-4 text-lg flex-col">
<p>{t.p1}</p>
<p>{t.p2}</p>
<p>{t.p3}</p>

View File

@@ -2,19 +2,31 @@
import { Image } from 'astro:assets';
import logo from '@assets/logo.png';
import DNS from '@assets/DNS-logo-hvit.png';
import outland from "@assets/outland.svg"
import { translations, type Lang } from '@data/i18n';
import Links from '@components/Links.astro';
const { lang = 'no' } = Astro.props as { lang?: Lang };
const t = translations[lang].footer;
---
<footer class="flex items-center lg:justify-between justify-center bg-accent text-white py-16 px-18 mt-20">
<div class="gap-4 items-center justify-center hidden lg:flex">
<Image src={logo} alt={t.org} class="hero-logo" width={64} height={64} loading="lazy" />
<p class="text-white text-2xl" set:html={t.org}></p>
<footer class="flex items-center lg:justify-between justify-center bg-accent text-white py-16 px-18 mt-20 gap-18">
<div class="gap-6 flex flex-col">
<div class="gap-4 items-center justify-center flex">
<Image src={logo} alt={t.org} class="hero-logo" width={64} height={64} loading="lazy" />
<p class="text-white text-2xl hidden lg:block" set:html={t.org}></p>
</div>
<div class="gap-4 items-center flex flex-col">
<h3>{t.sponsoredBy}</h3>
<a href="https://www.outland.no/" target="_blank">
<Image src={outland} alt="Outland" width={120} height={40} loading="lazy" />
</a>
</div>
</div>
<div class="flex gap-6 items-center justify-center flex-col text-center">
<Image src={DNS} alt={t.dnsAlt} class="hero-logo" width={200} height={200} loading="lazy" />
<a href="https://neuf.no" target="_blank">
<Image src={DNS} alt={t.dnsAlt} class="hero-logo" width={200} height={200} loading="lazy" />
</a>
<address>{t.address}</address>
<Links lang={lang} class="text-3xl" />
</div>

View File

@@ -19,7 +19,7 @@ function getLangSwitchPath(path: string, lang: string) {
const langSwitchPath = getLangSwitchPath(pathname, lang);
---
<nav class="flex justify-center lg:justify-between items-center px-10 py-6 bg-accent mb-4 whitespace-nowrap">
<nav class="flex justify-center lg:justify-between items-center px-10 py-3 bg-accent mb-4 whitespace-nowrap">
<h1 class="text-xl font-bold text-white hover:no-underline hidden lg:block">
<a href={lang === 'en' ? '/en/' : '/'} class="hover:no-underline">{t.title}</a>
</h1>

View File

@@ -1,67 +1,34 @@
---
import { translations, type Lang } from '@data/i18n';
import ProgramCard from './ProgramCard.astro';
const { lang = 'no', data } = Astro.props as { lang?: Lang, data: any };
const t = translations[lang].program;
const t = translations[lang];
type ProgramItem = {
time: string;
event: string;
price?: string | null;
cost?: string | null;
url?: string;
};
const convertDate = (date: string | Date) => {
let d = date;
if (!(d instanceof Date)) {
d = new Date(d);
}
return d.toLocaleDateString(lang === 'en' ? 'en-GB' : 'nb-NO', {
weekday: 'long',
month: 'long',
day: 'numeric'
});
};
const today = new Date();
today.setHours(0, 0, 0, 0);
---
{data ? (
<div class="flex items-center justify-between flex-col gap-8">
<h1 class="font-bold text-3xl text-center w-full">{t.today}</h1>
<p class="font-bold text-2xl text-center w-full">{convertDate(new Date())}</p>
<h1 class="font-bold text-3xl text-center w-full">{t.nav.program}</h1>
</div>
<div class="flex gap-12 flex-wrap justify-center items-stretch">
{Object.entries(data).map(([date, items]) => (
<div id="program-list" class="w-125 p-6 rounded-2xl even:bg-slottsblaa even:text-white bg-gyllen-beige flex flex-col gap-2">
<h2 class="font-bold text-xl">{convertDate(date)}</h2>
<ul>
{(items as ProgramItem[]).map((item) => {
const price = item.price || item.cost;
return (
<li class="flex justify-between">
<p>
{item.time} - {item.event}
</p>
{item.url ? (
<a href={item.url} target="_blank" rel="noopener noreferrer" class="text-right">{price}</a>
) : (
price
)}
</li>
);
})}
</ul>
</div>
{Object.entries(data).map(([date, items], idx) => (
<ProgramCard
date={date}
items={items}
lang={lang}
even={idx % 2 === 1}
isPast={new Date(date) < today}
/>
))}
</div>
<div class="flex justify-center">
<p class="font-bold text-xl text-center w-full">
<a href="https://neuf.no/arrangementer" class="text-gyllen-oransje hover:text-slottsblaa hover:underline" target="_blank" rel="noopener noreferrer">{t.programMore}</a>
<a href="https://neuf.no/arrangementer" class="text-gyllen-oransje hover:text-slottsblaa hover:underline" target="_blank" rel="noopener noreferrer">{t.program.programMore}</a>
</p>
</div>
) : (
<div>No program data available.</div>
<div>{t.program.noProgram}</div>
)}
<style>
</style>

View File

@@ -0,0 +1,46 @@
---
import { translations, type Lang } from '@data/i18n';
const { date, items, lang = 'no', even = false, isPast = false } = Astro.props as { date: string | Date, items: ProgramItem[], lang?: Lang, even?: boolean, isPast?: boolean };
const t = translations[lang].program;
type ProgramItem = {
time: string;
event: string;
price?: string | null;
cost?: string | null;
url?: string;
};
const convertDate = (date: string | Date) => {
let d = date;
if (!(d instanceof Date)) {
d = new Date(d);
}
return d.toLocaleDateString(lang === 'en' ? 'en-GB' : 'nb-NO', {
weekday: 'long',
month: 'long',
day: 'numeric'
});
};
---
<div id="program-list" class:list={["w-125 p-6 rounded-2xl flex flex-col gap-2", even ? "bg-slottsblaa text-white" : "bg-gyllen-beige", isPast ? "opacity-50" : ""]}>
<h3 class="font-bold text-xl">{convertDate(date)}</h3>
<ul>
{items.map((item) => {
const price = item.price || item.cost;
return (
<li class="flex justify-between">
<p>
{item.time} - {item.event}
</p>
{item.url ? (
<a href={item.url} target="_blank" rel="noopener noreferrer" class="text-right">{price}</a>
) : (
price
)}
</li>
);
})}
</ul>
</div>

View File

@@ -0,0 +1,22 @@
---
import ProgramCard from './ProgramCard.astro';
import programData from '@data/program.json';
import { translations, type Lang } from '@data/i18n';
const { lang = 'no' } = Astro.props as { lang?: Lang };
const t = translations[lang].program;
const typedProgramData = programData as Record<string, any>;
const todayStr = new Date().toISOString().slice(0, 10);
const items = typedProgramData[todayStr];
---
<section class="flex flex-col gap-6 max-w-prose">
<h2 class="font-bold text-2xl">{t.today}</h2>
{items ? (
<ProgramCard date={todayStr} items={items} lang={lang} />
) : (
<p>{t.noProgram}</p>
)}
</section>

View File

@@ -31,11 +31,12 @@ export const translations = {
p2: "Det blir sosiale og spennende arrangementer hver dag! Festivalen er for alle nye og gamle studenter i Oslo. Opplev høydepunktet i semesteret - ta med fadderbarna eller vennegjengen, eller kom alene og møt nye venner.",
p3: "Ikke gå glipp av den største studiekickoffen i Oslo!",
p4: "Flere av arrangementene våre er gratis, og alt er ID 18+.",
p5: 'Dersom du ønsker å lære mer om historien til Studio, samt Det Norske Studentersamfund kan du leser mer på <a href="https://viteboka.studentersamfundet.no/Studentfestivalen_i_Oslo">Viteboka</a>',
p5: 'Dersom du ønsker å lære mer om historien til STUDiO, samt Det Norske Studentersamfund kan du leser mer på <a href="https://viteboka.studentersamfundet.no/Studentfestivalen_i_Oslo">Viteboka</a>',
},
program: {
today: "Hva skjer i dag?",
programMore: "For arrangementer etter Studio trykk her",
programMore: "For arrangementer etter STUDiO trykk her",
noProgram: "Ingenting på programmet i dag :(",
},
vors: {
text: "Sett på låta for litt stemning før dere kommer 🔥",
@@ -44,6 +45,7 @@ export const translations = {
address: "Slemdalsveien 15, 0369 Oslo",
org: "Studentfestivalen<br>i Oslo 2025",
dnsAlt: "Logo for Det Norske Studentersamfund",
sponsoredBy: "Sponset av",
},
},
en: {
@@ -78,11 +80,12 @@ export const translations = {
p2: "There will be social and exciting events every day for new and old students. Bring your buddies, a group of friends or come alone and experience the highlight of the semester.",
p3: "Don't miss the biggest buddy and semester kickoff in Oslo!",
p4: "Several of our events are free and everything is ID18+.",
p5: 'If you want to learn more about the history of Studio, as well as The Norwegian Student Society, you can read more on <a href="https://viteboka.studentersamfundet.no/Studentfestivalen_i_Oslo">Viteboka</a>',
p5: 'If you want to learn more about the history of STUDiO, as well as The Norwegian Student Society, you can read more on <a href="https://viteboka.studentersamfundet.no/Studentfestivalen_i_Oslo">Viteboka</a>',
},
program: {
today: "What's happening today?",
programMore: "For events after Studio click here",
programMore: "For events after STUDiO click here",
noProgram: "No events today :(",
},
vors: {
text: "Play the song to get in the mood before you arrive 🔥",
@@ -91,6 +94,7 @@ export const translations = {
address: "Slemdalsveien 15, 0369 Oslo",
org: "Student Festival<br>in Oslo 2025",
dnsAlt: "Logo for the Norwegian Student Society",
sponsoredBy: "Sponsored by",
},
},
} as const;

View File

@@ -16,7 +16,7 @@ const { lang = 'no' } = Astro.props;
</head>
<body class="grid grid-rows-[auto_1fr_auto] jusify-center gap-12">
<Nav lang={lang} />
<div id="content" class="max-w-7xl grid place-self-center gap-8 px-4">
<div id="content" class="max-w-7xl grid place-self-center gap-12 px-4">
<slot />
</div>
<Footer lang={lang} />

View File

@@ -1,16 +1,16 @@
---
import Layout from '@layouts/Layout.astro';
import Program from '@components/Program.astro';
import Links from '@components/Links.astro';
import FAQ from '@components/FAQ.astro';
import Hero from '@components/Hero.astro';
import TodayProgram from '@components/TodayProgram.astro';
import Vors from '@components/Vors.astro';
---
<Layout lang="en">
<Hero lang="en" />
<Links lang="en" class="text-5xl text-black" />
<Program lang="en" />
<TodayProgram lang="en" />
<FAQ lang="en" />
<Vors lang="en" />
</Layout>

View File

@@ -1,16 +1,16 @@
---
import Layout from '@layouts/Layout.astro';
import Program from '@components/Program.astro';
import Links from '@components/Links.astro';
import FAQ from '@components/FAQ.astro';
import Hero from '@components/Hero.astro';
import TodayProgram from '@components/TodayProgram.astro';
import Vors from '@components/Vors.astro';
---
<Layout lang="no">
<Hero lang="no" />
<Links lang="no" class="text-5xl text-black" />
<Program lang="no" />
<TodayProgram lang="no" />
<FAQ lang="no" />
<Vors lang="no" />
</Layout>