-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathBanner.js
More file actions
49 lines (45 loc) · 1.62 KB
/
Banner.js
File metadata and controls
49 lines (45 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import Image from "next/image";
import { HiArrowNarrowRight } from "react-icons/hi"; // icons
import HeroCoders from "@/public/twoplaysamonth/HeroCoders.svg";// image
const Banner = ({ events }) => {
const currentEvent = events.filter((event) => event.isCurrent);
return (
<>
{currentEvent.length ? (
<section className="bg-slate-900">
<div className="flex max-w-7xl px-4 mx-auto py-20 justify-between">
{/* primary section */}
<div className="md:w-1/2 mt-10 px-4 md:px-2 text-gray-200">
<div className="w-72">
<Image
src={require(`/public/${currentEvent[0].image}.png`)}
alt="Logo"
/>
</div>
<h3 className="text-5xl font-black tracking-wide leading-snug font-sans py-8">
{currentEvent[0].name}
</h3>
<p>{currentEvent[0].description}</p>
<a
href={currentEvent[0].link}
target="_blank"
rel="noopener noreferrer"
className="inline-flex items-center gap-2 my-8 px-6 rounded-full bg-neutral-100 text-sky-900 py-3"
>
Join{" "}
<span className="inline-block text-base text-cyan-400">
<HiArrowNarrowRight />
</span>
</a>
</div>
{/* image section*/}
<div className="hidden md:block">
<Image src={HeroCoders} width={350} />
</div>
</div>
</section>
) : null}
</>
);
};
export default Banner;