-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
283 lines (265 loc) · 9.44 KB
/
index.jsx
File metadata and controls
283 lines (265 loc) · 9.44 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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
import { useState } from "react";
import PropTypes from "prop-types";
import PageTransition from "@/components/PageTransition";
import TraitorsGambitLogo from "../../assets/images/Traitors_Gambit/logo.png";
import RobberBackground from "../../assets/images/Traitors_Gambit/robberbg.jpeg";
import RobberImage from "../../assets/images/Traitors_Gambit/robber1.jpeg";
import DetectiveBackground from "../../assets/images/Traitors_Gambit/detectivebg.jpeg";
import DetectiveImage from "../../assets/images/Traitors_Gambit/detective.jpeg";
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>
);
}
GradientTextSVG.propTypes = {
text: PropTypes.string.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
fontSize: PropTypes.number.isRequired,
gradientColors: PropTypes.arrayOf(PropTypes.string).isRequired,
};
GradientTextSVG.propTypes = {
text: PropTypes.string.isRequired,
width: PropTypes.number.isRequired,
height: PropTypes.number.isRequired,
fontSize: PropTypes.number.isRequired,
gradientColors: PropTypes.arrayOf(PropTypes.string).isRequired,
};
export default function TraitorsGambit() {
const gradientFontSize = 80;
// Hashtags (hidden until revealed)
const hashtags = [
"#£~+hee37!;bd",
"#dontclickonme😱",
"#thisisasecretlmao",
"#pacodexaammp",
"#Tibmagsrotiart",
"#coder",
"#event",
"#foryou",
"#foryoupage",
"#trending",
"#explorepage",
"#nextbigthing",
];
// Map of words to hashtags (randomly assigned)
const wordHashtagMap = {
vanish: hashtags[2], // #thisisasecretlmao
chaos: hashtags[0], // #£~+hee37!;bd
riddles: hashtags[1], // #dontclickonme😱
circuits: hashtags[3], // #pacodexaammp
beams: hashtags[4], // #Tibmagsrotiart
crew: hashtags[5], // #coder
grid: hashtags[6], // #event
patterns: hashtags[7], // #foryou
signals: hashtags[8], // #foryoupage
shadows: hashtags[9], // #trending
stash: hashtags[10], // #explorepage
seconds: hashtags[11], // #nextbigthing
};
// Popup state
const [showPopup, setShowPopup] = useState(false);
const [popupHashtag, setPopupHashtag] = useState("");
// Handler for word click
const handleWordClick = (hashtag) => {
setPopupHashtag(hashtag);
setShowPopup(true);
};
// Helper to wrap words in a span if they are in the map
const highlightWords = (text) => {
const wordInstanceCount = {};
return text.split(/(\b)/).map((word) => {
const cleanWord = word.replace(/[^a-zA-Z]/g, "");
if (wordHashtagMap[cleanWord]) {
wordInstanceCount[cleanWord] = (wordInstanceCount[cleanWord] || 0) + 1;
return (
<span
key={`hashtag-${cleanWord}-${wordInstanceCount[cleanWord]}`}
className="cursor-pointer"
onClick={() => handleWordClick(wordHashtagMap[cleanWord])}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ")
handleWordClick(wordHashtagMap[cleanWord]);
}}
>
{word}
</span>
);
}
return word;
});
};
return (
<PageTransition>
<div className="text-white overflow-hidden">
{/* Section 1 - Event Details */}
<div
className="flex flex-col items-center justify-center p-10 w-full bg-background-dark"
style={{ minHeight: "100vh" }}
>
<div className="mb-8">
<GradientTextSVG
text="SYMBITECH 2025"
width={9 * gradientFontSize}
height={gradientFontSize}
fontSize={gradientFontSize}
gradientColors={["#FD4445", "#F2C849"]}
/>
</div>
<div className="mb-8">
<img
src={TraitorsGambitLogo}
alt="Traitor's Gambit Logo"
className="max-w-md w-full h-auto"
/>
</div>
<div className="text-center space-y-4">
<div className="text-xl font-orbitron">
Date: 19th - 20th September, 2025
</div>
<div className="text-xl font-orbitron">
Venue: Computer Lab 9 - 10, 4th floor, B wing
</div>
<div className="text-xl font-orbitron">
Timings: 10:30 am to 4:00 pm
</div>
</div>
</div>
{/* Section 2 - Robbers */}
<div
className="w-full relative flex items-center justify-center"
style={{
minHeight: "100vh",
}}
>
<img
src={RobberBackground}
alt="Robber Background"
className="absolute inset-0 w-full h-full object-cover opacity-50 z-0"
style={{ pointerEvents: "none" }}
/>
<div className="flex items-center justify-center w-full max-w-6xl px-16 relative z-10">
<div className="flex flex-col items-center mr-20">
<h2
className="text-6xl font-bold mb-8 text-white text-center"
style={{ fontFamily: "Poppins, sans-serif" }}
>
Robbers:
</h2>
<img
src={RobberImage}
alt="Robber"
className="w-72 h-80 object-cover"
/>
</div>
<div className="flex-1 max-w-xl">
<div className="space-y-6 text-white">
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Slip through codes, chase hidden signals, dodge beams, and leave chaos in your wake.",
)}
</p>
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Your mission? Find the stash before anyone else does.",
)}
</p>
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Bring your crew of 3 - 4, think fast, move faster, and remember: every second counts.",
)}
</p>
</div>
</div>
</div>
</div>
{/* Section 3 - Detectives */}
<div
className="w-full relative flex items-center justify-center"
style={{
minHeight: "100vh",
}}
>
<img
src={DetectiveBackground}
alt="Detective Background"
className="absolute inset-0 w-full h-full object-cover opacity-35 z-0"
style={{ pointerEvents: "none" }}
/>
<div className="flex items-center justify-center w-full max-w-6xl px-16 relative z-10">
<div className="flex flex-col items-center mr-20">
<h2
className="text-6xl font-bold mb-8 text-white text-center"
style={{ fontFamily: "Poppins, sans-serif" }}
>
Detectives:
</h2>
<img
src={DetectiveImage}
alt="Detective"
className="w-72 h-80 object-cover"
/>
</div>
<div className="flex-1 max-w-xl">
<div className="space-y-6 text-white">
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Follow trails that vanish in plain sight, piece together fractured patterns, and outsmart shifting circuits.",
)}
</p>
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Your mission? Track down the stash before it's too late.",
)}
</p>
<p className="text-xl font-orbitron leading-relaxed">
{highlightWords(
"Assemble your crew of 3-4, crack the riddles, guard the grid, and stop the shadows.",
)}
</p>
</div>
</div>
</div>
{/* Popup Modal */}
{showPopup && (
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-60 z-50">
<div className="bg-white rounded-lg shadow-lg p-8 text-black text-2xl font-bold flex flex-col items-center">
<span className="mb-4">{popupHashtag}</span>
<button
type="button"
className="mt-2 px-4 py-2 bg-yellow-400 rounded hover:bg-yellow-500 font-semibold"
onClick={() => setShowPopup(false)}
>
Close
</button>
</div>
</div>
)}
</div>
</div>
</PageTransition>
);
}