diff --git a/src/components/Committee.astro b/src/components/Committee.astro new file mode 100644 index 0000000..fc5b492 --- /dev/null +++ b/src/components/Committee.astro @@ -0,0 +1,24 @@ +--- +interface Props { + committee: any; +} + +const { committee } = Astro.props; +--- + +{committee?.members?.length > 0 && ( +
+

+ {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.'} +

+ +
+)} diff --git a/src/components/Hero.astro b/src/components/Hero.astro new file mode 100644 index 0000000..ff198d0 --- /dev/null +++ b/src/components/Hero.astro @@ -0,0 +1,30 @@ +--- +interface Props { + content: any; +} + +const { content } = Astro.props; +--- + +
+
+

+ + + + {content.hero?.title + +

+ {content.hero?.subtitle && ( +

+ {content.hero.subtitle} +

+ )} +
+
diff --git a/src/components/MitwirkenExtras.astro b/src/components/MitwirkenExtras.astro new file mode 100644 index 0000000..4ea969e --- /dev/null +++ b/src/components/MitwirkenExtras.astro @@ -0,0 +1,55 @@ +--- +import { Download, FileText } from '@lucide/astro'; + +interface Props { + mitwirkung: any; +} + +const { mitwirkung } = Astro.props; +--- + +{mitwirkung?.flyerUrl && ( +
+ + + + +
+)} + +{mitwirkung?.director_name && ( +
+

Kontakt Regisseur:

+

{mitwirkung.director_name}

+ {mitwirkung.director_email && ( +

+ E-Mail: + {mitwirkung.director_email} +

+ )} + {mitwirkung.director_phone && ( +

+ Telefon: + {mitwirkung.director_phone} +

+ )} +
+)} diff --git a/src/components/Organizations.astro b/src/components/Organizations.astro new file mode 100644 index 0000000..b82ec84 --- /dev/null +++ b/src/components/Organizations.astro @@ -0,0 +1,42 @@ +--- +import { urlFor } from '../sanity/imageUrl'; + +interface Props { + organizations: any[]; +} + +const { organizations } = Astro.props; +--- + +{organizations && organizations.length > 0 && ( +
+ {organizations.map((org: any) => { + const cardContent = ( + + {org.logo && ( +
+ {`${org.name} +
+ )} +

{org.name}

+

{org.role}

+
+ ); + + return org.url ? ( + + {cardContent} + + ) : ( +
+ {cardContent} +
+ ); + })} +
+)} diff --git a/src/components/Timeline.astro b/src/components/Timeline.astro new file mode 100644 index 0000000..f2c299c --- /dev/null +++ b/src/components/Timeline.astro @@ -0,0 +1,37 @@ +--- +import { MapPin } from '@lucide/astro'; + +interface Props { + events: any[]; +} + +const { events } = Astro.props; +--- + +{events && events.length > 0 && ( +
+ + {events.map((event: any, index: number) => ( +
+ +
+
{event.date}
+

{event.title}

+

{event.description}

+
+
+ ))} +
+)} diff --git a/src/pages/index.astro b/src/pages/index.astro index b6708b5..8bfc275 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,11 +3,14 @@ import BaseLayout from '../layouts/BaseLayout.astro'; import AnchorNav from '../components/AnchorNav.astro'; import TheaterSection from '../components/TheaterSection.astro'; import PhotoGallery from '../components/PhotoGallery.astro'; +import Hero from '../components/Hero.astro'; +import Organizations from '../components/Organizations.astro'; +import Committee from '../components/Committee.astro'; +import MitwirkenExtras from '../components/MitwirkenExtras.astro'; +import Timeline from '../components/Timeline.astro'; import { fetchWithCache } from '../sanity/client'; import { renderPortableText } from '../sanity/portableText'; -import { urlFor } from '../sanity/imageUrl'; import { theaterHomepageQuery } from '../sanity/queries'; -import { MapPin, Download, FileText } from '@lucide/astro'; export const prerender = false @@ -15,234 +18,53 @@ const content: any = await fetchWithCache(theaterHomepageQuery) ?? {}; --- - - -
-
-

- - - - {content.hero?.title - -

- {content.hero?.subtitle && ( -

- {content.hero.subtitle} -

- )} -
-
+ - - +
- - +
- - {content.team?.organizations && content.team.organizations.length > 0 && ( -
- {content.team.organizations.map((org: any) => { - const cardContent = ( - - {org.logo && ( -
- {`${org.name} -
- )} -

{org.name}

-

{org.role}

-
- ); - - return org.url ? ( - - {cardContent} - - ) : ( -
- {cardContent} -
- ); - })} -
- )} - - {content.team?.committee?.members?.length > 0 && ( -
-

- {content.team.committee.title || 'Organisationskomitee'} -

-

- {content.team.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.'} -

-
    - {content.team.committee.members.map((member: any) => ( -
  • - {member.name} - {member.role && {member.role}} -
  • - ))} -
-
- )} + - - + {content.team?.committee?.members?.length > 0 && ( + + + + )} + +
- - +
- - {content.mitwirkung?.flyerUrl && ( - - )} - - {content.mitwirkung?.director_name && ( -
-

Kontakt Regisseur:

-

{content.mitwirkung.director_name}

- {content.mitwirkung.director_email && ( -

- E-Mail: - {content.mitwirkung.director_email} -

- )} - {content.mitwirkung.director_phone && ( -

- Telefon: - {content.mitwirkung.director_phone} -

- )} -
- )} + - - - {content.termine?.events && content.termine.events.length > 0 && ( -
- - {content.termine.events.map((event: any, index: number) => ( -
- -
-
{event.date}
-

{event.title}

-

{event.description}

-
-
- ))} -
- )} + + - - +
- - + - - +
- {content.tickets?.ticket_url && ( )}