|
1 | 1 | --- |
2 | | -import { format } from "date-fns"; |
3 | 2 | import Background from "../components/background.astro"; |
4 | 3 | import FlyerTabs from "../components/flyer-tabs.astro"; |
5 | 4 | import Title from "../components/title.astro"; |
6 | | -import { EVENT_DATE } from "../constants/date"; |
7 | 5 | import * as LINKS from "../constants/links"; |
8 | | -import * as LOCATION from "../constants/location"; |
9 | | -import WiggleText from "./wiggle-text.astro"; |
| 6 | +import { EVENT_DATE } from "../constants/date"; |
| 7 | +import HeroEventDetails from "./hero-event-details.astro"; |
10 | 8 | --- |
11 | 9 |
|
12 | | -<header class="relative grid place-items-center pt-10 pb-20 text-center"> |
| 10 | +<header |
| 11 | + class:list={[ |
| 12 | + "relative grid place-items-center pt-10 pb-20 text-center", |
| 13 | + { "border-b": !EVENT_DATE }, |
| 14 | + ]} |
| 15 | +> |
13 | 16 | <Background /> |
14 | 17 |
|
15 | 18 | <Title /> |
16 | 19 |
|
17 | | - <p aria-hidden="true" class="faq-header tilt-left"> |
18 | | - {format(EVENT_DATE, "MMMM do, yyyy")} |
19 | | - </p> |
20 | | - <p aria-hidden="true" class="faq-header tilt-right">at {LOCATION.NAME}</p> |
21 | | - |
22 | | - <p class="sr-only"> |
23 | | - {`${format(EVENT_DATE, "MMMM do, yyyy")} at ${LOCATION.NAME}`} |
24 | | - </p> |
25 | | - |
26 | | - <p class="body mt-5"> |
27 | | - {`${LOCATION.STREET_ADDRESS}, ${LOCATION.ADDRESS_ADDITIONAL}`} |
28 | | - </p> |
29 | | - |
30 | | - <p class="display mb-10"> |
31 | | - <WiggleText |
32 | | - text="12:00 to 17:00" |
33 | | - words={[ |
34 | | - [ |
35 | | - ["1", "rotate-[3deg] scale-75 mr-[-0.5%]"], |
36 | | - ["2", "rotate-[-2deg] scale-105 mr-[0.5%]"], |
37 | | - [":", ""], |
38 | | - ["0", "rotate-[-3deg] scale-80 mr-[-0.25%]"], |
39 | | - ["0", "rotate-[6deg] scale-102"], |
40 | | - ], |
41 | | - [["–", ""]], |
42 | | - [ |
43 | | - ["1", "rotate-[-3deg] scale-80 mr-[-0.5%]"], |
44 | | - ["7", "rotate-[6deg] scale-100 ml-[-0.5%]"], |
45 | | - [":", ""], |
46 | | - ["0", "rotate-[2deg] scale-95"], |
47 | | - ["0", "rotate-[-5deg] scale-102"], |
48 | | - ], |
49 | | - ]} |
50 | | - /> |
51 | | - </p> |
52 | | - |
53 | | - <p> |
54 | | - <a |
55 | | - aria-label="Register to attend the Berlin Swapfest" |
56 | | - class="register-button" |
57 | | - href={LINKS.REGISTER_LINK} |
58 | | - onclick="fathom.trackEvent('click register here');" |
59 | | - target="_blank" |
60 | | - > |
61 | | - Register here |
62 | | - </a> |
63 | | - </p> |
| 20 | + { |
| 21 | + EVENT_DATE ? ( |
| 22 | + <HeroEventDetails eventDate={EVENT_DATE} /> |
| 23 | + ) : ( |
| 24 | + <Fragment> |
| 25 | + <p aria-hidden="true" class="faq-header tilt-left"> |
| 26 | + We're taking a break |
| 27 | + </p> |
| 28 | + |
| 29 | + <p aria-hidden="true" class="faq-header tilt-right"> |
| 30 | + back in 2026 |
| 31 | + </p> |
| 32 | + |
| 33 | + <p class="sr-only">We're taking a break, back in 2026</p> |
| 34 | + |
| 35 | + <p class="mt-20"> |
| 36 | + <a |
| 37 | + aria-label="Subscribe for updates!" |
| 38 | + class="register-button" |
| 39 | + href={LINKS.NEWSLETTER_LINK} |
| 40 | + onclick="fathom.trackEvent('click subscribe for updates');" |
| 41 | + target="_blank" |
| 42 | + > |
| 43 | + Subscribe for updates! |
| 44 | + </a> |
| 45 | + </p> |
| 46 | + </Fragment> |
| 47 | + ) |
| 48 | + } |
64 | 49 | </header> |
65 | 50 |
|
66 | | -<FlyerTabs /> |
| 51 | +{EVENT_DATE && <FlyerTabs />} |
0 commit comments