Rework homepage for recruiting, add Impressum page
- Hero call to action for the casting (Anmeldeschluss 31.1.2027), CMS-editable - Reorder sections (Mitwirken second, Organisationskomitee as own section) and build the nav from visible sections; hide empty Stück/Galerie/Tickets - Termine as one continuous "way" timeline with next-milestone highlight - Compact supporter tiles and committee grid, fixed contact box - Typography: script font only for section titles, 18px body text - Self-host Kaushan Script (no Google Fonts), Open Graph/canonical meta - Footer with contacts and supporters - /impressum page driven by new optional Studio fields; only served once publisher and email are filled in (hosting defaults to Infomaniak) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c237dea65f
commit
50a68841ce
18 files changed
+860
-162
No files matched your search
@@ -1,16 +1,16 @@
|
||||
---
|
||||
const navItems = [
|
||||
{ id: 'projekt', label: 'Das Projekt' },
|
||||
{ id: 'team', label: 'Wer steckt dahinter' },
|
||||
{ id: 'stueck', label: 'Das Stück' },
|
||||
{ id: 'mitwirkung', label: 'Mitwirken' },
|
||||
{ id: 'termine', label: 'Termine' },
|
||||
{ id: 'presse', label: 'Presse' },
|
||||
{ id: 'gallery', label: 'Galerie' },
|
||||
{ id: 'tickets', label: 'Tickets' },
|
||||
];
|
||||
---
|
||||
export interface NavItem {
|
||||
id: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
interface Props {
|
||||
/** Sections actually rendered on the page, in page order. */
|
||||
items: NavItem[];
|
||||
}
|
||||
|
||||
const { items: navItems } = Astro.props;
|
||||
---
|
||||
<nav class="max-md:sticky anchor-nav bg-[#2b2b56] py-4 md:py-3 transition-all duration-300 z-[100] shadow-[0_2px_5px_rgba(0,0,0,0.1)] [&.sticky]:sticky [&.sticky]:top-0 [&.sticky]:shadow-[0_2px_10px_rgba(0,0,0,0.3)]" id="anchor-nav">
|
||||
<div class="max-w-[--max-width-container] mx-auto px-[--spacing-md]">
|
||||
|
||||
@@ -31,7 +31,9 @@ const navItems = [
|
||||
|
||||
<!-- Mobile header row -->
|
||||
<div class="flex md:hidden items-center justify-between px-2">
|
||||
<span class="text-white/60 text-xs font-medium tracking-widest uppercase">Theater Ziefen</span>
|
||||
<a href="#" class="text-white no-underline text-base font-bold leading-tight tracking-wide">
|
||||
Freilichttheater Ziefen <span class="text-accent">2028</span>
|
||||
</a>
|
||||
<button
|
||||
id="hamburger-btn"
|
||||
class="text-white p-2 -mr-2 rounded hover:bg-white/20 transition-colors duration-200"
|
||||
@@ -93,22 +95,38 @@ const navItems = [
|
||||
});
|
||||
});
|
||||
|
||||
// Highlight active section on scroll
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
const sectionId = entry.target.getAttribute('id');
|
||||
document.querySelectorAll('.nav-link').forEach(link => {
|
||||
link.classList.remove('active');
|
||||
if (link.getAttribute('data-section') === sectionId) {
|
||||
link.classList.add('active');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}, { root: null, rootMargin: '-20% 0px -70% 0px', threshold: 0 });
|
||||
// Highlight active section on scroll: the active section is the last one whose
|
||||
// top has passed a line just below the nav. At the very bottom of the page the
|
||||
// last section wins, since it may be too short to ever reach that line.
|
||||
const sections = Array.from(document.querySelectorAll<HTMLElement>('.theater-section'));
|
||||
const navLinks = Array.from(document.querySelectorAll<HTMLElement>('.nav-link'));
|
||||
|
||||
document.querySelectorAll('.theater-section').forEach(section => observer.observe(section));
|
||||
function setActive(id: string | null) {
|
||||
navLinks.forEach(link => link.classList.toggle('active', link.dataset.section === id));
|
||||
}
|
||||
|
||||
function updateActive() {
|
||||
const atBottom = window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 4;
|
||||
if (atBottom && sections.length) {
|
||||
setActive(sections[sections.length - 1].id);
|
||||
return;
|
||||
}
|
||||
const line = window.innerHeight * 0.25;
|
||||
let current: string | null = null;
|
||||
for (const section of sections) {
|
||||
if (section.getBoundingClientRect().top <= line) current = section.id;
|
||||
}
|
||||
setActive(current);
|
||||
}
|
||||
|
||||
let ticking = false;
|
||||
window.addEventListener('scroll', () => {
|
||||
if (ticking) return;
|
||||
ticking = true;
|
||||
requestAnimationFrame(() => { updateActive(); ticking = false; });
|
||||
}, { passive: true });
|
||||
window.addEventListener('resize', updateActive);
|
||||
updateActive();
|
||||
|
||||
// Sticky nav on scroll
|
||||
const nav = document.querySelector('.anchor-nav');
|
||||
@@ -129,7 +147,7 @@ const navItems = [
|
||||
hamburgerIcon.classList.add('hidden');
|
||||
closeIcon.classList.remove('hidden');
|
||||
hamburgerBtn.setAttribute('aria-expanded', 'true');
|
||||
hamburgerBtn.setAttribute('aria-label', 'Menü schließen');
|
||||
hamburgerBtn.setAttribute('aria-label', 'Menü schliessen');
|
||||
}
|
||||
|
||||
function closeMenu() {
|
||||
|
||||
@@ -7,16 +7,26 @@ const { committee } = Astro.props;
|
||||
---
|
||||
|
||||
{committee?.members?.length > 0 && (
|
||||
<div class="text-center">
|
||||
<p class="prose-measure opacity-90 mb-10">
|
||||
<div>
|
||||
<p class="prose-measure mb-10 text-center opacity-90">
|
||||
{committee.intro ||
|
||||
'Hinter dem Freilichttheater Ziefen 2028 steht ein Organisationskomitee aus Ziefen und Umgebung, das das Projekt mit viel Herzblut plant, koordiniert und auf die Bühne bringt.'}
|
||||
</p>
|
||||
<ul class="list-none p-0 m-0 flex flex-wrap justify-center gap-4">
|
||||
{/* Keep the Sanity order: members are deliberately ordered by importance. */}
|
||||
<ul
|
||||
role="list"
|
||||
class="mx-auto m-0 grid max-w-5xl list-none grid-cols-2 gap-2 p-0 sm:gap-3 md:grid-cols-3 lg:grid-cols-4"
|
||||
>
|
||||
{committee.members.map((member: any) => (
|
||||
<li class="bg-white/10 rounded-lg px-6 py-4 min-w-[12rem]">
|
||||
<span class="block text-xl text-white">{member.name}</span>
|
||||
{member.role && <span class="block text-base opacity-80">{member.role}</span>}
|
||||
<li class="m-0 flex flex-col justify-center rounded-lg bg-white/10 px-3 py-2.5 sm:px-4 sm:py-3">
|
||||
<span class="block text-[0.95rem] font-bold leading-snug text-white hyphens-auto break-words sm:text-base md:text-lg">
|
||||
{member.name}
|
||||
</span>
|
||||
{member.role && (
|
||||
<span class="mt-0.5 block text-sm leading-snug text-white/75 hyphens-auto break-words">
|
||||
{member.role}
|
||||
</span>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -4,6 +4,14 @@ interface Props {
|
||||
}
|
||||
|
||||
const { content } = Astro.props;
|
||||
|
||||
// Recruiting call to action. CMS fields override these defaults.
|
||||
const cta = content.hero?.cta ?? {};
|
||||
const showCta = !cta.hidden;
|
||||
const ctaText = cta.text || 'Wir suchen Schauspielerinnen, Schauspieler, Sängerinnen und Sänger – Anmeldeschluss 31. Januar 2027';
|
||||
const ctaLabel = cta.buttonLabel || 'Jetzt mitwirken';
|
||||
const ctaHref = cta.href || '#mitwirkung';
|
||||
const ctaExternal = /^https?:\/\//.test(ctaHref);
|
||||
---
|
||||
|
||||
<div class="bg-[#2b2b56] text-white relative overflow-hidden">
|
||||
@@ -26,5 +34,19 @@ const { content } = Astro.props;
|
||||
{content.hero.subtitle}
|
||||
</p>
|
||||
)}
|
||||
{showCta && (
|
||||
<div class="hero-cta flex flex-col items-center gap-5 text-center">
|
||||
<p class="max-w-xl text-lg md:text-xl font-semibold leading-snug text-accent">
|
||||
{ctaText}
|
||||
</p>
|
||||
<a
|
||||
href={ctaHref}
|
||||
{...(ctaExternal ? { target: '_blank', rel: 'noopener noreferrer' } : {})}
|
||||
class="inline-block py-4 px-10 bg-accent text-secondary no-underline font-bold text-xl rounded-lg transition-all duration-300 shadow-[0_4px_10px_rgba(0,0,0,0.2)] hover:-translate-y-1 hover:shadow-[0_6px_15px_rgba(0,0,0,0.3)] hover:bg-[#fbfa9a] focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-accent"
|
||||
>
|
||||
{ctaLabel}
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,15 +1,23 @@
|
||||
---
|
||||
import { Download, FileText } from '@lucide/astro';
|
||||
import { Download, FileText, Mail, Phone } from '@lucide/astro';
|
||||
|
||||
interface Props {
|
||||
mitwirkung: any;
|
||||
}
|
||||
|
||||
const { mitwirkung } = Astro.props;
|
||||
|
||||
// tel: URIs must not contain spaces; keep the formatted number for display.
|
||||
const phoneHref = mitwirkung?.director_phone
|
||||
? `tel:${String(mitwirkung.director_phone).replace(/[^\d+]/g, '')}`
|
||||
: '';
|
||||
|
||||
const contactLink =
|
||||
'inline-flex min-h-11 max-w-full text-base sm:text-lg items-center gap-3 rounded-md px-3 -mx-3 text-accent no-underline hover:underline hover:bg-white/10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent';
|
||||
---
|
||||
|
||||
{mitwirkung?.flyerUrl && (
|
||||
<div class="mt-12 flex flex-col sm:flex-row items-center justify-center gap-4 text-center">
|
||||
<div class="mx-auto mt-10 flex max-w-[42rem] flex-col items-center justify-center gap-4 text-center sm:flex-row sm:gap-6">
|
||||
<a
|
||||
href={`${mitwirkung.flyerUrl}?dl=Flyer-Mitwirken-Freilichttheater-Ziefen-2028.pdf`}
|
||||
download
|
||||
@@ -27,7 +35,7 @@ const { mitwirkung } = Astro.props;
|
||||
href={mitwirkung.flyerUrl}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="inline-flex items-center gap-2 text-white underline underline-offset-4 hover:text-accent"
|
||||
class="inline-flex min-h-11 items-center gap-2 text-white underline underline-offset-4 hover:text-accent"
|
||||
>
|
||||
<FileText size={20} aria-hidden="true" />
|
||||
Im Browser ansehen<span class="sr-only"> (öffnet in neuem Tab)</span>
|
||||
@@ -36,20 +44,35 @@ const { mitwirkung } = Astro.props;
|
||||
)}
|
||||
|
||||
{mitwirkung?.director_name && (
|
||||
<div class="mt-16 p-12 bg-white/10 rounded-lg text-center">
|
||||
<h3 class="text-3xl text-white mb-4">Kontakt Regisseur:</h3>
|
||||
<p><strong>{mitwirkung.director_name}</strong></p>
|
||||
{mitwirkung.director_email && (
|
||||
<p>
|
||||
<span>E-Mail:</span>
|
||||
<a href={`mailto:${mitwirkung.director_email}`} class="text-accent no-underline hover:underline">{mitwirkung.director_email}</a>
|
||||
</p>
|
||||
)}
|
||||
{mitwirkung.director_phone && (
|
||||
<p>
|
||||
<span>Telefon:</span>
|
||||
<a href={`tel:${mitwirkung.director_phone}`} class="text-accent no-underline hover:underline">{mitwirkung.director_phone}</a>
|
||||
</p>
|
||||
<div class="mx-auto mt-12 max-w-[42rem] rounded-lg bg-white/10 p-6 sm:p-8">
|
||||
<h3 class="m-0 font-body text-sm font-semibold uppercase tracking-[0.15em] text-white/75">Kontakt</h3>
|
||||
<p class="m-0 mt-2 text-xl font-bold text-white sm:text-2xl">{mitwirkung.director_name}</p>
|
||||
<p class="m-0 text-base text-white/75">Regie & Autor</p>
|
||||
{(mitwirkung.director_email || mitwirkung.director_phone) && (
|
||||
<dl class="m-0 mt-4 flex flex-col gap-1">
|
||||
{mitwirkung.director_email && (
|
||||
<div>
|
||||
<dt class="sr-only">E-Mail</dt>
|
||||
<dd class="m-0">
|
||||
<a href={`mailto:${mitwirkung.director_email}`} class={contactLink}>
|
||||
<Mail size={20} aria-hidden="true" class="shrink-0" />
|
||||
<span class="min-w-0 break-all sm:break-normal">{mitwirkung.director_email}</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
{mitwirkung.director_phone && (
|
||||
<div>
|
||||
<dt class="sr-only">Telefon</dt>
|
||||
<dd class="m-0">
|
||||
<a href={phoneHref} class={contactLink}>
|
||||
<Phone size={20} aria-hidden="true" class="shrink-0" />
|
||||
<span class="whitespace-nowrap">{mitwirkung.director_phone}</span>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
)}
|
||||
</dl>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
@@ -1,4 +1,5 @@
|
||||
---
|
||||
import { ExternalLink } from '@lucide/astro';
|
||||
import { urlFor } from '../sanity/imageUrl';
|
||||
|
||||
interface Props {
|
||||
@@ -6,37 +7,81 @@ interface Props {
|
||||
}
|
||||
|
||||
const { organizations } = Astro.props;
|
||||
|
||||
// Short, human-readable host ("ziefen.ch") shown under the name of link cards.
|
||||
const hostOf = (url: string) => {
|
||||
try {
|
||||
return new URL(url).hostname.replace(/^www\./, '');
|
||||
} catch {
|
||||
return '';
|
||||
}
|
||||
};
|
||||
|
||||
// Logos render at most ~80px tall; request a 2x-height version from the CDN.
|
||||
const logoSrc = (logo: any) => {
|
||||
const src = urlFor(logo);
|
||||
return src && !src.includes('?') ? `${src}?h=160&fit=max&auto=format` : src;
|
||||
};
|
||||
|
||||
const tileBase =
|
||||
'flex h-full flex-col items-center gap-3 rounded-lg bg-white/10 p-4 text-center text-white no-underline md:p-5';
|
||||
---
|
||||
|
||||
{organizations && organizations.length > 0 && (
|
||||
<div class="grid grid-cols-1 md:grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-12 mt-16">
|
||||
{organizations.map((org: any) => {
|
||||
const cardContent = (
|
||||
<Fragment>
|
||||
{org.logo && (
|
||||
<div class="mb-4 flex justify-center">
|
||||
<img src={urlFor(org.logo)} alt={`${org.name} logo`} class="h-20 w-auto object-contain" />
|
||||
<div class="mx-auto mt-14 max-w-5xl md:mt-16">
|
||||
<p class="mb-5 text-center font-body text-sm font-semibold uppercase tracking-[0.15em] text-white/75">
|
||||
Trägerschaft & Unterstützung
|
||||
</p>
|
||||
<ul role="list" class="m-0 grid list-none grid-cols-2 gap-3 p-0 sm:gap-4 lg:grid-cols-4 lg:gap-6">
|
||||
{organizations.map((org: any) => {
|
||||
const role = typeof org.role === 'string' ? org.role.trim() : '';
|
||||
const host = org.url ? hostOf(org.url) : '';
|
||||
const cardContent = (
|
||||
<Fragment>
|
||||
{org.logo && (
|
||||
<div class="flex h-20 w-full items-center justify-center rounded-md bg-white p-2 md:h-24 md:p-3">
|
||||
<img
|
||||
src={logoSrc(org.logo)}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="max-h-full max-w-full object-contain"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
<div class="flex flex-1 flex-col items-center justify-center gap-1">
|
||||
<h3 class="m-0 font-body text-sm font-bold leading-snug text-white hyphens-auto break-words sm:text-base lg:text-lg">
|
||||
{org.name}
|
||||
</h3>
|
||||
{role && <p class="org-role m-0 text-sm leading-snug opacity-85">{role}</p>}
|
||||
{org.url && (
|
||||
<span class="inline-flex items-center gap-1 text-xs text-white/70 group-hover:text-accent">
|
||||
{host && <span>{host}</span>}
|
||||
<ExternalLink size={14} aria-hidden="true" class="shrink-0" />
|
||||
<span class="sr-only">(öffnet in neuem Tab)</span>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<h3 class="text-3xl mb-2 text-white">{org.name}</h3>
|
||||
<p class="org-role m-0 opacity-90">{org.role}</p>
|
||||
</Fragment>
|
||||
);
|
||||
</Fragment>
|
||||
);
|
||||
|
||||
return org.url ? (
|
||||
<a
|
||||
href={org.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="block bg-white/10 p-12 rounded-lg text-center transition-all duration-300 hover:-translate-y-1 hover:bg-white/15 no-underline text-white hover:shadow-lg"
|
||||
>
|
||||
{cardContent}
|
||||
</a>
|
||||
) : (
|
||||
<div class="bg-white/10 p-12 rounded-lg text-center transition-all duration-300 hover:-translate-y-1 hover:bg-white/15">
|
||||
{cardContent}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
return (
|
||||
<li class="m-0">
|
||||
{org.url ? (
|
||||
<a
|
||||
href={org.url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class={`group ${tileBase} transition duration-200 hover:-translate-y-1 hover:bg-white/15 hover:shadow-lg focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent motion-reduce:transition-none motion-reduce:hover:translate-y-0`}
|
||||
>
|
||||
{cardContent}
|
||||
</a>
|
||||
) : (
|
||||
<div class={tileBase}>{cardContent}</div>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
@@ -9,15 +9,15 @@ const { images } = Astro.props;
|
||||
---
|
||||
|
||||
{images && images.length > 0 ? (
|
||||
<div class="grid grid-cols-[repeat(auto-fill,minmax(300px,1fr))] md:grid-cols-[repeat(auto-fill,minmax(200px,1fr))] gap-[--spacing-md] md:gap-[--spacing-sm] mt-[--spacing-lg]">
|
||||
<div class="grid grid-cols-[repeat(auto-fill,minmax(min(100%,300px),1fr))] md:grid-cols-[repeat(auto-fill,minmax(220px,1fr))] gap-6 md:gap-4 mt-8">
|
||||
{images.map((image) => (
|
||||
<div class="relative overflow-hidden rounded-lg shadow-[0_4px_10px_rgba(0,0,0,0.2)] transition-all duration-300 aspect-[4/3] hover:-translate-y-1 hover:shadow-[0_8px_20px_rgba(0,0,0,0.3)] group">
|
||||
<img src={urlFor(image)} alt="Theater photo" loading="lazy" class="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105" />
|
||||
<img src={urlFor(image)} alt={image?.alt || 'Foto Freilichttheater Ziefen'} loading="lazy" class="w-full h-full object-cover transition-transform duration-300 group-hover:scale-105" />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
) : (
|
||||
<div class="text-center p-[--spacing-xl] bg-white/10 rounded-lg italic">
|
||||
<div class="prose-measure text-center px-6 py-10 md:px-10 bg-white/10 rounded-lg italic">
|
||||
<p class="m-0 text-lg">Fotos werden bald hinzugefügt. Besuchen Sie uns später wieder!</p>
|
||||
</div>
|
||||
)}
|
||||
@@ -10,10 +10,10 @@ const { id, title, variant = 'light' } = Astro.props;
|
||||
|
||||
<section class={`theater-section py-12 px-4 md:py-20 md:px-16 scroll-mt-[100px] ${variant === 'light' ? 'bg-[#3d3d6f]' : 'bg-primary'} text-white`} id={id}>
|
||||
<div class="max-w-7xl mx-auto">
|
||||
<h2 class="font-heading text-4xl md:text-6xl mb-8 text-center font-normal text-white [text-shadow:2px_2px_4px_rgba(0,0,0,0.3)]">
|
||||
<h2 class="font-heading text-4xl md:text-6xl mb-8 text-center font-normal text-white">
|
||||
{title}
|
||||
</h2>
|
||||
<div class="section-content text-lg md:text-base leading-relaxed">
|
||||
<div class="section-content text-lg leading-relaxed">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+274
-27
@@ -1,37 +1,284 @@
|
||||
---
|
||||
import { MapPin } from '@lucide/astro';
|
||||
|
||||
interface Props {
|
||||
events: any[];
|
||||
}
|
||||
|
||||
const { events } = Astro.props;
|
||||
|
||||
// --- Best-effort parsing of free-text German dates ------------------------
|
||||
// "31. Januar 2027" -> day, "Juni 2028" / "Ab November 2027" -> month,
|
||||
// "Frühjahr 2027" -> season (Mar–May). Anything else -> null (never "past").
|
||||
const MONTHS: Record<string, number> = {
|
||||
januar: 1, jänner: 1, jaenner: 1, februar: 2, märz: 3, maerz: 3, april: 4,
|
||||
mai: 5, juni: 6, juli: 7, august: 8, september: 9, oktober: 10,
|
||||
november: 11, dezember: 12,
|
||||
};
|
||||
const SEASONS: Record<string, number> = {
|
||||
frühjahr: 3, fruehjahr: 3, frühling: 3, fruehling: 3, sommer: 6, herbst: 9, winter: 12,
|
||||
};
|
||||
|
||||
const pad = (n: number) => String(n).padStart(2, '0');
|
||||
const lastDay = (y: number, m: number) => new Date(Date.UTC(y, m, 0)).getUTCDate();
|
||||
const iso = (y: number, m: number, d: number) => `${y}-${pad(m)}-${pad(d)}`;
|
||||
|
||||
interface ParsedDate {
|
||||
end: string; // last day the milestone covers, YYYY-MM-DD
|
||||
datetime?: string; // machine-readable value for <time>, only when exact
|
||||
}
|
||||
|
||||
function parseDate(raw: unknown): ParsedDate | null {
|
||||
if (typeof raw !== 'string') return null;
|
||||
const s = raw.toLowerCase().trim();
|
||||
|
||||
const isoMatch = s.match(/\b(\d{4})-(\d{2})-(\d{2})\b/);
|
||||
const numMatch = s.match(/\b(\d{1,2})\.\s?(\d{1,2})\.\s?(\d{4})\b/);
|
||||
if (isoMatch || numMatch) {
|
||||
const [y, m, d] = isoMatch
|
||||
? [+isoMatch[1], +isoMatch[2], +isoMatch[3]]
|
||||
: [+numMatch![3], +numMatch![2], +numMatch![1]];
|
||||
if (m < 1 || m > 12 || d < 1 || d > lastDay(y, m)) return null;
|
||||
return { end: iso(y, m, d), datetime: iso(y, m, d) };
|
||||
}
|
||||
|
||||
const year = Number(s.match(/\b(\d{4})\b/)?.[1]);
|
||||
if (!year) return null;
|
||||
const words = s.split(/[^a-zäöü]+/);
|
||||
|
||||
const month = words.map((w) => MONTHS[w]).find(Boolean);
|
||||
if (month) {
|
||||
const day = Number(s.match(/\b(\d{1,2})\.\s*[a-zäöü]/)?.[1]);
|
||||
if (day >= 1 && day <= lastDay(year, month)) {
|
||||
return { end: iso(year, month, day), datetime: iso(year, month, day) };
|
||||
}
|
||||
return { end: iso(year, month, lastDay(year, month)), datetime: `${year}-${pad(month)}` };
|
||||
}
|
||||
|
||||
const season = words.map((w) => SEASONS[w]).find(Boolean);
|
||||
if (season) {
|
||||
// A season spans three months, e.g. Frühjahr = March–May.
|
||||
const endDate = new Date(Date.UTC(year, season - 1 + 3, 0));
|
||||
return { end: iso(endDate.getUTCFullYear(), endDate.getUTCMonth() + 1, endDate.getUTCDate()) };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
let today: string;
|
||||
try {
|
||||
today = new Intl.DateTimeFormat('en-CA', { timeZone: 'Europe/Zurich' }).format(new Date());
|
||||
} catch {
|
||||
today = new Date().toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
const items = (Array.isArray(events) ? events : [])
|
||||
.filter(Boolean)
|
||||
.map((event: any) => {
|
||||
const parsed = parseDate(event.date);
|
||||
return { ...event, datetime: parsed?.datetime, past: parsed ? parsed.end < today : false };
|
||||
});
|
||||
const nextIndex = items.findIndex((item) => !item.past);
|
||||
---
|
||||
|
||||
{events && events.length > 0 && (
|
||||
<div class="relative min-h-auto flex flex-col gap-16">
|
||||
<svg class="hidden md:flex absolute top-0 left-0 w-full h-full z-1 pointer-events-none" viewBox="0 0 1000 1000" preserveAspectRatio="xMidYMid meet">
|
||||
<path
|
||||
d="M 50,30 C 150,80 350,150 550,200 S 350,290 100,380 S 300,470 600,560 S 350,670 150,740 S 350,850 550,920"
|
||||
fill="none"
|
||||
stroke="var(--color-accent)"
|
||||
stroke-width="4"
|
||||
stroke-dasharray="15,10"
|
||||
opacity="0.7"
|
||||
/>
|
||||
{items.length > 0 && (
|
||||
<ol class="timeline relative mx-auto max-w-5xl list-none m-0 p-0 pt-10 md:pt-14" data-timeline>
|
||||
<svg class="timeline-way pointer-events-none absolute inset-0 overflow-visible" aria-hidden="true" focusable="false">
|
||||
<defs>
|
||||
<linearGradient id="timeline-fade" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="#fff" stop-opacity="0" />
|
||||
<stop offset="1" stop-color="#fff" stop-opacity="0.7" data-fade-end />
|
||||
</linearGradient>
|
||||
<linearGradient id="timeline-fade-accent" gradientUnits="userSpaceOnUse" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="0" stop-color="var(--color-accent)" stop-opacity="0" />
|
||||
<stop offset="1" stop-color="var(--color-accent)" stop-opacity="1" data-fade-end />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path data-way="all" fill="none" stroke="url(#timeline-fade)" stroke-width="2" stroke-linecap="round" />
|
||||
<path data-way="walked" fill="none" stroke="url(#timeline-fade-accent)" stroke-width="2.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
{events.map((event: any, index: number) => (
|
||||
<div class={`relative z-2 flex items-center gap-12 text-left ${(index + 1) % 2 === 0 ? 'md:flex-row-reverse md:text-right md:right-0' : 'md:left-0'}`}>
|
||||
<div class="hidden md:flex flex-col items-center in-w-30 max-w-60 md:min-w-auto md:self-start">
|
||||
<MapPin class="text-accent" size={40} ></MapPin>
|
||||
<div class="mt-6 text-lg font-bold text-accent text-center whitespace-nowrap md:text-base">{event.date}</div>
|
||||
</div>
|
||||
<div class="flex-1 bg-white/10 p-12 rounded-xl backdrop-blur-[10px] border-2 border-white/20 transition-all duration-300 hover:-translate-y-1 hover:bg-white/15 hover:shadow-[0_8px_20px_rgba(0,0,0,0.3)] max-w-full md:max-w-2xl">
|
||||
<div class="md:hidden text-lg font-bold text-accent text-center whitespace-nowrap md:text-base">{event.date}</div>
|
||||
<h3 class="text-3xl mb-2 text-white md:text-2xl">{event.title}</h3>
|
||||
<p class="event-desc m-0 text-white/90 leading-relaxed">{event.description}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{items.map((item: any, index: number) => {
|
||||
const isNext = index === nextIndex;
|
||||
const contentLeft = index % 2 === 1; // desktop: alternate sides of the way
|
||||
const state = item.past ? 'past' : isNext ? 'next' : 'upcoming';
|
||||
const dateSide = contentLeft
|
||||
? 'md:col-start-3 md:justify-self-start md:ml-2'
|
||||
: 'md:col-start-1 md:justify-self-end md:mr-2';
|
||||
return (
|
||||
<li
|
||||
class:list={[
|
||||
'relative z-1 grid grid-cols-[2rem_1fr] gap-x-4 pb-10 last:pb-0',
|
||||
'md:grid-cols-[1fr_6rem_1fr] md:gap-x-0 md:pb-16',
|
||||
]}
|
||||
data-state={state}
|
||||
aria-current={isNext ? 'step' : undefined}
|
||||
>
|
||||
<span
|
||||
data-marker
|
||||
class:list={[
|
||||
'col-start-1 row-start-1 self-center justify-self-center rounded-full md:col-start-2',
|
||||
state === 'past' && 'size-2.5 bg-[#9494b0]',
|
||||
state === 'upcoming' && 'size-3.5 border-2 border-white/85 bg-(--tl-bg)',
|
||||
state === 'next' && 'size-5 bg-accent shadow-[0_0_0_6px_rgb(249_248_113/0.18),0_0_18px_rgb(249_248_113/0.45)]',
|
||||
]}
|
||||
/>
|
||||
|
||||
{/* Mobile: date + label share one line. Desktop: the wrapper dissolves and the
|
||||
date sits level with the marker, the label tucked underneath. */}
|
||||
<div class="col-start-2 row-start-1 flex flex-wrap items-center gap-x-3 gap-y-1 md:contents">
|
||||
{item.datetime ? (
|
||||
<time datetime={item.datetime} class:list={['tl-date md:row-start-1 md:self-center', dateSide]}>{item.date}</time>
|
||||
) : (
|
||||
<span class:list={['tl-date md:row-start-1 md:self-center', dateSide]}>{item.date}</span>
|
||||
)}
|
||||
{isNext && (
|
||||
<span
|
||||
class:list={[
|
||||
'rounded-full bg-accent px-2.5 py-0.5 text-xs font-bold uppercase tracking-wider text-primary',
|
||||
'md:row-start-2 md:mt-1.5 md:self-start',
|
||||
dateSide,
|
||||
]}
|
||||
>
|
||||
Nächster Termin
|
||||
</span>
|
||||
)}
|
||||
{item.past && <span class="sr-only">(vorbei)</span>}
|
||||
</div>
|
||||
|
||||
<h3
|
||||
class:list={[
|
||||
'col-start-2 row-start-2 m-0 mt-1 font-bold leading-snug md:row-start-1 md:mt-0',
|
||||
contentLeft ? 'md:col-start-1 md:pr-2 md:text-right' : 'md:col-start-3 md:pl-2',
|
||||
state === 'next' ? 'text-2xl md:text-3xl' : 'text-xl md:text-2xl',
|
||||
]}
|
||||
>
|
||||
{item.title}
|
||||
</h3>
|
||||
|
||||
{item.description && (
|
||||
<p
|
||||
class:list={[
|
||||
'col-start-2 row-start-3 m-0 mt-1.5 leading-relaxed text-white/80 md:row-start-2 md:mt-2 md:max-w-md',
|
||||
contentLeft ? 'md:col-start-1 md:ml-auto md:pr-2 md:text-right' : 'md:col-start-3 md:pl-2',
|
||||
]}
|
||||
>
|
||||
{item.description}
|
||||
</p>
|
||||
)}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
)}
|
||||
|
||||
<style>
|
||||
.timeline {
|
||||
/* Marker fill must match the section background so the way "enters" open rings. */
|
||||
--tl-bg: #3d3d6f;
|
||||
}
|
||||
|
||||
/* No-JS fallback: a straight way through the marker column. Replaced by the SVG once drawn. */
|
||||
.timeline::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 1rem;
|
||||
width: 2px;
|
||||
margin-left: -1px;
|
||||
background: linear-gradient(to bottom, transparent, rgb(255 255 255 / 0.7) 2.5rem);
|
||||
}
|
||||
@media (width >= 50rem) {
|
||||
.timeline::before {
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
.timeline[data-drawn]::before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tl-date {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.06em;
|
||||
text-transform: uppercase;
|
||||
color: rgb(255 255 255 / 0.75);
|
||||
}
|
||||
li[data-state='next'] .tl-date {
|
||||
font-size: 1rem;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
li[data-state='past'] {
|
||||
color: rgb(255 255 255 / 0.5);
|
||||
}
|
||||
li[data-state='past'] .tl-date,
|
||||
li[data-state='past'] p {
|
||||
color: rgb(255 255 255 / 0.4);
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
// Draws "the way": one continuous, gently winding line through the centre of every marker.
|
||||
// Positions are measured, so it stays exact for any content length and viewport.
|
||||
function draw(list: HTMLElement) {
|
||||
const svg = list.querySelector<SVGSVGElement>('svg.timeline-way');
|
||||
const markers = [...list.querySelectorAll<HTMLElement>('[data-marker]')];
|
||||
if (!svg || markers.length === 0) return;
|
||||
|
||||
const box = list.getBoundingClientRect();
|
||||
const width = box.width;
|
||||
const height = box.height;
|
||||
if (!width || !height) return;
|
||||
|
||||
const pts = markers.map((m) => {
|
||||
const r = m.getBoundingClientRect();
|
||||
return { x: r.left + r.width / 2 - box.left, y: r.top + r.height / 2 - box.top };
|
||||
});
|
||||
const nextIdx = markers.findIndex((m) => m.closest('li')?.dataset.state === 'next');
|
||||
const allPast = markers.every((m) => m.closest('li')?.dataset.state === 'past');
|
||||
|
||||
const desktop = window.matchMedia('(min-width: 50rem)').matches;
|
||||
const amp = desktop ? 26 : 9; // how far the way swings between markers
|
||||
const start = { x: pts[0].x, y: 0 };
|
||||
|
||||
// Each segment is a cubic curve; alternating the bulge side keeps the tangent
|
||||
// continuous at every marker, so the line reads as one hand-drawn stroke.
|
||||
const segment = (a: { x: number; y: number }, b: { x: number; y: number }, side: number) => {
|
||||
const k = (b.y - a.y) * 0.4;
|
||||
return `C ${a.x + side * amp} ${a.y + k} ${b.x + side * amp} ${b.y - k} ${b.x} ${b.y}`;
|
||||
};
|
||||
const segs: string[] = [segment(start, pts[0], -1)];
|
||||
for (let i = 1; i < pts.length; i++) segs.push(segment(pts[i - 1], pts[i], i % 2 ? 1 : -1));
|
||||
|
||||
const head = `M ${start.x} ${start.y}`;
|
||||
const walkedCount = allPast ? segs.length : nextIdx >= 0 ? nextIdx + 1 : 0;
|
||||
|
||||
svg.setAttribute('width', String(width));
|
||||
svg.setAttribute('height', String(height));
|
||||
svg.setAttribute('viewBox', `0 0 ${width} ${height}`);
|
||||
svg.querySelectorAll('linearGradient').forEach((g) => {
|
||||
g.setAttribute('y2', String(pts[0].y));
|
||||
});
|
||||
svg.querySelector('[data-way="all"]')?.setAttribute('d', `${head} ${segs.join(' ')}`);
|
||||
svg
|
||||
.querySelector('[data-way="walked"]')
|
||||
?.setAttribute('d', walkedCount ? `${head} ${segs.slice(0, walkedCount).join(' ')}` : '');
|
||||
list.setAttribute('data-drawn', '');
|
||||
}
|
||||
|
||||
function init() {
|
||||
document.querySelectorAll<HTMLElement>('[data-timeline]').forEach((list) => {
|
||||
if (list.dataset.timelineInit) return;
|
||||
list.dataset.timelineInit = '1';
|
||||
let frame = 0;
|
||||
const schedule = () => {
|
||||
cancelAnimationFrame(frame);
|
||||
frame = requestAnimationFrame(() => draw(list));
|
||||
};
|
||||
schedule();
|
||||
new ResizeObserver(schedule).observe(list);
|
||||
document.fonts?.ready.then(schedule);
|
||||
});
|
||||
}
|
||||
|
||||
init();
|
||||
document.addEventListener('astro:page-load', init);
|
||||
</script>
|
||||
@@ -1,36 +1,114 @@
|
||||
---
|
||||
// Self-hosted Kaushan Script (no requests to Google, for revDSG/GDPR)
|
||||
import '@fontsource/kaushan-script/400.css';
|
||||
import '../styles/global.css';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
description?: string;
|
||||
interface FooterOrganization {
|
||||
name?: string;
|
||||
url?: string;
|
||||
}
|
||||
|
||||
const { title, description = "Freilichttheater Ziefen 2028 – Wyti Wäg mit Breitestei. Uraufführung im Juni 2028 rund um Jonas Breitenstein (1828–1877)." } = Astro.props;
|
||||
interface Props {
|
||||
title?: string;
|
||||
description?: string;
|
||||
/** Supporting organisations shown in the footer (name + optional link). */
|
||||
organizations?: FooterOrganization[];
|
||||
/** Show the "Impressum & Datenschutz" link (only once its details are complete). */
|
||||
showImpressumLink?: boolean;
|
||||
}
|
||||
|
||||
const BRAND = 'Freilichttheater Ziefen 2028 – Wyti Wäg mit Breitestei';
|
||||
|
||||
const {
|
||||
title = BRAND,
|
||||
description = "Freilichttheater Ziefen 2028 – Wyti Wäg mit Breitestei. Uraufführung im Juni 2028 rund um Jonas Breitenstein (1828–1877).",
|
||||
organizations = [],
|
||||
showImpressumLink = false,
|
||||
} = Astro.props;
|
||||
|
||||
const site = Astro.site ?? Astro.url;
|
||||
const canonicalUrl = new URL(Astro.url.pathname, site).href;
|
||||
const ogImageUrl = new URL('/og-image.png', site).href;
|
||||
const footerOrgs = organizations.filter((org) => org?.name);
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<html lang="de-CH">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="description" content={description} />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>{title}</title>
|
||||
<meta name="description" content={description} />
|
||||
<link rel="canonical" href={canonicalUrl} />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<meta name="generator" content={Astro.generator} />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Kaushan+Script&display=swap" rel="stylesheet">
|
||||
<title>{title} | Theater Ziefen</title>
|
||||
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="Freilichttheater Ziefen 2028" />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:url" content={canonicalUrl} />
|
||||
<meta property="og:image" content={ogImageUrl} />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:image:alt" content={BRAND} />
|
||||
<meta property="og:locale" content="de_CH" />
|
||||
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content={ogImageUrl} />
|
||||
</head>
|
||||
<body>
|
||||
<main class="min-h-[calc(100vh-200px)] flex flex-col items-center *:w-full">
|
||||
<slot />
|
||||
</main>
|
||||
|
||||
<footer class="bg-[#2b2b56] text-white py-[--spacing-md] text-center mt-[--spacing-xl] border-t-2 border-white/10">
|
||||
<div class="mx-auto px-[--spacing-md] md:px-[--spacing-md] px-[--spacing-sm]">
|
||||
<p>© {new Date().getFullYear()} Freilichttheater Ziefen. Alle Rechte vorbehalten.</p>
|
||||
<p class="mt- text-accent font-semibold opacity-90">Uraufführung Juni 2028</p>
|
||||
<footer class="bg-[#2b2b56] text-white/90 py-12 px-4 text-center border-t-2 border-white/10">
|
||||
<div class="max-w-4xl mx-auto flex flex-col items-center gap-6">
|
||||
<p class="m-0 flex flex-wrap justify-center gap-x-2">
|
||||
<span class="font-bold text-white whitespace-nowrap">Freilichttheater Ziefen 2028</span>
|
||||
<span class="opacity-50" aria-hidden="true">·</span>
|
||||
<span class="text-accent font-semibold whitespace-nowrap">Uraufführung Juni 2028</span>
|
||||
</p>
|
||||
|
||||
<nav aria-label="Kontakt">
|
||||
<p class="m-0">
|
||||
<span class="font-semibold text-white mr-1">Kontakt:</span>
|
||||
<a href="/#mitwirkung" class="underline underline-offset-4 hover:text-accent">Mitwirken & Regie</a>
|
||||
<span class="mx-2 opacity-50" aria-hidden="true">·</span>
|
||||
<a href="/#presse" class="underline underline-offset-4 hover:text-accent">Presse</a>
|
||||
</p>
|
||||
</nav>
|
||||
|
||||
{footerOrgs.length > 0 && (
|
||||
<div>
|
||||
<p class="m-0 mb-2 text-sm uppercase tracking-widest text-white/60">Getragen von</p>
|
||||
<ul class="list-none m-0 p-0 flex flex-wrap justify-center gap-x-6 gap-y-2">
|
||||
{footerOrgs.map((org) => (
|
||||
<li>
|
||||
{org.url ? (
|
||||
<a href={org.url} target="_blank" rel="noopener noreferrer" class="underline underline-offset-4 decoration-white/40 hover:text-accent hover:decoration-accent">
|
||||
{org.name}<span class="sr-only"> (öffnet in neuem Tab)</span>
|
||||
</a>
|
||||
) : (
|
||||
<span>{org.name}</span>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<p class="m-0 text-sm text-white/60 flex flex-wrap justify-center gap-x-2">
|
||||
<span>© {new Date().getFullYear()} Freilichttheater Ziefen</span>
|
||||
{showImpressumLink && (
|
||||
<Fragment>
|
||||
<span aria-hidden="true">·</span>
|
||||
<a href="/impressum" class="underline underline-offset-4 decoration-white/40 hover:text-accent hover:decoration-accent">Impressum & Datenschutz</a>
|
||||
</Fragment>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
---
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import TheaterSection from '../components/TheaterSection.astro';
|
||||
import { ArrowLeft } from '@lucide/astro';
|
||||
import { fetchWithCache } from '../sanity/client';
|
||||
import { theaterHomepageQuery } from '../sanity/queries';
|
||||
import { isImpressumComplete } from '../sanity/impressum';
|
||||
|
||||
export const prerender = false;
|
||||
|
||||
const content: any = (await fetchWithCache(theaterHomepageQuery)) ?? {};
|
||||
const imp = content.impressum ?? {};
|
||||
const complete = isImpressumComplete(imp);
|
||||
// Studio field overrides; the site is hosted at Infomaniak.
|
||||
const hosting = imp.hosting?.trim() || 'Infomaniak Network SA, Genf, mit Servern in der Schweiz';
|
||||
|
||||
// Never publish a half-finished legal notice. In dev, show a preview that
|
||||
// marks the missing Studio fields instead.
|
||||
if (!complete && !import.meta.env.DEV) {
|
||||
return new Response('Nicht gefunden', { status: 404 });
|
||||
}
|
||||
|
||||
const webmaster = (content.team?.committee?.members ?? []).find((m: any) =>
|
||||
/webmaster/i.test(m?.role ?? ''),
|
||||
)?.name;
|
||||
|
||||
const updated = imp.updated
|
||||
? new Intl.DateTimeFormat('de-CH', { day: 'numeric', month: 'long', year: 'numeric' }).format(new Date(imp.updated))
|
||||
: null;
|
||||
---
|
||||
|
||||
<BaseLayout
|
||||
title="Impressum & Datenschutz – Freilichttheater Ziefen 2028"
|
||||
description="Impressum und Datenschutzerklärung der Website des Freilichttheaters Ziefen 2028."
|
||||
organizations={content.team?.organizations || []}
|
||||
showImpressumLink={complete}
|
||||
>
|
||||
<header class="bg-[#2b2b56] py-4 px-4 shadow-[0_2px_5px_rgba(0,0,0,0.1)]">
|
||||
<div class="max-w-[42rem] mx-auto flex items-center justify-between gap-4">
|
||||
<a href="/" class="inline-flex items-center gap-2 min-h-11 text-white no-underline hover:text-accent">
|
||||
<ArrowLeft size={20} aria-hidden="true" />
|
||||
Zur Startseite
|
||||
</a>
|
||||
<span class="font-bold text-white">Freilichttheater Ziefen <span class="text-accent">2028</span></span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{!complete && (
|
||||
<p class="m-0 bg-accent text-secondary text-center font-semibold py-3 px-4">
|
||||
Vorschau (nur lokal sichtbar): Diese Seite ist live erst erreichbar, wenn im Studio unter «Impressum & Datenschutz»
|
||||
die Herausgeberin und die E-Mail ausgefüllt sind.
|
||||
</p>
|
||||
)}
|
||||
|
||||
<TheaterSection id="impressum" title="Impressum" variant="light">
|
||||
<div class="prose-measure">
|
||||
<h3>Verantwortlich für den Inhalt</h3>
|
||||
<p>
|
||||
{imp.publisher ? <strong>{imp.publisher}</strong> : <mark>[fehlt: Herausgeberin]</mark>}
|
||||
<br />
|
||||
{imp.address
|
||||
? imp.address.split('\n').map((line: string, i: number) => <Fragment>{i > 0 && <br />}{line}</Fragment>)
|
||||
: <mark>[fehlt: Postadresse]</mark>}
|
||||
</p>
|
||||
{imp.representative && <p>Vertreten durch: {imp.representative}</p>}
|
||||
<p>
|
||||
E-Mail:{' '}
|
||||
{imp.email
|
||||
? <a href={`mailto:${imp.email}`} class="text-accent">{imp.email}</a>
|
||||
: <mark>[fehlt: E-Mail]</mark>}
|
||||
</p>
|
||||
{imp.uid && <p>{imp.uid}</p>}
|
||||
|
||||
{webmaster && (
|
||||
<Fragment>
|
||||
<h3>Webmaster</h3>
|
||||
<p>{webmaster}</p>
|
||||
</Fragment>
|
||||
)}
|
||||
|
||||
<h3>Bilder und Logos</h3>
|
||||
<p>
|
||||
Logos und Wappen werden mit freundlicher Genehmigung der jeweiligen Organisationen verwendet.
|
||||
{imp.imageCredits && <Fragment><br />{imp.imageCredits}</Fragment>}
|
||||
</p>
|
||||
|
||||
<h3>Externe Links</h3>
|
||||
<p>Für die Inhalte verlinkter externer Websites sind ausschliesslich deren Betreiber verantwortlich.</p>
|
||||
</div>
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="datenschutz" title="Datenschutz" variant="dark">
|
||||
<div class="prose-measure">
|
||||
<p>
|
||||
Wir nehmen den Schutz Ihrer Personendaten ernst und bearbeiten sie gemäss dem Schweizer
|
||||
Datenschutzgesetz (DSG).
|
||||
</p>
|
||||
|
||||
<h3>Verantwortliche Stelle</h3>
|
||||
<p>
|
||||
{imp.publisher || <mark>[fehlt: Herausgeberin]</mark>}, Kontakt für Datenschutzfragen:{' '}
|
||||
{imp.email ? <a href={`mailto:${imp.email}`} class="text-accent">{imp.email}</a> : <mark>[fehlt: E-Mail]</mark>}
|
||||
</p>
|
||||
|
||||
<h3>Besuch der Website</h3>
|
||||
<p>
|
||||
Beim Aufruf dieser Website verarbeitet unser Hosting-Anbieter
|
||||
({hosting}) technisch
|
||||
notwendige Daten wie IP-Adresse, Datum und Uhrzeit des Zugriffs, aufgerufene Seite und Browsertyp. Diese
|
||||
Daten dienen ausschliesslich dem sicheren Betrieb der Website und werden nicht länger als dafür nötig
|
||||
aufbewahrt.
|
||||
</p>
|
||||
|
||||
<h3>Inhalte, Bilder und Dokumente</h3>
|
||||
<p>
|
||||
Texte, Bilder und Dokumente (z. B. der Flyer) verwalten wir mit dem Content-Management-System Sanity
|
||||
(sanity.io). Bilder und Dokumente lädt Ihr Browser direkt von Servern von Sanity. Dabei wird Ihre
|
||||
IP-Adresse an Sanity übermittelt. Diese Server können sich ausserhalb der Schweiz befinden, auch in den USA.
|
||||
</p>
|
||||
|
||||
<h3>Schriften</h3>
|
||||
<p>
|
||||
Die verwendeten Schriften sind auf unserem eigenen Server gespeichert. Es wird keine Verbindung zu Google
|
||||
oder anderen Schriftanbietern hergestellt.
|
||||
</p>
|
||||
|
||||
<h3>Keine Analyse, keine Cookies</h3>
|
||||
<p>Wir setzen keine Analyse- oder Tracking-Tools und keine Cookies ein.</p>
|
||||
|
||||
<h3>Kontaktaufnahme</h3>
|
||||
<p>
|
||||
Wenn Sie uns per E-Mail oder Telefon kontaktieren, verwenden wir Ihre Angaben nur, um Ihre Anfrage zu
|
||||
beantworten und die Mitwirkung am Theaterprojekt zu organisieren (z. B. das Casting). Wir geben sie nicht
|
||||
an Dritte weiter und löschen sie, sobald sie dafür nicht mehr benötigt werden.
|
||||
</p>
|
||||
|
||||
<h3>Ihre Rechte</h3>
|
||||
<p>
|
||||
Sie können jederzeit Auskunft über Ihre bei uns gespeicherten Personendaten verlangen und deren
|
||||
Berichtigung oder Löschung beantragen. Wenden Sie sich dazu an{' '}
|
||||
{imp.email ? <a href={`mailto:${imp.email}`} class="text-accent">{imp.email}</a> : <mark>[fehlt: E-Mail]</mark>}.
|
||||
</p>
|
||||
|
||||
{updated && <p class="text-white/70 text-base">Stand: {updated}</p>}
|
||||
</div>
|
||||
</TheaterSection>
|
||||
</BaseLayout>
|
||||
+65
-31
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import AnchorNav from '../components/AnchorNav.astro';
|
||||
import AnchorNav, { type NavItem } from '../components/AnchorNav.astro';
|
||||
import TheaterSection from '../components/TheaterSection.astro';
|
||||
import PhotoGallery from '../components/PhotoGallery.astro';
|
||||
import Hero from '../components/Hero.astro';
|
||||
@@ -11,61 +11,95 @@ import Timeline from '../components/Timeline.astro';
|
||||
import { fetchWithCache } from '../sanity/client';
|
||||
import { renderPortableText } from '../sanity/portableText';
|
||||
import { theaterHomepageQuery } from '../sanity/queries';
|
||||
import { isImpressumComplete } from '../sanity/impressum';
|
||||
|
||||
export const prerender = false
|
||||
|
||||
const content: any = await fetchWithCache(theaterHomepageQuery) ?? {};
|
||||
|
||||
/** True when a Portable Text array has any visible text or an image. */
|
||||
function hasPortableContent(blocks: any[] | undefined): boolean {
|
||||
return (blocks ?? []).some((block) =>
|
||||
block?._type === 'image'
|
||||
? Boolean(block.asset)
|
||||
: (block?.children ?? []).some((child: any) => child?.text?.trim()),
|
||||
);
|
||||
}
|
||||
|
||||
// Page order (requested by the director). `show` hides empty sections from
|
||||
// both the page and the nav; colours alternate over the visible sections only.
|
||||
const sections: (NavItem & { show: boolean })[] = [
|
||||
{ id: 'projekt', label: 'Das Projekt', show: true },
|
||||
{ id: 'mitwirkung', label: 'Mitwirken', show: true },
|
||||
{ id: 'termine', label: 'Termine', show: true },
|
||||
{ id: 'team', label: 'Wer steckt dahinter', show: true },
|
||||
{ id: 'ok', label: 'Organisationskomitee', show: content.team?.committee?.members?.length > 0 },
|
||||
{ id: 'stueck', label: 'Das Stück', show: hasPortableContent(content.stueck?.content) },
|
||||
{ id: 'presse', label: 'Presse', show: true },
|
||||
{ id: 'gallery', label: 'Galerie', show: content.gallery?.images?.length > 0 },
|
||||
{ id: 'tickets', label: 'Tickets', show: Boolean(content.tickets?.ticket_url) },
|
||||
];
|
||||
|
||||
const visible = sections.filter((s) => s.show);
|
||||
const navItems: NavItem[] = visible.map(({ id, label }) => ({ id, label }));
|
||||
const shown = (id: string) => visible.some((s) => s.id === id);
|
||||
const variant = (id: string): 'light' | 'dark' =>
|
||||
visible.findIndex((s) => s.id === id) % 2 === 0 ? 'light' : 'dark';
|
||||
---
|
||||
|
||||
<BaseLayout title={content.title || 'Freilichttheater Ziefen 2028'}>
|
||||
<AnchorNav />
|
||||
<BaseLayout organizations={content.team?.organizations || []} showImpressumLink={isImpressumComplete(content.impressum)}>
|
||||
<AnchorNav items={navItems} />
|
||||
|
||||
<Hero content={content} />
|
||||
|
||||
<TheaterSection id="projekt" title={content.projekt?.title || 'Das Projekt'} variant="light">
|
||||
<TheaterSection id="projekt" title={content.projekt?.title || 'Das Projekt'} variant={variant('projekt')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.projekt?.content)} />
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="team" title={content.team?.title || 'Wer steckt dahinter'} variant="dark">
|
||||
<div class="prose-measure" set:html={renderPortableText(content.team?.content)} />
|
||||
<Organizations organizations={content.team?.organizations || []} />
|
||||
</TheaterSection>
|
||||
|
||||
{content.team?.committee?.members?.length > 0 && (
|
||||
<TheaterSection id="ok" title={content.team.committee.title || 'Organisationskomitee'} variant="light">
|
||||
<Committee committee={content.team.committee} />
|
||||
</TheaterSection>
|
||||
)}
|
||||
|
||||
<TheaterSection id="stueck" title={content.stueck?.title || 'Das Stück'} variant="light">
|
||||
<div class="prose-measure" set:html={renderPortableText(content.stueck?.content)} />
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="mitwirkung" title={content.mitwirkung?.title || 'Mitwirken'} variant="dark">
|
||||
<TheaterSection id="mitwirkung" title={content.mitwirkung?.title || 'Mitwirken'} variant={variant('mitwirkung')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.mitwirkung?.content)} />
|
||||
<MitwirkenExtras mitwirkung={content.mitwirkung} />
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="termine" title={content.termine?.title || 'Termine'} variant="light">
|
||||
<TheaterSection id="termine" title={content.termine?.title || 'Termine'} variant={variant('termine')}>
|
||||
<Timeline events={content.termine?.events || []} />
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="presse" title={content.presse?.title || 'Presse'} variant="dark">
|
||||
<TheaterSection id="team" title={content.team?.title || 'Wer steckt dahinter'} variant={variant('team')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.team?.content)} />
|
||||
<Organizations organizations={content.team?.organizations || []} />
|
||||
</TheaterSection>
|
||||
|
||||
{shown('ok') && (
|
||||
<TheaterSection id="ok" title={content.team.committee.title || 'Organisationskomitee'} variant={variant('ok')}>
|
||||
<Committee committee={content.team.committee} />
|
||||
</TheaterSection>
|
||||
)}
|
||||
|
||||
{shown('stueck') && (
|
||||
<TheaterSection id="stueck" title={content.stueck?.title || 'Das Stück'} variant={variant('stueck')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.stueck?.content)} />
|
||||
</TheaterSection>
|
||||
)}
|
||||
|
||||
<TheaterSection id="presse" title={content.presse?.title || 'Presse'} variant={variant('presse')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.presse?.content)} />
|
||||
</TheaterSection>
|
||||
|
||||
<TheaterSection id="gallery" title={content.gallery?.title || 'Foto Galerie'} variant="light">
|
||||
<PhotoGallery images={content.gallery?.images || []} />
|
||||
</TheaterSection>
|
||||
{shown('gallery') && (
|
||||
<TheaterSection id="gallery" title={content.gallery?.title || 'Fotogalerie'} variant={variant('gallery')}>
|
||||
<PhotoGallery images={content.gallery?.images || []} />
|
||||
</TheaterSection>
|
||||
)}
|
||||
|
||||
<TheaterSection id="tickets" title={content.tickets?.title || 'Tickets'} variant="dark">
|
||||
<div class="prose-measure" set:html={renderPortableText(content.tickets?.content)} />
|
||||
{content.tickets?.ticket_url && (
|
||||
<div class="mt-[--spacing-lg] text-center">
|
||||
{shown('tickets') && (
|
||||
<TheaterSection id="tickets" title={content.tickets?.title || 'Tickets'} variant={variant('tickets')}>
|
||||
<div class="prose-measure" set:html={renderPortableText(content.tickets?.content)} />
|
||||
<div class="mt-8 text-center">
|
||||
<a href={content.tickets.ticket_url} class="inline-block py-4 px-10 bg-accent text-secondary no-underline font-bold text-xl rounded-lg transition-all duration-300 shadow-[0_4px_10px_rgba(0,0,0,0.2)] hover:-translate-y-1 hover:shadow-[0_6px_15px_rgba(0,0,0,0.3)] hover:bg-[#fbfa9a]" target="_blank" rel="noopener noreferrer">
|
||||
Tickets kaufen
|
||||
</a>
|
||||
</div>
|
||||
)}
|
||||
</TheaterSection>
|
||||
</TheaterSection>
|
||||
)}
|
||||
</BaseLayout>
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* The Impressum page and its footer link only go live once the legally
|
||||
* essential details are filled in the Studio, so a half-finished legal
|
||||
* notice is never published.
|
||||
*/
|
||||
export function isImpressumComplete(impressum: any): boolean {
|
||||
return Boolean(impressum?.publisher?.trim() && impressum?.email?.trim());
|
||||
}
|
||||
@@ -20,6 +20,19 @@ export const theaterHomepageSchema = defineType({
|
||||
fields: [
|
||||
defineField({ name: 'title', title: 'Title', type: 'string', validation: (r) => r.required() }),
|
||||
defineField({ name: 'subtitle', title: 'Subtitle', type: 'text' }),
|
||||
defineField({
|
||||
name: 'cta',
|
||||
title: 'Call to Action',
|
||||
description: 'Aufruf unter dem Untertitel. Leere Felder verwenden den Standardtext (Mitwirken, Anmeldeschluss 31. Januar 2027).',
|
||||
type: 'object',
|
||||
options: { collapsible: true },
|
||||
fields: [
|
||||
defineField({ name: 'text', title: 'Text', type: 'string' }),
|
||||
defineField({ name: 'buttonLabel', title: 'Button Label', type: 'string' }),
|
||||
defineField({ name: 'href', title: 'Button Link', description: 'z.B. #mitwirkung oder eine URL', type: 'string' }),
|
||||
defineField({ name: 'hidden', title: 'Aufruf ausblenden', type: 'boolean', initialValue: false }),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -164,7 +177,14 @@ export const theaterHomepageSchema = defineType({
|
||||
name: 'images',
|
||||
title: 'Gallery Images',
|
||||
type: 'array',
|
||||
of: [{ type: 'image' }],
|
||||
of: [
|
||||
defineArrayMember({
|
||||
type: 'image',
|
||||
fields: [
|
||||
defineField({ name: 'alt', title: 'Alternativtext', description: 'Kurze Bildbeschreibung für Screenreader', type: 'string' }),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
@@ -180,5 +200,30 @@ export const theaterHomepageSchema = defineType({
|
||||
defineField({ name: 'ticket_url', title: 'Ticket Purchase URL', type: 'url' }),
|
||||
],
|
||||
}),
|
||||
|
||||
// Impressum & Datenschutz (/impressum)
|
||||
defineField({
|
||||
name: 'impressum',
|
||||
title: 'Impressum & Datenschutz',
|
||||
description:
|
||||
'Angaben für die Seite /impressum. Die Seite und der Link im Footer erscheinen erst, wenn «Herausgeberin» und «E-Mail» ausgefüllt sind.',
|
||||
type: 'object',
|
||||
options: { collapsible: true, collapsed: true },
|
||||
fields: [
|
||||
defineField({
|
||||
name: 'publisher',
|
||||
title: 'Herausgeberin / verantwortliche Stelle',
|
||||
description: 'z. B. «Verein Jonas Breitenstein» oder «OK Freilichttheater Ziefen 2028»',
|
||||
type: 'string',
|
||||
}),
|
||||
defineField({ name: 'address', title: 'Postadresse', type: 'text', rows: 3 }),
|
||||
defineField({ name: 'email', title: 'E-Mail (auch für Datenschutzanfragen)', type: 'string' }),
|
||||
defineField({ name: 'representative', title: 'Vertreten durch', description: 'Vertretungsberechtigte Person(en), z. B. Präsidium', type: 'string' }),
|
||||
defineField({ name: 'uid', title: 'UID / Handelsregister (falls vorhanden)', type: 'string' }),
|
||||
defineField({ name: 'hosting', title: 'Hosting-Anbieter und Serverstandort', description: 'Leer lassen für den Standard «Infomaniak Network SA, Genf, mit Servern in der Schweiz»', type: 'string' }),
|
||||
defineField({ name: 'imageCredits', title: 'Bildnachweise', type: 'text', rows: 3 }),
|
||||
defineField({ name: 'updated', title: 'Stand', type: 'date' }),
|
||||
],
|
||||
}),
|
||||
],
|
||||
})
|
||||
+15
-6
@@ -34,12 +34,18 @@
|
||||
background-color: #2b2b56;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
/* Kaushan Script is reserved for the logo and h2 section titles.
|
||||
Sub-headings (h3–h6, card titles) use the body font, bold. */
|
||||
h1, h2 {
|
||||
font-family: var(--font-heading);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* Language-specific content visibility */
|
||||
h3, h4, h5, h6 {
|
||||
font-family: var(--font-body);
|
||||
font-weight: 700;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Section content styling */
|
||||
.section-content p {
|
||||
@@ -47,13 +53,16 @@
|
||||
}
|
||||
|
||||
.section-content h3 {
|
||||
font-size: 1.8rem;
|
||||
margin: 1.5rem 0 1rem;
|
||||
font-size: 1.375rem;
|
||||
letter-spacing: 0.005em;
|
||||
margin: 2rem 0 0.75rem;
|
||||
}
|
||||
|
||||
.section-content h3:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.section-content h4 {
|
||||
font-family: var(--font-body);
|
||||
font-weight: 700;
|
||||
font-size: 1.15rem;
|
||||
margin: 1.5rem 0 0.5rem;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user