Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.
JavaScript apple-watchbodyweightdockerfitnessfitness-trackergymhealthiosmcpnodejspasskeysprogressive-web-applicationspwareactself-hostedself-hostingvitewebauthnweightliftingworkout-tracker
Halloween theme: seasonal themes page, spider, bats, cobwebs, a shy pumpkin and a rare witch (lazy, off the workout screen)
Duarte Santosbba2d732d632
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsxindex 20a41909e..84e1bd19f 100644--- a/frontend/src/App.jsx+++ b/frontend/src/App.jsx@@ -6,6 +6,7 @@ import { useUI } from './store/useUI.js'import { bindUI } from './components/ui.jsx'import { setWeightDecimals } from './lib/format.js'import { accentValue, applyAccent } from './lib/accent.js'+import { seasonAccent } from './lib/seasonal.js'import { setLang, useLang, baseLang } from './lib/i18n.js'import { effectiveLang } from './lib/default-lang.js'import { setPlayOnSilent, setVibrate, setAlarmBuzzer, setNativeBuzzer } from './lib/sound.js'@@ -36,6 +37,7 @@ import Toast from './components/Toast.jsx'import SyncBanner from './components/SyncBanner.jsx'import RestTimer from './components/RestTimer.jsx'import TimerFlash from './components/TimerFlash.jsx'+import { SeasonalLayer } from './components/Seasonal.jsx'import { openDeviceLinkRedeem } from './components/Passkeys.jsx'import { useAnimPacksBoot } from './components/Animations.jsx'import Login from './views/Login.jsx'@@ -140,8 +142,10 @@ function Shell() {navigate('/workout', { replace: true })exitWorkoutEdit(() => navigate(destination, { replace: true }))}, [loc.pathname, loc.search, S.active?.editingWorkoutId, navigate])- // A preset key, or the user's own colour as '#rrggbb' (lib/accent.js), already checked.- const accent = accentValue(S)+ // A preset key, or the user's own colour as '#rrggbb' (lib/accent.js), already checked. A+ // seasonal theme's colours stand in for it while that theme shows, and only when chosen+ // (Settings → Look & Home → Seasonal themes); the saved accent itself is never touched.+ const accent = seasonAccent(S) || accentValue(S)useEffect(() => { applyPrefs(S.theme, accent) }, [S.theme, accent])// 'system' needs to react live if the OS theme flips while the app is open, not just on// the next mount — a fixed 'dark'/'light' choice never re-fires this since matchMedia@@ -335,6 +339,9 @@ function Shell() {<Modals /><Toast /><TimerFlash />+ {/* Seasonal decoration (lib/seasonal.js): nothing, and nothing loaded, out of season. Never+ over a running workout or the first-launch screens. */}+ {authed && !needsMobileOnboarding && !permSteps && <SeasonalLayer hidden={inWorkout || loc.pathname === '/workout'} />}</>)}diff --git a/frontend/src/components/Icon.jsx b/frontend/src/components/Icon.jsxindex bbb148bd4..c650eabcd 100644--- a/frontend/src/components/Icon.jsx+++ b/frontend/src/components/Icon.jsx@@ -102,6 +102,8 @@ const P = {grid: <><rect x="4" y="4" width="6.5" height="6.5" rx="1.6" /><rect x="13.5" y="4" width="6.5" height="6.5" rx="1.6" /><rect x="4" y="13.5" width="6.5" height="6.5" rx="1.6" /><rect x="13.5" y="13.5" width="6.5" height="6.5" rx="1.6" /></>,folder: <path d="M3.6 7.4a2 2 0 0 1 2-2h3.1l2 2.4h6.7a2 2 0 0 1 2 2v7.8a2 2 0 0 1-2 2H5.6a2 2 0 0 1-2-2Z" />,globe: <><circle cx="12" cy="12" r="8.2" /><path d="M3.8 12h16.4M12 3.8c2.1 2.2 3.2 5.1 3.2 8.2s-1.1 6-3.2 8.2c-2.1-2.2-3.2-5.1-3.2-8.2s1.1-6 3.2-8.2Z" /></>,+ // Seasonal themes (lib/seasonal.js): two halves of a pumpkin and its stem.+ pumpkin: <><path d="M12 7.4c-1.6-1.2-4.9-1.4-6.8.6-2.4 2.6-2.4 8.4 0 11 1.9 2 5.2 1.8 6.8.6 1.6 1.2 4.9 1.4 6.8-.6 2.4-2.6 2.4-8.4 0-11-1.9-2-5.2-1.8-6.8-.6Z" /><path d="M12 7.4c-1.4 2.2-1.4 10 0 12.2M12 7.4c.1-1.6.6-2.9 1.8-3.8" /></>,moon: <path d="M19.4 14.2A7.8 7.8 0 0 1 9.8 4.6a8.2 8.2 0 1 0 9.6 9.6Z" />,sun: <><circle cx="12" cy="12" r="4.4" /><path d="M12 3.6v2M12 18.4v2M20.4 12h-2M5.6 12h-2M17.94 6.06l-1.42 1.42M7.48 16.52l-1.42 1.42M17.94 17.94l-1.42-1.42M7.48 7.48 6.06 6.06" /></>,key: <><circle cx="8.2" cy="15.8" r="3.8" /><path d="m10.9 13.1 8-8M16.6 7.4l2 2M14.6 9.4l2 2" /></>,diff --git a/frontend/src/components/Seasonal.jsx b/frontend/src/components/Seasonal.jsxnew file mode 100644index 000000000..fe4ff74a2--- /dev/null+++ b/frontend/src/components/Seasonal.jsx@@ -0,0 +1,47 @@+import { Suspense, lazy, useEffect } from 'react'+import { useStore } from '../store/useStore.js'+import { activeSeason } from '../lib/seasonal.js'++/* The main bundle's side of the seasonal themes (lib/seasonal.js): two tiny components that render+ nothing at all unless a theme is showing, and only then fetch its module (seasonal/<id>.jsx,+ its art, CSS and timers). Out of season or switched off, nothing is downloaded, parsed or+ scheduled. seasonal.lazy.test.js keeps it that way: no file but this one names that folder,+ and only through import(). */+const LOADERS = {+ halloween: () => import('../seasonal/halloween.jsx'),+}+const mods = {}+const modOf = id => (mods[id] ||= {+ Layer: lazy(() => LOADERS[id]().then(m => ({ default: m.Layer }))),+ Deco: lazy(() => LOADERS[id]().then(m => ({ default: m.Deco }))),+})++const useSeason = () => useStore(s => activeSeason(s.S))++// Whether the first screen this session drew was one the theme may decorate. The spider's+// "first open of the day" is an app start, so a start straight into a running workout skips it.+let firstVisible = null++/** The screen-wide layer (the spider, the witch). `hidden` on the workout screen: no theme there. */+export function SeasonalLayer({ hidden = false }) {+ const id = useSeason()+ if (id && firstVisible === null) firstVisible = !hidden+ // The CSS of a theme is scoped to html[data-season], so a theme switched off mid-session+ // leaves nothing styled behind even though its stylesheet stays loaded.+ useEffect(() => {+ const de = document.documentElement+ if (id) de.dataset.season = id+ else delete de.dataset.season+ }, [id])+ if (!id || !LOADERS[id]) return null+ const { Layer } = modOf(id)+ return <Suspense fallback={null}><Layer hidden={hidden} fresh={firstVisible} /></Suspense>+}++/** One piece of decoration in a view: `spot` names where ('home-hero', 'home-streak', ...). */+export function SeasonDeco({ spot }) {+ const id = useSeason()+ if (!id || !LOADERS[id]) return null+ const { Deco } = modOf(id)+ return <Suspense fallback={null}><Deco spot={spot} /></Suspense>+}diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.jsindex a482c7243..8198be913 100644--- a/frontend/src/lib/pt-br-locale.test.js+++ b/frontend/src/lib/pt-br-locale.test.js@@ -41,7 +41,7 @@ describe('Brazilian Portuguese locale', () => {// has to be taught is a number nobody reads. What the numbers stood for is asserted above.// If the hash fails, review the changed keys and wording before accepting a new one. From// frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list- expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('4e88aaf93115063d8c310cc025e488198c8823f94e8a8e404e1b0475182f1fba')+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('b62744aa1d45b0a964771ac133d6329819a6a54e58d963e97e1e5a00631c0551')})// pt-PT labelled Unpair 'Desfazer': Undo, in Portuguese (it is pt-BR's Undo), on the button thatdiff --git a/frontend/src/lib/seasonal.js b/frontend/src/lib/seasonal.jsnew file mode 100644index 000000000..c85049301--- /dev/null+++ b/frontend/src/lib/seasonal.js@@ -0,0 +1,81 @@+// Seasonal themes (v1.4.3): a little decoration for a few weeks a year, Halloween first.+//+// This file is all the main bundle carries of them: the list, the date windows and the choice.+// The art, its CSS and its timers live in seasonal/<id>.jsx, fetched only while a theme is on+// (components/Seasonal.jsx), so a profile with themes off, or a day out of season, pays nothing.+//+// The choice is a Look setting like Theme and Accent color, so it syncs with the profile:+// S.seasonal = { halloween: 'auto' | 'on' | 'off', halloweenColors: true }. Absent reads as Auto.+// What happens once a day (the spider, the pumpkin) is per device, in localStorage below.++/* One entry per theme. `from` and `to` are [month, day], 1-based and inclusive, in local time:+ Halloween is on from 1 October to the end of 31 October and gone on 1 November. The strings+ are English keys, translated where they are shown. A theme with `colors` offers an accent+ override, which is only ever opt-in. */+export const THEMES = [+ {+ id: 'halloween', title: 'Halloween', icon: 'pumpkin', tint: 'var(--orange)',+ from: [10, 1], to: [10, 31],+ colors: 'orange', colorsTitle: 'Spooky colors', colorsNote: 'A pumpkin orange accent while Halloween shows. Your own color comes back after.',+ during: 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.',+ back: 'Back next October. The spiders are on holiday.',+ },+]+export const THEME_IDS = THEMES.map(th => th.id)+export const CHOICES = ['auto', 'on', 'off']+const byId = id => THEMES.find(th => th.id === id) || null++const md = d => (d.getMonth() + 1) * 100 + d.getDate()++/** Whether `now` (local time) falls inside the theme's window. A window may wrap the new year. */+export function inSeason(theme, now = new Date()) {+ const th = typeof theme === 'string' ? byId(theme) : theme+ if (!th) return false+ const x = md(now), a = th.from[0] * 100 + th.from[1], b = th.to[0] * 100 + th.to[1]+ return a <= b ? x >= a && x <= b : x >= a || x <= b+}++/** 'auto', 'on' or 'off'; anything else (absent, a value from a newer client) reads as Auto. */+export function seasonChoice(S, id) {+ const v = S?.seasonal?.[id]+ return CHOICES.includes(v) ? v : 'auto'+}++/** Whether the theme shows now: On always, Off never, Auto inside its window. */+export function themeOn(S, id, now = new Date()) {+ const c = seasonChoice(S, id)+ return c === 'on' || (c === 'auto' && inSeason(id, now))+}++/** The theme showing now, or null. The first in the list wins if two ever overlap. */+export function activeSeason(S, now = new Date()) {+ return THEMES.find(th => themeOn(S, th.id, now))?.id || null+}++/** The accent a showing theme puts on instead of the user's own, when its colours are chosen. */+export function seasonAccent(S, now = new Date()) {+ const id = activeSeason(S, now)+ const th = id && byId(id)+ return th?.colors && S?.seasonal?.[id + 'Colors'] === true ? th.colors : null+}++/* Once a day per device: true the first time it is asked on a local date, false after. Storage+ that is not there (a private window, blocked site data) answers false, so nothing repeats. */+const pad = n => String(n).padStart(2, '0')+const dayOf = now => `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())}`+export function onceToday(key, now = new Date()) {+ try {+ const k = 'og_season_' + key, today = dayOf(now)+ if (localStorage.getItem(k) === today) return false+ localStorage.setItem(k, today)+ return true+ } catch (e) { return false }+}+/** Whether onceToday(key) already fired today, without using it up. */+export function doneToday(key, now = new Date()) {+ try { return localStorage.getItem('og_season_' + key) === dayOf(now) } catch (e) { return true }+}++export const reducedMotion = () => {+ try { return !!window.matchMedia?.('(prefers-reduced-motion: reduce)').matches } catch (e) { return false }+}diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.jsindex c6ed76428..d56061211 100644--- a/frontend/src/locales/ar.js+++ b/frontend/src/locales/ar.js@@ -2618,4 +2618,20 @@ export default {'Everything but dumbbells': 'كل شيء ما عدا الدمبلز','None, so dumbbell lifts stay hidden.': 'لا شيء، لذا تبقى تمارين الدمبل مخفية.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'يقرأ openGym فقط وهو مفتوح: نبض القلب لتمارين آخر يوم، وقياسات الوزن لآخر سنة. تبقى التمارين الأقدم كما هي.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'سمات المواسم',+ 'Little extras for the time of year.': 'لمسات صغيرة تناسب الوقت من السنة.',+ 'Halloween': 'الهالوين',+ 'Auto': 'تلقائي',+ 'Spooky colors': 'ألوان مخيفة',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'لون مميز برتقالي بلون اليقطين طوال الهالوين. بعدها يعود لونك.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'عناكب وخفافيش ويقطينة خجولة حتى نهاية أكتوبر. أبدًا أثناء التمرين.',+ 'Back next October. The spiders are on holiday.': 'تعود في أكتوبر القادم. العناكب في إجازة.',+ 'On all year round. Bold choice.': 'مفعّل طوال السنة. اختيار جريء.',+ 'Off, even in season. Fair enough.': 'متوقف حتى في الموسم. معك حق.',+ 'Boo! You found the pumpkin. It was watching you train.': 'بوو! وجدت اليقطينة. كانت تراقبك وأنت تتمرن.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'بوو! وُجدت اليقطينة. رقمك القياسي القادم صار مسكونًا رسميًا.',+ 'Boo! The bats were not part of the warm-up.': 'بوو! الخفافيش لم تكن جزءًا من الإحماء.',+ 'Boo! Found it. The spiders owe you a rep.': 'بوو! وجدتها. العناكب مدينة لك بتكرار.',+ 'The pumpkin is napping. Come back tomorrow.': 'اليقطينة تأخذ قيلولة. عد غدًا.',}diff --git a/frontend/src/locales/bn.js b/frontend/src/locales/bn.jsindex e6a19aed8..5e5b58382 100644--- a/frontend/src/locales/bn.js+++ b/frontend/src/locales/bn.js@@ -2642,4 +2642,20 @@ export default {'Everything but dumbbells': 'ডাম্বেল ছাড়া সবকিছু','None, so dumbbell lifts stay hidden.': 'একটাও নেই, তাই ডাম্বেলের ব্যায়াম লুকানো থাকবে।','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym শুধু খোলা থাকলেই পড়ে: শেষ এক দিনের ওয়ার্কআউটের হার্ট রেট, শেষ এক বছরের ওজন। পুরোনো ওয়ার্কআউট যেমন আছে তেমনই থাকে।',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'মৌসুমি থিম',+ 'Little extras for the time of year.': 'বছরের এই সময়ের জন্য ছোট্ট কিছু বাড়তি সাজ।',+ 'Halloween': 'হ্যালোইন',+ 'Auto': 'অটো',+ 'Spooky colors': 'ভুতুড়ে রং',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'হ্যালোইন চলাকালীন কুমড়ো-কমলা অ্যাকসেন্ট রং। তারপর আপনার নিজের রং ফিরে আসবে।',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'অক্টোবরের শেষ পর্যন্ত মাকড়সা, বাদুড় আর একটা লাজুক কুমড়ো। ওয়ার্কআউটের সময় কখনো নয়।',+ 'Back next October. The spiders are on holiday.': 'আবার আসবে আগামী অক্টোবরে। মাকড়সারা ছুটিতে আছে।',+ 'On all year round. Bold choice.': 'সারা বছর চালু। সাহসী সিদ্ধান্ত।',+ 'Off, even in season. Fair enough.': 'বন্ধ, মৌসুমেও। ঠিক আছে।',+ 'Boo! You found the pumpkin. It was watching you train.': 'বু! আপনি কুমড়োটা খুঁজে পেয়েছেন। ও আপনার ট্রেনিং দেখছিল।',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'বু! কুমড়ো পাওয়া গেছে। আপনার পরের রেকর্ড এখন আনুষ্ঠানিকভাবে ভুতুড়ে।',+ 'Boo! The bats were not part of the warm-up.': 'বু! বাদুড়গুলো ওয়ার্ম-আপের অংশ ছিল না।',+ 'Boo! Found it. The spiders owe you a rep.': 'বু! পেয়ে গেছেন। মাকড়সাদের কাছে আপনার একটা রেপ পাওনা।',+ 'The pumpkin is napping. Come back tomorrow.': 'কুমড়োটা ঘুমোচ্ছে। কাল আবার আসুন।',}diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.jsindex e50b6d3c2..39b7aefe8 100644--- a/frontend/src/locales/de.js+++ b/frontend/src/locales/de.js@@ -2583,4 +2583,20 @@ export default {'Everything but dumbbells': 'Alles außer Kurzhanteln','None, so dumbbell lifts stay hidden.': 'Keine, also bleiben Kurzhantelübungen ausgeblendet.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym liest nur, solange es offen ist: Puls für Trainings vom letzten Tag, Wiegungen des letzten Jahres. Ältere Trainings bleiben, wie sie sind.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Saison-Themen',+ 'Little extras for the time of year.': 'Kleine Extras passend zur Jahreszeit.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Gruselfarben',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Ein Kürbis-Orange als Akzentfarbe, solange Halloween läuft. Danach kommt deine eigene Farbe zurück.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Spinnen, Fledermäuse und ein schüchterner Kürbis bis Ende Oktober. Nie während eines Trainings.',+ 'Back next October. The spiders are on holiday.': 'Wieder da im nächsten Oktober. Die Spinnen machen Urlaub.',+ 'On all year round. Bold choice.': 'Das ganze Jahr an. Mutig.',+ 'Off, even in season. Fair enough.': 'Aus, auch in der Saison. Fair.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Buh! Du hast den Kürbis gefunden. Er hat dir beim Training zugeschaut.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Buh! Kürbis gefunden. Dein nächster Rekord ist jetzt offiziell verhext.',+ 'Boo! The bats were not part of the warm-up.': 'Buh! Die Fledermäuse gehörten nicht zum Aufwärmen.',+ 'Boo! Found it. The spiders owe you a rep.': 'Buh! Gefunden. Die Spinnen schulden dir eine Wiederholung.',+ 'The pumpkin is napping. Come back tomorrow.': 'Der Kürbis macht ein Nickerchen. Komm morgen wieder.',}diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.jsindex 4cfe79d16..89fa509d9 100644--- a/frontend/src/locales/es.js+++ b/frontend/src/locales/es.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Todo menos mancuernas','None, so dumbbell lifts stay hidden.': 'Ninguna, así que los ejercicios con mancuernas quedan ocultos.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym solo lee mientras está abierto: pulso de los entrenos del último día, pesajes del último año. Los entrenos anteriores se quedan como están.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Temas de temporada',+ 'Little extras for the time of year.': 'Pequeños extras según la época del año.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Colores terroríficos',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Un acento naranja calabaza mientras dure Halloween. Después vuelve tu color.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Arañas, murciélagos y una calabaza tímida hasta finales de octubre. Nunca durante un entrenamiento.',+ 'Back next October. The spiders are on holiday.': 'Vuelve el próximo octubre. Las arañas están de vacaciones.',+ 'On all year round. Bold choice.': 'Activado todo el año. Qué valiente.',+ 'Off, even in season. Fair enough.': 'Desactivado, incluso en temporada. Entendido.',+ 'Boo! You found the pumpkin. It was watching you train.': '¡Bu! Encontraste la calabaza. Te estaba viendo entrenar.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': '¡Bu! Calabaza encontrada. Tu próximo récord ya está oficialmente embrujado.',+ 'Boo! The bats were not part of the warm-up.': '¡Bu! Los murciélagos no eran parte del calentamiento.',+ 'Boo! Found it. The spiders owe you a rep.': '¡Bu! Encontrada. Las arañas te deben una repetición.',+ 'The pumpkin is napping. Come back tomorrow.': 'La calabaza está echando la siesta. Vuelve mañana.',}diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.jsindex 575f4f717..79a9d9ae3 100644--- a/frontend/src/locales/fr.js+++ b/frontend/src/locales/fr.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Tout sauf les haltères','None, so dumbbell lifts stay hidden.': 'Aucun, donc les exercices aux haltères restent cachés.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym ne lit que lorsqu’il est ouvert : fréquence cardiaque des séances du dernier jour, pesées de la dernière année. Les séances plus anciennes restent telles quelles.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Thèmes de saison',+ 'Little extras for the time of year.': 'Petits bonus selon la saison.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Couleurs qui font peur',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Un accent orange citrouille tant qu\'Halloween est là. Ta couleur revient ensuite.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Des araignées, des chauves-souris et une citrouille timide jusqu\'à fin octobre. Jamais pendant une séance.',+ 'Back next October. The spiders are on holiday.': 'De retour en octobre prochain. Les araignées sont en vacances.',+ 'On all year round. Bold choice.': 'Activé toute l\'année. Audacieux.',+ 'Off, even in season. Fair enough.': 'Désactivé, même en saison. Très bien.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bouh ! Tu as trouvé la citrouille. Elle te regardait t\'entraîner.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bouh ! Citrouille trouvée. Ton prochain record est officiellement hanté.',+ 'Boo! The bats were not part of the warm-up.': 'Bouh ! Les chauves-souris ne faisaient pas partie de l\'échauffement.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bouh ! Trouvée. Les araignées te doivent une répétition.',+ 'The pumpkin is napping. Come back tomorrow.': 'La citrouille fait la sieste. Reviens demain.',}diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.jsindex 083eafbeb..ff25624f6 100644--- a/frontend/src/locales/hi.js+++ b/frontend/src/locales/hi.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'डंबल के अलावा सब कुछ','None, so dumbbell lifts stay hidden.': 'कोई नहीं, इसलिए डंबल वाली एक्सरसाइज़ छिपी रहेंगी।','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym सिर्फ़ तब पढ़ता है जब वह खुला हो: पिछले एक दिन के वर्कआउट की धड़कन, पिछले एक साल का वज़न। पुराने वर्कआउट जैसे हैं वैसे ही रहते हैं।',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'मौसमी थीम',+ 'Little extras for the time of year.': 'साल के इस समय के लिए छोटी-छोटी सजावट।',+ 'Halloween': 'हैलोवीन',+ 'Auto': 'ऑटो',+ 'Spooky colors': 'डरावने रंग',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'हैलोवीन के दौरान कद्दू जैसा नारंगी एक्सेंट रंग। उसके बाद आपका अपना रंग लौट आता है।',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'अक्टूबर के आख़िर तक मकड़ियाँ, चमगादड़ और एक शर्मीला कद्दू। वर्कआउट के दौरान कभी नहीं।',+ 'Back next October. The spiders are on holiday.': 'अगले अक्टूबर में वापस। मकड़ियाँ छुट्टी पर हैं।',+ 'On all year round. Bold choice.': 'पूरे साल चालू। हिम्मत वाला फ़ैसला।',+ 'Off, even in season. Fair enough.': 'बंद, सीज़न में भी। ठीक है।',+ 'Boo! You found the pumpkin. It was watching you train.': 'बू! आपने कद्दू ढूँढ लिया। वह आपको ट्रेनिंग करते देख रहा था।',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'बू! कद्दू मिल गया। आपका अगला रिकॉर्ड अब आधिकारिक तौर पर भुतहा है।',+ 'Boo! The bats were not part of the warm-up.': 'बू! चमगादड़ वार्म-अप का हिस्सा नहीं थे।',+ 'Boo! Found it. The spiders owe you a rep.': 'बू! मिल गया। मकड़ियों पर आपका एक रेप उधार है।',+ 'The pumpkin is napping. Come back tomorrow.': 'कद्दू झपकी ले रहा है। कल फिर आइए।',}diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.jsindex fe96c9f79..afa3b9dea 100644--- a/frontend/src/locales/hu.js+++ b/frontend/src/locales/hu.js@@ -2566,4 +2566,20 @@ export default {'Everything but dumbbells': 'Minden, kivéve a kézisúlyzót','None, so dumbbell lifts stay hidden.': 'Nincs, így a kézisúlyzós gyakorlatok rejtve maradnak.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'Az openGym csak nyitott állapotban olvas: az utolsó nap edzéseinek pulzusát és az utolsó egy év mérlegeléseit. A régebbi edzések maradnak, ahogy vannak.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Szezonális témák',+ 'Little extras for the time of year.': 'Apró extrák az évszakhoz.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Kísérteties színek',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Töknarancs kiemelő szín, amíg tart a Halloween. Utána visszajön a saját színed.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Pókok, denevérek és egy félénk tök október végéig. Edzés közben soha.',+ 'Back next October. The spiders are on holiday.': 'Jövő októberben visszajön. A pókok szabadságon vannak.',+ 'On all year round. Bold choice.': 'Egész évben bekapcsolva. Merész.',+ 'Off, even in season. Fair enough.': 'Kikapcsolva, szezonban is. Rendben.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bú! Megtaláltad a tököt. Végig nézte, ahogy edzel.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bú! Tök megvan. A következő rekordod mostantól hivatalosan kísértetjárta.',+ 'Boo! The bats were not part of the warm-up.': 'Bú! A denevérek nem voltak a bemelegítés részei.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bú! Megvan. A pókok tartoznak neked egy ismétléssel.',+ 'The pumpkin is napping. Come back tomorrow.': 'A tök épp szundikál. Gyere vissza holnap.',}diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.jsindex 6e643b379..baa3db1fc 100644--- a/frontend/src/locales/it.js+++ b/frontend/src/locales/it.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Tutto tranne i manubri','None, so dumbbell lifts stay hidden.': 'Nessuno, quindi gli esercizi con manubri restano nascosti.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym legge solo mentre è aperto: battito degli allenamenti dell’ultimo giorno, pesate dell’ultimo anno. Gli allenamenti più vecchi restano come sono.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Temi stagionali',+ 'Little extras for the time of year.': 'Piccoli extra per il periodo dell\'anno.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Colori da brivido',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Un accento arancione zucca finché dura Halloween. Poi torna il tuo colore.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Ragni, pipistrelli e una zucca timida fino alla fine di ottobre. Mai durante un allenamento.',+ 'Back next October. The spiders are on holiday.': 'Torna il prossimo ottobre. I ragni sono in vacanza.',+ 'On all year round. Bold choice.': 'Attivo tutto l\'anno. Coraggioso.',+ 'Off, even in season. Fair enough.': 'Disattivato, anche in stagione. Va bene così.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bu! Hai trovato la zucca. Ti guardava mentre ti allenavi.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bu! Zucca trovata. Il tuo prossimo record ora è ufficialmente stregato.',+ 'Boo! The bats were not part of the warm-up.': 'Bu! I pipistrelli non facevano parte del riscaldamento.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bu! Trovata. I ragni ti devono una ripetizione.',+ 'The pumpkin is napping. Come back tomorrow.': 'La zucca sta facendo un pisolino. Torna domani.',}diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.jsindex e769dd254..0c130299f 100644--- a/frontend/src/locales/ko.js+++ b/frontend/src/locales/ko.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': '덤벨 빼고 전부','None, so dumbbell lifts stay hidden.': '없음, 그래서 덤벨 운동은 숨겨져요.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym은 열려 있을 때만 읽어요: 최근 하루 동안의 운동 심박수와 최근 1년의 체중 기록. 그보다 오래된 운동은 그대로 둬요.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': '시즌 테마',+ 'Little extras for the time of year.': '계절에 맞춘 작은 장식이에요.',+ 'Halloween': '핼러윈',+ 'Auto': '자동',+ 'Spooky colors': '으스스한 색상',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': '핼러윈 동안 호박색 주황 강조 색상을 써요. 끝나면 원래 색상으로 돌아와요.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': '10월 말까지 거미, 박쥐, 그리고 수줍은 호박 하나. 운동 중에는 절대 안 나와요.',+ 'Back next October. The spiders are on holiday.': '내년 10월에 돌아와요. 거미들은 휴가 중이에요.',+ 'On all year round. Bold choice.': '1년 내내 켜기. 과감한 선택이네요.',+ 'Off, even in season. Fair enough.': '시즌에도 꺼 두기. 좋아요.',+ 'Boo! You found the pumpkin. It was watching you train.': '왁! 호박을 찾았어요. 운동하는 걸 계속 지켜보고 있었대요.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': '왁! 호박 발견. 다음 신기록은 이제 공식적으로 귀신 들렸어요.',+ 'Boo! The bats were not part of the warm-up.': '왁! 박쥐는 워밍업에 없던 거예요.',+ 'Boo! Found it. The spiders owe you a rep.': '왁! 찾았다. 거미들이 1회 빚졌어요.',+ 'The pumpkin is napping. Come back tomorrow.': '호박이 낮잠 자는 중이에요. 내일 다시 와 주세요.',}diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.jsindex 2ac98053c..5d760a1ba 100644--- a/frontend/src/locales/pl.js+++ b/frontend/src/locales/pl.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Wszystko oprócz hantli','None, so dumbbell lifts stay hidden.': 'Brak, więc ćwiczenia z hantlami są ukryte.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym czyta tylko, gdy jest otwarty: tętno z treningów z ostatniej doby, pomiary wagi z ostatniego roku. Starsze treningi zostają bez zmian.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Motywy sezonowe',+ 'Little extras for the time of year.': 'Drobne dodatki na tę porę roku.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Straszne kolory',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Dyniowy pomarańczowy akcent, dopóki trwa Halloween. Potem wraca Twój kolor.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Pająki, nietoperze i jedna nieśmiała dynia do końca października. Nigdy podczas treningu.',+ 'Back next October. The spiders are on holiday.': 'Wróci w przyszłym październiku. Pająki są na urlopie.',+ 'On all year round. Bold choice.': 'Włączone cały rok. Odważnie.',+ 'Off, even in season. Fair enough.': 'Wyłączone, nawet w sezonie. W porządku.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bu! Jest dynia! Patrzyła, jak trenujesz.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bu! Dynia znaleziona. Twój następny rekord jest teraz oficjalnie nawiedzony.',+ 'Boo! The bats were not part of the warm-up.': 'Bu! Nietoperze nie były częścią rozgrzewki.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bu! Mam ją. Pająki są Ci winne jedno powtórzenie.',+ 'The pumpkin is napping. Come back tomorrow.': 'Dynia ucina sobie drzemkę. Wróć jutro.',}diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.jsindex dbb038cbb..c343c7e5f 100644--- a/frontend/src/locales/pt-BR.js+++ b/frontend/src/locales/pt-BR.js@@ -1656,6 +1656,15 @@ export const PT_BR_OVERRIDES = {'Everything but dumbbells': 'Tudo menos halteres','None, so dumbbell lifts stay hidden.': 'Nenhum, então os exercícios com halteres ficam escondidos.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'O openGym só lê enquanto está aberto: frequência cardíaca dos treinos do último dia, pesagens do último ano. Os treinos mais antigos ficam como estão.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Um destaque laranja abóbora enquanto durar o Halloween. Depois sua cor volta.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Aranhas, morcegos e uma abóbora tímida até o fim de outubro. Nunca durante um treino.',+ 'Little extras for the time of year.': 'Pequenos extras de acordo com a época do ano.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bu! Você achou a abóbora. Ela estava vendo você treinar.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bu! Abóbora encontrada. Seu próximo recorde agora é oficialmente assombrado.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bu! Achou. As aranhas te devem uma repetição.',+ 'The pumpkin is napping. Come back tomorrow.': 'A abóbora está tirando uma soneca. Volte amanhã.',+ 'Back next October. The spiders are on holiday.': 'Volta em outubro. As aranhas estão de férias.',}export default { ...pt, ...PT_BR_OVERRIDES }diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.jsindex 1d78e0ab1..f35e6f365 100644--- a/frontend/src/locales/pt.js+++ b/frontend/src/locales/pt.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Tudo menos halteres','None, so dumbbell lifts stay hidden.': 'Nenhum, por isso os exercícios com halteres ficam escondidos.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'O openGym só lê enquanto está aberto: frequência cardíaca dos treinos do último dia, pesagens do último ano. Os treinos mais antigos ficam como estão.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Temas da época',+ 'Little extras for the time of year.': 'Pequenos extras conforme a altura do ano.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Cores assustadoras',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Um destaque laranja abóbora enquanto durar o Halloween. Depois volta a tua cor.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Aranhas, morcegos e uma abóbora tímida até ao fim de outubro. Nunca durante um treino.',+ 'Back next October. The spiders are on holiday.': 'Volta em outubro. As aranhas estão de férias.',+ 'On all year round. Bold choice.': 'Ligado o ano inteiro. Corajoso.',+ 'Off, even in season. Fair enough.': 'Desligado, mesmo na época. Justo.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bu! Encontraste a abóbora. Ela estava a ver-te treinar.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bu! Abóbora encontrada. O teu próximo recorde está oficialmente assombrado.',+ 'Boo! The bats were not part of the warm-up.': 'Bu! Os morcegos não faziam parte do aquecimento.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bu! Encontrada. As aranhas devem-te uma repetição.',+ 'The pumpkin is napping. Come back tomorrow.': 'A abóbora está a dormir a sesta. Volta amanhã.',}diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.jsindex f82dbc62a..010af101b 100644--- a/frontend/src/locales/ru.js+++ b/frontend/src/locales/ru.js@@ -2567,4 +2567,20 @@ export default {'Everything but dumbbells': 'Всё, кроме гантелей','None, so dumbbell lifts stay hidden.': 'Нет, поэтому упражнения с гантелями скрыты.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym читает данные, только пока открыт: пульс тренировок за последние сутки, взвешивания за последний год. Старые тренировки остаются как есть.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Сезонные темы',+ 'Little extras for the time of year.': 'Маленькие сюрпризы по сезону.',+ 'Halloween': 'Хеллоуин',+ 'Auto': 'Авто',+ 'Spooky colors': 'Жуткие цвета',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Тыквенно-оранжевый акцент, пока идёт Хеллоуин. Потом вернётся твой цвет.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Пауки, летучие мыши и одна застенчивая тыква до конца октября. Никогда во время тренировки.',+ 'Back next October. The spiders are on holiday.': 'Вернётся в следующем октябре. Пауки в отпуске.',+ 'On all year round. Bold choice.': 'Включено круглый год. Смело.',+ 'Off, even in season. Fair enough.': 'Выключено, даже в сезон. Справедливо.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Бу! Тыква нашлась. Она следила за твоей тренировкой.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Бу! Тыква найдена. Твой следующий рекорд теперь официально заколдован.',+ 'Boo! The bats were not part of the warm-up.': 'Бу! Летучие мыши не входили в разминку.',+ 'Boo! Found it. The spiders owe you a rep.': 'Бу! Есть! Пауки должны тебе один повтор.',+ 'The pumpkin is napping. Come back tomorrow.': 'Тыква дремлет. Загляни завтра.',}diff --git a/frontend/src/locales/sv.js b/frontend/src/locales/sv.jsindex 204f2eb21..5af7ec4e8 100644--- a/frontend/src/locales/sv.js+++ b/frontend/src/locales/sv.js@@ -2610,4 +2610,20 @@ export default {'Everything but dumbbells': 'Allt utom hantlar','None, so dumbbell lifts stay hidden.': 'Inga, så hantelövningar förblir dolda.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym läser bara medan appen är öppen: puls för pass från det senaste dygnet, vägningar från det senaste året. Äldre pass förblir som de är.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Säsongsteman',+ 'Little extras for the time of year.': 'Små extragrejer efter årstiden.',+ 'Halloween': 'Halloween',+ 'Auto': 'Auto',+ 'Spooky colors': 'Läskiga färger',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'En pumpaorange accentfärg medan Halloween pågår. Sedan kommer din egen färg tillbaka.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Spindlar, fladdermöss och en blyg pumpa till slutet av oktober. Aldrig under ett pass.',+ 'Back next October. The spiders are on holiday.': 'Tillbaka nästa oktober. Spindlarna har semester.',+ 'On all year round. Bold choice.': 'På hela året. Modigt.',+ 'Off, even in season. Fair enough.': 'Av, även under säsongen. Helt okej.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bu! Du hittade pumpan. Den har sett dig träna.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bu! Pumpan hittad. Ditt nästa personbästa är nu officiellt hemsökt.',+ 'Boo! The bats were not part of the warm-up.': 'Bu! Fladdermössen var inte en del av uppvärmningen.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bu! Hittad. Spindlarna är skyldiga dig en rep.',+ 'The pumpkin is napping. Come back tomorrow.': 'Pumpan tar en tupplur. Kom tillbaka i morgon.',}diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.jsindex e15e49a14..d113f56cc 100644--- a/frontend/src/locales/th.js+++ b/frontend/src/locales/th.js@@ -2574,4 +2574,20 @@ export default {'Everything but dumbbells': 'ทุกอย่างยกเว้นดัมเบล','None, so dumbbell lifts stay hidden.': 'ไม่มี ท่าที่ใช้ดัมเบลจึงถูกซ่อนไว้','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym อ่านเฉพาะตอนที่เปิดอยู่: อัตราการเต้นของหัวใจของการฝึกในวันล่าสุด และน้ำหนักในหนึ่งปีล่าสุด การฝึกที่เก่ากว่านั้นจะเหมือนเดิม',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'ธีมตามฤดูกาล',+ 'Little extras for the time of year.': 'ของตกแต่งเล็กๆ ตามช่วงเวลาของปี',+ 'Halloween': 'ฮาโลวีน',+ 'Auto': 'อัตโนมัติ',+ 'Spooky colors': 'สีสยองขวัญ',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'สีเน้นส้มฟักทองระหว่างช่วงฮาโลวีน หลังจากนั้นสีของคุณจะกลับมา',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'แมงมุม ค้างคาว และฟักทองขี้อายหนึ่งลูกจนถึงสิ้นเดือนตุลาคม ไม่โผล่ระหว่างออกกำลังกายเด็ดขาด',+ 'Back next October. The spiders are on holiday.': 'กลับมาตุลาคมปีหน้า แมงมุมไปพักร้อนอยู่',+ 'On all year round. Bold choice.': 'เปิดตลอดทั้งปี กล้ามาก',+ 'Off, even in season. Fair enough.': 'ปิด แม้ในช่วงเทศกาล ก็ได้',+ 'Boo! You found the pumpkin. It was watching you train.': 'แฮ่! คุณเจอฟักทองแล้ว มันแอบดูคุณซ้อมอยู่',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'แฮ่! เจอฟักทองแล้ว สถิติครั้งหน้าของคุณมีผีสิงอย่างเป็นทางการ',+ 'Boo! The bats were not part of the warm-up.': 'แฮ่! ค้างคาวไม่ได้อยู่ในการวอร์มอัพนะ',+ 'Boo! Found it. The spiders owe you a rep.': 'แฮ่! เจอแล้ว แมงมุมติดคุณหนึ่งครั้ง',+ 'The pumpkin is napping. Come back tomorrow.': 'ฟักทองกำลังงีบ พรุ่งนี้มาใหม่นะ',}diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.jsindex 35b021214..10a496dce 100644--- a/frontend/src/locales/tr.js+++ b/frontend/src/locales/tr.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': 'Dambıl hariç her şey','None, so dumbbell lifts stay hidden.': 'Yok, bu yüzden dambıl hareketleri gizli kalır.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym yalnızca açıkken okur: son bir günün antrenmanları için nabız, son bir yılın tartılmaları. Daha eski antrenmanlar olduğu gibi kalır.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Sezon temaları',+ 'Little extras for the time of year.': 'Mevsime göre küçük sürprizler.',+ 'Halloween': 'Cadılar Bayramı',+ 'Auto': 'Otomatik',+ 'Spooky colors': 'Ürkütücü renkler',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Cadılar Bayramı sürerken balkabağı turuncusu vurgu rengi. Sonra kendi rengin geri gelir.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Ekim sonuna kadar örümcekler, yarasalar ve utangaç bir balkabağı. Antrenman sırasında asla.',+ 'Back next October. The spiders are on holiday.': 'Gelecek ekim geri döner. Örümcekler tatilde.',+ 'On all year round. Bold choice.': 'Bütün yıl açık. Cesur seçim.',+ 'Off, even in season. Fair enough.': 'Kapalı, sezonda bile. Anlaşıldı.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Bö! Balkabağını buldun. Antrenmanını izliyordu.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Bö! Balkabağı bulundu. Bir sonraki rekorun artık resmen perili.',+ 'Boo! The bats were not part of the warm-up.': 'Bö! Yarasalar ısınmanın bir parçası değildi.',+ 'Boo! Found it. The spiders owe you a rep.': 'Bö! Buldun. Örümcekler sana bir tekrar borçlu.',+ 'The pumpkin is napping. Come back tomorrow.': 'Balkabağı şekerleme yapıyor. Yarın tekrar gel.',}diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.jsindex df7e8d842..ad4818978 100644--- a/frontend/src/locales/uk.js+++ b/frontend/src/locales/uk.js@@ -2560,4 +2560,20 @@ export default {'Everything but dumbbells': 'Усе, крім гантелей','None, so dumbbell lifts stay hidden.': 'Немає, тож вправи з гантелями приховані.','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym читає дані, лише поки відкритий: пульс тренувань за останню добу, зважування за останній рік. Старіші тренування лишаються як є.',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': 'Сезонні теми',+ 'Little extras for the time of year.': 'Маленькі сюрпризи до пори року.',+ 'Halloween': 'Гелловін',+ 'Auto': 'Авто',+ 'Spooky colors': 'Моторошні кольори',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': 'Гарбузово-помаранчевий акцент, поки триває Гелловін. Потім повернеться твій колір.',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': 'Павуки, кажани й один сором’язливий гарбуз до кінця жовтня. Ніколи під час тренування.',+ 'Back next October. The spiders are on holiday.': 'Повернеться наступного жовтня. Павуки у відпустці.',+ 'On all year round. Bold choice.': 'Увімкнено цілий рік. Сміливо.',+ 'Off, even in season. Fair enough.': 'Вимкнено, навіть у сезон. Справедливо.',+ 'Boo! You found the pumpkin. It was watching you train.': 'Бу! Гарбуз знайшовся. Він стежив за твоїм тренуванням.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': 'Бу! Гарбуз знайдено. Твій наступний рекорд тепер офіційно зачарований.',+ 'Boo! The bats were not part of the warm-up.': 'Бу! Кажани не входили в розминку.',+ 'Boo! Found it. The spiders owe you a rep.': 'Бу! Є! Павуки винні тобі одне повторення.',+ 'The pumpkin is napping. Come back tomorrow.': 'Гарбуз дрімає. Зазирни завтра.',}diff --git a/frontend/src/locales/zh-TW.js b/frontend/src/locales/zh-TW.jsindex 91dff9445..2c6f1ee37 100644--- a/frontend/src/locales/zh-TW.js+++ b/frontend/src/locales/zh-TW.js@@ -2556,4 +2556,20 @@ export default {'Everything but dumbbells': '除啞鈴外的全部','None, so dumbbell lifts stay hidden.': '沒有,所以啞鈴動作會隱藏。','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym 只在開啟時讀取:最近一天訓練的心率,最近一年的體重紀錄。更早的訓練維持不變。',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': '季節主題',+ 'Little extras for the time of year.': '應景的小彩蛋。',+ 'Halloween': '萬聖節',+ 'Auto': '自動',+ 'Spooky colors': '驚悚配色',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': '萬聖節期間使用南瓜橘強調色,結束後換回你自己的顏色。',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': '蜘蛛、蝙蝠和一顆害羞的南瓜,一直陪你到十月底。訓練時絕不出現。',+ 'Back next October. The spiders are on holiday.': '明年十月見。蜘蛛們去度假了。',+ 'On all year round. Bold choice.': '整年開啟。真大膽。',+ 'Off, even in season. Fair enough.': '關閉,季節裡也不顯示。沒問題。',+ 'Boo! You found the pumpkin. It was watching you train.': '嚇!你找到南瓜了。它一直在看你訓練。',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': '嚇!找到南瓜。你的下一個紀錄現在正式鬧鬼了。',+ 'Boo! The bats were not part of the warm-up.': '嚇!蝙蝠可不在熱身組裡。',+ 'Boo! Found it. The spiders owe you a rep.': '嚇!找到了。蜘蛛們欠你一下。',+ 'The pumpkin is napping. Come back tomorrow.': '南瓜在打盹,明天再來吧。',}diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.jsindex 7d0c2dd8c..b7126ebb5 100644--- a/frontend/src/locales/zh.js+++ b/frontend/src/locales/zh.js@@ -2563,4 +2563,20 @@ export default {'Everything but dumbbells': '除哑铃外的全部','None, so dumbbell lifts stay hidden.': '没有,所以哑铃动作会隐藏。','openGym reads only while it is open: heart rate for workouts of the last day, weigh-ins of the last year. Older workouts stay as they are.': 'openGym 只在打开时读取:最近一天训练的心率,最近一年的称重。更早的训练保持不变。',+ // --- seasonal themes (lib/seasonal.js) ---+ 'Seasonal themes': '季节主题',+ 'Little extras for the time of year.': '应季的小彩蛋。',+ 'Halloween': '万圣节',+ 'Auto': '自动',+ 'Spooky colors': '惊悚配色',+ 'A pumpkin orange accent while Halloween shows. Your own color comes back after.': '万圣节期间使用南瓜橙强调色,结束后恢复你自己的颜色。',+ 'Spiders, bats and one shy pumpkin until the end of October. Never during a workout.': '蜘蛛、蝙蝠和一只害羞的南瓜,一直陪你到十月底。训练时绝不出现。',+ 'Back next October. The spiders are on holiday.': '明年十月再见。蜘蛛们去度假了。',+ 'On all year round. Bold choice.': '全年开启。够大胆。',+ 'Off, even in season. Fair enough.': '关闭,季节里也不显示。没问题。',+ 'Boo! You found the pumpkin. It was watching you train.': '吓!你找到南瓜了。它一直在看你训练。',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.': '吓!找到南瓜。你的下一个纪录现在正式闹鬼了。',+ 'Boo! The bats were not part of the warm-up.': '吓!蝙蝠可不在热身计划里。',+ 'Boo! Found it. The spiders owe you a rep.': '吓!找到了。蜘蛛们欠你一次。',+ 'The pumpkin is napping. Come back tomorrow.': '南瓜在打盹,明天再来吧。',}diff --git a/frontend/src/seasonal/halloween.css b/frontend/src/seasonal/halloween.cssnew file mode 100644index 000000000..28f74738c--- /dev/null+++ b/frontend/src/seasonal/halloween.css@@ -0,0 +1,161 @@+/* Halloween (seasonal/halloween.jsx). Loaded only while the theme shows, and scoped to+ html[data-season="halloween"] so switching it off mid-session leaves nothing behind.+ Transforms and opacity only; every animation runs a fixed number of times and stops. */++:root[data-season="halloween"]{+ --hw-ink:#b49ae6; /* spider, bats, witch on a dark screen: moonlit lavender */+ --hw-ink-2:#7b5cc0;+ --hw-thread:rgba(235,235,245,.42);+ --hw-web:rgba(235,235,245,.26);+ --hw-face:#ffd04a;+}+:root[data-season="halloween"][data-theme="light"]{+ --hw-ink:#33244a;+ --hw-ink-2:#5b3f8c;+ --hw-thread:rgba(60,60,67,.38);+ --hw-web:rgba(60,60,67,.24);+ --hw-face:#5a2100;+}++/* ------------------------------------------------------------ cobwebs -- */+/* In a card's corner, under its content and never in a tap's way. */+[data-season="halloween"] :has(> .hw-web){position:relative}+[data-season="halloween"] .hw-web{+ position:absolute;width:52px;height:52px;pointer-events:none;+ fill:none;stroke:var(--hw-web);stroke-width:.8;stroke-linecap:round;+}+[data-season="halloween"] .hw-web-br{right:0;bottom:0;transform:scale(-1,-1);border-end-end-radius:var(--r-card)}+[data-season="halloween"] .hw-web-tr{right:0;top:0;transform:scaleX(-1)}+[dir="rtl"][data-season="halloween"] .hw-web-br{right:auto;left:0;transform:scaleY(-1)}+[dir="rtl"][data-season="halloween"] .hw-web-tr{right:auto;left:0;transform:none}++/* --------------------------------------------------------- header bats -- */+[data-season="halloween"] .hdr:has(> .hw-bats){position:relative}+[data-season="halloween"] .hdr:has(> .hw-bats) > :not(.hw-bats){position:relative;z-index:1}+[data-season="halloween"] .hw-bats{position:absolute;inset:-6px 0 -4px;overflow:hidden;pointer-events:none;z-index:0}+.hw-batsvg{display:block;width:100%;height:100%;fill:var(--hw-ink)}+[data-season="halloween"] .hw-batlane{+ position:absolute;inset:0;opacity:0;+ animation:hw-cross 15s cubic-bezier(.45,.05,.55,.95) 3 both;+}+[data-season="halloween"] .hw-flap{position:absolute;left:0;display:block;width:22px;height:11px;animation:hw-flap .2s ease-in-out 220 alternate}+[data-season="halloween"] .hw-lane0{animation-delay:1.2s}+[data-season="halloween"] .hw-lane0 .hw-flap{top:8px}+[data-season="halloween"] .hw-lane1{animation-delay:6s;animation-duration:17s}+[data-season="halloween"] .hw-lane1 .hw-flap{top:26px;width:16px;height:8px;animation-duration:.17s}+[data-season="halloween"] .hw-lane2{animation-delay:9.5s;animation-duration:19s}+[data-season="halloween"] .hw-lane2 .hw-flap{top:14px;width:12px;height:6px;animation-duration:.15s}+@keyframes hw-cross{+ 0%{transform:translate3d(-6%,14px,0);opacity:0}+ 3%{opacity:.5}+ 14%{transform:translate3d(45%,-2px,0)}+ 27%{opacity:.5}+ 30%{transform:translate3d(104%,10px,0);opacity:0}+ 100%{transform:translate3d(104%,10px,0);opacity:0}+}+@keyframes hw-flap{from{transform:scaleY(1)}to{transform:scaleY(.35)}}+/* Reduced motion: two bats simply sit in the corner of the sky. */+[data-season="halloween"] .hw-bats-still .hw-batlane{animation:none;opacity:.4}+[data-season="halloween"] .hw-bats-still .hw-flap{animation:none}+[data-season="halloween"] .hw-bats-still .hw-lane0 .hw-flap{left:auto;right:64px}+[data-season="halloween"] .hw-bats-still .hw-lane1 .hw-flap{left:auto;right:92px}+[data-season="halloween"] .hw-bats-still .hw-lane2{display:none}++/* ------------------------------------------------------------- pumpkin -- */+/* Behind the top edge of its card: only the stem and the eyes show above it. */+[data-season="halloween"] .card:has(> .hw-peek){position:relative}+[data-season="halloween"] .hw-peek{+ position:absolute;bottom:100%;inset-inline-end:58px;width:40px;height:17px;overflow:hidden;pointer-events:none;+}+[data-season="halloween"] .hw-pumpkin{+ all:unset;position:absolute;left:0;top:1px;width:40px;height:32px;cursor:pointer;pointer-events:auto;+ -webkit-tap-highlight-color:transparent;animation:hw-peek .9s cubic-bezier(.3,1.5,.5,1) .6s both;+}+[data-season="halloween"] .hw-pumpkin.hw-hop{animation:hw-hop .5s cubic-bezier(.3,1.6,.5,1)}+.hw-pumpkinsvg{display:block;width:100%;height:auto;overflow:visible}+.hw-pumpkinsvg .hw-stem{fill:#6c7d2c}+.hw-pumpkinsvg .hw-vine{fill:none;stroke:#6c7d2c;stroke-width:1.1;stroke-linecap:round}+.hw-pumpkinsvg .hw-lobes ellipse{stroke:#b9500c;stroke-width:.7}+.hw-pumpkinsvg .hw-face{fill:var(--hw-face)}+[data-season="halloween"] .hw-pumpkinsvg .hw-eyes{transform-origin:24px 16px;animation:hw-blink 7s ease-in-out 2.5s 4}+@keyframes hw-peek{from{transform:translateY(18px)}to{transform:none}}+@keyframes hw-hop{0%{transform:none}35%{transform:translateY(-7px) rotate(-6deg)}70%{transform:translateY(1px) rotate(3deg)}100%{transform:none}}+@keyframes hw-blink{0%,94%,100%{transform:none}97%{transform:scaleY(.1)}}++.hw-burst{position:fixed;width:0;height:0;z-index:58;pointer-events:none}+.hw-burstbat{+ position:absolute;left:-11px;top:-6px;width:22px;height:11px;opacity:0;+ animation:hw-burst 1.15s cubic-bezier(.2,.7,.3,1) both;+}+@keyframes hw-burst{+ 0%{transform:translate3d(0,0,0) scale(.3) rotate(0);opacity:0}+ 12%{opacity:1}+ 70%{opacity:.9}+ 100%{transform:translate3d(var(--dx),var(--dy),0) scale(1.15) rotate(var(--r));opacity:0}+}++/* -------------------------------------------------------------- spider -- */+/* Drops on its thread from the top, swings to a stop, climbs back up. A tap sends it up fast. */+.hw-spider{+ position:fixed;top:0;inset-inline-end:76px;z-index:55;width:26px;height:0;pointer-events:none;+ transform-origin:50% 0;animation:hw-swing 2.6s ease-in-out .55s both;+}+.hw-drop{position:absolute;left:0;top:0;width:26px;animation:hw-drop 4.4s cubic-bezier(.4,0,.3,1) both}+.hw-thread{+ position:absolute;left:12.5px;bottom:20px;width:1px;height:420px;background:var(--hw-thread);+}+.hw-spiderbtn{+ all:unset;position:absolute;left:-9px;top:-4px;width:44px;height:44px;display:flex;align-items:center;justify-content:center;+ pointer-events:auto;cursor:pointer;-webkit-tap-highlight-color:transparent;+}+.hw-spidersvg{width:26px;height:26px;overflow:visible}+.hw-spidersvg .hw-body{fill:var(--hw-ink)}+.hw-spidersvg .hw-eye{fill:var(--hw-face)}+.hw-spidersvg .hw-legs{fill:none;stroke:var(--hw-ink);stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}+.hw-legs-l{transform-origin:9px 14px;animation:hw-legs .3s ease-in-out 6 alternate}+.hw-legs-r{transform-origin:15px 14px;animation:hw-legs .3s ease-in-out .15s 6 alternate-reverse}+@keyframes hw-legs{from{transform:rotate(-7deg)}to{transform:rotate(7deg)}}+/* where it hangs: below the status bar, beside the header's title */+@keyframes hw-drop{+ 0%{transform:translateY(calc(-40px))}+ 17%{transform:translateY(calc(var(--sat) + 108px))}+ 23%{transform:translateY(calc(var(--sat) + 92px))}+ 29%{transform:translateY(calc(var(--sat) + 100px))}+ 34%,66%{transform:translateY(calc(var(--sat) + 97px))}+ 100%{transform:translateY(-48px)}+}+@keyframes hw-swing{+ 0%{transform:rotate(0)}+ 14%{transform:rotate(9deg)}+ 34%{transform:rotate(-6deg)}+ 54%{transform:rotate(3.5deg)}+ 72%{transform:rotate(-1.5deg)}+ 100%{transform:rotate(0)}+}+.hw-scurry,.hw-scurry .hw-drop{animation-play-state:paused}+.hw-scurry .hw-spiderbtn{animation:hw-scurry .45s cubic-bezier(.5,0,.8,.4) forwards}+.hw-scurry .hw-thread{animation:hw-scurry .45s cubic-bezier(.5,0,.8,.4) forwards}+.hw-scurry .hw-legs{animation-duration:.08s;animation-iteration-count:8}+@keyframes hw-scurry{to{transform:translateY(-280px)}}+/* Reduced motion: no drop, no swing. A small spider sits in the corner for a few seconds. */+.hw-spider.hw-still{animation:none;top:calc(var(--sat) + 6px);inset-inline-end:14px;height:auto}+.hw-still .hw-spidersvg{width:16px;height:16px}+.hw-still .hw-legs{animation:none}++/* --------------------------------------------------------------- witch -- */+.hw-witch{+ position:fixed;top:calc(var(--sat) + 4px);left:0;z-index:40;width:66px;height:38px;pointer-events:none;+ animation:hw-fly 7.5s linear both;+}+.hw-witchsvg{display:block;width:100%;height:100%;fill:var(--hw-ink);opacity:.8}+@keyframes hw-fly{+ 0%{transform:translate3d(-90px,22px,0) rotate(-5deg)}+ 25%{transform:translate3d(24vw,8px,0) rotate(-2deg)}+ 50%{transform:translate3d(50vw,16px,0) rotate(-4deg)}+ 75%{transform:translate3d(76vw,4px,0) rotate(-1deg)}+ 100%{transform:translate3d(calc(100vw + 30px),-6px,0) rotate(-6deg)}+}++@media (prefers-reduced-motion: reduce){+ .hw-spider:not(.hw-still),.hw-witch,.hw-burst{display:none}+}diff --git a/frontend/src/seasonal/halloween.jsx b/frontend/src/seasonal/halloween.jsxnew file mode 100644index 000000000..e618c3e24--- /dev/null+++ b/frontend/src/seasonal/halloween.jsx@@ -0,0 +1,216 @@+import { useEffect, useRef, useState } from 'react'+import { useUI } from '../store/useUI.js'+import { t } from '../lib/i18n.js'+import { vibrate } from '../lib/sound.js'+import { onceToday, doneToday, reducedMotion } from '../lib/seasonal.js'+import './halloween.css'++/* Halloween (v1.4.3), fetched only while the theme shows (components/Seasonal.jsx). All of it is+ hand-drawn inline SVG, moved with CSS transforms and opacity only: no rAF loop, nothing that+ lays the page out again, and every animation has an end. Everything is aria-hidden and lets+ taps through, except the spider and the pumpkin, which are the point. Never on the workout+ screen: App.jsx hides the layer there, and no workout view has a spot. */++/* ---------------------------------------------------------------- art -- */++// A corner web: spokes out of the corner and sagging threads between them, drawn once.+const WEB = (() => {+ const spokes = [3, 22, 44, 66, 87].map(a => (a * Math.PI) / 180)+ const rings = [9, 19, 30, 42, 53]+ const pt = (r, a) => [r * Math.cos(a), r * Math.sin(a)].map(v => v.toFixed(1)).join(' ')+ let d = spokes.map(a => `M0 0L${pt(58, a)}`).join('')+ rings.forEach((r, i) => {+ for (let s = 0; s < spokes.length - 1; s++) {+ const a = spokes[s], b = spokes[s + 1]+ // A little unevenness, so it reads as spun rather than plotted.+ const sag = 0.78 + ((i + s) % 3) * 0.04+ d += `M${pt(r, a)}Q${pt(r * sag, (a + b) / 2)} ${pt(r, b)}`+ }+ })+ return d+})()++// A bat, drawn as its right half and mirrored, so both wings always match.+const BAT = (() => {+ const R = [['M', [16, 5.6]], ['L', [16.9, 3.5]], ['L', [17.5, 5.3]], ['Q', [21, 2.3], [25.5, 2.6]], ['Q', [29.6, 3], [31.6, 6.2]],+ ['Q', [29.2, 5.7], [27.6, 7.7]], ['Q', [25.4, 6.6], [23.8, 8.5]], ['Q', [21.6, 7.8], [20.4, 10.1]], ['Q', [18.6, 9.9], [17.5, 11.5]], ['Q', [16.8, 12.7], [16, 13.8]]]+ const m = ([x, y]) => `${(32 - x).toFixed(1)} ${y}`+ const f = ([x, y]) => `${x} ${y}`+ let d = R.map(([c, a, b]) => c + f(a) + (b ? ' ' + f(b) : '')).join('')+ for (let i = R.length - 1; i > 0; i--) {+ const [c, a, b] = R[i], from = R[i - 1][2] || R[i - 1][1]+ d += c === 'Q' ? `Q${m(a)} ${m(from)}` : `L${m(from)}`+ }+ return d + 'Z'+})()++const Bat = ({ className = '' }) => (+ <svg className={'hw-batsvg ' + className} viewBox="0 0 32 16" aria-hidden="true" focusable="false"><path d={BAT} /></svg>+)++const Web = ({ className = '' }) => (+ <svg className={'hw-web ' + className} viewBox="0 0 60 60" aria-hidden="true" focusable="false"><path d={WEB} /></svg>+)++const Spider = () => (+ <svg className="hw-spidersvg" viewBox="0 0 24 24" aria-hidden="true" focusable="false">+ <g className="hw-legs hw-legs-l">+ <path d="M9 11.6 5.6 8.2 3.4 9.6M8.4 13.6 4.4 12.2 2.4 14.2M8.6 15.6 4.8 16.8 3.4 19.2M9.4 17.4 7 20.2 6.6 22.6" />+ </g>+ <g className="hw-legs hw-legs-r">+ <path d="M15 11.6l3.4-3.4 2.2 1.4M15.6 13.6l4-1.4 2 2M15.4 15.6l3.8 1.2 1.4 2.4M14.6 17.4l2.4 2.8.4 2.4" />+ </g>+ <ellipse className="hw-body" cx="12" cy="14.6" rx="3.9" ry="4.4" />+ <circle className="hw-body" cx="12" cy="9.4" r="2.6" />+ <circle className="hw-eye" cx="11" cy="9.2" r=".75" /><circle className="hw-eye" cx="13" cy="9.2" r=".75" />+ </svg>+)++const Pumpkin = () => (+ <svg className="hw-pumpkinsvg" viewBox="0 0 48 38" aria-hidden="true" focusable="false">+ <defs>+ <radialGradient id="hw-pk" cx="45%" cy="40%" r="65%">+ <stop offset="0" stopColor="#ffab4a" /><stop offset="1" stopColor="#e2600d" />+ </radialGradient>+ </defs>+ <path className="hw-stem" d="M22.2 8.6c-.3-3.6 1.1-6.2 4.2-7.4l1.2 1.9c-2 .9-2.7 2.8-2.4 5.5Z" />+ <path className="hw-vine" d="M26 6.4c2.4-1.6 5-.9 5.6 1.2-1.9-.8-3.7-.6-5.2.7" />+ <g fill="url(#hw-pk)" className="hw-lobes">+ <ellipse cx="11" cy="23" rx="8.6" ry="11.6" />+ <ellipse cx="37" cy="23" rx="8.6" ry="11.6" />+ <ellipse cx="16.5" cy="22.4" rx="9.6" ry="13.2" />+ <ellipse cx="31.5" cy="22.4" rx="9.6" ry="13.2" />+ <ellipse cx="24" cy="22" rx="9.4" ry="14" />+ </g>+ <g className="hw-face">+ <path className="hw-eyes" d="M13.4 18.2h6.4l-3.1-5.4ZM28.2 18.2h6.4l-3.3-5.4Z" />+ <path d="M22.5 22.4h3L24 19.9Z" />+ <path d="M12.6 24.6Q24 31 35.4 24.6l-1.9 4.1-2.4-1.3-2 3-2.5-1.9-2.6 3-2.6-3-2.5 1.9-2-3-2.4 1.3Z" />+ </g>+ </svg>+)++const Witch = () => (+ <svg className="hw-witchsvg" viewBox="0 -3 80 46" aria-hidden="true" focusable="false">+ <path d="M7 34.2 74 25.6l.3 2.2L7.4 36.4Z" />+ <path d="M1.4 29.6c4.6.3 8.6 1.6 12.6 3.4l.6 3.6c-4.2 1.8-8.4 3-13.4 3.4 2.4-2.2 3.4-4.2 2.6-6.4-.4-1.6-1.2-2.8-2.4-4Z" />+ <path d="M35.6 18.2c-7.4 1.4-12.6 5.6-16 10.6 4.2-1.6 8.6-2 13-1.4Z" />+ <path d="M34.4 30.2c-3.4-5.8-2-11.8 2.6-15.4 3.2-2.4 7.4-2.4 10 .4 2.8 3 2.4 7.6.8 11.2l3.8 2.4Z" />+ <path d="M45.4 26.2 53.6 31h3.4l-.4 2.2h-4.4l-8.6-4.6Z" />+ <circle cx="46.8" cy="11.4" r="3.6" />+ <path d="M50 10.8l3.8 1.6-3.6.6Z" />+ <path d="M38.8 8.4h15.2c.6 0 .6 1.2 0 1.2H38.8c-.6 0-.6-1.2 0-1.2Z" />+ <path d="M42.4 8.6h7.4C48 4.6 45 1 40 -1.6c2.6 3 3.4 6 2.4 10.2Z" />+ </svg>+)++/* -------------------------------------------------------- the layer -- */++// Once per session at most, decided once: the witch is rare on purpose.+let witchPlan = null+let witchFlown = false+let spiderTried = false++/** The spider at the day's first start, and now and then the witch. Nothing while `hidden`. */+export function Layer({ hidden, fresh }) {+ const [spider, setSpider] = useState(null) // null | 'drop' | 'still'+ const [witch, setWitch] = useState(false)+ useEffect(() => {+ if (spiderTried || hidden) return+ spiderTried = true+ // A start straight into a workout, or a day it already dropped on this device: no spider.+ if (!fresh || !onceToday('spider')) return+ const still = reducedMotion()+ setSpider(still ? 'still' : 'drop')+ // Reduced motion: a tiny spider sits in the corner for a few seconds, and that is all.+ if (still) { const tm = setTimeout(() => setSpider(null), 4000); return () => clearTimeout(tm) }+ }, [hidden, fresh])+ useEffect(() => {+ if (hidden || witchFlown || reducedMotion()) return+ if (witchPlan === null) witchPlan = Math.random() < 0.4 ? 20000 + Math.random() * 60000 : false+ if (!witchPlan) return+ const tm = setTimeout(() => { witchFlown = true; setWitch(true) }, witchPlan)+ return () => clearTimeout(tm)+ }, [hidden])+ if (hidden) return null+ return <>+ {spider && <SpiderDrop still={spider === 'still'} onGone={() => setSpider(null)} />}+ {witch && <div className="hw-witch" aria-hidden="true" onAnimationEnd={() => setWitch(false)}><Witch /></div>}+ </>+}++function SpiderDrop({ still, onGone }) {+ const [scurry, setScurry] = useState(false)+ if (still) return <div className="hw-spider hw-still" aria-hidden="true"><Spider /></div>+ // The outer element swings on its thread (a damped pendulum), the inner one drops and climbs.+ return <div className={'hw-spider' + (scurry ? ' hw-scurry' : '')} aria-hidden="true"+ onAnimationEnd={e => { if (e.animationName === 'hw-scurry' && e.target.classList.contains('hw-spiderbtn')) onGone() }}>+ <div className="hw-drop" onAnimationEnd={e => { if (e.target === e.currentTarget) onGone() }}>+ <span className="hw-thread" />+ <button type="button" className="hw-spiderbtn" tabIndex={-1} aria-hidden="true"+ onPointerDown={e => { e.stopPropagation(); setScurry(true) }}><Spider /></button>+ </div>+ </div>+}++/* ----------------------------------------------------- the spots -- */++/** Decoration for one place in a view. Unknown spots draw nothing. */+export function Deco({ spot }) {+ if (spot === 'home-bats') return <HeaderBats />+ if (spot === 'home-hero') return <Web className="hw-web-br" />+ if (spot === 'plan-card') return <Web className="hw-web-tr" />+ if (spot === 'home-streak') return <PeekPumpkin />+ return null+}++// Three bats cross behind the title a few times, then the sky stays quiet until the next visit.+function HeaderBats() {+ const still = reducedMotion()+ return <div className={'hw-bats' + (still ? ' hw-bats-still' : '')} aria-hidden="true">+ {[0, 1, 2].map(i => <span key={i} className={'hw-batlane hw-lane' + i}><span className="hw-flap"><Bat /></span></span>)}+ </div>+}++// Said when the pumpkin is found: one a day, the same one all day.+const BOOS = [+ 'Boo! You found the pumpkin. It was watching you train.',+ 'Boo! Pumpkin found. Your next PR is now officially haunted.',+ 'Boo! The bats were not part of the warm-up.',+ 'Boo! Found it. The spiders owe you a rep.',+]++function PeekPumpkin() {+ const ref = useRef(null)+ const [burst, setBurst] = useState(null)+ const [hop, setHop] = useState(0)+ useEffect(() => {+ if (!burst) return+ const tm = setTimeout(() => setBurst(null), 1400)+ return () => clearTimeout(tm)+ }, [burst])+ const tap = e => {+ // The card it hides behind opens the calendar; the pumpkin is its own thing.+ e.stopPropagation()+ const toast = useUI.getState().toast+ setHop(h => h + 1)+ if (!doneToday('pumpkin') && onceToday('pumpkin')) {+ const r = ref.current?.getBoundingClientRect()+ if (r && !reducedMotion()) setBurst({ x: r.left + r.width / 2, y: r.top + r.height / 2 })+ // A "boo": two short taps and a longer one, on whatever this device can buzz.+ vibrate([25, 50, 60])+ toast(t(BOOS[new Date().getDate() % BOOS.length]))+ } else toast(t('The pumpkin is napping. Come back tomorrow.'))+ }+ return <>+ <span className="hw-peek" aria-hidden="true">+ <button type="button" ref={ref} key={hop} className={'hw-pumpkin' + (hop ? ' hw-hop' : '')} tabIndex={-1} aria-hidden="true"+ onClick={tap} onKeyDown={e => e.stopPropagation()}><Pumpkin /></button>+ </span>+ {burst && <div className="hw-burst" aria-hidden="true" style={{ left: burst.x, top: burst.y }}>+ {BURST.map(([dx, dy, r], i) => <span key={i} className="hw-burstbat" style={{ '--dx': dx + 'px', '--dy': dy + 'px', '--r': r + 'deg', animationDelay: i * 35 + 'ms' }}><Bat /></span>)}+ </div>}+ </>+}+// Where each bat of the burst ends up, relative to the pumpkin: mostly up and out.+const BURST = [[-120, -150, -18], [-60, -210, -8], [10, -240, 4], [80, -190, 12], [140, -120, 20], [-150, -60, -24], [160, -40, 26]]diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsxindex 164da0102..cecc2985c 100644--- a/frontend/src/views/Home.jsx+++ b/frontend/src/views/Home.jsx@@ -18,6 +18,7 @@ import { glyphOf } from '../lib/glyphs.js'import { dayNoteOf } from '../lib/day-notes.js'import { weighInAt } from '../lib/bodyweight.js'import WeightRate from '../components/WeightRate.jsx'+import { SeasonDeco } from '../components/Seasonal.jsx'// Home = what to do now + a quick glance. Deep charts & history live in Stats.export default function Home() {@@ -105,6 +106,7 @@ export default function Home() {return <div className="narrow"><div className="hdr">+ <SeasonDeco spot="home-bats" /><div><h1>{user ? t('Hi {0}', user.name) : 'openGym'}</h1><div className="sub">{today.toLocaleDateString(dateLocale(), { weekday: 'long', day: 'numeric', month: 'long' })}</div></div><button className="iconbtn" onClick={() => nav('/settings')} aria-label={trouble ? t('Settings') + ', ' + t('Connection problem') : t('Settings')}><Icon name="gear" />{trouble && <span className="tab-dot" aria-hidden="true" />}</button></div>@@ -159,6 +161,7 @@ export default function Home() {{t('Choose a different workout')}</Button></div>}+ <SeasonDeco spot="home-hero" /></div>{/* Jump to the gym check-in cards (QR membership codes). Shown here as a quick tap on@@ -229,6 +232,7 @@ export default function Home() {</div>}<div className="card tappable" style={{ cursor: 'pointer' }} {...tappable(() => calendarSheet())}>+ <SeasonDeco spot="home-streak" /><div className="row between"><div><div className="row" style={{ gap: 7, fontSize: 22, fontWeight: 600, letterSpacing: '-.021em' }}>diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsxindex f8540b727..c0799c786 100644--- a/frontend/src/views/Plan.jsx+++ b/frontend/src/views/Plan.jsx@@ -9,6 +9,7 @@ import {planHasRoutines, exportPlanFile, printWholePlan, importPlanFile,} from '../sheets.jsx'import Icon from '../components/Icon.jsx'+import { SeasonDeco } from '../components/Seasonal.jsx'import { Button, Row, Section, Segmented } from '../components/ui.jsx'import SwipeRow from '../components/SwipeRow.jsx'import { copyRoutine, deleteRoutine, restoreRoutine, routineSnapshot } from '../lib/routines.js'@@ -321,7 +322,7 @@ function Schedule({ S, update, nav, mode }) {{mode === 'week' ? <><h4 className="sec">{t('This week')}</h4>- <div className="list plan-week">{weekOrder(ws).map(d => dayRow(d))}</div>+ <div className="list plan-week">{weekOrder(ws).map(d => dayRow(d))}<SeasonDeco spot="plan-card" /></div><p className="sect-f">{t('Want two routines on one day? Tap the day and pick both.')}</p></> : <div className="rotation"><div className="row between plan-sec-h">diff --git a/frontend/src/views/Settings.jsx b/frontend/src/views/Settings.jsxindex 239984232..4f77823b0 100644--- a/frontend/src/views/Settings.jsx+++ b/frontend/src/views/Settings.jsx@@ -58,6 +58,7 @@ import { reportSheet } from '../components/ReportSheet.jsx'import { csvExportSheet } from '../components/CsvExportSheet.jsx'import GymReminderPage, { GymEditPage } from './GymReminder.jsx'import { readGymConfig } from '../lib/gym-reminder.js'+import { THEMES, inSeason, seasonChoice, activeSeason } from '../lib/seasonal.js'/* Settings (v1.3.11). The root is one screen: an account card, eleven rows that each open a page(/settings/<page>), and a search over every row. Rare things live one level further down@@ -848,6 +849,11 @@ export default function Settings({ page = null, find = null, via = null, entryKe/></Row></Section>+ {/* Halloween and whatever comes after it (lib/seasonal.js), on a page of their own. */}+ <Section>+ <Row icon="pumpkin" iconTint="var(--orange)" title={t('Seasonal themes')} subtitle={t('Little extras for the time of year.')}+ value={activeSeasonTitle(S)} accessory="chevron" onClick={() => open('themes')} />+ </Section><Section title={t('On Home')}>{/* Membership QR codes on Home (views/CheckIn.jsx); off = no Home card, no route. */}<Row icon="qr" iconTint="var(--blue)" title={t('Gym check-in')}@@ -869,6 +875,29 @@ export default function Settings({ page = null, find = null, via = null, entryKe</Section></>,+ // One section per seasonal theme (lib/seasonal.js). Auto shows it in its weeks; On keeps it+ // all year, Off never. Synced like the rest of Look; once-a-day surprises stay per device.+ themes: () => <>+ {THEMES.map(th => {+ const choice = seasonChoice(S, th.id)+ const set = (k, v) => update(s => { s.seasonal = { ...(s.seasonal || {}), [k]: v } })+ const note = choice === 'on' ? t('On all year round. Bold choice.')+ : choice === 'off' ? t('Off, even in season. Fair enough.')+ : inSeason(th) ? t(th.during) : t(th.back)+ return <Section key={th.id} footer={note}>+ <Row icon={th.icon} iconTint={th.tint} title={t(th.title)}>+ <Segmented className="seg-inline"+ options={[{ value: 'auto', label: t('Auto') }, { value: 'on', label: t('On') }, { value: 'off', label: t('Off') }]}+ value={choice} onChange={v => set(th.id, v)} />+ </Row>+ {th.colors && <Row icon="palette" iconTint="var(--purple)" title={t(th.colorsTitle)} subtitle={t(th.colorsNote)}>+ <Switch aria-label={t(th.colorsTitle)} checked={S.seasonal?.[th.id + 'Colors'] === true}+ onChange={v => set(th.id + 'Colors', v)} />+ </Row>}+ </Section>+ })}+ </>,+data: () => <><Section title={t('Back up')}><Row icon="share" iconTint="var(--blue)" title={t('Export backup (JSON)')} subtitle={hasMedia ? t('Without photos and videos') : undefined} accessory="chevron" onClick={doExport} />@@ -1336,6 +1365,13 @@ function PushCard({ S, update, toast }) {// the Library, exercise picker, and flags routine entries that need something outside it// (see lib/equipment.js). Purely local/synced state — no server changes needed.// What the chosen accent is called: a preset's colour name, or the user's own.+// The theme showing right now, by name, for the row that opens them.+function activeSeasonTitle(S) {+ const id = activeSeason(S)+ const th = id && THEMES.find(x => x.id === id)+ return th ? t(th.title) : null+}+function accentLabel(S) {const k = accentKey(S)return k === CUSTOM ? t('Your own color') : t(ACCENT_NAMES[k] || 'Green')diff --git a/frontend/src/views/settings-pages.js b/frontend/src/views/settings-pages.jsindex 062089225..c73cdfdca 100644--- a/frontend/src/views/settings-pages.js+++ b/frontend/src/views/settings-pages.js@@ -25,6 +25,8 @@ export const PAGES = {// Phone app only (#614): the gyms that get you a nudge when you arrive, and one of them.gym: { title: 'Gym reminder', icon: 'mapPin', tint: 'var(--green)', parent: 'reminders' },'gym-edit': { title: 'Your gym', icon: 'mapPin', tint: 'var(--orange)', parent: 'gym' },+ // Seasonal themes (lib/seasonal.js), one section per theme.+ themes: { title: 'Seasonal themes', icon: 'pumpkin', tint: 'var(--orange)', parent: 'look' },}export const PAGE_IDS = Object.keys(PAGES)@@ -124,6 +126,10 @@ export const SEARCH = [{ page: 'look', title: 'Exercise drawings', icon: 'figureStrength', tint: 'var(--teal)', kw: 'figure male female woman man picture', opts: ['Male', 'Female'] },{ page: 'look', title: 'Gym check-in', icon: 'qr', tint: 'var(--blue)', kw: 'qr code membership card check in barcode' },{ page: 'look', title: 'Body weight', icon: 'scale', tint: 'var(--green)', kw: 'weight card home' },+ { page: 'look', title: 'Seasonal themes', icon: 'pumpkin', tint: 'var(--orange)', kw: 'seasonal season holiday halloween theme decoration' },+ // Seasonal themes+ { page: 'themes', title: 'Halloween', icon: 'pumpkin', tint: 'var(--orange)', kw: 'halloween seasonal theme spooky spider pumpkin bats witch october decoration', opts: ['Auto', 'On', 'Off'] },+ { page: 'themes', title: 'Spooky colors', icon: 'palette', tint: 'var(--purple)', kw: 'halloween orange purple accent color colour seasonal' },{ page: 'look', title: 'Show connection status', icon: 'cloud', tint: 'var(--blue)', kw: 'sync offline banner bar connection', when: c => !c.demo },// Data & backup{ page: 'data', title: 'Export backup (JSON)', icon: 'share', tint: 'var(--blue)', kw: 'export backup json download save' },diff --git a/frontend/src/views/settings-pages.test.jsx b/frontend/src/views/settings-pages.test.jsxindex c9a4d0058..7e52d0d4a 100644--- a/frontend/src/views/settings-pages.test.jsx+++ b/frontend/src/views/settings-pages.test.jsx@@ -302,7 +302,7 @@ describe('the pages', () => {it('each search entry is a row on its page (guest in a browser)', () => {const byPage = {}for (const e of SEARCH) if (pageVisible(PAGES[e.page].parent || e.page, guestWeb) && (!e.when || e.when(guestWeb))) (byPage[e.page] ||= []).push(e.title)- expect(Object.keys(byPage).sort()).toEqual(['about', 'advanced', 'alerts', 'data', 'equipment', 'look', 'plan', 'units', 'workout'])+ expect(Object.keys(byPage).sort()).toEqual(['about', 'advanced', 'alerts', 'data', 'equipment', 'look', 'plan', 'themes', 'units', 'workout'])for (const [page, want] of Object.entries(byPage)) {mount(page)const have = titles()