Compare commits
7 Commits
d4570883ae
...
main
Author | SHA1 | Date | |
---|---|---|---|
7d2a9e009d
|
|||
7c185fcb28
|
|||
e93a6b309d
|
|||
8dccdab641
|
|||
b28f2e150f
|
|||
7f0e12d1cc
|
|||
863463392a
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "solar-star",
|
||||
"name": "studio-2025",
|
||||
"version": "0.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "solar-star",
|
||||
"name": "studio-2025",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"@astrojs/react": "^4.3.0",
|
||||
|
@@ -1,8 +1,8 @@
|
||||
---
|
||||
import { translations, type Lang } from '@data/i18n';
|
||||
import { Image } from 'astro:assets';
|
||||
import benker from '@assets/studioBenker.png';
|
||||
const { lang = 'no' } = Astro.props as { lang?: Lang };
|
||||
import { translations, type Lang } from "@data/i18n";
|
||||
import { Image } from "astro:assets";
|
||||
import benker from "@assets/studioBenker.png";
|
||||
const { lang = "no" } = Astro.props as { lang?: Lang };
|
||||
const t = translations[lang].about;
|
||||
---
|
||||
|
||||
@@ -13,7 +13,19 @@ const t = translations[lang].about;
|
||||
<p>{t.p2}</p>
|
||||
<p>{t.p3}</p>
|
||||
<p>{t.p4}</p>
|
||||
<Image src={benker} alt="Studio Benker" class="place-self-center w-full" width={600} height={400} loading="eager" />
|
||||
<p set:html={t.p5}></p>
|
||||
<div>
|
||||
<Image
|
||||
src={benker}
|
||||
alt="Studio Benker"
|
||||
class="place-self-center w-full"
|
||||
width={600}
|
||||
height={400}
|
||||
loading="eager"
|
||||
/>
|
||||
<p class="text-right text-md font-light">
|
||||
{t.photoCredit} Runhild Heggem
|
||||
</p>
|
||||
</div>
|
||||
<p set:html={t.p5} />
|
||||
</div>
|
||||
</main>
|
||||
</main>
|
||||
|
@@ -5,8 +5,11 @@ import ProgramCard from './ProgramCard.astro';
|
||||
const { lang = 'no', data } = Astro.props as { lang?: Lang, data: any };
|
||||
const t = translations[lang];
|
||||
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const now = new Date();
|
||||
const osloNow = new Date(
|
||||
now.toLocaleString("en-US", { timeZone: "Europe/Oslo" })
|
||||
);
|
||||
osloNow.setHours(0, 0, 0, 0);
|
||||
---
|
||||
|
||||
{data ? (
|
||||
@@ -14,19 +17,33 @@ today.setHours(0, 0, 0, 0);
|
||||
<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], idx) => (
|
||||
<ProgramCard
|
||||
date={date}
|
||||
items={items}
|
||||
lang={lang}
|
||||
even={idx % 2 === 1}
|
||||
isPast={new Date(date) < today}
|
||||
/>
|
||||
))}
|
||||
{Object.entries(data).map(([date, items], idx) => {
|
||||
const dateInOslo = new Date(
|
||||
new Date(date).toLocaleString("en-US", { timeZone: "Europe/Oslo" })
|
||||
);
|
||||
dateInOslo.setHours(0, 0, 0, 0);
|
||||
|
||||
return (
|
||||
<ProgramCard
|
||||
date={date}
|
||||
items={items}
|
||||
lang={lang}
|
||||
even={idx % 2 === 1}
|
||||
isPast={dateInOslo < osloNow}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</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.program.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>
|
||||
) : (
|
||||
|
@@ -1,22 +1,34 @@
|
||||
---
|
||||
import ProgramCard from './ProgramCard.astro';
|
||||
import programData from '@data/program.json';
|
||||
import { translations, type Lang } from '@data/i18n';
|
||||
export const prerender = false;
|
||||
|
||||
const { lang = 'no' } = Astro.props as { lang?: Lang };
|
||||
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 todayStr = new Intl.DateTimeFormat("en-CA", {
|
||||
timeZone: "Europe/Oslo",
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
})
|
||||
.format(new Date())
|
||||
.replace(/(\d{4})-(\d{2})-(\d{2})/, "$1-$2-$3");
|
||||
|
||||
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>
|
||||
{
|
||||
items ? (
|
||||
<ProgramCard date={todayStr} items={items} lang={lang} />
|
||||
) : (
|
||||
<p>{t.noProgram}</p>
|
||||
)
|
||||
}
|
||||
</section>
|
||||
|
@@ -33,6 +33,7 @@
|
||||
{ "time": "22:00", "event": "Silent Disco", "cost": "free" }
|
||||
],
|
||||
"2025-08-15": [
|
||||
{ "time": "20:00", "event": "Toga party", "price": "free" },
|
||||
{ "time": "21:00", "event": "Sing-a-long karaoke", "cost": "free" },
|
||||
{ "time": "22:00", "event": "Afterparty", "cost": "free" },
|
||||
{ "time": "22:00", "event": "Silent Disco", "cost": "free" }
|
||||
|
@@ -15,14 +15,14 @@ export const translations = {
|
||||
faq: {
|
||||
title: "Ofte stilte spørsmål",
|
||||
q1: "Hvor arrangeres festivalen?",
|
||||
a1: 'På <a href="https://neuf.no/praktisk#adkomst">Chateau Neuf</a>, Majorstuen, Oslo',
|
||||
a1: 'På <a href="https://neuf.no/praktisk#adkomst">Chateau Neuf</a>, Majorstuen i Oslo',
|
||||
q2: "Hvem er festivalen for?",
|
||||
a2: "Alle nye og gamle studenter, men arrangementene er åpne for alle som ønsker å delta.",
|
||||
q3: "Koster det penger å delta?",
|
||||
a3: "Gratis inngang hver dag og nesten alle arrangementene er gratis. Kun 2 arrangementer krever kjøp av billett.",
|
||||
q4: "Må jeg har med student ID for å komme inn?",
|
||||
a3: "Det er gratis inngang hver dag og nesten alle arrangementene er gratis. Kun 2 arrangementer krever kjøp av billett. Se programmet for mer informasjon.",
|
||||
q4: "Må jeg har med student-ID for å komme inn?",
|
||||
a4: "Nei, men generell legitimasjon er påkrevd.",
|
||||
q5: "Hva er alder årsgrensen på festivalen?",
|
||||
q5: "Hva er aldersgrensen på festivalen?",
|
||||
a5: "Alt er ID18+",
|
||||
},
|
||||
about: {
|
||||
@@ -32,10 +32,11 @@ export const translations = {
|
||||
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>',
|
||||
photoCredit: "Foto:",
|
||||
},
|
||||
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: {
|
||||
@@ -68,7 +69,7 @@ export const translations = {
|
||||
q2: "Who is the festival for?",
|
||||
a2: "All new and returning students, but the events are open to everyone who wants to join.",
|
||||
q3: "Does it cost money?",
|
||||
a3: "Free entry every day and almost all events are free. Only 2 events require a ticket.",
|
||||
a3: "Free entry every day and almost all events are free. Only 2 events require a ticket. See the event schedule for more information.",
|
||||
q4: "Do I need a student ID to enter?",
|
||||
a4: "No, but general identification is required.",
|
||||
q5: "What is the age limit for the festival?",
|
||||
@@ -81,10 +82,11 @@ export const translations = {
|
||||
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>',
|
||||
photoCredit: "Photo:",
|
||||
},
|
||||
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: {
|
||||
|
@@ -37,6 +37,7 @@
|
||||
{ "time": "22:00", "event": "Silent Disco", "price": "gratis" }
|
||||
],
|
||||
"2025-08-15": [
|
||||
{ "time": "20:00", "event": "Togafest", "price": "gratis" },
|
||||
{ "time": "21:00", "event": "Allsangkaraoke", "price": "gratis" },
|
||||
{ "time": "22:00", "event": "Afterparty", "price": "gratis" },
|
||||
{ "time": "22:00", "event": "Silent Disco", "price": "gratis" }
|
||||
|
Reference in New Issue
Block a user