From 97689dcec2e6b3c77f7c4502d2b2a726118a94ec Mon Sep 17 00:00:00 2001 From: "Ignacio Ceballos (Yayo)" Date: Thu, 21 Nov 2024 00:58:04 +0100 Subject: [PATCH] snowfall --- package.json | 1 + .../assets/decorations/snowflake_02.svg | 3 +++ .../components/label-rotate.jsx | 6 ++---- .../pages/calendar-view.jsx | 16 ++++++++++++++++ .../advent-calendar-2024/pages/snowflake-2.png | Bin 0 -> 583 bytes .../advent-calendar-2024/pages/snowflake_01.svg | 3 +++ yarn.lock | 9 ++++++++- 7 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 src/pages/advent-calendar-2024/assets/decorations/snowflake_02.svg create mode 100644 src/pages/advent-calendar-2024/pages/snowflake-2.png create mode 100644 src/pages/advent-calendar-2024/pages/snowflake_01.svg diff --git a/package.json b/package.json index 54ca73d721..7f3eed7825 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "react-helmet": "^6.1.0", "react-router-dom": "^6.6.2", "react-scripts": "5.0.1", + "react-snowfall": "^2.1.1", "web-vitals": "^2.1.4" }, "scripts": { diff --git a/src/pages/advent-calendar-2024/assets/decorations/snowflake_02.svg b/src/pages/advent-calendar-2024/assets/decorations/snowflake_02.svg new file mode 100644 index 0000000000..2ed1780616 --- /dev/null +++ b/src/pages/advent-calendar-2024/assets/decorations/snowflake_02.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/pages/advent-calendar-2024/components/label-rotate.jsx b/src/pages/advent-calendar-2024/components/label-rotate.jsx index c87b09de10..a1481c0b11 100644 --- a/src/pages/advent-calendar-2024/components/label-rotate.jsx +++ b/src/pages/advent-calendar-2024/components/label-rotate.jsx @@ -14,8 +14,8 @@ const RotatingSVG = ({ fill }) => { > @@ -42,8 +42,6 @@ const RotatingSVG = ({ fill }) => { className={`${styles.rotationInverse} ${ isHovered ? styles.slowMo : "" }`} - width={36} - height={36} > diff --git a/src/pages/advent-calendar-2024/pages/calendar-view.jsx b/src/pages/advent-calendar-2024/pages/calendar-view.jsx index 5afc2da22a..82388bb5e1 100644 --- a/src/pages/advent-calendar-2024/pages/calendar-view.jsx +++ b/src/pages/advent-calendar-2024/pages/calendar-view.jsx @@ -23,6 +23,7 @@ import { CARD_STATES, TOTAL_CALENDAR_DAYS } from "../utils/constants"; import ToastWrapper from "../components/toast-wrapper"; import contentByDate from "../utils/content-config"; import DecorationSnake from "../assets/decorations/decoration-snake.jsx"; +import Snowfall from "react-snowfall"; const CalendarView = () => { const location = useLocation(); @@ -139,8 +140,23 @@ const CalendarView = () => { )); }, [completedDays, calendarDays]); + const snowflake1 = document.createElement("img"); + snowflake1.src = "./snowflake_01.svg"; + const snowflake2 = document.createElement("img"); + snowflake2.src = "./snowflake_01.svg"; + + const customSnow = [snowflake1, snowflake2]; + return ( <> + diff --git a/src/pages/advent-calendar-2024/pages/snowflake-2.png b/src/pages/advent-calendar-2024/pages/snowflake-2.png new file mode 100644 index 0000000000000000000000000000000000000000..fdef14a6009eb87543cc7d5072cc2a418ccdb548 GIT binary patch literal 583 zcmV-N0=WH&P)Ks#9J2JHle37{L42}(Cmr6#@0rLiqp@uxJp)4_pJ@~{(} z7=T2908f-S$VW&N3%HV)A+^Q-fzSbZLwO4Y0^7XfeF(K(1PXD1J!ftVwhvp%XUbOz z##M-W;?z5JUNjiX>9^~N?clRVHD&~%#>7G#h#o~66rshqAXOkV7zbom z4MKq#n;E=Ug%DyiSq?EFraa;&44BCf4Z0_2+E{~jLI?2Hr8STt2!B6tzWGpFTn%Ii z(;Vy##2xGh$}`x*ew+*DPWAtW7!h?~CPI|O2oStud#riVC`9{|z+J_zGgQLkAw6kSwSFMh*U5oamw_(rdm)=G&>hX!jzi + + diff --git a/yarn.lock b/yarn.lock index 515c0c8e60..4271c77b32 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8105,7 +8105,7 @@ react-error-overlay@^6.0.11: resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== -react-fast-compare@^3.1.1: +react-fast-compare@^3.1.1, react-fast-compare@^3.2.2: version "3.2.2" resolved "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz" integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ== @@ -8227,6 +8227,13 @@ react-side-effect@^2.1.0: resolved "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.2.tgz" integrity sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw== +react-snowfall@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/react-snowfall/-/react-snowfall-2.1.1.tgz#0ad21415b3256af4522b7264b3ad61be5ba22c7d" + integrity sha512-29F2U+skZc8uYYYzVP2Ub4mbc5nPH+0jYr1yXDysaPCnHdl9nVUN3h/ygg6PYw2LH53q6ZQCNfj30kVliaPvBg== + dependencies: + react-fast-compare "^3.2.2" + react-themeable@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/react-themeable/-/react-themeable-1.1.0.tgz"