|
1 | | -import { IconBrandLinkedin, IconBrandGithub } from "@tabler/icons-react"; |
2 | | -import { Title } from "@mantine/core"; |
| 1 | +import { IconBrandLinkedin, IconBrandInstagram } from "@tabler/icons-react"; |
3 | 2 | import { |
| 3 | + Container, |
| 4 | + Title, |
| 5 | + SimpleGrid, |
4 | 6 | Card, |
| 7 | + AspectRatio, |
5 | 8 | Image, |
6 | 9 | Text, |
7 | | - ActionIcon, |
8 | 10 | Group, |
9 | | - Center, |
10 | | - Avatar, |
| 11 | + ActionIcon, |
11 | 12 | rem, |
12 | | - Button, |
13 | 13 | } from "@mantine/core"; |
14 | 14 | import classes from "./Events.module.css"; |
15 | 15 |
|
16 | | -const eventData = [ |
17 | | - { |
18 | | - name: "upcoming", |
19 | | - time: "NA", |
20 | | - meetingLink: "#", |
21 | | - mode: "NA", |
22 | | - speakerName: "NA", |
23 | | - }, |
24 | | - { |
25 | | - name: "To be announced", |
26 | | - time: "NA", |
27 | | - meetingLink: "NA", |
28 | | - mode: "Offline", |
29 | | - speakerName: "NA", |
30 | | - }, |
31 | | - { |
32 | | - name: "To be announced", |
33 | | - time: "NA", |
34 | | - meetingLink: "NA", |
35 | | - mode: "Online", |
36 | | - speakerName: "NA", |
37 | | - }, |
38 | | -]; |
| 16 | +import { upcomingEvents } from "../../config/events"; |
39 | 17 |
|
40 | 18 | const Events = () => { |
41 | | - const linkProps = { |
42 | | - href: "https://mantine.dev", |
43 | | - target: "_blank", |
44 | | - rel: "noopener noreferrer", |
45 | | - }; |
46 | | - |
47 | 19 | return ( |
48 | | - <div id="events"> |
49 | | - <Title ta="center" className={classes.title1}> |
| 20 | + <Container id="events" py="xl" className={classes.container}> |
| 21 | + <Title className={classes.heading} order={1}> |
50 | 22 | Upcoming Events |
51 | 23 | </Title> |
52 | | - <Group className={classes.cardsContainer}> |
53 | | - {eventData.map((event, index) => ( |
54 | | - <Card key={index} withBorder radius="md" className={classes.card}> |
55 | | - <Card.Section> |
56 | | - <a {...linkProps}> |
57 | | - <Image |
58 | | - src="https://media1.tenor.com/m/-4_cFnz_D3YAAAAC/btc-mechanics-ordinals.gif" |
59 | | - height={200} |
60 | | - fit="cover" |
61 | | - /> |
62 | | - </a> |
63 | | - </Card.Section> |
64 | | - |
65 | | - <Text |
66 | | - className={classes.title} |
67 | | - fw={500} |
68 | | - component="a" |
69 | | - {...linkProps} |
70 | | - > |
71 | | - {event.name} |
72 | | - </Text> |
73 | | - |
74 | | - <Group justify="space-between" className={classes.footer}> |
75 | | - <Center> |
76 | | - <Avatar src="" size={34} radius="xl" mr="xs" /> |
77 | | - <Text fz="sm" inline> |
78 | | - {event.speakerName} |
79 | | - </Text> |
80 | | - </Center> |
81 | | - |
82 | | - <Group gap={8} mr={0}> |
| 24 | + <SimpleGrid cols={{ base: 1, sm: 2 }}> |
| 25 | + {upcomingEvents.map((event, index) => { |
| 26 | + return ( |
| 27 | + <Card key={index} p="md" radius="md" className={classes.card}> |
| 28 | + <AspectRatio ratio="auto"> |
| 29 | + <Image width={100} src={event.banner} /> |
| 30 | + </AspectRatio> |
| 31 | + <Text size="xl" fw={700} className={classes.title} mt={5}> |
| 32 | + {event.name} |
| 33 | + </Text> |
| 34 | + <Text c="dimmed" fw={700}> |
| 35 | + 📅 {event.date} |
| 36 | + </Text> |
| 37 | + <Text c="dimmed" fw={700}> |
| 38 | + ⏲ {event.time} |
| 39 | + </Text> |
| 40 | + <Text c="dimmed" size="sm" fw={700}> |
| 41 | + 📳 {event.mode} |
| 42 | + </Text> |
| 43 | + <Text c="dimmed" fw={700}> |
| 44 | + 📍 {event.location} |
| 45 | + </Text> |
| 46 | + <Group mt={10}> |
83 | 47 | <ActionIcon |
84 | | - className={classes.action} |
85 | | - style={{ backgroundColor: "black" }} |
| 48 | + size="lg" |
| 49 | + variant="default" |
| 50 | + radius="xl" |
| 51 | + component="a" |
| 52 | + target="_blank" |
| 53 | + href={event.linkedin} |
86 | 54 | > |
87 | 55 | <IconBrandLinkedin |
88 | | - style={{ width: rem(16), height: rem(16), color: "white" }} |
| 56 | + style={{ width: rem(18), height: rem(18) }} |
| 57 | + stroke={1.5} |
89 | 58 | /> |
90 | 59 | </ActionIcon> |
91 | 60 | <ActionIcon |
92 | | - className={classes.action} |
93 | | - style={{ backgroundColor: "black" }} |
| 61 | + size="lg" |
| 62 | + variant="default" |
| 63 | + radius="xl" |
| 64 | + component="a" |
| 65 | + target="_blank" |
| 66 | + href={event.instagram} |
94 | 67 | > |
95 | | - <IconBrandGithub |
96 | | - style={{ width: rem(16), height: rem(16), color: "white" }} |
| 68 | + <IconBrandInstagram |
| 69 | + style={{ width: rem(18), height: rem(18) }} |
| 70 | + stroke={1.5} |
97 | 71 | /> |
98 | 72 | </ActionIcon> |
99 | 73 | </Group> |
100 | | - </Group> |
101 | | - |
102 | | - <Text fz="sm" c="dimmed" lineClamp={4}> |
103 | | - Date: {event.time} |
104 | | - </Text> |
105 | | - <Text fz="sm" c="dimmed" lineClamp={4}> |
106 | | - Mode: {event.mode} |
107 | | - </Text> |
108 | | - <Button |
109 | | - component="a" |
110 | | - href={event.meetingLink} |
111 | | - target="_blank" |
112 | | - rel="noopener noreferrer" |
113 | | - variant="outline" |
114 | | - style={{ width: "100%" }} |
115 | | - > |
116 | | - Join |
117 | | - </Button> |
118 | | - </Card> |
119 | | - ))} |
120 | | - </Group> |
121 | | - </div> |
| 74 | + </Card> |
| 75 | + ); |
| 76 | + })} |
| 77 | + </SimpleGrid> |
| 78 | + </Container> |
122 | 79 | ); |
123 | 80 | }; |
124 | 81 |
|
|
0 commit comments