feat(game): play confetti for finished games

This commit is contained in:
lobo committed 2026-09-28 13:36:36 +02:00
1 parent 09e1f767d8
commit a5458b3f86
9 files changed
+260 -9

No files matched your search

+8 -5
View File
@@ -2,11 +2,14 @@ import {useId} from 'react';
import {BODY, CHECKLIST, DPAD, OUTLINE, PROGRESS_BAR} from './logoPaths.js';
// Each color is [themed CSS, fixed hex]. The hex is the logo as designed; it also stands in where a browser
// cannot read color-mix, which would otherwise make that stop black.
const violet = ['var(--logo-violet, #7467f9)', '#7467f9'];
const blue = ['var(--logo-blue, #0192ef)', '#0192ef'];
const teal = ['var(--logo-teal, #17c7a4)', '#17c7a4'];
/**
* The three logo colors as [CSS variable, hex as designed]; style.css sets the variables per accent.
*/
export const LOGO_COLORS = [['--logo-violet', '#7467f9'], ['--logo-blue', '#0192ef'], ['--logo-teal', '#17c7a4']];
// Each color is [themed CSS, fixed hex]. The hex also stands in where a browser cannot read color-mix, which
// would otherwise make that stop black.
const [violet, blue, teal] = LOGO_COLORS.map(([name, hex]) => [`var(${name}, ${hex})`, hex]);
const mix = ([a], [b], percentOfB, hex) => [`color-mix(in oklch, ${a}, ${b} ${percentOfB}%)`, hex];
function Gradient({id, from, to, stops}) {