Update
This commit is contained in:
1 parent
773bd10212
commit
fc0603377c
7 files changed
+88
-8
No files matched your search
@@ -3,7 +3,7 @@ const navItems = [
|
|||||||
{ id: 'projekt', label: 'Das Projekt' },
|
{ id: 'projekt', label: 'Das Projekt' },
|
||||||
{ id: 'team', label: 'Wer steckt dahinter' },
|
{ id: 'team', label: 'Wer steckt dahinter' },
|
||||||
{ id: 'stueck', label: 'Das Stück' },
|
{ id: 'stueck', label: 'Das Stück' },
|
||||||
{ id: 'mitwirkung', label: 'Mitwirkung' },
|
{ id: 'mitwirkung', label: 'Mitwirken' },
|
||||||
{ id: 'termine', label: 'Termine' },
|
{ id: 'termine', label: 'Termine' },
|
||||||
{ id: 'presse', label: 'Presse' },
|
{ id: 'presse', label: 'Presse' },
|
||||||
{ id: 'gallery', label: 'Galerie' },
|
{ id: 'gallery', label: 'Galerie' },
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ interface Props {
|
|||||||
description?: string;
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { title, description = "Theater Ziefen - Coming 2029" } = Astro.props;
|
const { title, description = "Freilichttheater Ziefen 2028 – Wyti Wäg mit Breitestei. Uraufführung im Juni 2028 rund um Jonas Breitenstein (1828–1877)." } = Astro.props;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
@@ -29,8 +29,8 @@ const { title, description = "Theater Ziefen - Coming 2029" } = Astro.props;
|
|||||||
|
|
||||||
<footer class="bg-[#2b2b56] text-white py-[--spacing-md] text-center mt-[--spacing-xl] border-t-2 border-white/10">
|
<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]">
|
<div class="mx-auto px-[--spacing-md] md:px-[--spacing-md] px-[--spacing-sm]">
|
||||||
<p>© {new Date().getFullYear()} Theater Ziefen. All rights reserved.</p>
|
<p>© {new Date().getFullYear()} Freilichttheater Ziefen. Alle Rechte vorbehalten.</p>
|
||||||
<p class="mt- text-accent font-semibold opacity-90">Coming 2029</p>
|
<p class="mt- text-accent font-semibold opacity-90">Uraufführung Juni 2028</p>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import type { APIRoute } from 'astro';
|
||||||
|
import { fetchWithCache } from '../sanity/client';
|
||||||
|
import { flyerUrlQuery } from '../sanity/queries';
|
||||||
|
|
||||||
|
export const prerender = false;
|
||||||
|
|
||||||
|
// Short, shareable link (theater-jb.ch/flyer) to the current recruitment flyer.
|
||||||
|
// Redirects to the PDF stored in Sanity, so swapping the flyer in the Studio
|
||||||
|
// keeps this URL working.
|
||||||
|
export const GET: APIRoute = async ({ redirect }) => {
|
||||||
|
const url = await fetchWithCache<string>(flyerUrlQuery);
|
||||||
|
if (!url) return new Response('Flyer nicht gefunden', { status: 404 });
|
||||||
|
return redirect(url, 302);
|
||||||
|
};
|
||||||
+30
-3
@@ -7,7 +7,7 @@ import { fetchWithCache } from '../sanity/client';
|
|||||||
import { renderPortableText } from '../sanity/portableText';
|
import { renderPortableText } from '../sanity/portableText';
|
||||||
import { urlFor } from '../sanity/imageUrl';
|
import { urlFor } from '../sanity/imageUrl';
|
||||||
import { theaterHomepageQuery } from '../sanity/queries';
|
import { theaterHomepageQuery } from '../sanity/queries';
|
||||||
import { MapPin } from '@lucide/astro';
|
import { MapPin, Download, FileText } from '@lucide/astro';
|
||||||
|
|
||||||
export const prerender = false
|
export const prerender = false
|
||||||
|
|
||||||
@@ -122,14 +122,41 @@ const content: any = await fetchWithCache(theaterHomepageQuery) ?? {};
|
|||||||
<div class="prose-measure" set:html={renderPortableText(content.stueck?.content)} />
|
<div class="prose-measure" set:html={renderPortableText(content.stueck?.content)} />
|
||||||
</TheaterSection>
|
</TheaterSection>
|
||||||
|
|
||||||
<!-- Section 4: Mitwirkung -->
|
<!-- Section 4: Mitwirken -->
|
||||||
<TheaterSection
|
<TheaterSection
|
||||||
id="mitwirkung"
|
id="mitwirkung"
|
||||||
title={content.mitwirkung?.title || 'Mitwirkung im Schauspiel'}
|
title={content.mitwirkung?.title || 'Mitwirken'}
|
||||||
variant="dark"
|
variant="dark"
|
||||||
>
|
>
|
||||||
<div class="prose-measure" set:html={renderPortableText(content.mitwirkung?.content)} />
|
<div class="prose-measure" set:html={renderPortableText(content.mitwirkung?.content)} />
|
||||||
|
|
||||||
|
{content.mitwirkung?.flyerUrl && (
|
||||||
|
<div class="mt-12 flex flex-col sm:flex-row items-center justify-center gap-4 text-center">
|
||||||
|
<a
|
||||||
|
href={`${content.mitwirkung.flyerUrl}?dl=Flyer-Mitwirken-Freilichttheater-Ziefen-2028.pdf`}
|
||||||
|
download
|
||||||
|
class="inline-flex items-center gap-3 py-4 px-8 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]"
|
||||||
|
>
|
||||||
|
<Download size={24} aria-hidden="true" />
|
||||||
|
<span>
|
||||||
|
Flyer herunterladen
|
||||||
|
<span class="block text-sm font-normal">
|
||||||
|
PDF{content.mitwirkung.flyerSize ? `, ${Math.round(content.mitwirkung.flyerSize / 1024)} KB` : ''}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
<a
|
||||||
|
href={content.mitwirkung.flyerUrl}
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
class="inline-flex 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>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{content.mitwirkung?.director_name && (
|
{content.mitwirkung?.director_name && (
|
||||||
<div class="mt-16 p-12 bg-white/10 rounded-lg text-center">
|
<div class="mt-16 p-12 bg-white/10 rounded-lg text-center">
|
||||||
<h3 class="text-3xl text-white mb-4">Kontakt Regisseur:</h3>
|
<h3 class="text-3xl text-white mb-4">Kontakt Regisseur:</h3>
|
||||||
|
|||||||
+10
-1
@@ -1 +1,10 @@
|
|||||||
export const theaterHomepageQuery = `*[_type == "theaterHomepage" && _id == "theaterHomepage"][0]`
|
export const theaterHomepageQuery = `*[_type == "theaterHomepage" && _id == "theaterHomepage"][0]{
|
||||||
|
...,
|
||||||
|
mitwirkung{
|
||||||
|
...,
|
||||||
|
"flyerUrl": flyer.asset->url,
|
||||||
|
"flyerSize": flyer.asset->size
|
||||||
|
}
|
||||||
|
}`
|
||||||
|
|
||||||
|
export const flyerUrlQuery = `*[_type == "theaterHomepage" && _id == "theaterHomepage"][0].mitwirkung.flyer.asset->url`
|
||||||
@@ -104,6 +104,13 @@ export const theaterHomepageSchema = defineType({
|
|||||||
fields: [
|
fields: [
|
||||||
defineField({ name: 'title', title: 'Title', type: 'string', validation: (r) => r.required() }),
|
defineField({ name: 'title', title: 'Title', type: 'string', validation: (r) => r.required() }),
|
||||||
defineField({ name: 'content', title: 'Content', type: 'array', of: [{ type: 'block' }, defineArrayMember({ type: 'image', options: { hotspot: true } })] }),
|
defineField({ name: 'content', title: 'Content', type: 'array', of: [{ type: 'block' }, defineArrayMember({ type: 'image', options: { hotspot: true } })] }),
|
||||||
|
defineField({
|
||||||
|
name: 'flyer',
|
||||||
|
title: 'Flyer (PDF)',
|
||||||
|
description: 'Wird als Download-Button angezeigt und ist unter /flyer erreichbar.',
|
||||||
|
type: 'file',
|
||||||
|
options: { accept: 'application/pdf' },
|
||||||
|
}),
|
||||||
defineField({ name: 'director_name', title: 'Director Name', type: 'string' }),
|
defineField({ name: 'director_name', title: 'Director Name', type: 'string' }),
|
||||||
defineField({ name: 'director_email', title: 'Director Email', type: 'string' }),
|
defineField({ name: 'director_email', title: 'Director Email', type: 'string' }),
|
||||||
defineField({ name: 'director_phone', title: 'Director Phone', type: 'string' }),
|
defineField({ name: 'director_phone', title: 'Director Phone', type: 'string' }),
|
||||||
|
|||||||
@@ -51,6 +51,29 @@
|
|||||||
margin: 1.5rem 0 1rem;
|
margin: 1.5rem 0 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.section-content h4 {
|
||||||
|
font-family: var(--font-body);
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 1.15rem;
|
||||||
|
margin: 1.5rem 0 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-content ul {
|
||||||
|
list-style: disc;
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-content ol {
|
||||||
|
list-style: decimal;
|
||||||
|
padding-left: 1.5rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-content a {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keep flowing prose to a comfortable reading measure so lines
|
/* Keep flowing prose to a comfortable reading measure so lines
|
||||||
don't stretch across the full section width. */
|
don't stretch across the full section width. */
|
||||||
.prose-measure {
|
.prose-measure {
|
||||||
|
|||||||
Reference in new issue
Block a user