diff --git a/website/app/components/hero/hero.tsx b/website/app/components/hero/hero.tsx index 82feba6..b9e4b90 100644 --- a/website/app/components/hero/hero.tsx +++ b/website/app/components/hero/hero.tsx @@ -3,41 +3,40 @@ import ImportantDates, { Workshops } from '../page-components/important-dates' import { HomepageHeroPanel } from './hero-panel' export function Hero() { - return ( - - - - -

- DDD Perth is Perth’s largest community run conference for the tech community. Our goal is to - create an approachable event that appeals to the whole community, especially people that don’t - normally get to attend or speak at conferences. The conference is run on a Saturday, and strives - to be inclusive of everyone in the Perth tech community. -

-

- DDD Perth started out its life as part of the Developer! Developer! Developer! series of events - and while our heritage is as a developer-focussed conference, DDD Perth is not just for - developers, but for all professionals in the software industry. These days we don’t expand DDD - - it’s not an acronym for us anymore, but if people insist then we might say Designer, Developer - and Data Scientist, or is it DevOps, Data architect, distributed tester? -

-

- Check out the agenda and talks from previous years , or hear more about how we do what we do on - our blog. -

-
+ return ( + + + + +

+ DDD Perth is Perth’s largest community run conference for the tech community. Our goal is to create an + approachable event that appeals to the whole community, especially people that don’t normally get to attend + or speak at conferences. The conference is run on a Saturday, and strives to be inclusive of everyone in the + Perth tech community. +

+

+ DDD Perth started out its life as part of the Developer! Developer! Developer! series of events and while + our heritage is as a developer-focussed conference, DDD Perth is not just for developers, but for all + professionals in the software industry. These days we don’t expand DDD - it’s not an acronym for us anymore, + but if people insist then we might say Designer, Developer and Data Scientist, or is it DevOps, Data + architect, distributed tester? +

+

+ Check out the agenda and talks from previous years , or hear more about how we do what we do on our blog. +

+
- - -
-
- ) + + +
+
+ ) } diff --git a/website/app/components/page-components/important-dates.tsx b/website/app/components/page-components/important-dates.tsx index 08f6952..03e9ec3 100644 --- a/website/app/components/page-components/important-dates.tsx +++ b/website/app/components/page-components/important-dates.tsx @@ -2,242 +2,250 @@ import { FC, useCallback, useEffect, useMemo, useState } from 'react' import { Flex, styled } from 'styled-system/jsx' interface ImportantDateBoxProps { - datetime: string - day: string - date: string - time: string - event: string - eventCloseTitle?: string - eventCloseHref?: string - eventLive?: boolean - smallSidebar?: boolean // New prop for small sidebar - showOnlyLive?: boolean // New prop to filter only live events + datetime: string + day: string + date: string + time: string + event: string + eventCloseTitle?: string + eventCloseHref?: string + eventLive?: boolean + smallSidebar?: boolean // New prop for small sidebar + showOnlyLive?: boolean // New prop to filter only live events } const importantDatesData: ImportantDateBoxProps[] = [ - { - datetime: '2024-06-14T00:00:00.000Z', - day: 'Friday', - date: 'Jun 14', - time: '8:00am', - event: 'Call for presentations open', - eventCloseTitle: 'CFP Closed', - }, - { - datetime: '2024-06-21T00:00:00.000Z', - day: 'Friday', - date: 'Jun 21', - time: '8:00am', - event: 'Ticket sales open', - eventCloseTitle: 'Buy Tickets ↗', - eventCloseHref: '/tickets', - eventLive: true, - }, - { - datetime: '2024-07-12T15:59:59.000Z', - day: 'Friday', - date: 'Jul 12', - time: '11:59pm', - event: 'Call for presentations close', - eventCloseTitle: 'CFP Closed', - }, - { - datetime: '2024-07-22T16:00:00.000Z', - day: 'Tuesday', - date: 'Jul 23', - time: '12:00am', - event: 'Voting open', - eventCloseTitle: 'Voting Closed', - }, - { - datetime: '2024-08-06T15:59:59.000Z', - day: 'Tuesday', - date: 'Aug 6', - time: '11:59pm', - event: 'Voting close', - eventCloseTitle: 'Voting Closed', - }, - { - datetime: '2024-08-20T09:00:00.000Z', - day: 'Tuesday', - date: 'Aug 20', - time: '5:00pm', - event: 'Agenda published', - eventCloseTitle: 'View Agenda', - eventCloseHref: '/agenda', - eventLive: true, - }, - { - datetime: '2024-11-15T09:15:00.000Z', - day: 'Friday', - date: 'Nov 15', - time: '05:15pm', - event: 'Ticket sales close', - eventLive: true, - }, - { - datetime: '2024-11-16T00:00:00.000Z', - day: 'Saturday', - date: 'Nov 16', - time: '8:00am', - event: 'Conference day', - eventCloseTitle: 'Get Directions!', - eventLive: true, - }, + { + datetime: '2024-06-14T00:00:00.000Z', + day: 'Friday', + date: 'Jun 14', + time: '8:00am', + event: 'Call for presentations open', + eventCloseTitle: 'CFP Closed', + }, + { + datetime: '2024-06-21T00:00:00.000Z', + day: 'Friday', + date: 'Jun 21', + time: '8:00am', + event: 'Ticket sales open', + eventCloseTitle: 'Buy Tickets ↗', + eventCloseHref: '/tickets', + eventLive: true, + }, + { + datetime: '2024-07-12T15:59:59.000Z', + day: 'Friday', + date: 'Jul 12', + time: '11:59pm', + event: 'Call for presentations close', + eventCloseTitle: 'CFP Closed', + }, + { + datetime: '2024-07-22T16:00:00.000Z', + day: 'Tuesday', + date: 'Jul 23', + time: '12:00am', + event: 'Voting open', + eventCloseTitle: 'Voting Closed', + }, + { + datetime: '2024-08-06T15:59:59.000Z', + day: 'Tuesday', + date: 'Aug 6', + time: '11:59pm', + event: 'Voting close', + eventCloseTitle: 'Voting Closed', + }, + { + datetime: '2024-08-20T09:00:00.000Z', + day: 'Tuesday', + date: 'Aug 20', + time: '5:00pm', + event: 'Agenda published', + eventCloseTitle: 'View Agenda', + eventCloseHref: '/agenda', + eventLive: true, + }, + { + datetime: '2024-11-15T09:15:00.000Z', + day: 'Friday', + date: 'Nov 15', + time: '05:15pm', + event: 'Ticket sales close', + eventLive: true, + }, + { + datetime: '2024-11-16T00:00:00.000Z', + day: 'Saturday', + date: 'Nov 16', + time: '8:00am', + event: 'Conference day', + eventCloseTitle: 'Get Directions!', + eventLive: true, + }, ] const ImportantDateBox: FC = ({ - datetime, - day, - date, - time, - event, - eventCloseTitle, - eventCloseHref, - eventLive, - smallSidebar, - showOnlyLive, + datetime, + day, + date, + time, + event, + eventCloseTitle, + eventCloseHref, + eventLive, + smallSidebar, + showOnlyLive, }) => { - if (showOnlyLive && !eventLive) { - return null - } + if (showOnlyLive && !eventLive) { + return null + } - const eventDate = useMemo(() => new Date(datetime), [datetime]) - const currentDate = new Date() - const isPast = currentDate > eventDate + const eventDate = useMemo(() => new Date(datetime), [datetime]) + const currentDate = new Date() + const isPast = currentDate > eventDate - const calculateDaysLeft = useCallback(() => { - const difference = +eventDate - +new Date() - return Math.ceil(difference / (1000 * 60 * 60 * 24)) - }, [eventDate]) + const calculateDaysLeft = useCallback(() => { + const difference = +eventDate - +new Date() + return Math.ceil(difference / (1000 * 60 * 60 * 24)) + }, [eventDate]) - const [daysLeft, setDaysLeft] = useState(calculateDaysLeft()) + const [daysLeft, setDaysLeft] = useState(calculateDaysLeft()) - useEffect(() => { - if (!isPast) { - const timer = setTimeout( - () => { - setDaysLeft(calculateDaysLeft()) - }, - 1000 * 60 * 60 * 24, - ) + useEffect(() => { + if (!isPast) { + const timer = setTimeout( + () => { + setDaysLeft(calculateDaysLeft()) + }, + 1000 * 60 * 60 * 24, + ) - return () => clearTimeout(timer) - } - }, [calculateDaysLeft, daysLeft, isPast]) + return () => clearTimeout(timer) + } + }, [calculateDaysLeft, daysLeft, isPast]) - return ( - + + - {eventLive ? ( - - {!isPast && daysLeft > 0 ? ( -
- {daysLeft} days left -
- ) : ( - eventCloseTitle - )} -
- ) : !isPast && daysLeft > 0 ? ( -
- {daysLeft} days left -
- ) : ( - - {eventCloseTitle} - - )} -
- ) + {eventLive ? ( + + {!isPast && daysLeft > 0 ? ( +
+ {daysLeft} days left +
+ ) : ( + eventCloseTitle + )} +
+ ) : !isPast && daysLeft > 0 ? ( +
+ {daysLeft} days left +
+ ) : ( + + {eventCloseTitle} + + )} + + ) } export const ImportantDates: React.FC<{ smallSidebar?: boolean; showOnlyLive?: boolean }> = ({ - smallSidebar, - showOnlyLive, + smallSidebar, + showOnlyLive, }) => ( - - - Important Dates - - {importantDatesData.map((dateInfo, index) => ( - - ))} - + + + Important Dates + + {importantDatesData.map((dateInfo, index) => ( + + ))} + ) export const Workshops: React.FC = () => ( - - - Workshops - - - DDD runs a bunch of workshops to help you come up with some amazing talks to submit to our CFP and a great - Bio to go with it. - + + + Workshops + + + DDD runs a bunch of workshops to help you come up with some amazing talks to submit to our CFP and a great Bio to + go with it. + - - + + ) export default ImportantDates