forked from sz-games/sz-games.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsz-brawlers.html
More file actions
364 lines (346 loc) · 17.3 KB
/
sz-brawlers.html
File metadata and controls
364 lines (346 loc) · 17.3 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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SZ Brawlers - Avatar Generator</title>
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
'brawl-blue': '#1099E7',
'brawl-yellow': '#FFD86B',
'brawl-purple': '#9B3CFF',
'brawl-red': '#F32757',
'brawl-green': '#5FAF26',
'dark-bg': '#16171B',
'card-bg': '#272A36',
'card-bg-light': '#32364A',
},
},
},
}
</script>
<script src="https://cdn.jsdelivr.net/npm/save-svg-as-png@1.4.17/lib/saveSvgAsPng.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Lilita+One&family=Poppins:wght@400;500;600;700&display=swap"
rel="stylesheet"
/>
<link href="./brawlers.css" rel="stylesheet" />
</head>
<body class="p-4 md:p-8">
<!-- Animated Avatar Background -->
<div class="avatar-background"></div>
<div class="container mx-auto max-w-6xl">
<h1 class="text-4xl md:text-5xl font-bold text-center mb-8 brawl-title">SZ BRAWLERS</h1>
<p class="text-center mb-10 text-brawl-yellow opacity-80">
Create your own custom Brawl Stars inspired character!
</p>
<div class="grid md:grid-cols-3 gap-8">
<!-- Column 1: Discord Profile Preview (no panel) -->
<div class="md:col-span-1 flex flex-col items-center">
<!-- Discord Profile Card with positioned color picker -->
<div class="relative w-full max-w-sm mb-6">
<!-- Banner Color Picker (positioned) -->
<div class="absolute top-2 right-2 z-10 color-control group" data-tooltip="Banner Color">
<span
class="absolute -top-4 left-0 text-xs text-brawl-yellow opacity-0 group-hover:opacity-100 transition-opacity"
>BANNER</span
>
<input type="color" id="bannerColor" value="#1099E7" class="w-10 h-10" />
</div>
<div id="discordCard" class="w-full rounded-lg overflow-hidden">
<!-- Banner -->
<div id="discordBanner" class="h-24 bg-brawl-blue">
<!-- Banner content (can be empty or have abstract pattern later) -->
</div>
<!-- Avatar & User Info Section -->
<div class="p-5 relative">
<!-- Avatar -->
<div
id="discordAvatarContainer"
class="absolute -top-12 left-4 w-24 h-24 rounded-full bg-gray-700 overflow-hidden shadow-lg relative cursor-pointer"
>
<!-- The brawler SVG will be injected here -->
<svg
id="discordAvatarSVG"
class="w-full h-full"
viewBox="0 0 100 100"
preserveAspectRatio="xMidYMid meet"
></svg>
<!-- "View" button overlay on hover -->
<div
class="absolute inset-0 bg-black bg-opacity-60 flex items-center justify-center opacity-0 hover:opacity-100 transition-opacity"
>
<span class="text-white text-sm font-semibold">View</span>
</div>
</div>
<!-- Avatar large overlay (hidden by default) -->
<div id="avatarOverlay" class="fixed inset-0 z-50 hidden">
<!-- Dark overlay background -->
<div id="darkOverlay" class="absolute inset-0 bg-black bg-opacity-70"></div>
<!-- Overlay content -->
<div
class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-card-bg rounded-xl border-2 border-brawl-yellow shadow-2xl p-4 w-72"
>
<div class="relative">
<!-- Close button -->
<button
id="closeOverlayBtn"
class="absolute -top-2 -right-2 bg-brawl-red text-white rounded-full w-6 h-6 flex items-center justify-center shadow-lg hover:bg-red-700 transition-colors"
>
<svg class="w-4 h-4" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M6 18L18 6M6 6l12 12"></path>
</svg>
</button>
<div class="text-center mb-2 font-bold text-brawl-yellow">
<span id="overlayBrawlerName">Avatar Preview</span>
</div>
<div class="rounded-lg bg-gray-800 p-2 mb-3 shadow-inner">
<svg
id="largeAvatarSVG"
class="w-60 h-60 mx-auto"
viewBox="0 0 100 100"
preserveAspectRatio="xMidYMid meet"
></svg>
</div>
<button
id="overlayDownloadBtn"
class="brawl-btn-primary text-sm py-2 px-3 w-full flex items-center justify-center"
>
<svg class="w-4 h-4 mr-2" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 16l-5-5h3V4h4v7h3l-5 5zm9 4v-2H3v2h18z" />
</svg>
Download Avatar
</button>
</div>
</div>
</div>
<!-- Spacer for avatar -->
<div class="pt-14">
<h3 id="discordDisplayName" class="text-xl font-bold text-white">Brawler Name</h3>
<p id="discordUsername" class="text-sm text-gray-400">brawler_name</p>
<!-- SZ Games Server Affiliation -->
<div id="szGamesAffiliation" class="mt-4 pt-4 border-t border-gray-700">
<h4 class="text-xs uppercase font-semibold text-gray-400 mb-1.5">Playing on SZ Games</h4>
<div class="flex items-center space-x-2">
<img
src="https://github.com/sz-games/home/blob/main/G.png?raw=true"
alt="SZ Games Logo"
class="w-10 h-10 rounded-md"
onerror="this.style.display='none'; this.parentElement.querySelector('.fallback-logo').style.display='block';"
/>
<div
class="w-10 h-10 rounded-md bg-gray-600 flex items-center justify-center text-white font-bold text-lg fallback-logo"
style="display: none"
>
SZ
</div>
<div>
<p class="text-sm font-semibold text-white">SZ Games</p>
<p class="text-xs text-gray-400">Brawler Avatar Generator</p>
</div>
</div>
<!-- Badge Style -->
<div
class="mt-2 inline-flex items-center bg-brawl-green text-white text-xs font-semibold px-2.5 py-0.5 rounded-full"
>
<svg class="w-3 h-3 mr-1.5" fill="currentColor" viewBox="0 0 20 20">
<path
d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
clip-rule="evenodd"
fill-rule="evenodd"
></path>
</svg>
SZ Games Verified
</div>
</div>
</div>
</div>
</div>
</div>
<!-- SVG Preview (Hidden for reference) -->
<div class="brawler-svg-preview hidden">
<svg id="brawlerPreviewSVG" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet">
<!-- SVG content will be dynamically inserted here -->
</svg>
</div>
<!-- Standalone buttons -->
<button id="randomizeAllBtn" class="mt-2 brawl-btn-accent w-full flex items-center justify-center">
<svg class="w-5 h-5 mr-2" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
<!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE -->
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<rect width="12" height="12" x="2" y="10" rx="2" ry="2" />
<path
d="m17.92 14l3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6M6 18h.01M10 14h.01M15 6h.01M18 9h.01"
/>
</g>
</svg>
RANDOMIZE ALL
</button>
<div class="mt-6 w-full relative">
<div class="absolute inset-0 bg-gradient-to-r from-brawl-blue to-brawl-purple blur opacity-20"></div>
<button
id="downloadPngBtn"
class="w-full brawl-btn-primary py-4 px-4 rounded-lg text-lg relative flex items-center justify-center"
>
<svg class="w-5 h-5 mr-2" viewBox="0 0 24 24" fill="currentColor">
<path d="M12 16l-5-5h3V4h4v7h3l-5 5zm9 4v-2H3v2h18z" />
</svg>
DOWNLOAD Avatar
</button>
</div>
</div>
<!-- Column 2: Customization Controls -->
<div class="md:col-span-2 brawl-card p-6 space-y-6">
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4">
<div>
<label for="brawlerName">BRAWLER NAME</label>
<input type="text" id="brawlerName" placeholder="Enter brawler name" />
</div>
<div>
<button id="generateNameBtn" class="brawl-btn-primary w-full mt-5 sm:mt-7">GENERATE NAME</button>
</div>
</div>
<div class="bg-opacity-50 bg-black p-4 rounded-xl">
<h3 class="text-xl font-semibold text-brawl-yellow mb-4 pb-2 border-b border-gray-700 flex items-center">
<span class="feature-title-icon mr-2">⚙️</span>
FEATURES
<div class="flex-grow ml-2 relative overflow-hidden">
<div class="title-sparkle"></div>
</div>
<button id="randomizeFeaturesBtn" class="brawl-btn-accent text-xs py-1 px-3 ml-2 flex items-center">
<svg class="w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
<!-- Icon from Lucide by Lucide Contributors - https://github.com/lucide-icons/lucide/blob/main/LICENSE -->
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
<rect width="12" height="12" x="2" y="10" rx="2" ry="2" />
<path
d="m17.92 14l3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6M6 18h.01M10 14h.01M15 6h.01M18 9h.01"
/>
</g>
</svg>
RANDOMIZE
</button>
</h3>
<div class="grid grid-cols-2 md:grid-cols-3 gap-4">
<div>
<div class="flex items-center mb-3">
<label for="headShape" class="flex-grow">HEAD SHAPE</label>
<div class="flex space-x-2">
<div class="color-control relative" data-tooltip="Skin Tone">
<span class="absolute -top-4 left-0 text-xs text-brawl-yellow">SKIN</span>
<input type="color" id="skinTone" value="#F5D5A9" class="w-8 h-8" />
</div>
<div class="color-control relative" data-tooltip="Outline Color">
<span class="absolute -top-4 left-0 text-xs text-brawl-yellow">OUTLINE</span>
<input type="color" id="outlineColor" value="#000000" class="w-8 h-8" />
</div>
</div>
</div>
<div id="headShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Head Shape">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="headShape" class="hidden"></select>
<div class="mt-3">
<div class="flex items-center mb-2">
<label for="outlineWidth" class="flex-grow text-sm">OUTLINE WIDTH</label>
<div class="text-xs text-brawl-yellow"><span id="outlineWidthValue">0</span>px</div>
</div>
<input
type="range"
id="outlineWidth"
value="0"
min="0"
max="5"
step="0.1"
class="w-full h-8 brawl-slider"
/>
</div>
</div>
<div>
<div class="flex items-center mb-3">
<label for="hairFront" class="flex-grow">HAIR</label>
<div class="color-control" data-tooltip="Hair Color">
<input type="color" id="hairColor" value="#5D4037" class="w-8 h-8" />
</div>
</div>
<div id="hairFrontVisualSelector" class="visual-selector-grid" data-tooltip-category="Hair Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="hairFront" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="eyeShape" class="flex-grow">EYE SHAPE</label>
</div>
<div id="eyeShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Eye Shape">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="eyeShape" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="pupilShape" class="flex-grow">PUPIL SHAPE</label>
<div class="color-control" data-tooltip="Eye Color">
<input type="color" id="eyeColor" value="#4CAF50" class="w-8 h-8" />
</div>
</div>
<div id="pupilShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Pupil Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="pupilShape" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="eyebrowShape" class="flex-grow">EYEBROWS</label>
</div>
<div id="eyebrowShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Eyebrow Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="eyebrowShape" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="noseShape" class="flex-grow">NOSE</label>
</div>
<div id="noseShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Nose Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="noseShape" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="mouthShape" class="flex-grow">MOUTH</label>
</div>
<div id="mouthShapeVisualSelector" class="visual-selector-grid" data-tooltip-category="Mouth Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="mouthShape" class="hidden"></select>
</div>
<div>
<div class="flex items-center mb-3">
<label for="headwear" class="flex-grow">HEADWEAR</label>
<div class="color-control" data-tooltip="Headwear Color">
<input type="color" id="clothingColor1" value="#2196F3" class="w-8 h-8" />
</div>
</div>
<div id="headwearVisualSelector" class="visual-selector-grid" data-tooltip-category="Headwear Style">
<!-- Visual options will be dynamically inserted here -->
</div>
<select id="headwear" class="hidden"></select>
</div>
</div>
</div>
</div>
</div>
<div id="createdBrawlerDisplay" class="mt-10">
<!-- Brawler card will be injected here -->
</div>
</div>
<script src="./brawlers.js"></script>
</body>
</html>