-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add upcoming events to the home page (#182)
- Loading branch information
1 parent
afe81d5
commit adffc65
Showing
2 changed files
with
106 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import FancyRectangle from '@/components/FancyRectangle'; | ||
import { type Event } from '@/data/events'; | ||
import { FiClock, FiMapPin } from 'react-icons/fi'; | ||
|
||
function UpcomingEventCard({ event, index }: { event: Event; index: number }) { | ||
return ( | ||
<FancyRectangle colour="white" offset="8" rounded fullWidth> | ||
<div className="flex w-full flex-col gap-6 rounded-xl bg-white p-4 text-black lg:flex-row"> | ||
<div className="grow space-y-2 md:space-y-4"> | ||
<div className="flex gap-6"> | ||
<div | ||
className={`h-fit rounded-md border-[3px] border-black px-4 py-2 text-xl ${['bg-orange', 'bg-yellow', 'bg-purple'][index % 3]}`} | ||
> | ||
<div>{event.date.month}</div> | ||
<div>{event.date.day}</div> | ||
</div> | ||
<div className="grow space-y-2 text-2xl"> | ||
<h4 className="md:border-b-[3px] md:border-black md:pb-1 "> | ||
{event.title} | ||
</h4> | ||
<div className="flex gap-2 text-lg font-normal"> | ||
<span> | ||
<FiClock size={26} /> | ||
</span> | ||
<span>{event.time}</span> | ||
</div> | ||
<div className="flex gap-2 text-lg font-normal"> | ||
<span> | ||
<FiMapPin size={26} /> | ||
</span> | ||
<span>{event.location}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</FancyRectangle> | ||
); | ||
} | ||
|
||
export default UpcomingEventCard; |
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