-
Notifications
You must be signed in to change notification settings - Fork 0
/
pp.html
258 lines (248 loc) · 15.4 KB
/
pp.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Punk Potus Simulator</title>
<!-- Farcaster-specific meta tags -->
<meta property="fc:frame" content="vNext">
<meta property="fc:frame:image" content="https://punkpotus.one/pp2.png">
<meta property="fc:frame:button:1" content="Change Color">
<meta property="fc:frame:button:2" content="Randomize">
<style>
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.svg-container {
width: 500px;
text-align: center;
margin: 0 auto;
}
.controls {
width: 300px;
margin: 20px auto;
}
.control-group {
margin-bottom: 20px;
}
h1 {
color: #333;
margin-top: 20px;
text-align: center;
}
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));}
.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">
<h1>Farcaster Frame</h1>
<div id="svgName" style="margin-top: 10px; font-size: 16px;"></div>
<svg id="PunkPOTUS" 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%; --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));}
</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>
</div>
<div class="controls">
<div class="control-group hue-info">
<label for="hue">Hue:</label>
<input type="range" id="hue" name="hue" min="0" max="360" value="0">
<span id="hueInfo">0</span>
</div>
<div class="control-group">
<button id="randomButton">Randomize Colors</button>
</div>
<div id="message"></div>
</div>
<script>
const svgElement = document.getElementById('PUNK_POTUS');
const hueInput = document.getElementById('hue');
const hueInfo = document.getElementById('hueInfo');
const randomButton = document.getElementById('randomButton');
hueInput.addEventListener('input', (event) => {
const hue = event.target.value;
svgElement.style.setProperty('--hue', hue);
hueInfo.textContent = hue;
});
randomButton.addEventListener('click', () => {
const randomHue = Math.floor(Math.random() * 361);
hueInput.value = randomHue;
svgElement.style.setProperty('--hue', randomHue);
hueInfo.textContent = randomHue;
});
</script>
</body>
</html>