diff --git a/public/media/money.webm b/public/media/money.webm deleted file mode 100644 index d958c69..0000000 Binary files a/public/media/money.webm and /dev/null differ diff --git a/src/components/MoneyRain.astro b/src/components/MoneyRain.astro new file mode 100644 index 0000000..d5c497f --- /dev/null +++ b/src/components/MoneyRain.astro @@ -0,0 +1,122 @@ +--- +/* + * The "make it rain" celebration, drawn on a canvas instead of played from a + * video file. + * + * It replaces a 12MB WebM. That file was already deferred with preload="none", + * which fixed the page weight but moved the cost somewhere worse: the download + * began at the moment of celebration, so a donor on a slow connection got their + * confetti late, or not at all. This starts instantly and weighs nothing. + * + * Exposes window.makeItRain() for the donation flow to call. + */ +--- + + + + diff --git a/src/pages/donate/index.astro b/src/pages/donate/index.astro index cdc365a..f8281e1 100644 --- a/src/pages/donate/index.astro +++ b/src/pages/donate/index.astro @@ -1,6 +1,7 @@ --- import BaseLayout from '@layouts/BaseLayout.astro'; import PageHeader from '@components/PageHeader.astro'; +import MoneyRain from '@components/MoneyRain.astro'; import { SITE, LINKS, PAYPAL_CLIENT_ID, DONATION_PRESETS, DEFAULT_DONATION } from '@data/site'; const description = @@ -111,23 +112,7 @@ const paypalSdk = - - +