-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
255 lines (244 loc) · 9.48 KB
/
index.jsx
File metadata and controls
255 lines (244 loc) · 9.48 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
import PageTransition from "@/components/PageTransition";
import { useEffect, useState } from "react";
import MazeImage from "../../assets/images/Bug2Bot/mazeImage.png";
import Bug2BotLogo from "../../assets/images/Bug2Bot/bug2botLogo.svg";
import Background1 from "../../assets/images/Bug2Bot/background1.png";
import Background2 from "../../assets/images/Bug2Bot/background2.png";
import Card1Background from "../../assets/images/Bug2Bot/card1_debug.png";
import Card2Background from "../../assets/images/Bug2Bot/card2_build.png";
import Card3Background from "../../assets/images/Bug2Bot/card3_conquer.png";
import React from "react";
const targetDate = new Date("2025-01-24T12:00:00");
/**
* GradientTextSVG component
* @param {Object} props
* @param {string} props.text - Text to display
* @param {number} props.width - Width of the SVG
* @param {number} props.height - Height of the SVG
* @param {number} props.fontSize - Font size of the text
* @param {string[]} props.gradientColors - Array of two colors for gradient
*/
function GradientTextSVG({ text, width, height, fontSize, gradientColors }) {
return (
<svg height={height} viewBox={`0 0 ${width} ${height}`} className="w-full">
<defs>
<linearGradient id="textGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stopColor={gradientColors[0]} />
<stop offset="100%" stopColor={gradientColors[1]} />
</linearGradient>
</defs>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight="bold"
fill="transparent"
stroke="url(#textGradient)"
strokeWidth="2"
textAnchor="middle"
dominantBaseline="middle"
className="font-poppins w-max"
>
{text}
</text>
</svg>
);
}
export default function Bug2Bot() {
const [remainingTime, setRemainingTime] = useState({
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
});
const updateCountdown = () => {
const now = new Date(); // Current date and time
const diff = targetDate.getTime() - now.getTime(); // Difference in milliseconds
if (diff <= 0) {
setRemainingTime({
days: 0,
hours: 0,
minutes: 0,
seconds: 0,
});
return; // Stop updating if the target time is reached
}
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const hours = Math.floor((diff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
setRemainingTime({ days, hours, minutes, seconds });
};
useEffect(() => {
updateCountdown();
const interval = setInterval(updateCountdown, 1000);
return () => clearInterval(interval);
}, []);
const gradientFontSize = 100;
return (
<PageTransition>
<div className="text-white overflow-hidden">
{/* Section 1 START ====== */}
<div
className="flex flex-col items-center p-10 w-full justify-center"
style={{
minHeight: "95vh",
backgroundImage: `url(${Background1})`,
backgroundPosition: "center",
}}
>
<div>
<GradientTextSVG
text="SYMBITECH 2025"
width={9 * gradientFontSize}
height={gradientFontSize}
fontSize={gradientFontSize}
gradientColors={["#FD4445", "#F2C849"]}
/>
</div>
<div className="text-2xl font-orbitron">Presenting You</div>
<img src={Bug2BotLogo} alt="bug2botLogo" />
<div className="text-3xl font-orbitron">Event Starts in:</div>
<div
className="text-3xl font-orbitron text-center"
style={{
WebkitTextStroke: "0.5px red",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
backgroundImage: "linear-gradient(to right, #FD4445, #F2C849)",
}}
>
{remainingTime.days} Days {remainingTime.hours} Hours{" "}
{remainingTime.minutes} Mins
</div>
<div className="font-orbitron text-2xl text-center">
Date: 24th & 25th January
</div>
<div className="font-orbitron text-2xl text-center">
Venue: CL9 & 10
</div>
<div className="font-orbitron text-2xl text-center">
(DBMS & Applied AI Lab)
</div>
</div>
{/* Section 1 END ====== */}
{/* Section 2, 3 Container START ===== */}
<div
style={{
backgroundImage: `url(${Background2})`,
backgroundSize: "cover",
}}
>
{/* Section 2 START ====== */}
<div className="w-full flex flex-col items-center p-10">
<div className="grid lg:grid-cols-2 gap-4 sm:grid-cols-1 lg:container md:container">
{/* Col 1 */}
<div>
<div className="font-orbitron font-bold text-xl">
Join the Challenge!
</div>
<div className="font-orbitron text-xl">
Unleash your tech prowess in this ultimate challenge where
coding precision meets hands-on ingenuity. Teams will tackle
gripping puzzles to unlock a path toward an innovative and
competitive build. Navigate through tasks designed to test
your creativity, strategy, and teamwork!
</div>
</div>
{/* Col 2 */}
<div className="mt-20">
{/* Maze Image */}
<img src={MazeImage} alt="Maze" />
</div>
</div>
</div>
{/* Section 2 END ====== */}
{/* Section 3 Rules START ====== */}
<div className="flex flex-col p-10 text-white lg:items-center md:items-center">
<div className="lg:container md:container">
<div className="text-3xl font-orbitron font-bold mb-6">
GUIDELINES
</div>
<div className="flex flex-col gap-6">
{/* DEBUG Card */}
<div
className="bg-gray-800 p-4 sm:p-6 rounded-lg shadow-lg w-full sm:w-[30rem] min-h-[10rem] sm:h-[15rem] bg-cover flex flex-col justify-center"
style={{
backgroundImage: `url(${Card1Background})`,
}}
>
<div className="text-xl sm:text-2xl font-orbitron mb-2 sm:mb-4 font-bold">
DEBUG
</div>
<ol className="list-decimal list-inside space-y-1 sm:space-y-2">
<li className="font-orbitron text-base sm:text-xl">
Form a team of 3 - 4.
</li>
<li className="font-orbitron text-base sm:text-xl">
Find Qr, scan it.
</li>
<li className="font-orbitron text-base sm:text-xl">
Look for PC number.
</li>
<li className="font-orbitron text-base sm:text-xl">
2 Debugging challenges.
</li>
<li className="font-orbitron text-base sm:text-xl">
4 Programming languages.
</li>
</ol>
</div>
{/* BUILD Card */}
<div
className="bg-gray-800 p-6 rounded-lg shadow-lg sm:w-[30rem] min-h-[10rem] sm:h-[15rem] bg-cover flex flex-col justify-center self-end "
style={{
backgroundImage: `url(${Card2Background})`,
}}
>
<div className="text-2xl font-bold mb-4 font-orbitron">
BUILD
</div>
<ol className="list-decimal list-inside">
<li className="font-orbitron text-xl">
Get the components.
</li>
<li className="font-orbitron text-xl">
Assemble the RC car and race!!
</li>
<li className="font-orbitron text-xl">
Total Time - 15 Minutes.
</li>
</ol>
</div>
{/* CONQUER Card */}
<div
className="bg-gray-800 p-6 rounded-lg shadow-lg sm:w-[30rem] min-h-[10rem] sm:h-[15rem] bg-cover flex flex-col justify-center"
style={{
backgroundImage: `url(${Card3Background})`,
}}
>
<div className="text-2xl mb-4 font-orbitron font-bold">
CONQUER
</div>
<ol className="list-decimal list-inside">
<li className="font-orbitron text-xl">
Navigate through the race track.
</li>
<li className="font-orbitron text-xl">
Outsmart the traps.
</li>
<li className="font-orbitron text-xl">
Reach the finish line.
</li>
</ol>
</div>
</div>
</div>
</div>
{/* Section 3 END ====== */}
</div>
{/* Section 2, 3 Container END ===== */}
</div>
</PageTransition>
);
}