feat(midsummer): rain of flowers/frogs/Swedish flags, dots become frogs, drop jingle
Per request: remove the WebAudio jingle (+ its 🔊 toggle and sound state); replace the one-shot confetti with a continuous rain of 🌼🌸🐸🇸🇪🌿 over the screen (MidsummerRain, gated by the theme, reduced-motion aware, leak-free); and replace player-dot markers with frogs themselves (override the inline dot color/border) instead of a flower-crown on top. Still toggled by the 🐸 Midsommar switch. Includes rebuilt static bundle. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7141a38c5c
commit
d86bc48862
24 changed files with 129 additions and 202 deletions
|
|
@ -1,34 +1,17 @@
|
|||
import React from 'react';
|
||||
import { useMidsummer } from '../../hooks/useMidsummer';
|
||||
import { playSmaGrodorna } from '../../hooks/useMidsummerSound';
|
||||
|
||||
/** 🐸 theme toggle + 🔊 jingle toggle, rendered among the sidebar tool links. */
|
||||
/** 🐸 midsummer theme toggle, rendered among the sidebar tool links. */
|
||||
export const FrogToggle: React.FC = () => {
|
||||
const { enabled, toggle, soundOn, toggleSound } = useMidsummer();
|
||||
const { enabled, toggle } = useMidsummer();
|
||||
return (
|
||||
<>
|
||||
<span
|
||||
className="ml-tool-link"
|
||||
style={{ cursor: 'pointer' }}
|
||||
title={enabled ? 'Turn off the midsummer theme' : 'Turn on the midsummer theme'}
|
||||
onClick={toggle}
|
||||
>
|
||||
🐸 Midsommar {enabled ? 'on' : 'off'}
|
||||
</span>
|
||||
{enabled && (
|
||||
<span
|
||||
className="ml-tool-link"
|
||||
style={{ cursor: 'pointer' }}
|
||||
title={soundOn ? 'Mute the Små grodorna jingle' : 'Unmute the Små grodorna jingle'}
|
||||
onClick={() => {
|
||||
const turningOn = !soundOn;
|
||||
toggleSound();
|
||||
if (turningOn) playSmaGrodorna(); // this click is a user gesture
|
||||
}}
|
||||
>
|
||||
{soundOn ? '🔊' : '🔇'} Jingle
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
<span
|
||||
className="ml-tool-link"
|
||||
style={{ cursor: 'pointer' }}
|
||||
title={enabled ? 'Turn off the midsummer theme' : 'Turn on the midsummer theme'}
|
||||
onClick={toggle}
|
||||
>
|
||||
🐸 Midsommar {enabled ? 'on' : 'off'}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue