-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
536 lines (494 loc) · 24.9 KB
/
index.html
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
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<title>Index - punkPOTUS</title>
<link rel="stylesheet" href="/css/style.css">
<!-- Add favicon -->
<link rel="icon" type="image/x-icon" href="/favicon.ico">
</head>
<body>
<div id="networkStatus" aria-live="polite"></div>
<header class="site-header">
<nav class="main-nav">
<ul class="nav-list">
<li><a href="/" class="nav-link">PunkPOTUS</a></li>
<li><a href="/mint/" class="nav-link">Mint</a></li>
<li><a href="/tokenomics/" class="nav-link">Tokenomics</a></li>
<li><a href="/blog/" class="nav-link">Blog</a></li>
</ul>
</nav>
</header>
<main class="container">
<head>
<title>Generatoe</title>
<head>
<title>Tokenomics of punkPOTUS</title>
<style>
body {
font-family: 'Arial', sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
padding: 0px;
background-color: #f0f0f0;
}
.container {
max-width: 800px;
margin: 0px auto;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.svg-container {
width: 500px;
text-align: center;
}
.controls {
width: 300px;
}
.control-group {
margin-bottom: 20px;
}
h1 {
color: #333;
margin-top: 0;
}
label {
display: block;
margin-bottom: 5px;
color: #666;
}
input[type="range"] {
width: 100%;
}
input[type="checkbox"] {
margin-right: 5px;
}
:root { --hue: 0; --sat: 100%; --lightness: 55%;}
.i{opacity:0}
.t5{opacity:.5}
.pr{fill:hsl(var(--hue),var(--sat), var(--lightness))}
.sc{fill:hsl(calc(var(--hue) + 120),var(--sat), var(--lightness))}
.tr{fill:hsl(calc(var(--hue) + 240),var(--sat), var(--lightness))}
.wh{fill:#fff}.au{fill:hsl(51,var(--sat), var(--lightness))}
.suit{fill:hsl(calc(var(--hue) + 120),calc(var(--sat)*.25), var(--lightness))}
.vest{fill:hsl(calc(var(--hue) + 180),calc(var(--sat)*.5), var(--lightness))}
.lip {fill: hsl(calc(var(--hue) + 120), calc(var(--sat) * .5), calc(var(--lightness) * .8));}
.skin {fill: hsl(var(--hue), calc(var(--sat) * .5), calc(var(--lightness) * 1.5));}
.sha {fill: hsl(calc(var(--hue) + 180), var(--sat), calc(var(--lightness) * .5));}
.fb {fill: hsl(216, var(--sat), calc(var(--lightness) * .8));}
.fw {fill: hsl(39, var(--sat), calc(var(--lightness) * 1.68));}var(--sat), 84%); }
.g0, .g1, .g2, .g3, .g4, .g5, .g6, .s0, .s1, .s2, .s3, .s4, .s5, .s6, .lr0 { opacity: 0; }
.hue-info {
display: flex;
align-items: center;
}
.hue-info label, .hue-info #hueInfo {
font-size: 16px;
color: #333;
}
.hue-info label {
margin-right: 10px;
}
.control-group h4 {
font-size: 16px;
color: #333;
}
#svgName {
width: 96%;
background-color: #000;
color: #fff;
text-align: center;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#randomButton {
width: 100%;
margin-top: 20px;
font-size: 18px;
}
#message {
margin-top: 10px;
font-size: 16px;
color: #666;
text-align: left;
}
</style>
</head>
<body>
<div class="svg-container">
<div id="svgName" style="margin-top: 10px; font-size: 16px;"></div>
<svg id="PUNK POTUS" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000">
<defs>
<pattern id="dot" patternUnits="userSpaceOnUse" width="3" height="3">
<path class="sha" d="M0 0h4v4H0z" />
<circle cx="2" cy="2" r="1" class="pr" />
</pattern>
</defs>
<style>
:root{--hue:0;--sat:0%}.i{opacity:0}.t5{opacity:.5}.pr{fill:hsl(var(--hue),var(--sat),50%)}.sc{fill:hsl(calc(var(--hue)
+ 120),var(--sat),50%)}.tr{fill:hsl(calc(var(--hue) +
240),var(--sat),50%)}.lip{fill:hsl(calc(var(--hue) +
120),calc(var(--sat)*.5),40%)}.suit{fill:hsl(calc(var(--hue) +
120),calc(var(--sat)*.25),50%)}.vest{fill:hsl(calc(var(--hue) +
180),calc(var(--sat)*.5),50%)}.skin{fill:hsl(var(--hue),calc(var(--sat)*.5),75%)}.sha{fill:hsl(calc(var(--hue)
+
180),var(--sat),25%)}.wh{fill:#fff}.au{fill:hsl(51,var(--sat),50%)}.fb{fill:hsl(216,var(--sat),40%)}.fw{fill:hsl(39,var(--sat),84%)}
</style>
<path class="pr" d="M0 0h1000v1000H0z" />
<path class="bg"
d="M871 546c-10-5-107-29-107-29 17-32-28-23-19-55-93 0-45-94-38-163 0-25-49-255-179-255-168-10-229 119-240 241 0 41 7 53 18 68 23 32 0 92-35 66-60 103 94 58-110 118-32 1-39 44-24 61 3 25-38 104 14 72 10 65 50 34 49 70-2 101 161 290 204 97 6 0 107 121 117 132 0 0 25-67 45-96 75-107-20 173 232-120 7-8-2-37 1-33 38 45 110-155 72-174z" />
<path class="skin"
d="M405 274c-1 8-7 13-14 17-5 17 1 57 12 88 21 42 63 95 109 82 38-10 76-62 89-98 4-20 7-61 5-87-1-12-14-16-15-20-3-13 24-1-1-68-13-45-34-86-77-75-39 7-57 5-77 37-12 19-23 49-26 85 0 0 32-8 2 31-2 3-5-7-7 8zm179 132c-46 77-124 87-178-9 0 2 0 6 1 12 8 76 4 68 1 88-5 120 181 139 177-2-4-12 3-93-1-89z" />
<path class="lip"
d="M551 367c-16-1-22-6-35-6-12 0-14 6-17 6-2 0-5-5-14-5s-18 5-27 6c-13 2-17 1-17 4 0 2 4 6 6 7 20 19 25 28 56 28 22 0 30-20 37-27 16-6 18-12 11-13z" />
<path class="suit"
d="M677 521c-2-5-63-50-63-41 48 119-98 412-93 489 22-60 60-86 112-145 71-81 100-183 100-183 0-18-42-30-42-64 0-15 27-35 2-26-42 15-6-9-16-30zM279 632c-3 1-5 4-5 9 0 71 238 319 247 328 1 1-171-310-136-488-2-3-30 27-58 80-5-12 9-38 9-41 0 0-70 38-70 64 4 19 59 23 78 14-14 14-47 28-65 34zm599-26c-10 0-29 76-39 76-6 0 2-47 37-87 7-8 4-45-6-45-15 1-64 187-24 144-13 26-1 60 14 57 56-10 20-145 18-145zm-739-54c-13 19-7 39 4 50 19 19 26 54 29 80 2 15-36-43-37-69-2 8-8 31-23 103-25 135-12 25 32 56 20 14 20 46 21 26 3-99-3-86-12-126 64 134 11-155-14-120z" />
<path class="vest"
d="M765 521c-34 0-3 29 13 44 0 0-51-20-61 5-30 71 69-23 77 120 1 21-3 4-4 3-4-9-15-26-41-61-42 103-45 85-30 141 7 25 4 47 2 47 0 0-17-82-21-82-1 0-4 33-92 130 28 89 243-42 187-157 29 41 9-18 16-74 5 18 1 40 5 40s0-15 16-62c17-48 23-62 23-67 0-4-84-27-90-27zM325 769c-24-31-53-83-56-83-11-1-37 129-24.6 168 0 0-52-82 17.6-197 26-44-86-60 15-127 93-62-108 9-114 12-12 6 39 75 26 168 9 23 10-62 13-74 12 30-13 108 4 160 29 102 170 208 193 61-1-6-50-57-74-88z" />
<path class="fw" d="M673 659c7 0 4-6 3-11-2-9-26-6-31-8-6.9.4-4 7-5 11 2 8 25 6 33 8z" />
<path class="fb" d="M655 642c3 12-8 7-15 7-8-10 9-11 15-7z" />
<path fill="url(#dot)"
d="M473 292c-3 30-11 26-8 39 1 6 6 8 12 9 36 6 20 0 49-4 13-2 5-31 0-27-1 1-1 3 0 4 4 5 6 16 2 15 0 0-17-1-21 1-13 6-26-6-22-19 3-10 1-22 2-39 2-25 4-31-6-33-97-26-68 21-62 17 22-18 72-3 59 17-2 2-5 19-5 20zm103-31c31 1 30 29 29 57-1 43-5 51-15 69-12-4-22 57-78 73-48 14-98-62-102-101-2-6 39 3 40-16 1-14-8 2-31 2-29 0-24-53-7-64 7 2 56-4 43-13-13 1-37 2-49-5-3 8 1 19-16 28-5 17 1 57 12 88 21 42 64 96 110 83 38-10 79-62 89-99 6-20 8-81 5-90s-12-13-13-17c-3-13 23 3-3-68 9 31 6 47 3 53-5-3-18-25-38-17 36-5 37 36 20 19-6-7-9-3-11-3-33 0-21-6-30-5-25 4-23 2-25 6-5 9 7 31 9 31 3 0 0-5 4-7s-3 6 28 6c26 0 8-15 26-10zM406 396c-1 25 10 51 2 101 30 0-3-72 48-42 10 6 20 9 28 10-39-9-66-47-78-69z" />
<path
d="M576 261c-6 3-10 2-11 5-4 3-21-1-24-1-4 0-6 4-16-1-2 0-3-1-3-1-4-4 12-17 28-21 8-2 17-1 24 4 5 4 8 11 2 15zm-157-9c9-8 17-7 29-8 26 2 39 22 27 15-16-9 0 1 0 5s-23 5-24 5c-31 2-40-4-43-5l11-12zm38-17c-26-6-38-7-52 7-2-3 11-18 18-19 12-2 30-2 42 2 6 5-1 12-8 10zm76-2c7-1 13-4 19-7 13-6 24-2 32 7 4 5 4 2 3 0-5-8-12-13-21-14-10-1-20 1-30 2-3 0-8 1-10 3s-3 5-1 8c0 4 5 2 8 1zm-53 97c9 0 17 7 22 7s11-8 22-8c6 0 7 4 3 5-24 4-19 12-54 4-13-3 6-8 7-8z" />
<g class="wh">
<path class="t5"
d="M504 401c-11 0-20 0-22-7-2-6 5-3 11-4 8 0 18-1 20 0 8 0 10 11-9 11zm-34-79c4-5 6 4 3 7-4 5-4-5-3-7z" />
<path
d="M553 257c-3 1-6 0-3-2 3 0 6 1 3 2zm-108 2c-3 0-6 1-3 2 3 0 6-1 3-2zm97-4c-5 1-9 3-10 6 1 1 6 2 12 2-3-2-3-6-2-8zm18-1c1 2 0 6-3 8 13-2 7-7 3-8zm-127 7c-2 1-4 3-6 5 1 2 5 2 9 2-2-2-3-5-3-7zm33 2c-4-3-9-4-14-5 0 3 2 6 0 9 8-2 15-4 14-4zm2 117c-6 1-5-7 0-3 2-1 3-3 6-1 5-1 4-2 8 1 2 0 3-2 6 0 4-1 4 1 6 1 2-1 12-3 15 0 13-6 4 3 15-4 1-1 2 1 3 1 4-3 7 0 2 4-4 0-3 4-5 4-7 0-5 3-9 3-7-2-5 1-12 2-7-2-14 1-20-3-3 2-5-2-8-1-6-1-6-4-7-4z" />
</g>
<g class="glasses">
<path class="g0 i"
d="M434 235c54-4 18 6 74 1 39-16 103-9 84 42-18 46-83 8-89-26-20-5-17 5-26 22-52 97-129-33-43-39zm49 13c22-4 17 3 21-7-8 1-16 0-25 1 1 2 3 4 4 6z" />
<g class="g1 i">
<path
d="M569 278c0 9 1 9-2 9-23 1-42 1-45 2v-9h-9v-9h-9v-9c-6 0-11 0-17 1 1 12 2 9-9 10 0 11 3 9-9 10v7c0 3 3 2-47 4v-9h-9v-9h-9v-9h-10c0-6 0-14-1-17 0-3-14-1 204-9 0 12 0 8 1 18 0 2-1 2-9 2 0 12 2 9-9 10-3 8 1 6-11 7z" />
<path class="wh" d="m429 273-1-9-8 1v-9h-9v9h9v8zm102-5v-9l-9 1v-9h-9l1 9h8v8z" />
</g>
<g class="g2 i">
<path class="wh"
d="m393 236 2 55 89-2c18-33 10-34 30-2l89-3-2-55-208 7zm85 43-69 3-1-37 69-2 1 36zm110-4-69 3-1-37 69-2 1 36z" />
<path class="t5" fill="red" d="m588 275-69 3-1-37 69-2z" />
<path class="t5" fill="blue" d="m478 279-69 3-1-37 69-2z" />
</g>
<g class="g3 i">
<path class="sc t5"
d="M584 211c-1 0-171 9-171 9-7 0-13 7-13 14l3 63c1 25 77 8 77 8 27-36 31 0 50-1 55-3 71 0 71-17 0 0-3-64-3-63-1-7-7-13-14-13z" />
</g>
<g class="g4 i">
<path class="tr"
d="M605 232c0 5-1 9-1 13-14 4 1 42-29 54-16 6-43 2-53-8-17-16-15-37-24-37-8 0-8-2-12 13-7 23-15 34-39 39-59 10-44-46-60-53 0-4-1-8-1-13 56-14 93 0 103 2 17 4 43-23 116-10zm-169 8c-22 1-39 5-33 32 8 44 58 33 69 12 15-34-1-47-36-44zm118-4c-6 0-43 1-41 22 4 26 15 37 36 40 47 6 61-71 5-62z" />
<path class="t5"
d="M554 236c-6 0-43 1-41 22 4 26 15 37 36 40 47 6 61-71 5-62zm-118 4c-22 1-39 5-33 32 8 44 58 33 69 12 15-34-1-47-36-44z" />
</g>
<g class="g5 5 i">
<circle class="tr t5" cx="438" cy="266" r="47" />
<circle class="tr t5" cx="554" cy="260" r="47" />
<path class="sc" d="M483 252c1 2 1 5 2 7l22-1c0-2 0-5 1-7l-25 1z" />
</g>
<path class="g6 i"
d="M497 281s-73 26-110 39l-4-89c77-3 141-6 222-9l4 90c-116-32-112-31-112-31z" />
</g>
<path class="sc"
d="M300 449c16-3 27-12 34-27 3 14-20 36-34 27zm58-74c10 9 11 10 13 9 1-24-56-49-57-49 0 0 59 52 50 94-16 41-47 51-82 39 52 50 134-7 76-93zm38-233c-23 52-26 113-81 132 51-3 62-62 72-102 2-8 20-47 9-30zm85-54c-81 18-98 95-96 174 0 5 5 3 7-5 15-38 2-55 21-94 3-5 29-65 79-74 5-1-2-2-11-1zm-77 85c-3 0 14-38 19-38-6 18-17 38-19 38zm234 188c-15 16-16 20-24 46 2-68 86-72 70-127 41 25-23 75-29 80 1-4 7-9 7-11-1-8-21 8-24 12z" />
<path class="tr"
d="M336 240c2 0-2 9-12 16 0 0-34 21-2-2 9-6 14-14 14-14zm357 27c-8-29-49-33-56-90 3 1 6 9 12 15 1 5 35 38 36 38-16-42-36-38-61-92-10-18-23-33-24-26-10-8-22-23-46-17 80 31 61 183 72 188 1-1-1-25 2-25 1 0 8 23 12 21 1-1-1-8-1-21 0-2 5-39 6-39 8 21 51 54 48 48zm-41-80c9 7 24 30 25 32 0 0-47-48-25-32zm53 284c-9-1-24-6-23-9s18 0 12-7c-49-25-4-95-36-54-16-14 34-53 32-55-1-2-73 29-37 101-5-6-18-13-26-53-3-18-16 55 35 79 1 0 10 4-4-7-5-4-11-15-1-6 30 27 92 19 48 11z" />
<path fill="#8ace00"
d="M757 503c-4-7-34 3-50 13 6-12 22-21 22-23-2-17-52 51-45 53 8 3 7-14 61-28-25-7 16-8 12-15z" />
<circle class="wh" cx="374" cy="347" r="9" />
<circle class="wh" cx="615" cy="342" r="9" />
<circle class="pr" cx="508" cy="635" r="12.5" />
<path class="au"
d="M503 616c44 0 78-52 82-112-1 61-37 116-83 116-49 0-94-61-94-116 4 57 50 112 95 112z" />
<g class="sc t5" style="stroke:#fff;stroke-width:3">
<path class="s0 i"
d="M515 743c6 6 12 11 20 14 0-9-3-16-8-23 10 0 18 3 24 11 4-7 1-19-12-25 21-12 18-10 18-11-10-6-19-6-29 0 4-8 7-15 13-21-14-6-29 11-29 19-11-17-38-25-58-13 18 3 33 10 46 22-9-7-45 2-47 17 15-3 30-6 45-4-7 7-10 14-10 24 27-8 14-27 10 38h13c0-17 0-38 4-48z" />
<path class="s1 i"
d="M475 775v-11c0-3 11 2 11-5-2-53 0-45-14-45v-10c22-1 20 2 19-16 12 0 8-4 9 14 9 0 9 0 8-15 3 0 6-1 9-1v14c0 3 23-1 24 19 0 6-3 10-8 13-2 1 13 1 14 15 2 19-9 24-26 26-1 0-1-3 0 15-3 0-7 1-10 1-1-18 3-16-8-16v16c-3 0-6 1-9 1-1-20 6-16-19-15zm29-12c2 0 27 1 24-13-2-10-15-8-25-8 0 7 1 14 1 21zm-3-50c0 6 1 13 1 19 5 0 21 0 21-10 0-7-8-10-22-9z" />
<path class="s2 i" d="M482 772c9-25 20 8 43-8 13-17-13-16-28-21-16-6-16-25-7-34 10-9 16-5 16-10-2-12 4-9 13-9 0 20-1 3 21 18-2 4-5 8-7 12-8-5-21-8-30-4-20 18 23 16 30 23 15 9 14 37-11 42-2 1-2 1-2 12-11 0-13 7-13-10-9-2-17-5-25-11z"/>
<g class="s3 i">
<path class="t5" d="m483 749 32 17 30-19-29 45z" />
<path d="m483 741 29-53 33 51-30 20z" />
</g>
<path class="s4 i" d="m478 743 50-58-17 43h29l-53 61 17-46z" />
<path class="s5 i"
d="M489 735c-35-26 1-1 6-8-1-2-8-18-7-20 24 27 13 15 20-5 6 23 1 30 15 10 10-14 1 6-1 14 5 7 41-21 7 7-10 8 49 4 0 12-1 0 0 3-1-2-3-18-34-18-38 0-1 6 1 3-2 3-48-4 10-4 1-11zm20 1c15-1 16 15 8 26-15 18-34-28-8-26z" />
<path class="s6 i"
d="M538 710c-32 44-8-33-83 5 0 0 95 42 9 56 12 16 55 16 81-20 14-19-6-29 14-43-8-1-16-4-21 2zm7 0c-1-1 1-2 2-1 0 1-1 2-2 1z" />
</g>
<g class="lr0 i">
<path class="wh"
d="M555 254c20-21 20-21-1-1-2-1-4-1-6 0-21-20-22-21-1 1-1 2-1 4 0 6-20 21-20 21 1 1 2 2 5 2 7 0 21 21 20 20 1-1 1-2 1-5-1-6zm-109 4c20-21 20-21-1-1-2-1-4-1-6 0-21-20-22-21-1 1-1 2-1 4 0 6-20 21-20 21 1 1 2 2 5 2 7 0 21 20 20 20 1-1 1-1 1-4-1-6z" />
</g>
</svg>
<button id="randomButton">Random</button>
<div id="message"></div>
</div>
<div class="controls">
<div class="control-group">
<div class="hue-info">
<label for="hueSlider">Hue:</label>
<div id="hueInfo"></div>
</div>
<input type="range" id="hueSlider" min="0" max="360" value="0">
</div>
<div class="control-group">
<h4>Eyewear (1/56 chance)</h4>
<label><input type="checkbox" id="toggleGlasses0" class="toggle" data-class="g0"> Aviator Joe</label>
<label><input type="checkbox" id="toggleGlasses1" class="toggle" data-class="g1"> Pixel</label>
<label><input type="checkbox" id="toggleGlasses2" class="toggle" data-class="g2"> Anaglyph 3D</label>
<label><input type="checkbox" id="toggleGlasses3" class="toggle" data-class="g3"> Visor</label>
<label><input type="checkbox" id="toggleGlasses4" class="toggle" data-class="g4"> Iconic Rectangular</label>
<label><input type="checkbox" id="toggleGlasses5" class="toggle" data-class="g5"> Retro Round</label>
<label><input type="checkbox" id="toggleGlasses6" class="toggle" data-class="g6"> Blindfold</label>
</div>
<div class="control-group">
<h4>Shirts (1/28 chance)</h4>
<label><input type="checkbox" id="toggleShirt0" class="toggle" data-class="s0"> Coconut Tree</label>
<label><input type="checkbox" id="toggleShirt1" class="toggle" data-class="s1"> Bitcoin</label>
<label><input type="checkbox" id="toggleShirt2" class="toggle" data-class="s2"> Dollar</label>
<label><input type="checkbox" id="toggleShirt3" class="toggle" data-class="s3"> Ethereum</label>
<label><input type="checkbox" id="toggleShirt4" class="toggle" data-class="s4"> Lightning</label>
<label><input type="checkbox" id="toggleShirt5" class="toggle" data-class="s5"> Lady Liberty</label>
<label><input type="checkbox" id="toggleShirt6" class="toggle" data-class="s6"> Flying Dove</label>
</div>
<div class="control-group">
<h4>Maxi (1/100 chance)</h4>
<label><input type="checkbox" id="toggleLaser0" class="toggle" data-class="lr0"> Laser-Eyed</label>
</div>
</div>
</div>
<script>
const hueSlider = document.getElementById('hueSlider');
const toggles = document.querySelectorAll('.toggle');
const svg = document.getElementById('PUNK POTUS');
const hueInfo = document.getElementById('hueInfo');
const svgName = document.getElementById('svgName');
const randomButton = document.getElementById('randomButton');
const messageDiv = document.getElementById('message');
function getHueName(hueValue) {
if (hueValue < 15) return "Red";
else if (hueValue < 30) return "Red-Orange";
else if (hueValue < 45) return "Orange";
else if (hueValue < 60) return "Yellow-Orange";
else if (hueValue < 75) return "Yellow";
else if (hueValue < 90) return "Yellow-Green";
else if (hueValue < 105) return "Green";
else if (hueValue < 120) return "Green-Cyan";
else if (hueValue < 135) return "Cyan";
else if (hueValue < 150) return "Cyan-Blue";
else if (hueValue < 165) return "Blue";
else if (hueValue < 180) return "Blue-Indigo";
else if (hueValue < 195) return "Indigo";
else if (hueValue < 210) return "Indigo-Violet";
else if (hueValue < 225) return "Violet";
else if (hueValue < 240) return "Violet-Purple";
else if (hueValue < 255) return "Purple";
else if (hueValue < 270) return "Purple-Magenta";
else if (hueValue < 285) return "Magenta";
else if (hueValue < 300) return "Magenta-Pink";
else if (hueValue < 315) return "Pink";
else if (hueValue < 330) return "Pink-Red";
else return "Red";
}
function getShirtName(value) {
if (value == 0) return "Coconut Tree";
else if (value == 1) return "Bitcoin";
else if (value == 2) return "Dollar";
else if (value == 3) return "Ethereum";
else if (value == 4) return "Lightning";
else if (value == 5) return "Lady Liberty";
else if (value == 6) return "Flying Dove";
else return "";
}
function getGlassesName(value) {
if (value == 0) return "Aviator Joe";
else if (value == 1) return "Pixel";
else if (value == 2) return "Anaglyph 3D";
else if (value == 3) return "Visor";
else if (value == 4) return "Iconic Rectangular";
else if (value == 5) return "Retro Round";
else if (value == 6) return "Blindfold";
else return "";
}
function updateSvgName() {
const hueValue = hueSlider.value;
const hueName = getHueName(hueValue);
let glassesName = "";
let shirtName = "";
let laserName = "";
toggles.forEach(toggle => {
if (toggle.checked) {
const classToToggle = toggle.dataset.class;
if (classToToggle.startsWith('g')) {
glassesName = getGlassesName(parseInt(classToToggle.slice(1)));
} else if (classToToggle.startsWith('s')) {
shirtName = getShirtName(parseInt(classToToggle.slice(1)));
} else if (classToToggle === 'lr0') {
laserName = "Laser-Eyed";
}
}
});
const svgNameText = `${laserName ? laserName + ' ' : ''}${hueName} ${glassesName} ${shirtName} PUNK POTUS`;
svgName.textContent = svgNameText;
}
function calculateProbability() {
const hueValue = hueSlider.value;
const hueProbability = 1 / 360;
let glassesProbability = 1;
let shirtProbability = 1;
let laserProbability = 1;
toggles.forEach(toggle => {
const classToToggle = toggle.dataset.class;
if (toggle.checked) {
if (classToToggle.startsWith('g')) {
glassesProbability = 1 / 56;
} else if (classToToggle.startsWith('s')) {
shirtProbability = 1 / 28;
} else if (classToToggle === 'lr0') {
laserProbability = 1 / 100;
}
}
});
const totalProbability = hueProbability * glassesProbability * shirtProbability * laserProbability;
const percentageProbability = (totalProbability * 100).toFixed(6);
messageDiv.textContent = `The probability of getting this PunkPOTUS is ${percentageProbability}%`;
}
function updateMessage() {
const saturation = parseFloat(getComputedStyle(document.documentElement).getPropertyValue('--sat').trim());
if (saturation === 0) {
messageDiv.textContent = "Brat Candidate Kamala Harris.";
} else {
calculateProbability();
}
}
hueSlider.addEventListener('input', (event) => {
const hueValue = event.target.value;
document.documentElement.style.setProperty('--hue', hueValue);
const hueName = getHueName(hueValue);
hueInfo.textContent = `${hueName} ${hueValue}`;
updateSvgName();
document.documentElement.style.setProperty('--sat', '100%');
updateMessage();
});
toggles.forEach(toggle => {
toggle.addEventListener('change', (event) => {
const classToToggle = event.target.dataset.class;
const elements = svg.querySelectorAll(`.${classToToggle}`);
elements.forEach(element => {
element.style.opacity = event.target.checked ? '1' : '0';
});
// Ensure only one checkbox is checked at a time within the Eyewear and Shirts groups
if (classToToggle.startsWith('g') || classToToggle.startsWith('s')) {
const group = classToToggle.startsWith('g') ? 'g' : 's';
const groupToggles = document.querySelectorAll(`.toggle[data-class^="${group}"]`);
groupToggles.forEach(gToggle => {
if (gToggle !== event.target) {
gToggle.checked = false;
const otherClassToToggle = gToggle.dataset.class;
const otherElements = svg.querySelectorAll(`.${otherClassToToggle}`);
otherElements.forEach(otherElement => {
otherElement.style.opacity = '0';
});
}
});
}
updateSvgName();
document.documentElement.style.setProperty('--sat', '100%');
updateMessage();
});
});
randomButton.addEventListener('click', () => {
// Deselect all checkboxes
toggles.forEach(toggle => {
toggle.checked = false;
const classToToggle = toggle.dataset.class;
const elements = svg.querySelectorAll(`.${classToToggle}`);
elements.forEach(element => {
element.style.opacity = '0';
});
});
// Generate random values
const randomHue = Math.floor(Math.random() * 360);
hueSlider.value = randomHue;
document.documentElement.style.setProperty('--hue', randomHue);
const hueName = getHueName(randomHue);
hueInfo.textContent = `${hueName} ${randomHue}`;
const randomGlasses = Math.floor(Math.random() * 56);
if (randomGlasses < 7) {
document.getElementById(`toggleGlasses${randomGlasses}`).checked = true;
}
const randomShirt = Math.floor(Math.random() * 28);
if (randomShirt < 7) {
document.getElementById(`toggleShirt${randomShirt}`).checked = true;
}
const randomMaxi = Math.floor(Math.random() * 100);
if (randomMaxi === 0) {
document.getElementById(`toggleLaser0`).checked = true;
}
// Update SVG based on new random values
toggles.forEach(toggle => {
if (toggle.checked) {
const classToToggle = toggle.dataset.class;
const elements = svg.querySelectorAll(`.${classToToggle}`);
elements.forEach(element => {
element.style.opacity = '1';
});
}
});
// Set saturation to 100%
document.documentElement.style.setProperty('--sat', '100%');
updateSvgName();
updateMessage();
});
// Initial setup
document.documentElement.style.setProperty('--hue', '0');
document.documentElement.style.setProperty('--sat', '0%');
hueInfo.textContent = `Red 0`;
svgName.textContent = "PunkPOTUS NFT Simulator";
updateMessage();
</script>
</body>
</main>
<footer class="site-footer">
<p>© 2024 punkPOTUS. All rights reserved. |
<a href="https://x.com/dirtysalsa">Twitter</a> |
<a href="https://warpcast.com/digifilm.eth">Warpcast</a> |
<a href="https://discord.gg/bTAnHMsq4v">Discord</a></p>
</footer>
<!-- Add basic script for network status -->
<script>
window.addEventListener('online', updateNetworkStatus);
window.addEventListener('offline', updateNetworkStatus);
function updateNetworkStatus() {
const statusDiv = document.getElementById('networkStatus');
if (navigator.onLine) {
statusDiv.textContent = '';
statusDiv.style.display = 'none';
} else {
statusDiv.textContent = 'You are currently offline';
statusDiv.style.display = 'block';
}
}
</script>
</body>
</html>