Spaces:
Sleeping
Sleeping
Ron Au
commited on
Commit
•
2d460b1
1
Parent(s):
6f41437
refactor
Browse files- static/{index.js → js/card-html.js} +1 -278
- static/js/dom-manipulation.js +123 -0
- static/js/index.js +103 -0
- static/js/network.js +44 -0
- static/style.css +610 -617
- templates/index.html +1 -1
static/{index.js → js/card-html.js}
RENAMED
@@ -1,7 +1,3 @@
|
|
1 |
-
import { toPng } from 'https://cdn.skypack.dev/html-to-image';
|
2 |
-
|
3 |
-
/* HTML generation */
|
4 |
-
|
5 |
const TYPES = {
|
6 |
Grass: '🍃',
|
7 |
Fire: '🔥',
|
@@ -75,7 +71,7 @@ const attackRowsHTML = (attacks) => {
|
|
75 |
.join('');
|
76 |
};
|
77 |
|
78 |
-
const cardHTML = (details) => {
|
79 |
const { hp, energy_type, species, length, weight, attacks, weakness, resistance, retreat, description, rarity } =
|
80 |
details;
|
81 |
|
@@ -130,276 +126,3 @@ const cardHTML = (details) => {
|
|
130 |
</div>
|
131 |
</div>`;
|
132 |
};
|
133 |
-
|
134 |
-
/* Utility */
|
135 |
-
|
136 |
-
const getBasePath = () => {
|
137 |
-
return document.location.origin + document.location.pathname;
|
138 |
-
};
|
139 |
-
|
140 |
-
const generateDetails = async () => {
|
141 |
-
const details = await fetch(`${getBasePath()}/details`);
|
142 |
-
return await details.json();
|
143 |
-
};
|
144 |
-
|
145 |
-
const createTask = async (prompt) => {
|
146 |
-
const taskResponse = await fetch(`${getBasePath()}task/create?prompt=${prompt}`);
|
147 |
-
const task = await taskResponse.json();
|
148 |
-
|
149 |
-
return task;
|
150 |
-
};
|
151 |
-
|
152 |
-
const queueTask = async (task_id) => {
|
153 |
-
const queueResponse = await fetch(`${getBasePath()}task/queue?task_id=${task_id}`);
|
154 |
-
return queueResponse.json();
|
155 |
-
};
|
156 |
-
|
157 |
-
const pollTask = async (task) => {
|
158 |
-
const taskResponse = await fetch(`${getBasePath()}task/poll?task_id=${task.task_id}`);
|
159 |
-
|
160 |
-
return await taskResponse.json();
|
161 |
-
};
|
162 |
-
|
163 |
-
const longPollTask = async (task, interval = 10_000, max) => {
|
164 |
-
const etaDisplay = document.querySelector('.eta');
|
165 |
-
|
166 |
-
task = await pollTask(task);
|
167 |
-
|
168 |
-
if (task.status === 'completed' || (max && task.poll_count > max)) {
|
169 |
-
return task;
|
170 |
-
}
|
171 |
-
|
172 |
-
etaDisplay.textContent = Math.round(task.eta);
|
173 |
-
|
174 |
-
await new Promise((resolve) => setTimeout(resolve, interval));
|
175 |
-
|
176 |
-
return await longPollTask(task, interval, max);
|
177 |
-
};
|
178 |
-
|
179 |
-
/* DOM */
|
180 |
-
|
181 |
-
const generateButton = document.querySelector('button.generate');
|
182 |
-
|
183 |
-
const durationTimer = () => {
|
184 |
-
const elapsedDisplay = document.querySelector('.elapsed');
|
185 |
-
let duration = 0.0;
|
186 |
-
|
187 |
-
return () => {
|
188 |
-
const startTime = performance.now();
|
189 |
-
|
190 |
-
const incrementSeconds = setInterval(() => {
|
191 |
-
duration += 0.1;
|
192 |
-
elapsedDisplay.textContent = duration.toFixed(1);
|
193 |
-
}, 100);
|
194 |
-
|
195 |
-
const updateDuration = (task) => {
|
196 |
-
if (task?.status == 'completed') {
|
197 |
-
duration = task.completed_at - task.created_at;
|
198 |
-
return;
|
199 |
-
}
|
200 |
-
|
201 |
-
duration = Number(((performance.now() - startTime) / 1_000).toFixed(1));
|
202 |
-
};
|
203 |
-
|
204 |
-
window.addEventListener('focus', updateDuration);
|
205 |
-
|
206 |
-
return {
|
207 |
-
cleanup: (completedTask) => {
|
208 |
-
updateDuration(completedTask);
|
209 |
-
clearInterval(incrementSeconds);
|
210 |
-
window.removeEventListener('focus', updateDuration);
|
211 |
-
elapsedDisplay.textContent = duration.toFixed(1);
|
212 |
-
},
|
213 |
-
};
|
214 |
-
};
|
215 |
-
};
|
216 |
-
|
217 |
-
const rotateCard = () => {
|
218 |
-
const RANGE = 0.1;
|
219 |
-
const INTERVAL = 13; // ~75 per second
|
220 |
-
let previousTime = 0;
|
221 |
-
|
222 |
-
// Throttle closure
|
223 |
-
return (card, containerMouseEvent) => {
|
224 |
-
const currentTime = performance.now();
|
225 |
-
|
226 |
-
if (currentTime - previousTime > INTERVAL) {
|
227 |
-
previousTime = currentTime;
|
228 |
-
|
229 |
-
const rect = card.getBoundingClientRect();
|
230 |
-
|
231 |
-
const rotateX = (containerMouseEvent.clientY - rect.y - rect.height / 2) * RANGE;
|
232 |
-
const rotateY = -(containerMouseEvent.clientX - rect.x - rect.width / 2) * RANGE;
|
233 |
-
|
234 |
-
card.style.setProperty('--card-rx', rotateX + 'deg');
|
235 |
-
card.style.setProperty('--card-ry', rotateY + 'deg');
|
236 |
-
}
|
237 |
-
};
|
238 |
-
};
|
239 |
-
|
240 |
-
const initialiseCardRotation = (scene) => {
|
241 |
-
const card = document.querySelector('.pokecard');
|
242 |
-
|
243 |
-
const mousemoveHandler = rotateCard().bind(null, card);
|
244 |
-
|
245 |
-
scene.addEventListener('mousemove', mousemoveHandler, true);
|
246 |
-
|
247 |
-
return mousemoveHandler;
|
248 |
-
};
|
249 |
-
|
250 |
-
const setOutput = (mode, state) => {
|
251 |
-
const output = document.querySelector('.output');
|
252 |
-
|
253 |
-
output.dataset.mode = mode;
|
254 |
-
output.dataset.state = state;
|
255 |
-
};
|
256 |
-
|
257 |
-
const screenshotCard = async () => {
|
258 |
-
const card = document.querySelector('.pokecard');
|
259 |
-
|
260 |
-
const imageUrl = await toPng(card, {
|
261 |
-
width: 400,
|
262 |
-
height: 558,
|
263 |
-
backgroundColor: 'transparent',
|
264 |
-
style: {
|
265 |
-
transform: 'none',
|
266 |
-
},
|
267 |
-
});
|
268 |
-
|
269 |
-
return imageUrl;
|
270 |
-
};
|
271 |
-
|
272 |
-
/* Initialise */
|
273 |
-
|
274 |
-
let generating = false;
|
275 |
-
|
276 |
-
const nameForm = document.querySelector('form.trainer-name');
|
277 |
-
const nameInput = document.querySelector('input[name="name"');
|
278 |
-
const booster = document.querySelector('.booster');
|
279 |
-
const newGenerationButton = document.querySelector('button.generate-new');
|
280 |
-
const saveButton = document.querySelector('button.save');
|
281 |
-
|
282 |
-
let mousemoveHandlerForPreviousCard;
|
283 |
-
|
284 |
-
let trainerName;
|
285 |
-
let useTrainerName = true;
|
286 |
-
let pokeName;
|
287 |
-
|
288 |
-
nameInput.addEventListener('input', (e) => {
|
289 |
-
trainerName = [...e.target.value].filter((char) => char.match(/[\wÀ-ÿ '".,&+#!?:/\\()_-]/g)?.length).join('');
|
290 |
-
|
291 |
-
nameInput.value = trainerName;
|
292 |
-
|
293 |
-
updateCardName();
|
294 |
-
});
|
295 |
-
|
296 |
-
const updateCardName = () => {
|
297 |
-
const cardName = document.querySelector('.pokecard .name');
|
298 |
-
|
299 |
-
if (!cardName) {
|
300 |
-
return;
|
301 |
-
}
|
302 |
-
|
303 |
-
let trainerString = '';
|
304 |
-
|
305 |
-
if (trainerName && useTrainerName) {
|
306 |
-
trainerName = [...trainerName].filter((char) => char.match(/[\wÀ-ÿ '".,&+#!?:/\\()_-]/g)?.length).join('');
|
307 |
-
trainerString = `${trainerName}${trainerName.match(/[sSzZ]$/g)?.length ? "' " : "'s "}`;
|
308 |
-
}
|
309 |
-
|
310 |
-
cardName.innerText = `${trainerString}${pokeName}`;
|
311 |
-
|
312 |
-
let nameWidth;
|
313 |
-
let cardWidth = document.querySelector('.pokecard').getBoundingClientRect().width;
|
314 |
-
|
315 |
-
let scale = 1.01;
|
316 |
-
|
317 |
-
do {
|
318 |
-
scale -= 0.01;
|
319 |
-
cardName.style.transform = `scaleX(${scale})`;
|
320 |
-
nameWidth = cardName.getBoundingClientRect().width;
|
321 |
-
} while (nameWidth / cardWidth > 0.62);
|
322 |
-
};
|
323 |
-
|
324 |
-
const generate = async () => {
|
325 |
-
if (generating) {
|
326 |
-
return;
|
327 |
-
}
|
328 |
-
|
329 |
-
try {
|
330 |
-
const scene = document.querySelector('.scene');
|
331 |
-
const cardSlot = scene.querySelector('.card-slot');
|
332 |
-
const durationDisplay = document.querySelector('.duration');
|
333 |
-
|
334 |
-
scene.removeEventListener('mousemove', mousemoveHandlerForPreviousCard, true);
|
335 |
-
cardSlot.innerHTML = '';
|
336 |
-
|
337 |
-
generating = true;
|
338 |
-
|
339 |
-
setOutput('booster', 'generating');
|
340 |
-
|
341 |
-
const details = await generateDetails();
|
342 |
-
pokeName = details.name;
|
343 |
-
const task = await createTask(details.energy_type);
|
344 |
-
|
345 |
-
document.querySelector('.actions').style.opacity = '1';
|
346 |
-
durationDisplay.classList.add('displayed');
|
347 |
-
const timer = durationTimer(durationDisplay);
|
348 |
-
const timerCleanup = timer().cleanup;
|
349 |
-
|
350 |
-
const longPromises = [queueTask(task.task_id), longPollTask(task)];
|
351 |
-
const completedTask = await Promise.any(longPromises);
|
352 |
-
|
353 |
-
setOutput('booster', 'completed');
|
354 |
-
|
355 |
-
generating = false;
|
356 |
-
timerCleanup(completedTask);
|
357 |
-
|
358 |
-
cardSlot.innerHTML = cardHTML(details);
|
359 |
-
updateCardName();
|
360 |
-
const picture = document.querySelector('img.picture');
|
361 |
-
picture.src = completedTask.value;
|
362 |
-
|
363 |
-
mousemoveHandlerForPreviousCard = initialiseCardRotation(scene);
|
364 |
-
|
365 |
-
setOutput('card', 'completed');
|
366 |
-
} catch (err) {
|
367 |
-
generating = false;
|
368 |
-
console.error(err);
|
369 |
-
}
|
370 |
-
};
|
371 |
-
|
372 |
-
const nameToggle = document.querySelector('button.toggle-name');
|
373 |
-
|
374 |
-
nameToggle.addEventListener('click', () => {
|
375 |
-
useTrainerName = !useTrainerName;
|
376 |
-
|
377 |
-
updateCardName();
|
378 |
-
|
379 |
-
if (!useTrainerName) {
|
380 |
-
nameToggle.classList.add('off');
|
381 |
-
} else {
|
382 |
-
nameToggle.classList.remove('off');
|
383 |
-
}
|
384 |
-
});
|
385 |
-
|
386 |
-
nameForm.addEventListener('submit', (e) => {
|
387 |
-
e.preventDefault();
|
388 |
-
generate();
|
389 |
-
});
|
390 |
-
|
391 |
-
booster.addEventListener('click', generate);
|
392 |
-
newGenerationButton.addEventListener('click', generate);
|
393 |
-
saveButton.addEventListener('click', async () => {
|
394 |
-
let trainerString = '';
|
395 |
-
|
396 |
-
if (trainerName && useTrainerName) {
|
397 |
-
trainerName = [...trainerName].filter((char) => char.match(/[\wÀ-ÿ '".,&+#!?:/\\()_-]/g)?.length).join('');
|
398 |
-
trainerString = `${trainerName}${trainerName.match(/[sSzZ]$/g)?.length ? "' " : "'s "}`;
|
399 |
-
}
|
400 |
-
|
401 |
-
const a = document.createElement('a');
|
402 |
-
a.href = await screenshotCard();
|
403 |
-
a.download = `${trainerString}${pokeName} - This Pokémon Does Not Exist.png`;
|
404 |
-
a.click();
|
405 |
-
});
|
|
|
|
|
|
|
|
|
|
|
1 |
const TYPES = {
|
2 |
Grass: '🍃',
|
3 |
Fire: '🔥',
|
|
|
71 |
.join('');
|
72 |
};
|
73 |
|
74 |
+
export const cardHTML = (details) => {
|
75 |
const { hp, energy_type, species, length, weight, attacks, weakness, resistance, retreat, description, rarity } =
|
76 |
details;
|
77 |
|
|
|
126 |
</div>
|
127 |
</div>`;
|
128 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static/js/dom-manipulation.js
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { toPng } from 'https://cdn.skypack.dev/html-to-image';
|
2 |
+
|
3 |
+
const durationTimer = () => {
|
4 |
+
const elapsedDisplay = document.querySelector('.elapsed');
|
5 |
+
let duration = 0.0;
|
6 |
+
|
7 |
+
return () => {
|
8 |
+
const startTime = performance.now();
|
9 |
+
|
10 |
+
const incrementSeconds = setInterval(() => {
|
11 |
+
duration += 0.1;
|
12 |
+
elapsedDisplay.textContent = duration.toFixed(1);
|
13 |
+
}, 100);
|
14 |
+
|
15 |
+
const updateDuration = (task) => {
|
16 |
+
if (task?.status == 'completed') {
|
17 |
+
duration = task.completed_at - task.created_at;
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
duration = Number(((performance.now() - startTime) / 1_000).toFixed(1));
|
22 |
+
};
|
23 |
+
|
24 |
+
window.addEventListener('focus', updateDuration);
|
25 |
+
|
26 |
+
return {
|
27 |
+
cleanup: (completedTask) => {
|
28 |
+
updateDuration(completedTask);
|
29 |
+
clearInterval(incrementSeconds);
|
30 |
+
window.removeEventListener('focus', updateDuration);
|
31 |
+
elapsedDisplay.textContent = duration.toFixed(1);
|
32 |
+
},
|
33 |
+
};
|
34 |
+
};
|
35 |
+
};
|
36 |
+
|
37 |
+
const updateCardName = (trainerName, pokeName, useTrainerName) => {
|
38 |
+
const cardName = document.querySelector('.pokecard .name');
|
39 |
+
|
40 |
+
if (!cardName) {
|
41 |
+
return;
|
42 |
+
}
|
43 |
+
|
44 |
+
let trainerString = '';
|
45 |
+
|
46 |
+
if (trainerName && useTrainerName) {
|
47 |
+
trainerName = [...trainerName].filter((char) => char.match(/[\wÀ-ÿ '".,&+#!?:/\\()_-]/g)?.length).join('');
|
48 |
+
trainerString = `${trainerName}${trainerName.match(/[sSzZ]$/g)?.length ? "' " : "'s "}`;
|
49 |
+
}
|
50 |
+
|
51 |
+
const fullName = `${trainerString}${pokeName}`;
|
52 |
+
cardName.innerText = fullName;
|
53 |
+
|
54 |
+
let nameWidth;
|
55 |
+
let cardWidth = document.querySelector('.pokecard').getBoundingClientRect().width;
|
56 |
+
|
57 |
+
let scale = 1.01;
|
58 |
+
|
59 |
+
do {
|
60 |
+
scale -= 0.01;
|
61 |
+
cardName.style.transform = `scaleX(${scale})`;
|
62 |
+
nameWidth = cardName.getBoundingClientRect().width;
|
63 |
+
} while (nameWidth / cardWidth > 0.62);
|
64 |
+
|
65 |
+
return fullName;
|
66 |
+
};
|
67 |
+
|
68 |
+
const rotateCard = () => {
|
69 |
+
const RANGE = 0.1;
|
70 |
+
const INTERVAL = 13; // ~75 per second
|
71 |
+
let previousTime = 0;
|
72 |
+
|
73 |
+
// Throttle closure
|
74 |
+
return (card, containerMouseEvent) => {
|
75 |
+
const currentTime = performance.now();
|
76 |
+
|
77 |
+
if (currentTime - previousTime > INTERVAL) {
|
78 |
+
previousTime = currentTime;
|
79 |
+
|
80 |
+
const rect = card.getBoundingClientRect();
|
81 |
+
|
82 |
+
const rotateX = (containerMouseEvent.clientY - rect.y - rect.height / 2) * RANGE;
|
83 |
+
const rotateY = -(containerMouseEvent.clientX - rect.x - rect.width / 2) * RANGE;
|
84 |
+
|
85 |
+
card.style.setProperty('--card-rx', rotateX + 'deg');
|
86 |
+
card.style.setProperty('--card-ry', rotateY + 'deg');
|
87 |
+
}
|
88 |
+
};
|
89 |
+
};
|
90 |
+
|
91 |
+
const initialiseCardRotation = (scene) => {
|
92 |
+
const card = document.querySelector('.pokecard');
|
93 |
+
|
94 |
+
const mousemoveHandler = rotateCard().bind(null, card);
|
95 |
+
|
96 |
+
scene.addEventListener('mousemove', mousemoveHandler, true);
|
97 |
+
|
98 |
+
return mousemoveHandler;
|
99 |
+
};
|
100 |
+
|
101 |
+
const setOutput = (mode, state) => {
|
102 |
+
const output = document.querySelector('.output');
|
103 |
+
|
104 |
+
output.dataset.mode = mode;
|
105 |
+
output.dataset.state = state;
|
106 |
+
};
|
107 |
+
|
108 |
+
const screenshotCard = async () => {
|
109 |
+
const card = document.querySelector('.pokecard');
|
110 |
+
|
111 |
+
const imageUrl = await toPng(card, {
|
112 |
+
width: 400,
|
113 |
+
height: 558,
|
114 |
+
backgroundColor: 'transparent',
|
115 |
+
style: {
|
116 |
+
transform: 'none',
|
117 |
+
},
|
118 |
+
});
|
119 |
+
|
120 |
+
return imageUrl;
|
121 |
+
};
|
122 |
+
|
123 |
+
export { durationTimer, updateCardName, initialiseCardRotation, setOutput, screenshotCard };
|
static/js/index.js
ADDED
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import { generateDetails, createTask, queueTask, longPollTask } from './network.js';
|
2 |
+
import { cardHTML } from './card-html.js';
|
3 |
+
import {
|
4 |
+
durationTimer,
|
5 |
+
updateCardName,
|
6 |
+
initialiseCardRotation,
|
7 |
+
setOutput,
|
8 |
+
screenshotCard,
|
9 |
+
} from './dom-manipulation.js';
|
10 |
+
|
11 |
+
const nameInput = document.querySelector('input[name="name"');
|
12 |
+
const nameToggle = document.querySelector('button.toggle-name');
|
13 |
+
|
14 |
+
let pokeName;
|
15 |
+
let trainerName;
|
16 |
+
let useTrainerName = true;
|
17 |
+
let generating = false;
|
18 |
+
let mousemoveHandlerForPreviousCard;
|
19 |
+
|
20 |
+
const generate = async () => {
|
21 |
+
if (generating) {
|
22 |
+
return;
|
23 |
+
}
|
24 |
+
|
25 |
+
try {
|
26 |
+
const scene = document.querySelector('.scene');
|
27 |
+
const cardSlot = scene.querySelector('.card-slot');
|
28 |
+
const durationDisplay = document.querySelector('.duration');
|
29 |
+
|
30 |
+
scene.removeEventListener('mousemove', mousemoveHandlerForPreviousCard, true);
|
31 |
+
cardSlot.innerHTML = '';
|
32 |
+
generating = true;
|
33 |
+
|
34 |
+
setOutput('booster', 'generating');
|
35 |
+
|
36 |
+
await new Promise((resolve) => setTimeout(resolve, 9999));
|
37 |
+
|
38 |
+
const details = await generateDetails();
|
39 |
+
pokeName = details.name;
|
40 |
+
const task = await createTask(details.energy_type);
|
41 |
+
|
42 |
+
document.querySelector('.actions').style.opacity = '1';
|
43 |
+
durationDisplay.classList.add('displayed');
|
44 |
+
const timer = durationTimer(durationDisplay);
|
45 |
+
const timerCleanup = timer().cleanup;
|
46 |
+
|
47 |
+
const longPromises = [queueTask(task.task_id), longPollTask(task)];
|
48 |
+
const completedTask = await Promise.any(longPromises);
|
49 |
+
|
50 |
+
setOutput('booster', 'completed');
|
51 |
+
|
52 |
+
generating = false;
|
53 |
+
timerCleanup(completedTask);
|
54 |
+
|
55 |
+
cardSlot.innerHTML = cardHTML(details);
|
56 |
+
updateCardName(trainerName, pokeName, useTrainerName);
|
57 |
+
const picture = document.querySelector('img.picture');
|
58 |
+
picture.src = completedTask.value;
|
59 |
+
|
60 |
+
mousemoveHandlerForPreviousCard = initialiseCardRotation(scene);
|
61 |
+
|
62 |
+
setOutput('card', 'completed');
|
63 |
+
} catch (err) {
|
64 |
+
generating = false;
|
65 |
+
console.error(err);
|
66 |
+
}
|
67 |
+
};
|
68 |
+
|
69 |
+
nameInput.addEventListener('input', (e) => {
|
70 |
+
trainerName = [...e.target.value].filter((char) => char.match(/[\wÀ-ÿ '".,&+#!?:/\\()_-]/g)?.length).join('');
|
71 |
+
|
72 |
+
nameInput.value = trainerName;
|
73 |
+
|
74 |
+
updateCardName(trainerName, pokeName, useTrainerName);
|
75 |
+
});
|
76 |
+
|
77 |
+
document.querySelector('form.trainer-name').addEventListener('submit', (e) => {
|
78 |
+
e.preventDefault();
|
79 |
+
generate();
|
80 |
+
});
|
81 |
+
|
82 |
+
nameToggle.addEventListener('click', () => {
|
83 |
+
useTrainerName = !useTrainerName;
|
84 |
+
|
85 |
+
updateCardName(trainerName, pokeName, useTrainerName);
|
86 |
+
|
87 |
+
if (!useTrainerName) {
|
88 |
+
nameToggle.classList.add('off');
|
89 |
+
} else {
|
90 |
+
nameToggle.classList.remove('off');
|
91 |
+
}
|
92 |
+
});
|
93 |
+
|
94 |
+
document.querySelector('.booster').addEventListener('click', generate);
|
95 |
+
|
96 |
+
document.querySelector('button.generate-new').addEventListener('click', generate);
|
97 |
+
|
98 |
+
document.querySelector('button.save').addEventListener('click', async () => {
|
99 |
+
const a = document.createElement('a');
|
100 |
+
a.href = await screenshotCard();
|
101 |
+
a.download = `${updateCardName(trainerName, pokeName, useTrainerName)} - This Pokémon Does Not Exist.png`;
|
102 |
+
a.click();
|
103 |
+
});
|
static/js/network.js
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const getBasePath = () => {
|
2 |
+
return document.location.origin + document.location.pathname;
|
3 |
+
};
|
4 |
+
|
5 |
+
const generateDetails = async () => {
|
6 |
+
const details = await fetch(`${getBasePath()}/details`);
|
7 |
+
return await details.json();
|
8 |
+
};
|
9 |
+
|
10 |
+
const createTask = async (prompt) => {
|
11 |
+
const taskResponse = await fetch(`${getBasePath()}task/create?prompt=${prompt}`);
|
12 |
+
const task = await taskResponse.json();
|
13 |
+
|
14 |
+
return task;
|
15 |
+
};
|
16 |
+
|
17 |
+
const queueTask = async (task_id) => {
|
18 |
+
const queueResponse = await fetch(`${getBasePath()}task/queue?task_id=${task_id}`);
|
19 |
+
return queueResponse.json();
|
20 |
+
};
|
21 |
+
|
22 |
+
const pollTask = async (task) => {
|
23 |
+
const taskResponse = await fetch(`${getBasePath()}task/poll?task_id=${task.task_id}`);
|
24 |
+
|
25 |
+
return await taskResponse.json();
|
26 |
+
};
|
27 |
+
|
28 |
+
const longPollTask = async (task, interval = 10_000, max) => {
|
29 |
+
const etaDisplay = document.querySelector('.eta');
|
30 |
+
|
31 |
+
task = await pollTask(task);
|
32 |
+
|
33 |
+
if (task.status === 'completed' || (max && task.poll_count > max)) {
|
34 |
+
return task;
|
35 |
+
}
|
36 |
+
|
37 |
+
etaDisplay.textContent = Math.round(task.eta);
|
38 |
+
|
39 |
+
await new Promise((resolve) => setTimeout(resolve, interval));
|
40 |
+
|
41 |
+
return await longPollTask(task, interval, max);
|
42 |
+
};
|
43 |
+
|
44 |
+
export { generateDetails, createTask, queueTask, longPollTask };
|
static/style.css
CHANGED
@@ -1,10 +1,5 @@
|
|
1 |
:root {
|
2 |
-
--card-h: 47;
|
3 |
-
--card-s: 95%;
|
4 |
-
--card-l: 58%;
|
5 |
-
--card-color: hsl(var(--card-h) var(--card-s) var(--card-l));
|
6 |
--card-width: 25rem;
|
7 |
-
--card-aspect: 63 / 88;
|
8 |
--theme-primary: hsl(158 100% 33%);
|
9 |
--theme-secondary: hsl(165 67% 48%);
|
10 |
--theme-ternary: hsl(112 46% 75%);
|
@@ -57,6 +52,28 @@ main {
|
|
57 |
margin: 0 auto;
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
section {
|
61 |
display: grid;
|
62 |
place-items: center;
|
@@ -64,6 +81,8 @@ section {
|
|
64 |
box-sizing: border-box;
|
65 |
}
|
66 |
|
|
|
|
|
67 |
.info {
|
68 |
max-width: 35rem;
|
69 |
height: min-content;
|
@@ -108,18 +127,6 @@ section {
|
|
108 |
transition: font-size 0.5s ease;
|
109 |
}
|
110 |
|
111 |
-
@media (max-width: 1280px) {
|
112 |
-
.info h1 {
|
113 |
-
font-size: 3rem;
|
114 |
-
}
|
115 |
-
}
|
116 |
-
|
117 |
-
@media (max-width: 1280px) {
|
118 |
-
.card-slot > .pokecard {
|
119 |
-
--card-scale: 0.8;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
.info label {
|
124 |
width: 100%;
|
125 |
text-align: center;
|
@@ -142,16 +149,16 @@ section {
|
|
142 |
outline-color: white;
|
143 |
}
|
144 |
|
|
|
|
|
|
|
|
|
145 |
input:focus {
|
146 |
border-color: transparent;
|
147 |
outline-style: solid;
|
148 |
outline-color: var(--theme-primary);
|
149 |
}
|
150 |
|
151 |
-
.info input::placeholder {
|
152 |
-
text-align: center;
|
153 |
-
}
|
154 |
-
|
155 |
.info p {
|
156 |
width: 80%;
|
157 |
margin: 3rem auto 0;
|
@@ -164,7 +171,7 @@ input:focus {
|
|
164 |
color: var(--theme-subtext);
|
165 |
}
|
166 |
|
167 |
-
/* Output
|
168 |
|
169 |
.output {
|
170 |
display: flex;
|
@@ -179,25 +186,14 @@ input:focus {
|
|
179 |
justify-content: center;
|
180 |
align-items: center;
|
181 |
gap: 1rem;
|
182 |
-
|
183 |
width: 100%;
|
184 |
margin: 1rem auto 1.5rem;
|
185 |
-
|
186 |
-
|
187 |
}
|
188 |
|
189 |
.output .buttons {
|
190 |
display: contents;
|
191 |
}
|
192 |
|
193 |
-
button {
|
194 |
-
transform-origin: bottom;
|
195 |
-
transform: translateY(-25%);
|
196 |
-
transition: transform 0.5s, opacity 0.5s;
|
197 |
-
pointer-events: none;
|
198 |
-
opacity: 0;
|
199 |
-
}
|
200 |
-
|
201 |
button {
|
202 |
padding: 0.5rem 1rem;
|
203 |
border: none;
|
@@ -205,40 +201,32 @@ button {
|
|
205 |
background-image: linear-gradient(-90deg, var(--theme-ternary), var(--theme-secondary));
|
206 |
font-weight: bold;
|
207 |
color: white;
|
|
|
|
|
208 |
transition: transform 0.5s ease, box-shadow 0.1s, outline-offset 0.25s ease-out, filter 0.25s ease-out, opacity 0.25s;
|
|
|
209 |
whitespace: nowrap;
|
210 |
box-shadow: 0 0.2rem 0.375rem hsl(158 100% 33% / 60%);
|
211 |
filter: saturate(1);
|
212 |
cursor: pointer;
|
213 |
user-select: none;
|
|
|
|
|
214 |
}
|
215 |
|
216 |
-
button.toggle-name.off {
|
217 |
-
filter: saturate(0.15);
|
218 |
-
}
|
219 |
-
|
220 |
-
button:active {
|
221 |
-
transform: translateY(0.1rem);
|
222 |
-
box-shadow: none;
|
223 |
-
}
|
224 |
-
|
225 |
-
|
226 |
[data-mode='card'][data-state='completed'] button {
|
227 |
transform: translateY(0);
|
228 |
pointer-events: auto;
|
229 |
opacity: 1;
|
230 |
}
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
|
237 |
-
|
238 |
-
|
239 |
-
width: 90vw;
|
240 |
-
flex-wrap: wrap;
|
241 |
-
}
|
242 |
}
|
243 |
|
244 |
.duration {
|
@@ -261,756 +249,761 @@ button:active {
|
|
261 |
opacity: 1;
|
262 |
}
|
263 |
|
264 |
-
|
265 |
.scene {
|
266 |
--scale: 0.9;
|
267 |
height: 40rem;
|
268 |
box-sizing: border-box;
|
269 |
margin: 2rem;
|
270 |
perspective: 100rem;
|
271 |
-
transform: scale(var(--scale));
|
272 |
-
transition: transform 0.5s ease-out;/
|
273 |
transform-origin: center 40%;
|
|
|
|
|
274 |
}
|
275 |
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
--
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
}
|
284 |
|
285 |
-
.
|
286 |
-
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
289 |
}
|
290 |
-
|
291 |
-
|
|
|
|
|
292 |
}
|
293 |
|
294 |
-
.
|
295 |
-
|
296 |
-
--s: 100%;
|
297 |
-
--l: 58%;
|
298 |
}
|
299 |
-
.
|
300 |
-
|
|
|
301 |
}
|
302 |
|
303 |
-
.
|
304 |
-
|
305 |
-
--s: 100%;
|
306 |
-
--l: 58%;
|
307 |
-
}
|
308 |
-
.lightning.energy {
|
309 |
-
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(5deg) drop-shadow(0 0 0.1rem gold);
|
310 |
}
|
311 |
|
312 |
-
.
|
313 |
-
|
314 |
-
|
315 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
316 |
}
|
317 |
-
.
|
318 |
-
|
|
|
|
|
319 |
}
|
320 |
-
|
321 |
-
.
|
322 |
-
|
323 |
-
|
324 |
-
|
|
|
|
|
|
|
325 |
}
|
326 |
-
.
|
327 |
-
|
|
|
|
|
328 |
}
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
--l: 85%;
|
334 |
}
|
335 |
-
.
|
336 |
-
|
337 |
-
background-color: hsl(0 0% 100% / 15%);
|
338 |
-
font-size: 0.9em;
|
339 |
-
filter: contrast(100) grayscale(1) drop-shadow(0 0 0.1rem white);
|
340 |
}
|
341 |
-
|
342 |
-
|
343 |
-
--h: 100;
|
344 |
-
--s: 3%;
|
345 |
-
--l: 17%;
|
346 |
}
|
347 |
-
.
|
348 |
-
|
349 |
}
|
350 |
-
.
|
351 |
-
|
352 |
}
|
353 |
-
|
354 |
-
|
355 |
-
--h: 240;
|
356 |
-
--s: 20%;
|
357 |
-
--l: 77%;
|
358 |
}
|
359 |
-
.
|
360 |
-
|
361 |
}
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
--l: 44%;
|
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 |
-
--color: hsl(var(--h) var(--s) var(--l));
|
393 |
-
--lighter: hsl(var(--h) var(--s) calc(var(--l) + 10%));
|
394 |
-
--lightest: hsl(var(--h) var(--s) calc(var(--l) + 30%));
|
395 |
-
--card-rx: 0deg;
|
396 |
-
--card-ry: 0deg;
|
397 |
-
--card-rz: 0deg;
|
398 |
-
--card-scale: 1;
|
399 |
display: flex;
|
400 |
flex-direction: column;
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
407 |
background-image: linear-gradient(
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
);
|
416 |
-
transform-style: preserve-3d;
|
417 |
-
transform-origin: center;
|
418 |
-
transform: rotateX(var(--card-rx)) rotateY(var(--card-ry)) scale(var(--card-scale));
|
419 |
-
transition: transform 0.5s ease-out;
|
420 |
}
|
421 |
|
422 |
-
.
|
423 |
-
|
|
|
424 |
}
|
425 |
-
.
|
426 |
-
|
427 |
}
|
428 |
|
429 |
-
.
|
430 |
-
|
431 |
-
|
432 |
-
height: 100%;
|
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 |
-
right: 1rem;
|
476 |
}
|
477 |
|
478 |
-
.
|
479 |
-
|
480 |
-
color: hsl(0 100% 50%);
|
481 |
}
|
482 |
|
483 |
-
|
484 |
-
|
485 |
-
|
|
|
|
|
|
|
|
|
486 |
}
|
487 |
|
488 |
-
|
489 |
-
|
490 |
-
--lightest: hsl(var(--card-h) var(--card-s) calc(var(--card-l) + 30%));
|
491 |
-
--darker: hsl(var(--card-h) var(--card-s) calc(var(--card-l) - 15%));
|
492 |
-
border-color: var(--darker) var(--card-color) var(--lighter);
|
493 |
}
|
494 |
|
495 |
-
.
|
496 |
-
|
497 |
-
display: inline-block;
|
498 |
}
|
499 |
|
500 |
-
.
|
501 |
-
|
502 |
-
height: 240px;
|
503 |
-
border: 0.375rem solid;
|
504 |
-
background-color: white;
|
505 |
-
object-fit: contain;
|
506 |
-
box-shadow: 0.25rem 0.25rem 0.5rem black;
|
507 |
-
user-select: none;
|
508 |
}
|
509 |
|
510 |
-
.
|
511 |
-
|
512 |
-
padding: 0.1rem;
|
513 |
-
margin: 0.25rem auto;
|
514 |
-
border-style: solid;
|
515 |
-
border-width: 0 0.2rem;
|
516 |
-
border-image: linear-gradient(var(--lightest), var(--darker)) 1 100%;
|
517 |
-
background-image: linear-gradient(90deg, var(--card-color), var(--lightest) 45% 55%, var(--card-color));
|
518 |
-
text-align: center;
|
519 |
-
font-size: 0.75rem;
|
520 |
-
font-weight: bold;
|
521 |
-
font-style: italic;
|
522 |
}
|
523 |
|
524 |
-
.species::selection {
|
525 |
-
background-color: white;
|
526 |
-
}
|
527 |
|
528 |
-
|
529 |
-
.footer {
|
530 |
-
display: grid;
|
531 |
-
grid-template-columns: repeat(3, 1fr);
|
532 |
-
width: 100%;
|
533 |
-
}
|
534 |
|
535 |
-
.
|
536 |
-
|
|
|
537 |
}
|
538 |
|
539 |
-
.
|
540 |
-
|
|
|
|
|
541 |
}
|
542 |
-
|
543 |
-
.
|
544 |
-
display: flex;
|
545 |
-
flex-direction: column;
|
546 |
-
justify-content: space-evenly;
|
547 |
-
height: 100%;
|
548 |
-
padding: 0;
|
549 |
-
margin: 0;
|
550 |
-
list-style-type: none;
|
551 |
}
|
552 |
|
553 |
-
.
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
margin-left: -2.5%;
|
561 |
-
border-bottom: 0.5px solid hsl(0, 0%, 10%);
|
562 |
-
font-size: 0.95em;
|
563 |
}
|
564 |
|
565 |
-
.
|
566 |
-
|
|
|
|
|
567 |
}
|
568 |
-
.
|
569 |
-
|
570 |
-
text-align: left;
|
571 |
}
|
572 |
-
|
573 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
574 |
}
|
575 |
|
576 |
-
.
|
577 |
-
|
578 |
-
|
|
|
|
|
|
|
|
|
579 |
}
|
580 |
|
581 |
-
.
|
582 |
-
|
583 |
-
|
584 |
-
|
|
|
|
|
|
|
585 |
}
|
586 |
|
587 |
-
.
|
588 |
-
|
589 |
-
|
|
|
590 |
}
|
591 |
-
.
|
592 |
-
|
593 |
-
|
|
|
|
|
594 |
}
|
595 |
|
596 |
-
.
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
|
|
|
|
|
|
|
|
|
|
601 |
}
|
602 |
|
603 |
-
.
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
|
|
609 |
}
|
610 |
|
611 |
-
.
|
612 |
-
|
613 |
-
|
|
|
|
|
|
|
|
|
614 |
}
|
615 |
|
616 |
-
.
|
617 |
-
|
|
|
|
|
|
|
|
|
|
|
618 |
}
|
619 |
|
620 |
-
.
|
621 |
-
|
622 |
-
|
623 |
-
font-size: 1.375rem;
|
624 |
}
|
625 |
|
626 |
-
|
627 |
-
|
628 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
}
|
630 |
|
631 |
-
.
|
632 |
display: flex;
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
margin-top: 0;
|
637 |
-
text-align: center;
|
638 |
-
font-size: 0.75rem;
|
639 |
-
font-weight: bold;
|
640 |
}
|
641 |
|
642 |
-
.
|
643 |
display: flex;
|
644 |
flex-direction: column;
|
645 |
-
|
646 |
-
margin: 0;
|
647 |
}
|
648 |
|
649 |
-
.
|
650 |
-
|
651 |
}
|
652 |
-
|
653 |
-
|
654 |
-
position: absolute;
|
655 |
-
top: 1rem;
|
656 |
-
left: 2.5rem;
|
657 |
}
|
658 |
-
|
659 |
-
|
660 |
-
padding: 0.1rem 0.5rem;
|
661 |
-
margin: 0.25rem 0 0;
|
662 |
-
border: 0.1rem solid;
|
663 |
-
font-size: 0.65rem;
|
664 |
-
font-weight: bold;
|
665 |
-
font-style: italic;
|
666 |
}
|
667 |
|
668 |
-
.
|
669 |
-
|
670 |
-
position: relative;
|
671 |
-
margin: 0.15rem 0;
|
672 |
-
text-align: center;
|
673 |
font-size: 0.6rem;
|
674 |
font-weight: bold;
|
675 |
}
|
676 |
|
677 |
-
|
678 |
-
|
679 |
-
|
|
|
|
|
680 |
}
|
681 |
|
682 |
-
|
683 |
-
|
684 |
-
.booster {
|
685 |
-
--booster-rx: 0deg;
|
686 |
-
--booster-ry: 0deg;
|
687 |
-
--booster-rz: -5deg;
|
688 |
-
--booster-scale: 0.7;
|
689 |
-
--width: var(--card-width);
|
690 |
-
--height: calc(var(--card-width) / 66 * 88);
|
691 |
-
--depth: 0.5rem;
|
692 |
-
--bg: hsl(227, 54%, 21%);
|
693 |
-
display: none;
|
694 |
-
position: relative;
|
695 |
-
width: var(--width);
|
696 |
-
height: var(--height);
|
697 |
-
transform-style: preserve-3d;
|
698 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
699 |
-
scale(var(--booster-scale));
|
700 |
-
transition: transform 0.5s ease-in-out;
|
701 |
-
cursor: pointer;
|
702 |
}
|
703 |
|
704 |
-
.
|
705 |
-
display:
|
706 |
-
|
707 |
position: absolute;
|
708 |
-
|
709 |
-
|
710 |
-
|
|
|
|
|
711 |
}
|
712 |
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
}
|
717 |
|
718 |
-
.
|
719 |
-
|
720 |
-
|
721 |
-
.left,
|
722 |
-
.right {
|
723 |
-
width: var(--depth);
|
724 |
}
|
725 |
|
726 |
-
|
727 |
-
|
|
|
728 |
}
|
729 |
|
730 |
-
.
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
hsl(0 0% 84%) 10%,
|
736 |
-
hsl(0 0% 88%) 20%,
|
737 |
-
hsl(0 0% 92%) 30%,
|
738 |
-
hsl(0 0% 96%) 40%,
|
739 |
-
hsl(0 0% 100%) 50%,
|
740 |
-
hsl(0 0% 96%) 60%,
|
741 |
-
hsl(0 0% 92%) 70%,
|
742 |
-
hsl(0 0% 88%) 80%,
|
743 |
-
hsl(0 0% 84%) 90%,
|
744 |
-
hsl(0 0% 80%) 100%
|
745 |
-
);
|
746 |
-
}
|
747 |
-
.foil.top.flat {
|
748 |
-
height: 20px;
|
749 |
-
transform-origin: bottom;
|
750 |
-
transform: translate3d(0, -30px, 0px) rotateX(0deg);
|
751 |
-
}
|
752 |
-
.foil.top.flat::after,
|
753 |
-
.foil.bottom.flat::after {
|
754 |
-
content: '';
|
755 |
-
position: absolute;
|
756 |
-
width: var(--width);
|
757 |
-
height: 20px;
|
758 |
-
background: radial-gradient(#ffffff 0%, transparent 50%);
|
759 |
-
background-size: 1% 100%;
|
760 |
-
}
|
761 |
-
.foil.top.front {
|
762 |
-
height: 11px;
|
763 |
-
transform-origin: bottom;
|
764 |
-
transform: translate3d(0, -11.4px, 3.8px) rotateX(20.5deg);
|
765 |
-
}
|
766 |
-
.foil.top.back {
|
767 |
-
height: 11px;
|
768 |
-
transform-origin: bottom;
|
769 |
-
transform: translate3d(0, -11.4px, -4px) rotateX(339deg);
|
770 |
-
}
|
771 |
-
.face.front {
|
772 |
-
transform: rotateY(0deg) translate3d(0, 0, calc(var(--depth) / 2));
|
773 |
-
}
|
774 |
-
.face.left {
|
775 |
-
transform: rotateY(90deg) translate3d(0, 0, calc(var(--width) - calc(var(--depth) / 2)));
|
776 |
-
}
|
777 |
-
.face.back {
|
778 |
-
transform: rotateY(180deg) translate3d(0, 0, calc(var(--depth) / 2)) rotateZ(180deg);
|
779 |
-
}
|
780 |
-
.face.right {
|
781 |
-
transform: rotateY(-90deg) translate3d(0, 0, calc(var(--depth) / 2));
|
782 |
-
}
|
783 |
-
.face.top {
|
784 |
-
transform: rotateX(90deg) translate3d(0, 0, calc(var(--depth) / 2));
|
785 |
-
}
|
786 |
-
.face.bottom {
|
787 |
-
transform: rotateX(-90deg) translate3d(0, 0, calc(var(--height) - calc(var(--depth) / 2)));
|
788 |
}
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
}
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
|
|
|
|
|
|
|
|
|
|
798 |
}
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
803 |
}
|
804 |
|
805 |
-
.
|
806 |
-
|
807 |
-
height: var(--height);
|
808 |
-
background-image: linear-gradient(
|
809 |
-
90deg,
|
810 |
-
hsl(0 0% 0%) 0%,
|
811 |
-
hsl(0 0% 10%) 20%,
|
812 |
-
hsl(0 0% 40%) 30%,
|
813 |
-
hsl(0 0% 60%) 40%,
|
814 |
-
hsl(0 0% 86%) 50%,
|
815 |
-
hsl(0 0% 90%) 60%,
|
816 |
-
hsl(0 0% 85%) 80%,
|
817 |
-
hsl(0 0% 90%) 90%,
|
818 |
-
hsl(0 0% 70%) 100%
|
819 |
-
);
|
820 |
-
transform-style: preserve-3d;
|
821 |
-
transform-origin: bottom;
|
822 |
-
transform: translate3d(calc(var(--width) / 2 - 25px), 0px, calc(var(--depth) * -0.50001)) rotateX(0deg);
|
823 |
}
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
hsl(0 0% 74%) 10%,
|
831 |
-
hsl(0 0% 78%) 20%,
|
832 |
-
hsl(0 0% 82%) 30%,
|
833 |
-
hsl(0 0% 86%) 40%,
|
834 |
-
hsl(0 0% 90%) 50%,
|
835 |
-
hsl(0 0% 86%) 60%,
|
836 |
-
hsl(0 0% 82%) 70%,
|
837 |
-
hsl(0 0% 78%) 80%,
|
838 |
-
hsl(0 0% 74%) 90%,
|
839 |
-
hsl(0 0% 70%) 100%
|
840 |
-
);
|
841 |
-
transform-style: preserve-3d;
|
842 |
-
transform-origin: center;
|
843 |
-
transform: translate3d(calc(var(--width) / 2 - 25.5px), 0, -8px) rotateY(15deg);
|
844 |
}
|
845 |
|
846 |
-
.
|
847 |
-
|
848 |
-
position: absolute;
|
849 |
-
width: 30px;
|
850 |
-
height: var(--height);
|
851 |
-
background: radial-gradient(#ffffff 0%, transparent 50%);
|
852 |
-
background-size: 100% 0.75%;
|
853 |
}
|
854 |
|
855 |
-
.
|
856 |
-
|
857 |
-
225deg,
|
858 |
-
hsl(270deg 100% 7%) 0%,
|
859 |
-
hsl(246deg 77% 15%) 14%,
|
860 |
-
hsl(223deg 59% 24%) 29%,
|
861 |
-
hsl(199deg 44% 35%) 43%,
|
862 |
-
hsl(175deg 32% 48%) 57%,
|
863 |
-
hsl(151deg 36% 62%) 71%,
|
864 |
-
hsl(128deg 45% 78%) 86%,
|
865 |
-
hsl(104deg 100% 95%) 100%
|
866 |
-
);
|
867 |
}
|
868 |
|
869 |
-
.
|
870 |
display: flex;
|
871 |
flex-direction: column;
|
872 |
justify-content: space-evenly;
|
873 |
-
|
874 |
-
|
875 |
-
|
|
|
876 |
}
|
877 |
|
878 |
-
.
|
879 |
-
|
880 |
-
|
881 |
-
background-image: url("data:image/svg+xml;utf8,<svg id='patternId' width='100%' height='100%' style='opacity: 0.1' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='100' height='100' patternTransform='scale(3) rotate(45)'><rect x='0' y='0' width='100%' height='100%' fill='hsla(0, 0%, 0%, 0)'/><path d='M4.43 0c.17.58.34 1.12.52 1.58.29.76.59 1.51.9 2.25 1.59 3.68 4.3 5.96 8.1 7.2 2.69.88 6.77 1.47 10.1 1.58.14 0-.38-1.66-.93-3.38-.77-2.4-.74-4.74-1.27-7.16-.16-.7-.4-1.4-.7-2.07h-3.37c.19.24.37.49.54.74 1.25 1.83 1.73 4.07 2.07 6.2.17 1.08.33 2.67 1 3.45-.61-.28-3.5-1.2-3.97-1.4-2.94-1.2-5.53-1.08-7.84-3.6C8.21 3.9 7.56 1.96 6.87 0zm22.6 0a30.74 30.74 0 001.89 3.75c.09-1.1.54-2.51.94-3.75zm8.85 0c-3.4 5.03-5.04 11.1-.88 16.5 1.77 2.16 3.52 4.33 5.14 6.6 1.45 2.02 2.6 4.46 4.36 6.23.04.05 2.12-3.78 2.27-4.14.69-1.58 1.25-3.22 1.98-4.79 1.57-3.4 3.8-6.5 5.32-9.89v-.02c1.32-2.95 1.3-6.26 1.2-9.43 0-.25 0-.6-.03-1.06h-2.3a22.37 22.37 0 01.7 4.7 9.7 9.7 0 01-.57 3.33 15.35 15.35 0 01-1.74 3.47c-2.83 4.33-5.16 8.5-7.83 12.67-.33-.71-.58-1.42-.87-2.13l-.07-.15c-.1-.25-.2-.5-.32-.74l-.08-.17a10.11 10.11 0 00-.96-1.5l-.06-.08a12.18 12.18 0 00-.68-.79l-.39-.41a19.1 19.1 0 01-1.13-1.28 9.06 9.06 0 01-.67-.98 18.88 18.88 0 01-1.65-3.29c-.35-.96-.62-1.95-.76-2.96-.11-.8-.15-1.62-.1-2.45.18-2.9 1.5-5.18 3.22-7.24zm26.83 0a23.38 23.38 0 01-.85 3.63c-.46 1.47-1.2 2.97-1.2 4.54 1.79-2.23 4.86-2.88 7.38-3.93 2.63-1.1 5.25-2.37 7.42-4.24zM16.08 18.25c-.28 0-.55 0-.83.02-1.61-.05-3.17.34-4.75.73-1.11.28.44 1.06 2.67 4.17 2.31 3.24 3.84 8.76 8.33 9.66 3.01.6 6.15-.06 9.15-.45.47-.06 6.11-1.02 6.23-.6-.06-.23-.4-.58-1-1.08a22.05 22.05 0 01-4.18-4.47 17.1 17.1 0 00-4.7-4.81 19.07 19.07 0 00-10.92-3.17zm67.25 8.58a45.04 45.04 0 01-6.41 8c-2.57 2.46-5.57 4.03-8.59 5.84-3.22 1.93-4.9 6.23-4.16 9.83 1 5.33 2.16 10.17 2.38 15.35.04.9.45 3.98 1.37 4.98.56-.96 1.91-3.21 2.55-4.1a86.54 86.54 0 018.08-9.4c1.94-2.01 4.3-3.98 5.73-6.41a7.71 7.71 0 001.12-3.62c.27-6.8.6-13.97-2.07-20.47zm-1.16 7.5c-.25 4.67-.59 9.63-1.83 14.22a18.17 18.17 0 01-2.05 5.12c-2.46 3.83-6.12 6.5-9.29 9.83.25-1.92-.33-3.67-.48-5.58-.2-2.76-1.26-5.32-1.55-8.03-.1-.86-.04-1.73.3-2.57 1.16-2.92 4.3-5.4 6.7-7.32 1.52-1.23 7.03-3.83 8.2-5.67zM36.6 39.5c-4.17-.04-7.9 1.7-12.1 2.34-3.65.82-8.63.16-11.9 2.12-1.91 1.14-2.89 3.37-4.2 5.1-1.86 3.1-6 5.72-8.4 8.83v6.22c4.92-2.43 10.42-2.03 15.9-2.13 4.62-.08 10.32-.37 13.46-4.3 1.48-1.86 1.27-4.84 2.03-7.03.88-2.54 2.26-4.87 3.55-7.22.21-.4 1.4-3.25 2.06-3.92l-.4-.01zm-3.68 3.34c-2.77 3.2-5.32 7.08-8.25 12.17a9.54 9.54 0 01-4.7 4.3c-2.12.83-4.84.35-7.06.34a37.4 37.4 0 00-6.3.41c-1.33.22-3.2.37-5.2 1.53.13-.54 1.06-2.06 1.31-2.57 1.26-2.55 3.92-4.68 5.72-6.6 1.98-2.11 4.23-3.97 6.96-5.01 2.27-.87 4.66-1.37 7.04-1.88 2.33-.5 8.9-2.6 10.48-2.69zM100 57.88c-1.56 2.02-2.39 4.25-1.33 6.95.44-.27.88-.51 1.33-.73zM32.75 62.5c-1.75 2-4.07 5.92-5.85 8.13-2.37 2.95-5.05 6.05-5.27 9.84-.17 2.92.85 5.76 1.72 8.5 1.18 3.7 2.15 7.47 3.67 11.03h2.84c.16-.51.32-1 .43-1.4 1.23-4.34 3.72-8.16 6.38-11.77 2.56-3.47 2-8.6.5-12.42-.56-1.4-1.37-2.57-2.18-3.83-.93-1.44-1.26-3.1-1.8-4.7-.21-.66-.44-2.13-.44-3.38zM9.75 81C7.33 82.58 3.1 82.39.22 82.64l-.22.02v6.5c.5.08 1 .15 1.5.17 3.82.18 7.19-5.15 8.25-8.33zm38.58.17a34.68 34.68 0 01-7.05 12.75c-1.15 1.25-2.5 2.4-3.58 3.67-.64.77-1.25 1.58-1.82 2.41h3.1c1.5-1.8 3.32-3.42 4.93-5.12 1.78-1.88 2.79-4.1 3.74-6.38.13-.33.6-1.83.93-2.92 1.4 2.9 2.3 6.78 3.12 9.87.4 1.52.87 3.02 1.25 4.55h2.29c-.12-2.43-.87-8.03-6.9-18.83zm51.67 1.5c-2.4.22-4.95.7-6.92 2.18-.83.62-3.08 3.82-3.41 5.32 1.43-.92 3.08-1.9 4.81-1.94 1.88-.04 3.68.6 5.52.93zm-15.83 1.16a95.53 95.53 0 01-7.97 3.32c-4.2 1.53-9.96 2.46-12.32 6.78-.8 1.46-.94 3.3-1.05 4.94-.03.38-.07.76-.12 1.13h12.75l.39-.35c1.74-1.6 2.91-3.86 4.04-5.92a37.51 37.51 0 004.28-9.9zm-80.7 8.28c-.9 0-1.74.14-2.47.56 1.45 2.27 2.41 4.8 3.36 7.33h2.5a16.57 16.57 0 00-2.03-4.33c1.34 0 2.5 0 3.77-.13.25-.03.5-.04.75-.05 3.43-.06 6.36 1.85 8.43 4.51h3.37a14.48 14.48 0 00-1.76-2.91c-2.43-3.13-5.9-4.06-9.69-4.4-1.97.1-4.24-.58-6.23-.58z' stroke-width='1' stroke='none' fill='hsla(174, 100%, 29%, 1)'/><path d='M38.98 0c-1.72 2.06-3.04 4.34-3.22 7.24-.2 3.3 1.02 6.52 2.85 9.22.86 1.27 2.07 2.21 2.93 3.47.96 1.4 1.3 2.82 1.96 4.24 2.67-4.17 5-8.34 7.83-12.67 1.43-2.19 2.43-4.64 2.3-7.3a22.37 22.37 0 00-.68-4.2zm19.68 0a27.2 27.2 0 01-.12 4.26c-.4 2.95-.95 5.94-.37 8.9 3-.83 4.66-3.66 7.37-4.78C70.23 6.44 74.71 3.82 78.1 0h-2.64c-2.17 1.87-4.8 3.14-7.42 4.24-2.52 1.05-5.59 1.7-7.37 3.93 0-1.57.73-3.07 1.19-4.54.37-1.2.67-2.4.85-3.63zM97.4 6.96c-.03 0-.05.01-.07.04C93.17 15.33 84 23.17 86.9 33.34c1.12 3.97 4.3 6.5 6.73 9.65 2.08 2.7 3.07 5.46 4.42 8.5l1.96-2.86v-4.48c-.48.8-.98 1.56-1.5 2.24-.44-3.45-3.5-7.39-6.17-10.72-1.86-2.23-2.13-5.54-2.15-8.33-.03-6.4 4.9-10.22 7.65-15.5 1 1.1.7 3.71 1.12 5 .38 1.2.71 2.39 1.05 3.58v-9.45l-.12-.42c-.1-.34-2.06-3.54-2.48-3.59zm-97.4 4v9.46c.37 1.3.77 2.61 1.28 3.89 1.12 2.73 3.07 5.38 3.24 8.41.05.94-.1 1.92-.52 2.95a67.51 67.51 0 01-4 8.48v4.48c2.65-3.97 4.22-7 5.88-11.48.62-1.67 1.35-3.51 1.37-5.35.03-2.32-1.44-4.3-2.29-6.25-1.04-2.4-2.47-4.61-3.42-7.05C.58 16.05.68 13.46 0 10.97zm65.04 3.85l-.04.02c-1.35 1.36-3.08 2.3-4.58 3.47-2.34 1.84-3.93 4.46-6.06 6.51-1.37 1.32-2.7 2.75-2.34 4.8.88 4.88 2.09 9.82 5.31 13.72a16.93 16.93 0 011.57-4.14c1.43-2.49 4-3.85 5.97-5.83 2.48-2.48 3.29-5.9 2.8-9.36-.65-3.23-2.16-9.2-2.63-9.19zM91 59.33a36.8 36.8 0 01-3.61 1.65c-1.49.6-3 1.1-4.45 1.8-3.36 1.59-6.83 3.78-8.2 7.36-.7 1.8-1.12 3.58-2.05 5.32-.94 1.76-2.02 3.47-2.69 5.37 1.83-1 5.84-2.2 7.54-2.74 1.7-.54 3.5-.83 5.06-1.76a10.69 10.69 0 004.15-4.89c1.21-2.75.9-5.94 2.24-8.65.68-1.12 1.51-2.29 2.01-3.46zm-68 5.34a40.93 40.93 0 01-7.83 1.66c-3.61.4-7.25.17-10.86.65-1.47.12-2.92.5-4.31 1.1v1.95a16.41 16.41 0 019.19-2.3c2.7.11 5.14.77 7.81.44-.67.66-1.18 1.4-1.49 1.75-1.47 1.7-3 3.43-5.01 4.52a18.8 18.8 0 01-8.72 2.1c-.2.01-.9-.03-1.78-.08v1.6c.83 0 1.66-.02 2.48-.07 3.02-.15 5.92-.56 8.64-1.98a27.4 27.4 0 006.95-5.28 45.84 45.84 0 003.24-3.78c.21-.27 1.1-1.53 1.69-2.28zm77 3.4c-4.42 1.87-8.17 5.82-9.5 10.26 0 0 2.86-.12 3.24-.15 2.02-.14 4.15-.1 6.26-.12v-1.6l-1.57-.08a20.72 20.72 0 00-4.08.13l-.22.05c.37-.98.94-1.78 1.2-2.15a15.34 15.34 0 014.67-4.38zM87.17 80c-1.09.42-4.75 1.51-5.28 1.7-3.44 1.3-6.79 2.81-10.24 4.06-2.6.94-5.22 1.46-7.65 2.85-3.6 2.04-5.33 5.33-5.36 9.41 0 .66 0 1.32.02 1.98h4.05c.05-.37.1-.75.12-1.13.1-1.64.25-3.48 1.05-4.94 2.36-4.32 8.12-5.25 12.32-6.78 2.7-.98 5.36-2.1 7.97-3.32-1 3.5-2.34 6.84-4.28 9.9-1.13 2.06-2.3 4.31-4.04 5.92l-.39.35h2.64c3.1-3.5 5.56-7.71 7.1-12.13A45.45 45.45 0 0087.16 80zm-38.59 5.58c-.33 1.09-.8 2.6-.93 2.92-.95 2.28-1.96 4.5-3.74 6.38-1.61 1.7-3.42 3.32-4.93 5.12h13.97c-.38-1.53-.84-3.03-1.25-4.55-.82-3.1-1.73-6.97-3.12-9.87z' stroke-width='1' stroke='none' fill='hsla(0, 0%, 22%, 1)'/><path d='M80.57 0c-.35.33-.7.66-1.03 1-3.65 3.67-6.35 8.32-6.71 13.57-.16 2.3.06 4.61.3 6.9.24 2.2.98 6.53 1.54 9.7 2.79-2.7 4.55-6.26 7.41-8.86 1.52-1.38 3.2-2.55 4.62-4.04a24.4 24.4 0 003.64-5.12c.77-1.4 1.62-2.83 2.12-4.36l.09-.28c.47-1.61.53-3.3.85-4.94.25-1.24.74-2.42 1.25-3.57h-3.31c-.37.74-.66 1.52-.84 2.32-.34 1.5-.32 3.08-.52 4.6a16.5 16.5 0 01-1.07 4.13 16.93 16.93 0 01-4.28 5.91c-1.57 1.48-3.33 2.74-4.8 4.32-1.46 1.59-2.51 3.49-4 5.05 0-2.63-.43-5.23-.26-7.86.17-2.65.38-5.3.8-7.93.35-2.1.95-4.22 2.4-5.85C80.3 3 82.39 1.8 84.37.68l1.2-.68zm17.26 11.84c-2.74 5.28-7.68 9.1-7.65 15.5.02 2.8.3 6.1 2.15 8.33C95 39 98.06 42.94 98.5 46.39c.52-.68 1.02-1.44 1.5-2.24V20.42c-.34-1.2-.67-2.39-1.05-3.57-.43-1.3-.12-3.9-1.12-5.01zm-89.68 2.4c-1.48-.02-2.94.17-4.32.76 1.88 2.89 4.27 5.44 5.43 8.74 1.07 3.04 1.37 6.31 2.8 9.23 1.54 3.16 4.84 5.14 8.22 5.8 3.66.7 6.91-1.03 10.32-2.05 3.37-1 6.4-2.89 9.82-3.64.86-.19-1.66-3.3-2.9-4.49-.38-.37-.7-.66-.82-.82-1.4-1.7-2.5-3.62-3.44-5.6-1.16-2.47-2.55-4.82-5.31-5.65-4.04-1.22-8.26-1.2-12.43-1.5-2.37-.18-4.9-.76-7.37-.78zm7.93 4.01c4.09-.01 7.75 1.04 10.93 3.17a17.1 17.1 0 014.7 4.81c1.15 1.7 2.6 3.15 4.17 4.47.6.5.94.85 1 1.08-.12-.42-5.76.54-6.23.6-3 .4-6.14 1.06-9.15.45-4.5-.9-6.02-6.42-8.33-9.66-2.23-3.11-3.78-3.9-2.67-4.17a17.51 17.51 0 015.58-.75zM0 20.42v23.73a67.51 67.51 0 004-8.48c.42-1.03.57-2 .52-2.95-.17-3.03-2.12-5.68-3.24-8.41A37.8 37.8 0 010 20.42zm82.17 13.91c-1.17 1.84-6.68 4.44-8.2 5.67-2.4 1.92-5.54 4.4-6.7 7.32-.34.84-.4 1.7-.3 2.57.29 2.71 1.34 5.27 1.55 8.03.15 1.91.73 3.66.48 5.58 3.17-3.33 6.83-6 9.3-9.83.99-1.55 1.56-3.35 2.04-5.12 1.24-4.6 1.58-9.55 1.83-14.22zM44 39.83c-4 5-5.33 13.34-5.67 20-.24 4.96 1.97 10.36 6.54 12.83 1.95 1.05 4.16 1.49 6.19 2.35 1.9.8 3.68 1.8 5.47 2.8 5.22 2.94 6.28 4.63 6.47 4.19 1.33-3.08 1.02-6.82.92-10.02-.05-1.52-.08-3.04-.09-4.56.33-4.86-.2-10.61-4.67-13.53-2.05-1.57-4.7-1.71-6.98-2.75C47.5 49 47 43.5 44 39.84zm-11.08 3c-1.59.09-8.15 2.19-10.48 2.7-2.38.5-4.77 1-7.04 1.87-2.73 1.04-4.98 2.9-6.96 5-1.8 1.93-4.46 4.06-5.72 6.61-.25.5-1.18 2.03-1.3 2.57 2-1.16 3.86-1.31 5.18-1.53a37.4 37.4 0 016.31-.41c2.22.01 4.94.5 7.07-.34a9.54 9.54 0 004.69-4.3c2.94-5.1 5.48-8.96 8.25-12.17zm10.39 2.59c1.52 4.08 4.97 8.29 7.26 9.87 2.13 1.47 4.69 2.17 6.65 3.94 1.75 1.58 2.22 3.48 2.61 5.73.26 1.44 1.19 9.1 1.11 11.32-.55-.84-4.6-2.7-5.12-3.01-3.13-1.8-7.19-2.57-9.88-5.03-3.55-3.25-3.92-8.85-3.75-13.35.08-2.17.71-6.94 1.12-9.47zm53.02 45.75c-.83 1-1.66 1.83-2.66 2.16-1.81.6-3.57 1.32-5.35 2.01A22.3 22.3 0 0083 97.98c-.84.62-1.65 1.3-2.42 2.02h5c2.27-1.29 5.6-3.14 8.37-3.89-.25.39-1.44 1.84-1.69 2.24a18.8 18.8 0 00-.91 1.65h3.3l.17-.36c.91-2.03 2.43-4.4 2.21-6.7a3.21 3.21 0 00-.69-1.77z' stroke-width='1' stroke='none' fill='hsla(199, 59%, 53%, 1)'/><path d='M6.87 0c.69 1.95 1.34 3.9 2.71 5.4 2.31 2.5 4.9 2.4 7.84 3.6.46.19 3.36 1.11 3.97 1.39-.67-.78-.83-2.37-1-3.45-.34-2.13-.82-4.37-2.07-6.2-.17-.25-.35-.5-.54-.74zm17.09 0C25.5 2.97 27.27 5.84 29 8.67c.25-.92.84-2.54 1.07-3.08.76-1.84 1.33-3.73 1.98-5.59h-2.2c-.4 1.24-.84 2.66-.93 3.75A30.74 30.74 0 0127.02 0zm61.6 0l-1.2.68c-1.98 1.1-4.06 2.3-5.58 4.01-1.46 1.63-2.06 3.74-2.4 5.85a83.57 83.57 0 00-.81 7.93c-.17 2.63.26 5.23.26 7.86 1.49-1.56 2.54-3.46 4-5.05 1.47-1.58 3.23-2.84 4.8-4.32 1.8-1.7 3.33-3.6 4.28-5.91.54-1.33.89-2.7 1.07-4.13.2-1.52.18-3.1.52-4.6.18-.8.47-1.58.84-2.32zm-19.4 10.17c-.41.75-2.77 2.88-3.1 3.19a27.62 27.62 0 01-3.93 3.01c-5.3 3.3-11.46 7.8-9.96 14.96 1.5 6.67 3 14.34 9.66 17.5.2-.94.47-1.85.81-2.72a18.7 18.7 0 013.68-5.84c1.56-1.66 3.54-2.83 5.2-4.38 2.46-2.32 1.92-5.43 1.62-8.48-.5-5.02-1.74-9.9-3.02-14.75-.29-.85-.6-1.68-.95-2.5zm-1.12 4.64c.47 0 1.98 5.96 2.63 9.19.49 3.46-.32 6.88-2.8 9.36-1.97 1.98-4.54 3.34-5.97 5.83-.3.53-1.4 2.9-1.57 4.14-3.22-3.9-4.43-8.84-5.3-13.71-.38-2.06.96-3.5 2.33-4.8 2.13-2.06 3.72-4.68 6.06-6.52 1.5-1.18 3.23-2.11 4.58-3.47a.06.06 0 01.04-.02zm-21.73 30.6c-.4 2.54-1.04 7.31-1.12 9.48-.17 4.5.2 10.1 3.75 13.35 2.7 2.46 6.75 3.22 9.88 5.03.52.3 4.57 2.17 5.12 3 .08-2.2-.85-9.87-1.1-11.31-.4-2.25-.87-4.15-2.62-5.73-1.96-1.77-4.52-2.47-6.65-3.94-2.3-1.58-5.74-5.79-7.26-9.87zm-8.48 9.26c-1 2.27-2.31 4.31-3.8 6.21-2.14 2.73-4.73 5.82-7.46 7.97-2.33 2.34-4.7 4.1-5.3 7.54-.75 4.3.7 9.01 1.63 13.1.85 3.7 2.32 7.18 4.06 10.51h3.06c-1.52-3.56-2.49-7.33-3.67-11.04-.87-2.73-1.9-5.57-1.72-8.49.22-3.8 2.9-6.9 5.27-9.84 1.78-2.2 4.1-6.13 5.85-8.13 0 1.25.23 2.72.45 3.38.53 1.6.86 3.26 1.79 4.7.8 1.26 1.62 2.44 2.17 3.83 1.51 3.81 2.07 8.95-.5 12.42-2.65 3.6-5.14 7.43-6.37 11.77-.11.4-.27.89-.43 1.4h2.2c.8-2.31 1.73-4.56 3.32-6.56 2.92-3.7 8.14-7.56 7.12-12.94-1.07-5.6-4.96-10.04-6.68-15.4-.74-2.3-.9-4.75-.97-7.15a68.51 68.51 0 01-.02-3.28zm61.67.5c-2.67 1.58-6.63 2.6-8.93 3.04-3.7.72-8.12 2.56-11.32 5.24a14.57 14.57 0 00-2.65 2.85c-2.63 3.79-3.12 8.75-5.16 12.86-1.02 2.05-2.19 4-3.6 5.84 5.59-1.86 10.9-4.63 16.59-6.2 2.07-.57 4.59-.72 6.22-2.28 1.9-1.81 1.8-4.99 2.44-7.36.87-3.2 2.3-6.2 3.83-9.12.85-1.63 1.74-3.24 2.58-4.87zM91 59.33c-.5 1.17-1.33 2.34-2 3.46-1.34 2.7-1.04 5.9-2.25 8.65a10.69 10.69 0 01-4.15 4.9c-1.55.92-3.35 1.2-5.06 1.75-1.7.54-5.7 1.74-7.54 2.74.67-1.9 1.75-3.6 2.7-5.37.92-1.74 1.35-3.51 2.04-5.32 1.37-3.58 4.84-5.77 8.2-7.37 1.45-.69 2.96-1.19 4.45-1.79A36.8 36.8 0 0091 59.33zM8.68 67.72c-3.1-.04-6.1.76-8.68 2.31v6.43c.88.05 1.57.1 1.78.09a18.8 18.8 0 008.72-2.11c2-1.09 3.54-2.81 5.01-4.52.3-.35.82-1.09 1.49-1.75-2.67.33-5.11-.33-7.81-.44l-.51-.01zM100 70.03a15.34 15.34 0 00-4.67 4.38c-.26.37-.83 1.17-1.2 2.15 1.11-.33 3.96-.2 5.87-.1zm-85.06 7.25a42.2 42.2 0 00-4.37 1.17C8.7 79.2 6.81 80 4.81 80.44c-1.59.34-3.2.5-4.81.68v1.54l.22-.02c2.88-.25 7.11-.06 9.53-1.64-1.06 3.18-4.43 8.5-8.25 8.33-.5-.02-1-.09-1.5-.17v.99c1.44-.04 2.9-.07 4.33-.15 1.82-.1 3.38-1.42 4.17-3 .8-1.61 1.64-3.24 2.54-4.8 1.04-1.77 2.38-3.2 3.9-4.92zM100 81.12c-2.07.23-4.14.47-6.15 1.12-5.18 1.6-5.85 7.6-8.18 11.76 3.83-3.5 9.16-4 13.96-3.84l.37-.01v-1c-1.84-.32-3.64-.96-5.52-.92-1.73.04-3.38 1.02-4.81 1.94.33-1.5 2.58-4.7 3.4-5.32 1.98-1.47 4.53-1.96 6.93-2.19zM9.35 95.5a35.79 35.79 0 01-4.52.18c.95 1.3 1.5 2.81 2.04 4.33h10.91c-2.07-2.66-5-4.57-8.43-4.5zm84.6.62c-2.77.75-6.11 2.6-8.39 3.89h5.78c.27-.57.58-1.12.91-1.65.25-.4 1.44-1.85 1.7-2.24z' stroke-width='1' stroke='none' fill='hsla(199, 100%, 62%, 1)'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
|
882 |
-
|
|
|
|
|
|
|
|
|
|
|
883 |
}
|
884 |
|
885 |
-
.
|
886 |
-
|
887 |
-
background-image: linear-gradient(
|
888 |
-
0deg,
|
889 |
-
hsl(151deg 36% 62%) 0%,
|
890 |
-
hsl(175deg 32% 48%) 14%,
|
891 |
-
hsl(199deg 44% 35%) 29%,
|
892 |
-
hsl(223deg 59% 24%) 57%,
|
893 |
-
hsl(246deg 77% 15%) 86%,
|
894 |
-
hsl(270deg 100% 7%) 100%
|
895 |
-
);
|
896 |
}
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
filter: drop-shadow(0 0.25rem 0.1rem hsl(220 100% 10% / 0.75));
|
901 |
}
|
902 |
-
|
903 |
-
|
904 |
}
|
905 |
|
906 |
-
.
|
907 |
-
|
908 |
-
|
909 |
-
transform: rotateY(90deg) translate3d(0.1px, -59.1px, -39.5px) scale(0.1);
|
910 |
-
clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
|
911 |
}
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
}
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
|
923 |
}
|
924 |
-
.
|
925 |
-
width:
|
926 |
-
|
927 |
-
transform: rotateY(90deg) translate3d(0px, calc(var(--height) - 49px), -39.5px) scale(0.1);
|
928 |
-
clip-path: polygon(0% 0%, 50% 100%, 100% 0%);
|
929 |
}
|
930 |
|
931 |
-
|
|
|
|
|
|
|
|
|
|
|
932 |
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
}
|
940 |
}
|
941 |
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
}
|
946 |
-
100% {
|
947 |
-
transform: rotateX(var(--booster-rx)) rotateY(360deg) rotateZ(0deg) scale(var(--booster-scale));
|
948 |
-
}
|
949 |
}
|
950 |
|
951 |
-
|
952 |
-
|
953 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
954 |
-
scale(var(--booster-scale)) translateY(0%);
|
955 |
-
}
|
956 |
-
30% {
|
957 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
958 |
-
scale(var(--booster-scale)) translateY(-2%);
|
959 |
-
}
|
960 |
-
50% {
|
961 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
962 |
-
scale(var(--booster-scale)) translateY(1%);
|
963 |
-
}
|
964 |
-
70% {
|
965 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
966 |
-
scale(var(--booster-scale)) translateY(-1%);
|
967 |
-
}
|
968 |
-
100% {
|
969 |
-
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
970 |
-
scale(var(--booster-scale)) translateY(0%);
|
971 |
-
}
|
972 |
}
|
973 |
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
}
|
979 |
-
to {
|
980 |
-
transform: rotateZ(-270deg) scale(0);
|
981 |
-
opacity: 0;
|
982 |
-
}
|
983 |
}
|
984 |
|
985 |
-
|
986 |
-
|
|
|
987 |
}
|
988 |
|
989 |
-
|
990 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
991 |
}
|
992 |
|
993 |
-
|
994 |
-
|
|
|
|
|
|
|
995 |
}
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
cursor: default;
|
1000 |
}
|
1001 |
|
1002 |
-
|
1003 |
-
|
|
|
|
|
1004 |
}
|
1005 |
|
1006 |
-
|
1007 |
-
|
|
|
|
|
|
|
|
|
|
|
1008 |
}
|
1009 |
|
1010 |
-
|
1011 |
-
|
|
|
|
|
|
|
|
|
|
|
1012 |
}
|
1013 |
|
1014 |
-
|
1015 |
-
|
|
|
1016 |
}
|
|
|
1 |
:root {
|
|
|
|
|
|
|
|
|
2 |
--card-width: 25rem;
|
|
|
3 |
--theme-primary: hsl(158 100% 33%);
|
4 |
--theme-secondary: hsl(165 67% 48%);
|
5 |
--theme-ternary: hsl(112 46% 75%);
|
|
|
52 |
margin: 0 auto;
|
53 |
}
|
54 |
|
55 |
+
@media (max-width: 500px) {
|
56 |
+
main {
|
57 |
+
padding: 3rem 0;
|
58 |
+
}
|
59 |
+
|
60 |
+
.output .actions {
|
61 |
+
display: flex;
|
62 |
+
width: 90vw;
|
63 |
+
flex-wrap: wrap;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
@media (max-width: 1280px) {
|
68 |
+
.info h1 {
|
69 |
+
font-size: 3rem;
|
70 |
+
}
|
71 |
+
|
72 |
+
.output .pokecard {
|
73 |
+
--card-scale: 0.8;
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
section {
|
78 |
display: grid;
|
79 |
place-items: center;
|
|
|
81 |
box-sizing: border-box;
|
82 |
}
|
83 |
|
84 |
+
/* Info (left) section */
|
85 |
+
|
86 |
.info {
|
87 |
max-width: 35rem;
|
88 |
height: min-content;
|
|
|
127 |
transition: font-size 0.5s ease;
|
128 |
}
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
.info label {
|
131 |
width: 100%;
|
132 |
text-align: center;
|
|
|
149 |
outline-color: white;
|
150 |
}
|
151 |
|
152 |
+
.info input::placeholder {
|
153 |
+
text-align: center;
|
154 |
+
}
|
155 |
+
|
156 |
input:focus {
|
157 |
border-color: transparent;
|
158 |
outline-style: solid;
|
159 |
outline-color: var(--theme-primary);
|
160 |
}
|
161 |
|
|
|
|
|
|
|
|
|
162 |
.info p {
|
163 |
width: 80%;
|
164 |
margin: 3rem auto 0;
|
|
|
171 |
color: var(--theme-subtext);
|
172 |
}
|
173 |
|
174 |
+
/* Output (right) section */
|
175 |
|
176 |
.output {
|
177 |
display: flex;
|
|
|
186 |
justify-content: center;
|
187 |
align-items: center;
|
188 |
gap: 1rem;
|
|
|
189 |
width: 100%;
|
190 |
margin: 1rem auto 1.5rem;
|
|
|
|
|
191 |
}
|
192 |
|
193 |
.output .buttons {
|
194 |
display: contents;
|
195 |
}
|
196 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
button {
|
198 |
padding: 0.5rem 1rem;
|
199 |
border: none;
|
|
|
201 |
background-image: linear-gradient(-90deg, var(--theme-ternary), var(--theme-secondary));
|
202 |
font-weight: bold;
|
203 |
color: white;
|
204 |
+
transform-origin: bottom;
|
205 |
+
transform: translateY(-25%);
|
206 |
transition: transform 0.5s ease, box-shadow 0.1s, outline-offset 0.25s ease-out, filter 0.25s ease-out, opacity 0.25s;
|
207 |
+
transition: transform 0.5s, opacity 0.5s;
|
208 |
whitespace: nowrap;
|
209 |
box-shadow: 0 0.2rem 0.375rem hsl(158 100% 33% / 60%);
|
210 |
filter: saturate(1);
|
211 |
cursor: pointer;
|
212 |
user-select: none;
|
213 |
+
pointer-events: none;
|
214 |
+
opacity: 0;
|
215 |
}
|
216 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
[data-mode='card'][data-state='completed'] button {
|
218 |
transform: translateY(0);
|
219 |
pointer-events: auto;
|
220 |
opacity: 1;
|
221 |
}
|
222 |
|
223 |
+
button:active {
|
224 |
+
transform: translateY(0.1rem);
|
225 |
+
box-shadow: none;
|
226 |
+
}
|
227 |
|
228 |
+
button.toggle-name.off {
|
229 |
+
filter: saturate(0.15);
|
|
|
|
|
|
|
230 |
}
|
231 |
|
232 |
.duration {
|
|
|
249 |
opacity: 1;
|
250 |
}
|
251 |
|
|
|
252 |
.scene {
|
253 |
--scale: 0.9;
|
254 |
height: 40rem;
|
255 |
box-sizing: border-box;
|
256 |
margin: 2rem;
|
257 |
perspective: 100rem;
|
|
|
|
|
258 |
transform-origin: center 40%;
|
259 |
+
transform: scale(var(--scale));
|
260 |
+
transition: transform 0.5s ease-out;
|
261 |
}
|
262 |
|
263 |
+
/* Booster Pack */
|
264 |
+
|
265 |
+
.booster {
|
266 |
+
--booster-rx: 0deg;
|
267 |
+
--booster-ry: 0deg;
|
268 |
+
--booster-rz: -5deg;
|
269 |
+
--booster-scale: 0.7;
|
270 |
+
--width: var(--card-width);
|
271 |
+
--height: calc(var(--card-width) / 66 * 88);
|
272 |
+
--depth: 0.5rem;
|
273 |
+
--bg: hsl(227, 54%, 21%);
|
274 |
+
display: none;
|
275 |
+
position: relative;
|
276 |
+
width: var(--width);
|
277 |
+
height: var(--height);
|
278 |
+
transform-style: preserve-3d;
|
279 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
280 |
+
scale(var(--booster-scale));
|
281 |
+
transition: transform 0.5s ease-in-out;
|
282 |
+
cursor: pointer;
|
283 |
}
|
284 |
|
285 |
+
.booster > div {
|
286 |
+
display: grid;
|
287 |
+
place-items: center;
|
288 |
+
position: absolute;
|
289 |
+
font-size: 5rem;
|
290 |
+
transform-origin: center;
|
291 |
+
user-select: none;
|
292 |
}
|
293 |
+
|
294 |
+
.face:is(.front, .back, .left, .right) {
|
295 |
+
height: var(--height);
|
296 |
+
background-color: var(--bg);
|
297 |
}
|
298 |
|
299 |
+
.face:is(.front, .back, .top, .bottom) {
|
300 |
+
width: var(--width);
|
|
|
|
|
301 |
}
|
302 |
+
.left,
|
303 |
+
.right {
|
304 |
+
width: var(--depth);
|
305 |
}
|
306 |
|
307 |
+
.face:is(.top, .bottom) {
|
308 |
+
height: var(--depth);
|
|
|
|
|
|
|
|
|
|
|
309 |
}
|
310 |
|
311 |
+
.foil {
|
312 |
+
width: var(--width);
|
313 |
+
background-image: linear-gradient(
|
314 |
+
90deg,
|
315 |
+
hsl(0 0% 80%) 0%,
|
316 |
+
hsl(0 0% 84%) 10%,
|
317 |
+
hsl(0 0% 88%) 20%,
|
318 |
+
hsl(0 0% 92%) 30%,
|
319 |
+
hsl(0 0% 96%) 40%,
|
320 |
+
hsl(0 0% 100%) 50%,
|
321 |
+
hsl(0 0% 96%) 60%,
|
322 |
+
hsl(0 0% 92%) 70%,
|
323 |
+
hsl(0 0% 88%) 80%,
|
324 |
+
hsl(0 0% 84%) 90%,
|
325 |
+
hsl(0 0% 80%) 100%
|
326 |
+
);
|
327 |
}
|
328 |
+
.foil.top.flat {
|
329 |
+
height: 20px;
|
330 |
+
transform-origin: bottom;
|
331 |
+
transform: translate3d(0, -30px, 0px) rotateX(0deg);
|
332 |
}
|
333 |
+
.foil.top.flat::after,
|
334 |
+
.foil.bottom.flat::after {
|
335 |
+
content: '';
|
336 |
+
position: absolute;
|
337 |
+
width: var(--width);
|
338 |
+
height: 20px;
|
339 |
+
background: radial-gradient(#ffffff 0%, transparent 50%);
|
340 |
+
background-size: 1% 100%;
|
341 |
}
|
342 |
+
.foil.top.front {
|
343 |
+
height: 11px;
|
344 |
+
transform-origin: bottom;
|
345 |
+
transform: translate3d(0, -11.4px, 3.8px) rotateX(20.5deg);
|
346 |
}
|
347 |
+
.foil.top.back {
|
348 |
+
height: 11px;
|
349 |
+
transform-origin: bottom;
|
350 |
+
transform: translate3d(0, -11.4px, -4px) rotateX(339deg);
|
|
|
351 |
}
|
352 |
+
.face.front {
|
353 |
+
transform: rotateY(0deg) translate3d(0, 0, calc(var(--depth) / 2));
|
|
|
|
|
|
|
354 |
}
|
355 |
+
.face.left {
|
356 |
+
transform: rotateY(90deg) translate3d(0, 0, calc(var(--width) - calc(var(--depth) / 2)));
|
|
|
|
|
|
|
357 |
}
|
358 |
+
.face.back {
|
359 |
+
transform: rotateY(180deg) translate3d(0, 0, calc(var(--depth) / 2)) rotateZ(180deg);
|
360 |
}
|
361 |
+
.face.right {
|
362 |
+
transform: rotateY(-90deg) translate3d(0, 0, calc(var(--depth) / 2));
|
363 |
}
|
364 |
+
.face.top {
|
365 |
+
transform: rotateX(90deg) translate3d(0, 0, calc(var(--depth) / 2));
|
|
|
|
|
|
|
366 |
}
|
367 |
+
.face.bottom {
|
368 |
+
transform: rotateX(-90deg) translate3d(0, 0, calc(var(--height) - calc(var(--depth) / 2)));
|
369 |
}
|
370 |
+
.foil.bottom.flat {
|
371 |
+
height: 20px;
|
372 |
+
transform-origin: top;
|
373 |
+
transform: translate3d(0, calc(var(--height) + 10px), 0px) rotateX(0deg);
|
|
|
374 |
}
|
375 |
+
.foil.bottom.front {
|
376 |
+
height: 11px;
|
377 |
+
transform-origin: top;
|
378 |
+
transform: translate3d(0, var(--height), 3.8px) rotateX(-19.5deg);
|
379 |
+
}
|
380 |
+
.foil.bottom.back {
|
381 |
+
height: 11px;
|
382 |
+
transform-origin: top;
|
383 |
+
transform: translate3d(0, var(--height), -3.8px) rotateX(19.5deg);
|
384 |
}
|
385 |
|
386 |
+
.foil.back.flat {
|
387 |
+
width: 30px;
|
388 |
+
height: var(--height);
|
389 |
+
background-image: linear-gradient(
|
390 |
+
90deg,
|
391 |
+
hsl(0 0% 0%) 0%,
|
392 |
+
hsl(0 0% 10%) 20%,
|
393 |
+
hsl(0 0% 40%) 30%,
|
394 |
+
hsl(0 0% 60%) 40%,
|
395 |
+
hsl(0 0% 86%) 50%,
|
396 |
+
hsl(0 0% 90%) 60%,
|
397 |
+
hsl(0 0% 85%) 80%,
|
398 |
+
hsl(0 0% 90%) 90%,
|
399 |
+
hsl(0 0% 70%) 100%
|
400 |
+
);
|
401 |
+
transform-origin: bottom;
|
402 |
+
transform: translate3d(calc(var(--width) / 2 - 25px), 0px, calc(var(--depth) * -0.50001)) rotateX(0deg);
|
403 |
}
|
404 |
+
.foil.back.flap {
|
405 |
+
width: 30px;
|
406 |
+
height: var(--height);
|
407 |
+
background-image: linear-gradient(
|
408 |
+
90deg,
|
409 |
+
hsl(0 0% 70%) 0%,
|
410 |
+
hsl(0 0% 74%) 10%,
|
411 |
+
hsl(0 0% 78%) 20%,
|
412 |
+
hsl(0 0% 82%) 30%,
|
413 |
+
hsl(0 0% 86%) 40%,
|
414 |
+
hsl(0 0% 90%) 50%,
|
415 |
+
hsl(0 0% 86%) 60%,
|
416 |
+
hsl(0 0% 82%) 70%,
|
417 |
+
hsl(0 0% 78%) 80%,
|
418 |
+
hsl(0 0% 74%) 90%,
|
419 |
+
hsl(0 0% 70%) 100%
|
420 |
+
);
|
421 |
+
transform-origin: center;
|
422 |
+
transform: translate3d(calc(var(--width) / 2 - 25.5px), 0, -8px) rotateY(15deg);
|
423 |
}
|
424 |
|
425 |
+
.foil.back.flap::after {
|
426 |
+
content: '';
|
427 |
+
position: absolute;
|
428 |
+
width: 30px;
|
429 |
+
height: var(--height);
|
430 |
+
background: radial-gradient(#ffffff 0%, transparent 50%);
|
431 |
+
background-size: 100% 0.75%;
|
432 |
}
|
433 |
|
434 |
+
.gradient-bg {
|
435 |
+
background-image: linear-gradient(
|
436 |
+
225deg,
|
437 |
+
hsl(270deg 100% 7%) 0%,
|
438 |
+
hsl(246deg 77% 15%) 14%,
|
439 |
+
hsl(223deg 59% 24%) 29%,
|
440 |
+
hsl(199deg 44% 35%) 43%,
|
441 |
+
hsl(175deg 32% 48%) 57%,
|
442 |
+
hsl(151deg 36% 62%) 71%,
|
443 |
+
hsl(128deg 45% 78%) 86%,
|
444 |
+
hsl(104deg 100% 95%) 100%
|
445 |
+
);
|
446 |
}
|
447 |
|
448 |
+
.face.front {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
display: flex;
|
450 |
flex-direction: column;
|
451 |
+
justify-content: space-evenly;
|
452 |
+
gap: 0.5rem;
|
453 |
+
box-sizing: border-box;
|
454 |
+
padding: 1rem;
|
455 |
+
}
|
456 |
+
|
457 |
+
.face.front,
|
458 |
+
.face.back {
|
459 |
+
background-size: var(--width);
|
460 |
+
background-image: url("data:image/svg+xml;utf8,<svg id='patternId' width='100%' height='100%' style='opacity: 0.1' xmlns='http://www.w3.org/2000/svg'><defs><pattern id='a' patternUnits='userSpaceOnUse' width='100' height='100' patternTransform='scale(3) rotate(45)'><rect x='0' y='0' width='100%' height='100%' fill='hsla(0, 0%, 0%, 0)'/><path d='M4.43 0c.17.58.34 1.12.52 1.58.29.76.59 1.51.9 2.25 1.59 3.68 4.3 5.96 8.1 7.2 2.69.88 6.77 1.47 10.1 1.58.14 0-.38-1.66-.93-3.38-.77-2.4-.74-4.74-1.27-7.16-.16-.7-.4-1.4-.7-2.07h-3.37c.19.24.37.49.54.74 1.25 1.83 1.73 4.07 2.07 6.2.17 1.08.33 2.67 1 3.45-.61-.28-3.5-1.2-3.97-1.4-2.94-1.2-5.53-1.08-7.84-3.6C8.21 3.9 7.56 1.96 6.87 0zm22.6 0a30.74 30.74 0 001.89 3.75c.09-1.1.54-2.51.94-3.75zm8.85 0c-3.4 5.03-5.04 11.1-.88 16.5 1.77 2.16 3.52 4.33 5.14 6.6 1.45 2.02 2.6 4.46 4.36 6.23.04.05 2.12-3.78 2.27-4.14.69-1.58 1.25-3.22 1.98-4.79 1.57-3.4 3.8-6.5 5.32-9.89v-.02c1.32-2.95 1.3-6.26 1.2-9.43 0-.25 0-.6-.03-1.06h-2.3a22.37 22.37 0 01.7 4.7 9.7 9.7 0 01-.57 3.33 15.35 15.35 0 01-1.74 3.47c-2.83 4.33-5.16 8.5-7.83 12.67-.33-.71-.58-1.42-.87-2.13l-.07-.15c-.1-.25-.2-.5-.32-.74l-.08-.17a10.11 10.11 0 00-.96-1.5l-.06-.08a12.18 12.18 0 00-.68-.79l-.39-.41a19.1 19.1 0 01-1.13-1.28 9.06 9.06 0 01-.67-.98 18.88 18.88 0 01-1.65-3.29c-.35-.96-.62-1.95-.76-2.96-.11-.8-.15-1.62-.1-2.45.18-2.9 1.5-5.18 3.22-7.24zm26.83 0a23.38 23.38 0 01-.85 3.63c-.46 1.47-1.2 2.97-1.2 4.54 1.79-2.23 4.86-2.88 7.38-3.93 2.63-1.1 5.25-2.37 7.42-4.24zM16.08 18.25c-.28 0-.55 0-.83.02-1.61-.05-3.17.34-4.75.73-1.11.28.44 1.06 2.67 4.17 2.31 3.24 3.84 8.76 8.33 9.66 3.01.6 6.15-.06 9.15-.45.47-.06 6.11-1.02 6.23-.6-.06-.23-.4-.58-1-1.08a22.05 22.05 0 01-4.18-4.47 17.1 17.1 0 00-4.7-4.81 19.07 19.07 0 00-10.92-3.17zm67.25 8.58a45.04 45.04 0 01-6.41 8c-2.57 2.46-5.57 4.03-8.59 5.84-3.22 1.93-4.9 6.23-4.16 9.83 1 5.33 2.16 10.17 2.38 15.35.04.9.45 3.98 1.37 4.98.56-.96 1.91-3.21 2.55-4.1a86.54 86.54 0 018.08-9.4c1.94-2.01 4.3-3.98 5.73-6.41a7.71 7.71 0 001.12-3.62c.27-6.8.6-13.97-2.07-20.47zm-1.16 7.5c-.25 4.67-.59 9.63-1.83 14.22a18.17 18.17 0 01-2.05 5.12c-2.46 3.83-6.12 6.5-9.29 9.83.25-1.92-.33-3.67-.48-5.58-.2-2.76-1.26-5.32-1.55-8.03-.1-.86-.04-1.73.3-2.57 1.16-2.92 4.3-5.4 6.7-7.32 1.52-1.23 7.03-3.83 8.2-5.67zM36.6 39.5c-4.17-.04-7.9 1.7-12.1 2.34-3.65.82-8.63.16-11.9 2.12-1.91 1.14-2.89 3.37-4.2 5.1-1.86 3.1-6 5.72-8.4 8.83v6.22c4.92-2.43 10.42-2.03 15.9-2.13 4.62-.08 10.32-.37 13.46-4.3 1.48-1.86 1.27-4.84 2.03-7.03.88-2.54 2.26-4.87 3.55-7.22.21-.4 1.4-3.25 2.06-3.92l-.4-.01zm-3.68 3.34c-2.77 3.2-5.32 7.08-8.25 12.17a9.54 9.54 0 01-4.7 4.3c-2.12.83-4.84.35-7.06.34a37.4 37.4 0 00-6.3.41c-1.33.22-3.2.37-5.2 1.53.13-.54 1.06-2.06 1.31-2.57 1.26-2.55 3.92-4.68 5.72-6.6 1.98-2.11 4.23-3.97 6.96-5.01 2.27-.87 4.66-1.37 7.04-1.88 2.33-.5 8.9-2.6 10.48-2.69zM100 57.88c-1.56 2.02-2.39 4.25-1.33 6.95.44-.27.88-.51 1.33-.73zM32.75 62.5c-1.75 2-4.07 5.92-5.85 8.13-2.37 2.95-5.05 6.05-5.27 9.84-.17 2.92.85 5.76 1.72 8.5 1.18 3.7 2.15 7.47 3.67 11.03h2.84c.16-.51.32-1 .43-1.4 1.23-4.34 3.72-8.16 6.38-11.77 2.56-3.47 2-8.6.5-12.42-.56-1.4-1.37-2.57-2.18-3.83-.93-1.44-1.26-3.1-1.8-4.7-.21-.66-.44-2.13-.44-3.38zM9.75 81C7.33 82.58 3.1 82.39.22 82.64l-.22.02v6.5c.5.08 1 .15 1.5.17 3.82.18 7.19-5.15 8.25-8.33zm38.58.17a34.68 34.68 0 01-7.05 12.75c-1.15 1.25-2.5 2.4-3.58 3.67-.64.77-1.25 1.58-1.82 2.41h3.1c1.5-1.8 3.32-3.42 4.93-5.12 1.78-1.88 2.79-4.1 3.74-6.38.13-.33.6-1.83.93-2.92 1.4 2.9 2.3 6.78 3.12 9.87.4 1.52.87 3.02 1.25 4.55h2.29c-.12-2.43-.87-8.03-6.9-18.83zm51.67 1.5c-2.4.22-4.95.7-6.92 2.18-.83.62-3.08 3.82-3.41 5.32 1.43-.92 3.08-1.9 4.81-1.94 1.88-.04 3.68.6 5.52.93zm-15.83 1.16a95.53 95.53 0 01-7.97 3.32c-4.2 1.53-9.96 2.46-12.32 6.78-.8 1.46-.94 3.3-1.05 4.94-.03.38-.07.76-.12 1.13h12.75l.39-.35c1.74-1.6 2.91-3.86 4.04-5.92a37.51 37.51 0 004.28-9.9zm-80.7 8.28c-.9 0-1.74.14-2.47.56 1.45 2.27 2.41 4.8 3.36 7.33h2.5a16.57 16.57 0 00-2.03-4.33c1.34 0 2.5 0 3.77-.13.25-.03.5-.04.75-.05 3.43-.06 6.36 1.85 8.43 4.51h3.37a14.48 14.48 0 00-1.76-2.91c-2.43-3.13-5.9-4.06-9.69-4.4-1.97.1-4.24-.58-6.23-.58z' stroke-width='1' stroke='none' fill='hsla(174, 100%, 29%, 1)'/><path d='M38.98 0c-1.72 2.06-3.04 4.34-3.22 7.24-.2 3.3 1.02 6.52 2.85 9.22.86 1.27 2.07 2.21 2.93 3.47.96 1.4 1.3 2.82 1.96 4.24 2.67-4.17 5-8.34 7.83-12.67 1.43-2.19 2.43-4.64 2.3-7.3a22.37 22.37 0 00-.68-4.2zm19.68 0a27.2 27.2 0 01-.12 4.26c-.4 2.95-.95 5.94-.37 8.9 3-.83 4.66-3.66 7.37-4.78C70.23 6.44 74.71 3.82 78.1 0h-2.64c-2.17 1.87-4.8 3.14-7.42 4.24-2.52 1.05-5.59 1.7-7.37 3.93 0-1.57.73-3.07 1.19-4.54.37-1.2.67-2.4.85-3.63zM97.4 6.96c-.03 0-.05.01-.07.04C93.17 15.33 84 23.17 86.9 33.34c1.12 3.97 4.3 6.5 6.73 9.65 2.08 2.7 3.07 5.46 4.42 8.5l1.96-2.86v-4.48c-.48.8-.98 1.56-1.5 2.24-.44-3.45-3.5-7.39-6.17-10.72-1.86-2.23-2.13-5.54-2.15-8.33-.03-6.4 4.9-10.22 7.65-15.5 1 1.1.7 3.71 1.12 5 .38 1.2.71 2.39 1.05 3.58v-9.45l-.12-.42c-.1-.34-2.06-3.54-2.48-3.59zm-97.4 4v9.46c.37 1.3.77 2.61 1.28 3.89 1.12 2.73 3.07 5.38 3.24 8.41.05.94-.1 1.92-.52 2.95a67.51 67.51 0 01-4 8.48v4.48c2.65-3.97 4.22-7 5.88-11.48.62-1.67 1.35-3.51 1.37-5.35.03-2.32-1.44-4.3-2.29-6.25-1.04-2.4-2.47-4.61-3.42-7.05C.58 16.05.68 13.46 0 10.97zm65.04 3.85l-.04.02c-1.35 1.36-3.08 2.3-4.58 3.47-2.34 1.84-3.93 4.46-6.06 6.51-1.37 1.32-2.7 2.75-2.34 4.8.88 4.88 2.09 9.82 5.31 13.72a16.93 16.93 0 011.57-4.14c1.43-2.49 4-3.85 5.97-5.83 2.48-2.48 3.29-5.9 2.8-9.36-.65-3.23-2.16-9.2-2.63-9.19zM91 59.33a36.8 36.8 0 01-3.61 1.65c-1.49.6-3 1.1-4.45 1.8-3.36 1.59-6.83 3.78-8.2 7.36-.7 1.8-1.12 3.58-2.05 5.32-.94 1.76-2.02 3.47-2.69 5.37 1.83-1 5.84-2.2 7.54-2.74 1.7-.54 3.5-.83 5.06-1.76a10.69 10.69 0 004.15-4.89c1.21-2.75.9-5.94 2.24-8.65.68-1.12 1.51-2.29 2.01-3.46zm-68 5.34a40.93 40.93 0 01-7.83 1.66c-3.61.4-7.25.17-10.86.65-1.47.12-2.92.5-4.31 1.1v1.95a16.41 16.41 0 019.19-2.3c2.7.11 5.14.77 7.81.44-.67.66-1.18 1.4-1.49 1.75-1.47 1.7-3 3.43-5.01 4.52a18.8 18.8 0 01-8.72 2.1c-.2.01-.9-.03-1.78-.08v1.6c.83 0 1.66-.02 2.48-.07 3.02-.15 5.92-.56 8.64-1.98a27.4 27.4 0 006.95-5.28 45.84 45.84 0 003.24-3.78c.21-.27 1.1-1.53 1.69-2.28zm77 3.4c-4.42 1.87-8.17 5.82-9.5 10.26 0 0 2.86-.12 3.24-.15 2.02-.14 4.15-.1 6.26-.12v-1.6l-1.57-.08a20.72 20.72 0 00-4.08.13l-.22.05c.37-.98.94-1.78 1.2-2.15a15.34 15.34 0 014.67-4.38zM87.17 80c-1.09.42-4.75 1.51-5.28 1.7-3.44 1.3-6.79 2.81-10.24 4.06-2.6.94-5.22 1.46-7.65 2.85-3.6 2.04-5.33 5.33-5.36 9.41 0 .66 0 1.32.02 1.98h4.05c.05-.37.1-.75.12-1.13.1-1.64.25-3.48 1.05-4.94 2.36-4.32 8.12-5.25 12.32-6.78 2.7-.98 5.36-2.1 7.97-3.32-1 3.5-2.34 6.84-4.28 9.9-1.13 2.06-2.3 4.31-4.04 5.92l-.39.35h2.64c3.1-3.5 5.56-7.71 7.1-12.13A45.45 45.45 0 0087.16 80zm-38.59 5.58c-.33 1.09-.8 2.6-.93 2.92-.95 2.28-1.96 4.5-3.74 6.38-1.61 1.7-3.42 3.32-4.93 5.12h13.97c-.38-1.53-.84-3.03-1.25-4.55-.82-3.1-1.73-6.97-3.12-9.87z' stroke-width='1' stroke='none' fill='hsla(0, 0%, 22%, 1)'/><path d='M80.57 0c-.35.33-.7.66-1.03 1-3.65 3.67-6.35 8.32-6.71 13.57-.16 2.3.06 4.61.3 6.9.24 2.2.98 6.53 1.54 9.7 2.79-2.7 4.55-6.26 7.41-8.86 1.52-1.38 3.2-2.55 4.62-4.04a24.4 24.4 0 003.64-5.12c.77-1.4 1.62-2.83 2.12-4.36l.09-.28c.47-1.61.53-3.3.85-4.94.25-1.24.74-2.42 1.25-3.57h-3.31c-.37.74-.66 1.52-.84 2.32-.34 1.5-.32 3.08-.52 4.6a16.5 16.5 0 01-1.07 4.13 16.93 16.93 0 01-4.28 5.91c-1.57 1.48-3.33 2.74-4.8 4.32-1.46 1.59-2.51 3.49-4 5.05 0-2.63-.43-5.23-.26-7.86.17-2.65.38-5.3.8-7.93.35-2.1.95-4.22 2.4-5.85C80.3 3 82.39 1.8 84.37.68l1.2-.68zm17.26 11.84c-2.74 5.28-7.68 9.1-7.65 15.5.02 2.8.3 6.1 2.15 8.33C95 39 98.06 42.94 98.5 46.39c.52-.68 1.02-1.44 1.5-2.24V20.42c-.34-1.2-.67-2.39-1.05-3.57-.43-1.3-.12-3.9-1.12-5.01zm-89.68 2.4c-1.48-.02-2.94.17-4.32.76 1.88 2.89 4.27 5.44 5.43 8.74 1.07 3.04 1.37 6.31 2.8 9.23 1.54 3.16 4.84 5.14 8.22 5.8 3.66.7 6.91-1.03 10.32-2.05 3.37-1 6.4-2.89 9.82-3.64.86-.19-1.66-3.3-2.9-4.49-.38-.37-.7-.66-.82-.82-1.4-1.7-2.5-3.62-3.44-5.6-1.16-2.47-2.55-4.82-5.31-5.65-4.04-1.22-8.26-1.2-12.43-1.5-2.37-.18-4.9-.76-7.37-.78zm7.93 4.01c4.09-.01 7.75 1.04 10.93 3.17a17.1 17.1 0 014.7 4.81c1.15 1.7 2.6 3.15 4.17 4.47.6.5.94.85 1 1.08-.12-.42-5.76.54-6.23.6-3 .4-6.14 1.06-9.15.45-4.5-.9-6.02-6.42-8.33-9.66-2.23-3.11-3.78-3.9-2.67-4.17a17.51 17.51 0 015.58-.75zM0 20.42v23.73a67.51 67.51 0 004-8.48c.42-1.03.57-2 .52-2.95-.17-3.03-2.12-5.68-3.24-8.41A37.8 37.8 0 010 20.42zm82.17 13.91c-1.17 1.84-6.68 4.44-8.2 5.67-2.4 1.92-5.54 4.4-6.7 7.32-.34.84-.4 1.7-.3 2.57.29 2.71 1.34 5.27 1.55 8.03.15 1.91.73 3.66.48 5.58 3.17-3.33 6.83-6 9.3-9.83.99-1.55 1.56-3.35 2.04-5.12 1.24-4.6 1.58-9.55 1.83-14.22zM44 39.83c-4 5-5.33 13.34-5.67 20-.24 4.96 1.97 10.36 6.54 12.83 1.95 1.05 4.16 1.49 6.19 2.35 1.9.8 3.68 1.8 5.47 2.8 5.22 2.94 6.28 4.63 6.47 4.19 1.33-3.08 1.02-6.82.92-10.02-.05-1.52-.08-3.04-.09-4.56.33-4.86-.2-10.61-4.67-13.53-2.05-1.57-4.7-1.71-6.98-2.75C47.5 49 47 43.5 44 39.84zm-11.08 3c-1.59.09-8.15 2.19-10.48 2.7-2.38.5-4.77 1-7.04 1.87-2.73 1.04-4.98 2.9-6.96 5-1.8 1.93-4.46 4.06-5.72 6.61-.25.5-1.18 2.03-1.3 2.57 2-1.16 3.86-1.31 5.18-1.53a37.4 37.4 0 016.31-.41c2.22.01 4.94.5 7.07-.34a9.54 9.54 0 004.69-4.3c2.94-5.1 5.48-8.96 8.25-12.17zm10.39 2.59c1.52 4.08 4.97 8.29 7.26 9.87 2.13 1.47 4.69 2.17 6.65 3.94 1.75 1.58 2.22 3.48 2.61 5.73.26 1.44 1.19 9.1 1.11 11.32-.55-.84-4.6-2.7-5.12-3.01-3.13-1.8-7.19-2.57-9.88-5.03-3.55-3.25-3.92-8.85-3.75-13.35.08-2.17.71-6.94 1.12-9.47zm53.02 45.75c-.83 1-1.66 1.83-2.66 2.16-1.81.6-3.57 1.32-5.35 2.01A22.3 22.3 0 0083 97.98c-.84.62-1.65 1.3-2.42 2.02h5c2.27-1.29 5.6-3.14 8.37-3.89-.25.39-1.44 1.84-1.69 2.24a18.8 18.8 0 00-.91 1.65h3.3l.17-.36c.91-2.03 2.43-4.4 2.21-6.7a3.21 3.21 0 00-.69-1.77z' stroke-width='1' stroke='none' fill='hsla(199, 59%, 53%, 1)'/><path d='M6.87 0c.69 1.95 1.34 3.9 2.71 5.4 2.31 2.5 4.9 2.4 7.84 3.6.46.19 3.36 1.11 3.97 1.39-.67-.78-.83-2.37-1-3.45-.34-2.13-.82-4.37-2.07-6.2-.17-.25-.35-.5-.54-.74zm17.09 0C25.5 2.97 27.27 5.84 29 8.67c.25-.92.84-2.54 1.07-3.08.76-1.84 1.33-3.73 1.98-5.59h-2.2c-.4 1.24-.84 2.66-.93 3.75A30.74 30.74 0 0127.02 0zm61.6 0l-1.2.68c-1.98 1.1-4.06 2.3-5.58 4.01-1.46 1.63-2.06 3.74-2.4 5.85a83.57 83.57 0 00-.81 7.93c-.17 2.63.26 5.23.26 7.86 1.49-1.56 2.54-3.46 4-5.05 1.47-1.58 3.23-2.84 4.8-4.32 1.8-1.7 3.33-3.6 4.28-5.91.54-1.33.89-2.7 1.07-4.13.2-1.52.18-3.1.52-4.6.18-.8.47-1.58.84-2.32zm-19.4 10.17c-.41.75-2.77 2.88-3.1 3.19a27.62 27.62 0 01-3.93 3.01c-5.3 3.3-11.46 7.8-9.96 14.96 1.5 6.67 3 14.34 9.66 17.5.2-.94.47-1.85.81-2.72a18.7 18.7 0 013.68-5.84c1.56-1.66 3.54-2.83 5.2-4.38 2.46-2.32 1.92-5.43 1.62-8.48-.5-5.02-1.74-9.9-3.02-14.75-.29-.85-.6-1.68-.95-2.5zm-1.12 4.64c.47 0 1.98 5.96 2.63 9.19.49 3.46-.32 6.88-2.8 9.36-1.97 1.98-4.54 3.34-5.97 5.83-.3.53-1.4 2.9-1.57 4.14-3.22-3.9-4.43-8.84-5.3-13.71-.38-2.06.96-3.5 2.33-4.8 2.13-2.06 3.72-4.68 6.06-6.52 1.5-1.18 3.23-2.11 4.58-3.47a.06.06 0 01.04-.02zm-21.73 30.6c-.4 2.54-1.04 7.31-1.12 9.48-.17 4.5.2 10.1 3.75 13.35 2.7 2.46 6.75 3.22 9.88 5.03.52.3 4.57 2.17 5.12 3 .08-2.2-.85-9.87-1.1-11.31-.4-2.25-.87-4.15-2.62-5.73-1.96-1.77-4.52-2.47-6.65-3.94-2.3-1.58-5.74-5.79-7.26-9.87zm-8.48 9.26c-1 2.27-2.31 4.31-3.8 6.21-2.14 2.73-4.73 5.82-7.46 7.97-2.33 2.34-4.7 4.1-5.3 7.54-.75 4.3.7 9.01 1.63 13.1.85 3.7 2.32 7.18 4.06 10.51h3.06c-1.52-3.56-2.49-7.33-3.67-11.04-.87-2.73-1.9-5.57-1.72-8.49.22-3.8 2.9-6.9 5.27-9.84 1.78-2.2 4.1-6.13 5.85-8.13 0 1.25.23 2.72.45 3.38.53 1.6.86 3.26 1.79 4.7.8 1.26 1.62 2.44 2.17 3.83 1.51 3.81 2.07 8.95-.5 12.42-2.65 3.6-5.14 7.43-6.37 11.77-.11.4-.27.89-.43 1.4h2.2c.8-2.31 1.73-4.56 3.32-6.56 2.92-3.7 8.14-7.56 7.12-12.94-1.07-5.6-4.96-10.04-6.68-15.4-.74-2.3-.9-4.75-.97-7.15a68.51 68.51 0 01-.02-3.28zm61.67.5c-2.67 1.58-6.63 2.6-8.93 3.04-3.7.72-8.12 2.56-11.32 5.24a14.57 14.57 0 00-2.65 2.85c-2.63 3.79-3.12 8.75-5.16 12.86-1.02 2.05-2.19 4-3.6 5.84 5.59-1.86 10.9-4.63 16.59-6.2 2.07-.57 4.59-.72 6.22-2.28 1.9-1.81 1.8-4.99 2.44-7.36.87-3.2 2.3-6.2 3.83-9.12.85-1.63 1.74-3.24 2.58-4.87zM91 59.33c-.5 1.17-1.33 2.34-2 3.46-1.34 2.7-1.04 5.9-2.25 8.65a10.69 10.69 0 01-4.15 4.9c-1.55.92-3.35 1.2-5.06 1.75-1.7.54-5.7 1.74-7.54 2.74.67-1.9 1.75-3.6 2.7-5.37.92-1.74 1.35-3.51 2.04-5.32 1.37-3.58 4.84-5.77 8.2-7.37 1.45-.69 2.96-1.19 4.45-1.79A36.8 36.8 0 0091 59.33zM8.68 67.72c-3.1-.04-6.1.76-8.68 2.31v6.43c.88.05 1.57.1 1.78.09a18.8 18.8 0 008.72-2.11c2-1.09 3.54-2.81 5.01-4.52.3-.35.82-1.09 1.49-1.75-2.67.33-5.11-.33-7.81-.44l-.51-.01zM100 70.03a15.34 15.34 0 00-4.67 4.38c-.26.37-.83 1.17-1.2 2.15 1.11-.33 3.96-.2 5.87-.1zm-85.06 7.25a42.2 42.2 0 00-4.37 1.17C8.7 79.2 6.81 80 4.81 80.44c-1.59.34-3.2.5-4.81.68v1.54l.22-.02c2.88-.25 7.11-.06 9.53-1.64-1.06 3.18-4.43 8.5-8.25 8.33-.5-.02-1-.09-1.5-.17v.99c1.44-.04 2.9-.07 4.33-.15 1.82-.1 3.38-1.42 4.17-3 .8-1.61 1.64-3.24 2.54-4.8 1.04-1.77 2.38-3.2 3.9-4.92zM100 81.12c-2.07.23-4.14.47-6.15 1.12-5.18 1.6-5.85 7.6-8.18 11.76 3.83-3.5 9.16-4 13.96-3.84l.37-.01v-1c-1.84-.32-3.64-.96-5.52-.92-1.73.04-3.38 1.02-4.81 1.94.33-1.5 2.58-4.7 3.4-5.32 1.98-1.47 4.53-1.96 6.93-2.19zM9.35 95.5a35.79 35.79 0 01-4.52.18c.95 1.3 1.5 2.81 2.04 4.33h10.91c-2.07-2.66-5-4.57-8.43-4.5zm84.6.62c-2.77.75-6.11 2.6-8.39 3.89h5.78c.27-.57.58-1.12.91-1.65.25-.4 1.44-1.85 1.7-2.24z' stroke-width='1' stroke='none' fill='hsla(199, 100%, 62%, 1)'/></pattern></defs><rect width='800%' height='800%' transform='translate(0,0)' fill='url(%23a)'/></svg>");
|
461 |
+
background-position: center;
|
462 |
+
}
|
463 |
+
|
464 |
+
.face.right,
|
465 |
+
.face.left {
|
466 |
background-image: linear-gradient(
|
467 |
+
0deg,
|
468 |
+
hsl(151deg 36% 62%) 0%,
|
469 |
+
hsl(175deg 32% 48%) 14%,
|
470 |
+
hsl(199deg 44% 35%) 29%,
|
471 |
+
hsl(223deg 59% 24%) 57%,
|
472 |
+
hsl(246deg 77% 15%) 86%,
|
473 |
+
hsl(270deg 100% 7%) 100%
|
474 |
);
|
|
|
|
|
|
|
|
|
475 |
}
|
476 |
|
477 |
+
img.title {
|
478 |
+
width: 100%;
|
479 |
+
filter: drop-shadow(0 0.25rem 0.1rem hsl(220 100% 10% / 0.75));
|
480 |
}
|
481 |
+
img.hf-logo {
|
482 |
+
width: 90%;
|
483 |
}
|
484 |
|
485 |
+
.triangle {
|
486 |
+
width: calc(var(--depth) * 10);
|
487 |
+
aspect-ratio: 1 / 1.35;
|
|
|
488 |
}
|
489 |
|
490 |
+
.triangle.top {
|
491 |
+
clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
|
492 |
}
|
493 |
+
.triangle.bottom {
|
494 |
+
clip-path: polygon(0% 100%, 50% 0%, 100% 100%);
|
495 |
}
|
496 |
+
|
497 |
+
.triangle.top.right {
|
498 |
+
transform: rotateY(90deg) translate3d(0.1px, -59.1px, -39.5px) scale(0.1);
|
499 |
+
|
500 |
+
}
|
501 |
+
.triangle.top.left {
|
502 |
+
transform: rotateY(90deg) translate3d(0.1px, -59.1px, calc(var(--width) - 41.5px)) scale(0.1);
|
503 |
+
}
|
504 |
+
.triangle.bottom.left {
|
505 |
+
transform: rotateY(90deg) translate3d(0.1px, calc(var(--height) - 49px), calc(var(--width) - 41.5px)) scale(0.1);
|
506 |
+
}
|
507 |
+
.triangle.bottom.right {
|
508 |
+
transform: rotateY(90deg) translate3d(0px, calc(var(--height) - 49px), -39.5px) scale(0.1);
|
509 |
}
|
510 |
|
511 |
+
/* Animation */
|
512 |
+
|
513 |
+
@keyframes spin-x {
|
514 |
+
from {
|
515 |
+
transform: scale(var(--scale)) rotate(0turn);
|
516 |
+
}
|
517 |
+
to {
|
518 |
+
transform: scale(var(--scale)) rotate(1turn);
|
519 |
+
}
|
520 |
}
|
521 |
|
522 |
+
@keyframes spin-y {
|
523 |
+
0% {
|
524 |
+
transform: rotateX(var(--booster-rx)) rotateY(0deg) rotateZ(0deg) scale(var(--booster-scale));
|
525 |
+
}
|
526 |
+
100% {
|
527 |
+
transform: rotateX(var(--booster-rx)) rotateY(360deg) rotateZ(0deg) scale(var(--booster-scale));
|
528 |
+
}
|
529 |
}
|
530 |
|
531 |
+
@keyframes bounce {
|
532 |
+
0% {
|
533 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
534 |
+
scale(var(--booster-scale)) translateY(0%);
|
535 |
+
}
|
536 |
+
30% {
|
537 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
538 |
+
scale(var(--booster-scale)) translateY(-2%);
|
539 |
+
}
|
540 |
+
50% {
|
541 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
542 |
+
scale(var(--booster-scale)) translateY(1%);
|
543 |
+
}
|
544 |
+
70% {
|
545 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
546 |
+
scale(var(--booster-scale)) translateY(-1%);
|
547 |
+
}
|
548 |
+
100% {
|
549 |
+
transform: rotateX(var(--booster-rx)) rotateY(var(--booster-ry)) rotateZ(var(--booster-rz))
|
550 |
+
scale(var(--booster-scale)) translateY(0%);
|
551 |
+
}
|
552 |
}
|
553 |
|
554 |
+
@keyframes shrink {
|
555 |
+
from {
|
556 |
+
transform: rotateZ(-45deg) scale(var(--booster-scale));
|
557 |
+
opacity: 1;
|
558 |
+
}
|
559 |
+
to {
|
560 |
+
transform: rotateZ(-270deg) scale(0);
|
561 |
+
opacity: 0;
|
562 |
+
}
|
563 |
}
|
564 |
|
565 |
+
[data-mode='booster']:is([data-state='ready'], [data-state='generating'], [data-state='completed']) .booster {
|
566 |
+
display: block;
|
|
|
567 |
}
|
568 |
|
569 |
+
[data-state='ready'] .booster {
|
570 |
+
animation: 5s bounce infinite ease-out;
|
|
|
571 |
}
|
572 |
|
573 |
+
[data-state='generating'] .scene {
|
574 |
+
animation: 15s spin-x infinite linear;
|
575 |
+
}
|
576 |
+
[data-state='generating'] .booster {
|
577 |
+
transform-origin: center;
|
578 |
+
animation: 3s spin-y infinite linear;
|
579 |
+
cursor: default;
|
580 |
}
|
581 |
|
582 |
+
[data-mode='booster'][data-state='completed'] .booster {
|
583 |
+
animation: 0.5s shrink ease-out forwards;
|
|
|
|
|
|
|
584 |
}
|
585 |
|
586 |
+
[data-mode='booster'][data-state='completed'] .card-slot {
|
587 |
+
transform: scale(0);
|
|
|
588 |
}
|
589 |
|
590 |
+
[data-mode='card'][data-state='completed'] .booster {
|
591 |
+
--booster-scale: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
}
|
593 |
|
594 |
+
[data-mode='card'][data-state='completed'] .card-slot {
|
595 |
+
transform: scale(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
}
|
597 |
|
|
|
|
|
|
|
598 |
|
599 |
+
/* Pokémon Card */
|
|
|
|
|
|
|
|
|
|
|
600 |
|
601 |
+
.card-slot {
|
602 |
+
perspective: 100rem;
|
603 |
+
transition: transform 0.5s ease-out;
|
604 |
}
|
605 |
|
606 |
+
.grass {
|
607 |
+
--h: 90;
|
608 |
+
--s: 60%;
|
609 |
+
--l: 40%;
|
610 |
}
|
611 |
+
.grass.energy {
|
612 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(55deg) drop-shadow(0 0 0.1rem green);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
613 |
}
|
614 |
|
615 |
+
.fire {
|
616 |
+
--h: 0;
|
617 |
+
--s: 75%;
|
618 |
+
--l: 45%;
|
619 |
+
}
|
620 |
+
.fire.energy {
|
621 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(335deg) drop-shadow(0 0 0.1rem red);
|
|
|
|
|
|
|
622 |
}
|
623 |
|
624 |
+
.water {
|
625 |
+
--h: 210;
|
626 |
+
--s: 100%;
|
627 |
+
--l: 58%;
|
628 |
}
|
629 |
+
.water.energy {
|
630 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(180deg) drop-shadow(0 0 0.1rem cyan);
|
|
|
631 |
}
|
632 |
+
|
633 |
+
.lightning {
|
634 |
+
--h: 50;
|
635 |
+
--s: 100%;
|
636 |
+
--l: 58%;
|
637 |
+
}
|
638 |
+
.lightning.energy {
|
639 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(5deg) drop-shadow(0 0 0.1rem gold);
|
640 |
}
|
641 |
|
642 |
+
.fighting {
|
643 |
+
--h: 25;
|
644 |
+
--s: 72%;
|
645 |
+
--l: 36%;
|
646 |
+
}
|
647 |
+
.fighting.energy {
|
648 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(320deg) drop-shadow(0 0 0.1rem brown);
|
649 |
}
|
650 |
|
651 |
+
.psychic {
|
652 |
+
--h: 299;
|
653 |
+
--s: 43%;
|
654 |
+
--l: 44%;
|
655 |
+
}
|
656 |
+
.psychic.energy {
|
657 |
+
filter: grayscale(1) sepia(1) saturate(10) hue-rotate(240deg) drop-shadow(0 0 0.1rem purple);
|
658 |
}
|
659 |
|
660 |
+
.colorless {
|
661 |
+
--h: 21;
|
662 |
+
--s: 27%;
|
663 |
+
--l: 85%;
|
664 |
}
|
665 |
+
.colorless.energy {
|
666 |
+
border-radius: 50%;
|
667 |
+
background-color: hsl(0 0% 100% / 15%);
|
668 |
+
font-size: 0.9em;
|
669 |
+
filter: contrast(100) grayscale(1) drop-shadow(0 0 0.1rem white);
|
670 |
}
|
671 |
|
672 |
+
.darkness {
|
673 |
+
--h: 100;
|
674 |
+
--s: 3%;
|
675 |
+
--l: 17%;
|
676 |
+
}
|
677 |
+
.darkness.energy {
|
678 |
+
filter: drop-shadow(0 0 0.1rem black);
|
679 |
+
}
|
680 |
+
.darkness :not(.species) {
|
681 |
+
color: whitesmoke;
|
682 |
}
|
683 |
|
684 |
+
.metal {
|
685 |
+
--h: 240;
|
686 |
+
--s: 20%;
|
687 |
+
--l: 77%;
|
688 |
+
}
|
689 |
+
.metal.energy {
|
690 |
+
filter: drop-shadow(0 0 0.1rem silver);
|
691 |
}
|
692 |
|
693 |
+
.dragon {
|
694 |
+
--h: 30;
|
695 |
+
--s: 6%;
|
696 |
+
--l: 44%;
|
697 |
+
}
|
698 |
+
.dragon.energy {
|
699 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(15deg) drop-shadow(0 0 0.1rem gold);
|
700 |
}
|
701 |
|
702 |
+
.fairy {
|
703 |
+
--h: 334;
|
704 |
+
--s: 74%;
|
705 |
+
--l: 55%;
|
706 |
+
}
|
707 |
+
.fairy.energy {
|
708 |
+
filter: contrast(0.75) grayscale(1) sepia(1) saturate(10) hue-rotate(300deg) drop-shadow(0 0 0.1rem pink);
|
709 |
}
|
710 |
|
711 |
+
.pokecard,
|
712 |
+
.pokecard * {
|
713 |
+
box-sizing: border-box;
|
|
|
714 |
}
|
715 |
|
716 |
+
.pokecard {
|
717 |
+
--frame-h: 47;
|
718 |
+
--frame-s: 95%;
|
719 |
+
--frame-l: 58%;
|
720 |
+
--frame-color: hsl(47 95% 58%);
|
721 |
+
--color: hsl(var(--h) var(--s) var(--l));
|
722 |
+
--lighter: hsl(var(--h) var(--s) calc(var(--l) + 10%));
|
723 |
+
--lightest: hsl(var(--h) var(--s) calc(var(--l) + 30%));
|
724 |
+
--card-rx: 0deg;
|
725 |
+
--card-ry: 0deg;
|
726 |
+
--card-rz: 0deg;
|
727 |
+
--card-scale: 1;
|
728 |
+
display: flex;
|
729 |
+
flex-direction: column;
|
730 |
+
width: 25rem;
|
731 |
+
height: 35rem;
|
732 |
+
padding: 0.5rem 1rem 0.1rem;
|
733 |
+
border: 1rem solid;
|
734 |
+
border-radius: 0.75rem;
|
735 |
+
border-color: var(--frame-color);
|
736 |
+
background-image: linear-gradient(
|
737 |
+
45deg,
|
738 |
+
var(--lighter) 0%,
|
739 |
+
var(--lightest) 15%,
|
740 |
+
var(--lightest) 30%,
|
741 |
+
var(--color) 50%,
|
742 |
+
var(--lightest) 90%,
|
743 |
+
var(--lighter) 100%
|
744 |
+
);
|
745 |
+
transform-style: preserve-3d;
|
746 |
+
transform-origin: center;
|
747 |
+
transform: rotateX(var(--card-rx)) rotateY(var(--card-ry)) scale(var(--card-scale));
|
748 |
+
transition: transform 0.5s ease-out;
|
749 |
}
|
750 |
|
751 |
+
.pokecard[data-displayed='true'] {
|
752 |
display: flex;
|
753 |
+
}
|
754 |
+
.pokecard[data-displayed='false'] {
|
755 |
+
display: none;
|
|
|
|
|
|
|
|
|
756 |
}
|
757 |
|
758 |
+
.pokecard .lower-half {
|
759 |
display: flex;
|
760 |
flex-direction: column;
|
761 |
+
height: 100%;
|
|
|
762 |
}
|
763 |
|
764 |
+
.pokecard :where(header, p) {
|
765 |
+
font-family: 'Gill Sans', 'Gill Sans Mt', 'sans-serif';
|
766 |
}
|
767 |
+
.pokecard :is(.evolves) {
|
768 |
+
font-family: 'Century Gothic', 'sans-serif';
|
|
|
|
|
|
|
769 |
}
|
770 |
+
.pokecard :where(header, p) {
|
771 |
+
font-family: 'Gill Sans', 'Gill Sans Mt';
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
}
|
773 |
|
774 |
+
.evolves {
|
775 |
+
margin: 0;
|
|
|
|
|
|
|
776 |
font-size: 0.6rem;
|
777 |
font-weight: bold;
|
778 |
}
|
779 |
|
780 |
+
header {
|
781 |
+
display: flex;
|
782 |
+
flex-direction: row;
|
783 |
+
justify-content: space-between;
|
784 |
+
min-height: 1.4rem;
|
785 |
}
|
786 |
|
787 |
+
header > * {
|
788 |
+
display: inline-block;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
789 |
}
|
790 |
|
791 |
+
.name {
|
792 |
+
display: inline-block;
|
793 |
+
justify-self: left;
|
794 |
position: absolute;
|
795 |
+
left: 1rem;
|
796 |
+
margin: 0;
|
797 |
+
font-size: 1.25rem;
|
798 |
+
transform-origin: left;
|
799 |
+
white-space: nowrap;
|
800 |
}
|
801 |
|
802 |
+
header > div {
|
803 |
+
position: absolute;
|
804 |
+
right: 1rem;
|
805 |
}
|
806 |
|
807 |
+
.hp {
|
808 |
+
font-size: 1.25rem;
|
809 |
+
color: hsl(0 100% 50%);
|
|
|
|
|
|
|
810 |
}
|
811 |
|
812 |
+
header .energy {
|
813 |
+
display: inline-block;
|
814 |
+
transform: translateY(-0.15rem);
|
815 |
}
|
816 |
|
817 |
+
.frame:is(.picture, .species, .description) {
|
818 |
+
--lighter: hsl(var(--frame-h) var(--frame-s) calc(var(--frame-l) + 15%));
|
819 |
+
--lightest: hsl(var(--frame-h) var(--frame-s) calc(var(--frame-l) + 30%));
|
820 |
+
--darker: hsl(var(--frame-h) var(--frame-s) calc(var(--frame-l) - 15%));
|
821 |
+
border-color: var(--darker) var(--frame-color) var(--lighter);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
822 |
}
|
823 |
+
|
824 |
+
.picture,
|
825 |
+
.inline-block {
|
826 |
+
display: inline-block;
|
827 |
}
|
828 |
+
|
829 |
+
.picture {
|
830 |
+
width: 100%;
|
831 |
+
height: 240px;
|
832 |
+
border: 0.375rem solid;
|
833 |
+
background-color: white;
|
834 |
+
object-fit: contain;
|
835 |
+
box-shadow: 0.25rem 0.25rem 0.5rem black;
|
836 |
+
user-select: none;
|
837 |
}
|
838 |
+
|
839 |
+
.species {
|
840 |
+
width: 90%;
|
841 |
+
padding: 0.1rem;
|
842 |
+
margin: 0.25rem auto;
|
843 |
+
border-style: solid;
|
844 |
+
border-width: 0 0.2rem;
|
845 |
+
border-image: linear-gradient(var(--lightest), var(--darker)) 1 100%;
|
846 |
+
background-image: linear-gradient(90deg, var(--frame-color), var(--lightest) 45% 55%, var(--frame-color));
|
847 |
+
text-align: center;
|
848 |
+
font-size: 0.75rem;
|
849 |
+
font-weight: bold;
|
850 |
+
font-style: italic;
|
851 |
}
|
852 |
|
853 |
+
.species::selection {
|
854 |
+
background-color: white;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
855 |
}
|
856 |
+
|
857 |
+
.attacks-row,
|
858 |
+
.footer {
|
859 |
+
display: grid;
|
860 |
+
grid-template-columns: repeat(3, 1fr);
|
861 |
+
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
862 |
}
|
863 |
|
864 |
+
.footer > span:first-child {
|
865 |
+
text-align: left;
|
|
|
|
|
|
|
|
|
|
|
866 |
}
|
867 |
|
868 |
+
.footer > span:last-child {
|
869 |
+
text-align: right;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
870 |
}
|
871 |
|
872 |
+
.attacks {
|
873 |
display: flex;
|
874 |
flex-direction: column;
|
875 |
justify-content: space-evenly;
|
876 |
+
height: 100%;
|
877 |
+
padding: 0;
|
878 |
+
margin: 0;
|
879 |
+
list-style-type: none;
|
880 |
}
|
881 |
|
882 |
+
.attacks-row {
|
883 |
+
grid-template-columns: 3rem 1fr 3rem;
|
884 |
+
align-items: center;
|
885 |
+
width: 105%;
|
886 |
+
height: 100%;
|
887 |
+
max-height: 5rem;
|
888 |
+
padding: 0.25rem 0;
|
889 |
+
margin-left: -2.5%;
|
890 |
+
border-bottom: 0.5px solid hsl(0, 0%, 10%);
|
891 |
+
font-size: 0.95em;
|
892 |
}
|
893 |
|
894 |
+
.attacks-row.no-cost {
|
895 |
+
grid-template-columns: 1fr 3rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
}
|
897 |
+
.attacks-row.no-damage {
|
898 |
+
grid-template-columns: 3rem 1fr;
|
899 |
+
text-align: left;
|
|
|
900 |
}
|
901 |
+
.attacks-row.no-cost.no-damage {
|
902 |
+
grid-template-columns: 1fr;
|
903 |
}
|
904 |
|
905 |
+
.attack-text {
|
906 |
+
margin-left: 0.25rem;
|
907 |
+
margin-right: 0.1rem;
|
|
|
|
|
908 |
}
|
909 |
+
|
910 |
+
.attack-text > span:only-child {
|
911 |
+
display: block;
|
912 |
+
margin-left: -1rem;
|
913 |
+
text-align: center;
|
914 |
}
|
915 |
+
|
916 |
+
.no-cost .attack-text > span:only-child, .no-cost.no-damage .attack-text > span:only-child {
|
917 |
+
width: var(--card-width);
|
918 |
+
margin-left: -2.5rem;
|
|
|
919 |
}
|
920 |
+
.no-damage .attack-text > span:only-child {
|
921 |
+
width: var(--card-width);
|
922 |
+
margin-left: -5.5rem;
|
|
|
|
|
923 |
}
|
924 |
|
925 |
+
.attack-cost {
|
926 |
+
display: flex;
|
927 |
+
flex-flow: row wrap;
|
928 |
+
justify-content: space-evenly;
|
929 |
+
text-align: justify;
|
930 |
+
}
|
931 |
|
932 |
+
.energy {
|
933 |
+
width: 1.2em;
|
934 |
+
aspect-ratio: 1 / 1;
|
935 |
+
text-align: center;
|
936 |
+
cursor: default;
|
937 |
+
user-select: none;
|
|
|
938 |
}
|
939 |
|
940 |
+
.energy:only-child {
|
941 |
+
justify-self: flex-start;
|
942 |
+
margin: auto;
|
|
|
|
|
|
|
|
|
943 |
}
|
944 |
|
945 |
+
.attack-name {
|
946 |
+
font-weight: bold;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
947 |
}
|
948 |
|
949 |
+
.attack-damage {
|
950 |
+
min-width: 2.25rem;
|
951 |
+
text-align: center;
|
952 |
+
font-size: 1.375rem;
|
|
|
|
|
|
|
|
|
|
|
953 |
}
|
954 |
|
955 |
+
hr {
|
956 |
+
border: 0.5px solid black;
|
957 |
+
background-color: black;
|
958 |
}
|
959 |
|
960 |
+
.multipliers {
|
961 |
+
display: flex;
|
962 |
+
flex-direction: row;
|
963 |
+
justify-content: space-between;
|
964 |
+
height: 2rem;
|
965 |
+
margin-top: 0;
|
966 |
+
text-align: center;
|
967 |
+
font-size: 0.75rem;
|
968 |
+
font-weight: bold;
|
969 |
}
|
970 |
|
971 |
+
.multipliers > div {
|
972 |
+
display: flex;
|
973 |
+
flex-direction: column;
|
974 |
+
align-items: center;
|
975 |
+
margin: 0;
|
976 |
}
|
977 |
+
|
978 |
+
.resistance {
|
979 |
+
position: relative;
|
|
|
980 |
}
|
981 |
|
982 |
+
.resistance-total {
|
983 |
+
position: absolute;
|
984 |
+
top: 1rem;
|
985 |
+
left: 2.5rem;
|
986 |
}
|
987 |
|
988 |
+
.description {
|
989 |
+
padding: 0.1rem 0.5rem;
|
990 |
+
margin: 0.25rem 0 0;
|
991 |
+
border: 0.1rem solid;
|
992 |
+
font-size: 0.65rem;
|
993 |
+
font-weight: bold;
|
994 |
+
font-style: italic;
|
995 |
}
|
996 |
|
997 |
+
.footer {
|
998 |
+
align-self: end;
|
999 |
+
position: relative;
|
1000 |
+
margin: 0.15rem 0;
|
1001 |
+
text-align: center;
|
1002 |
+
font-size: 0.6rem;
|
1003 |
+
font-weight: bold;
|
1004 |
}
|
1005 |
|
1006 |
+
.pokecard a {
|
1007 |
+
text-decoration: none;
|
1008 |
+
color: inherit;
|
1009 |
}
|
templates/index.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
<script type="module" id="script-tag"></script>
|
15 |
<script>
|
16 |
const basePath = document.location.origin + document.location.pathname;
|
17 |
-
document.getElementById('script-tag').src = `${basePath}static/index.js`;
|
18 |
document.getElementById('stylesheet-tag').href = `${basePath}static/style.css`;
|
19 |
</script>
|
20 |
</head>
|
|
|
14 |
<script type="module" id="script-tag"></script>
|
15 |
<script>
|
16 |
const basePath = document.location.origin + document.location.pathname;
|
17 |
+
document.getElementById('script-tag').src = `${basePath}static/js/index.js`;
|
18 |
document.getElementById('stylesheet-tag').href = `${basePath}static/style.css`;
|
19 |
</script>
|
20 |
</head>
|