|
| 1 | +import { ReactNode } from "react" |
| 2 | +import Image from "next-image-export-optimizer" |
| 3 | +import { clsx } from "clsx" |
| 4 | + |
| 5 | +import { Button } from "@/app/conf/_design-system/button" |
| 6 | + |
| 7 | +import ArrowDown from "../pixelarticons/arrow-down.svg?svgr" |
| 8 | +import locationPhoto from "./location-photo.webp" |
| 9 | + |
| 10 | +export interface LocationSectionProps |
| 11 | + extends React.HTMLAttributes<HTMLElement> {} |
| 12 | + |
| 13 | +export function LocationSection(props: LocationSectionProps) { |
| 14 | + return ( |
| 15 | + <section |
| 16 | + {...props} |
| 17 | + className={clsx( |
| 18 | + "gql-conf-section relative bg-sec-light dark:bg-sec-darker", |
| 19 | + props.className, |
| 20 | + )} |
| 21 | + > |
| 22 | + <Image |
| 23 | + src={locationPhoto} |
| 24 | + alt="" |
| 25 | + width={1920} |
| 26 | + height={752} |
| 27 | + role="presentation" |
| 28 | + className="absolute inset-0" |
| 29 | + /> |
| 30 | + <div className="border border-sec-light p-4 dark:border-sec-darker lg:p-16"> |
| 31 | + <article> |
| 32 | + <h2 className="typography-h2">A place of innovation & creation</h2> |
| 33 | + <p className="mt-6"></p> |
| 34 | + <p className="mt-6"></p> |
| 35 | + <Button href="https://maps.app.goo.gl/W7nX1NejhWw9PqxF7"> |
| 36 | + Google Maps |
| 37 | + </Button> |
| 38 | + </article> |
| 39 | + <div> |
| 40 | + <h3>How to get to the venue?</h3> |
| 41 | + <Accordion |
| 42 | + items={[ |
| 43 | + { |
| 44 | + title: "Public Transportation", |
| 45 | + description: |
| 46 | + 'Take tram 26 from Amsterdam Central Station to the "Kattenburgerstraat" stop. The venue is in front of the tram stop.', |
| 47 | + }, |
| 48 | + { |
| 49 | + title: "Airport Information", |
| 50 | + description: |
| 51 | + "Amsterdam Airport Schiphol is about 20 km from the venue. Take a direct train to Amsterdam Central Station, then follow the public transportation instructions.", |
| 52 | + }, |
| 53 | + { |
| 54 | + title: "Parking at venue", |
| 55 | + description: `Limited parking is available at the venue. We recommend using public transportation when possible. Learn more about parking at <a class="typography-link" href="https://dezwijger.nl/about-us-en/contact" target="_blank">Pakhuis de Zwijger</a>. If you require an accessible parking spot, park at Vriesseveem 4 or Withoedenveem 16 where you can park if you have a Disability Parking Card.`, |
| 56 | + }, |
| 57 | + ]} |
| 58 | + /> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </section> |
| 62 | + ) |
| 63 | +} |
| 64 | + |
| 65 | +function Accordion({ |
| 66 | + items, |
| 67 | +}: { |
| 68 | + items: { title: string; description: ReactNode }[] |
| 69 | +}) { |
| 70 | + return ( |
| 71 | + <div className="grow space-y-4 lg:space-y-6"> |
| 72 | + {items.map((question, index) => ( |
| 73 | + <details |
| 74 | + open={index === 0} |
| 75 | + key={index} |
| 76 | + className="group/q w-full border border-neu-400 @container" |
| 77 | + > |
| 78 | + <summary className="flex cursor-pointer list-none items-center justify-between gap-2 border-neu-400 p-2 px-3 focus:outline-none group-open/q:border-b [&::-webkit-details-marker]:hidden"> |
| 79 | + <span className="select-none typography-body-lg"> |
| 80 | + {question.title} |
| 81 | + </span> |
| 82 | + <ArrowDown className="size-10 shrink-0 text-sec-darker group-open/q:rotate-180" /> |
| 83 | + </summary> |
| 84 | + <div className="p-3 typography-body-md">{question.description}</div> |
| 85 | + </details> |
| 86 | + ))} |
| 87 | + </div> |
| 88 | + ) |
| 89 | +} |
0 commit comments