@@ -2,21 +2,6 @@ import Image from "next/image";
22import type { ReactNode } from "react" ;
33import { fetchContent } from "@/app/actions" ;
44
5- const EVENT_DETAILS_SECTION_STYLES =
6- "flex w-full flex-col items-center bg-white" ;
7- const EVENT_DETAILS_CONTENT_STYLES =
8- "bg-pastel-pink border-4 border-dark-pink rounded-3xl mt-4 mb-8 xl:mt-8 xl:mb-12 flex flex-col xl:flex-row w-4/5 shadow-[15px_15px_0px_0px_dark-pink]" ;
9- const EVENT_IMAGE_CONTAINER_STYLES =
10- "bg-dark-grey border-b-4 border-dark-pink size-full xl:size-1/2 rounded-t-2xl xl:rounded-tr-none xl:rounded-l-2xl xl:border-b-0 xl:border-r-4 " ;
11- const EVENT_IMAGE_STYLES =
12- "w-full h-full object-cover rounded-bl-none rounded-t-2xl xl:rounded-tr-none xl:rounded-l-2xl" ;
13- const EVENT_DETAILS_CONTAINER_STYLES =
14- "flex items-center w-full xl:w-1/2 rounded-b-20 md:rounded-bl-none md:rounded-r-2xl" ;
15- const EVENT_DETAIL_STYLES = "flex items-center ml-10" ;
16- const EVENT_DETAIL_TITLE_STYLES =
17- "text-lg text-dark-grey font-extrabold leading-tight" ;
18- const ICON_CONTAINER_STYLES = "bg-white rounded-xl p-1 m-4" ;
19-
205const icons = {
216 date : "/svgs/aboutEventTile/date_icon.svg" ,
227 location : "/svgs/aboutEventTile/location_icon.svg" ,
@@ -30,15 +15,20 @@ interface EventDetailProps {
3015 children : ReactNode ;
3116}
3217
33- const EventDetail = ( props : EventDetailProps ) => {
34- const { iconSrc, iconName, children } = props ;
35-
18+ const EventDetail = ( { iconSrc, iconName, children } : EventDetailProps ) => {
3619 return (
37- < div className = { EVENT_DETAIL_STYLES } >
38- < div className = { ICON_CONTAINER_STYLES } >
39- < Image src = { iconSrc } alt = { `${ iconName } icon` } width = { 35 } height = { 35 } />
20+ < div className = "ml-4 flex items-center md:ml-10" >
21+ < div className = "m-4 rounded-xl bg-white p-1" >
22+ < Image
23+ src = { iconSrc || "/placeholder.svg" }
24+ alt = { `${ iconName } icon` }
25+ width = { 35 }
26+ height = { 35 }
27+ />
4028 </ div >
41- < h2 className = { EVENT_DETAIL_TITLE_STYLES } > { children } </ h2 >
29+ < h2 className = "text-lg font-extrabold leading-tight text-dark-grey" >
30+ { children }
31+ </ h2 >
4232 </ div >
4333 ) ;
4434} ;
@@ -54,22 +44,26 @@ export default async function AboutEventTile() {
5444 } ) ;
5545
5646 return (
57- < div className = { EVENT_DETAILS_SECTION_STYLES } >
58- < div className = { EVENT_DETAILS_CONTENT_STYLES } >
59- < div className = { EVENT_IMAGE_CONTAINER_STYLES } >
60- < Image
61- className = { EVENT_IMAGE_STYLES }
62- src = {
63- eventDetails . locationImage . fields . file ?. url
64- ?. toString ( )
65- . replace ( "//" , "https://" ) ?? ""
66- }
67- alt = { eventDetails . locationName }
68- width = { 500 }
69- height = { 500 }
70- />
47+ < div className = "flex w-full flex-col items-center bg-white py-10 md:py-20" >
48+ < div className = "z-100 mb-8 mt-4 flex w-4/5 flex-col rounded-3xl border-4 border-dark-pink bg-pastel-pink shadow-[15px_15px_0px_0px_dark-pink] xl:mb-12 xl:mt-8" >
49+ < div className = "relative rounded-t-2xl border-b-4 border-dark-pink bg-dark-pink" >
50+ < div className = "flex h-1/2 w-full items-center justify-center overflow-hidden rounded-t-3xl " >
51+ < Image
52+ src = {
53+ eventDetails . locationImage . fields . file ?. url
54+ ?. toString ( )
55+ . replace ( "//" , "https://" ) ?? ""
56+ }
57+ alt = { eventDetails . locationName }
58+ sizes = "100vw"
59+ height = { 0 }
60+ width = { 0 }
61+ priority
62+ className = "size-full object-contain"
63+ />
64+ </ div >
7165 </ div >
72- < div className = { EVENT_DETAILS_CONTAINER_STYLES } >
66+ < div className = "flex w-full items-center rounded-b-20 md:rounded-r-2xl md:rounded-bl-none" >
7367 < div >
7468 < EventDetail iconSrc = { icons . date } iconName = "date" >
7569 { formattedDate }
0 commit comments