-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
export type KeyDateProps = { | ||
name: string; | ||
date: string; | ||
dateTime: string; | ||
description: string; | ||
}; | ||
|
||
export default function KeyDate({ | ||
name, | ||
date, | ||
dateTime, | ||
description, | ||
}: { | ||
name: string; | ||
date: string; | ||
dateTime: string; | ||
description: string; | ||
}) { | ||
return ( | ||
<article className="relative group lg:even:mt-64 lg:odd:mb-64 flex flex-col"> | ||
<div className="hidden group-odd:hidden lg:block"> | ||
<div className="bg-secondary rounded-full w-6 h-6 -mb-3 mx-auto" /> | ||
<div className="bg-secondary w-2 h-40 -mb-28 mx-auto" /> | ||
</div> | ||
<div className="relative bg-secondary h-full lg:h-auto md:w-72 p-4 mx-4 flex flex-col group-even:mt-auto"> | ||
<header> | ||
<h3 className="uppercase font-bold text-2xl">{name}</h3> | ||
<time className="text-accent font-bold text-lg" dateTime={dateTime}> | ||
{date} | ||
</time> | ||
</header> | ||
<div className="mt-auto"> | ||
<p className="text-sm">{description}</p> | ||
</div> | ||
</div> | ||
<div className="hidden group-even:hidden lg:block mt-auto"> | ||
<div className="bg-secondary w-2 h-40 -mt-28 mx-auto" /> | ||
<div className="bg-secondary rounded-full w-6 h-6 -mt-3 mx-auto" /> | ||
</div> | ||
</article> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,62 @@ | ||
import KeyDate, { KeyDateProps } from '@/app/components/key-date'; | ||
|
||
const keyDates: KeyDateProps[] = [ | ||
{ | ||
name: 'Submissions Open', | ||
date: 'Mon 1st Apr', | ||
dateTime: '2024-04-01', | ||
description: | ||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', | ||
}, | ||
{ | ||
name: 'Submissions Close', | ||
date: 'Fri 26th Apr', | ||
dateTime: '2024-04-26', | ||
description: | ||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', | ||
}, | ||
{ | ||
name: 'Submissions Confirmed', | ||
date: 'Fri 3rd May', | ||
dateTime: '2024-05-03', | ||
description: | ||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', | ||
}, | ||
{ | ||
name: 'Schedule Announced', | ||
date: 'Fri 17th May', | ||
dateTime: '2024-05-17', | ||
description: | ||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', | ||
}, | ||
{ | ||
name: 'WSAF', | ||
date: 'Sat 8th - Mon 10th June', | ||
dateTime: '2024-06-08', | ||
description: | ||
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', | ||
}, | ||
]; | ||
|
||
export default function KeyDates() { | ||
return ( | ||
<section className="mb-12"> | ||
<h2>Key Dates</h2> | ||
<h2 className="mb-4">Key Dates</h2> | ||
|
||
<div className="relative"> | ||
<hr className="hidden lg:block border-secondary border-b-8 absolute top-1/2 w-full" /> | ||
<div className="flex flex-col flex-wrap md:flex-row justify-center items-stretch gap-y-6 lg:-space-x-36 xl:-space-x-28"> | ||
{keyDates.map((date) => ( | ||
<KeyDate | ||
key={date.name} | ||
name={date.name} | ||
date={date.date} | ||
dateTime={date.dateTime} | ||
description={date.description} | ||
/> | ||
))} | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |