Skip to content

[CW2-30] Design event cards #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Oct 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting fix
  • Loading branch information
Domin0de committed Oct 18, 2024
commit 91a1b1013ae944c7e4779930518751c969084570
30 changes: 15 additions & 15 deletions frontend/src/components/Event/EventsCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,22 @@ export default function EventsCarousel() {
>
{events.map((event, index) => (
<div key={index} className="w-full text-center">
<a href={event.link} target="_blank" rel="noopener noreferrer" className="relative block w-full h-64 group transition-opacity duration-3000">
<img
src={event.image}
alt={event.title}
className="w-full h-64 object-contain rounded-md"
/>
<div className="w-full h-64 absolute inset-0 bg-black bg-opacity-60 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center rounded-md">
<div className="text-white text-center p-4">
<h2 className="font-extrabold text-xl mb-2">{event.title}</h2>
<h3 className="font-bold text-lg">{event.location}</h3>
<p className="mt-2">
{formatEventDate(event.startTime, event.endTime)}
</p>
<a href={event.link} target="_blank" rel="noopener noreferrer" className="relative block w-full h-64 group transition-opacity duration-3000">
<img
src={event.image}
alt={event.title}
className="w-full h-64 object-contain rounded-md"
/>
<div className="w-full h-64 absolute inset-0 bg-black bg-opacity-60 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-center justify-center rounded-md">
<div className="text-white text-center p-4">
<h2 className="font-extrabold text-xl mb-2">{event.title}</h2>
<h3 className="font-bold text-lg">{event.location}</h3>
<p className="mt-2">
{formatEventDate(event.startTime, event.endTime)}
</p>
</div>
</div>
</div>
</a>
</a>
</div>
))}
</Carousel>
Expand Down
Loading