Skip to content

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.

Halloween: pumpkin peeks with its eyes, witch flies below the connection bar, bats on Plan too, spider follows the column on a computer

Duarte Santos8429cc7de235
diff --git a/frontend/src/seasonal/halloween.css b/frontend/src/seasonal/halloween.css
index 28f74738c..ea0f8a233 100644
--- a/frontend/src/seasonal/halloween.css
+++ b/frontend/src/seasonal/halloween.css
@@ -25,7 +25,7 @@
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)}
+[data-season="halloween"] .hw-web-tr{right:0;top:0;width:46px;height:46px;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}
@@ -38,22 +38,22 @@
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-flap{position:absolute;left:0;display:block;width:28px;height:14px;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-lane1 .hw-flap{top:30px;width:20px;height:10px;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}
+[data-season="halloween"] .hw-lane2 .hw-flap{top:16px;width:15px;height:8px;animation-duration:.15s}
@keyframes hw-cross{
0%{transform:translate3d(-6%,14px,0);opacity:0}
- 3%{opacity:.5}
+ 3%{opacity:.65}
14%{transform:translate3d(45%,-2px,0)}
- 27%{opacity:.5}
+ 27%{opacity:.65}
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)}}
+@keyframes hw-flap{from{transform:scaleY(1)}to{transform:scaleY(.5) translateY(2px)}}
/* 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}
@@ -65,10 +65,10 @@
/* 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;
+ position:absolute;bottom:100%;inset-inline-end:52px;width:44px;height:16px;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;
+ all:unset;position:absolute;left:7px;top:1px;width:30px;height:24px;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)}
@@ -78,7 +78,7 @@
.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-peek{from{transform:translateY(16px)}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)}}
@@ -97,18 +97,20 @@
/* -------------------------------------------------------------- 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;
+ /* beside the header's button, on a phone and on the 640px column of a computer alike */
+ position:fixed;top:0;inset-inline-end:max(76px,calc(50vw - 244px));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}
+/* from far above the screen down to the spider's head */
.hw-thread{
- position:absolute;left:12.5px;bottom:20px;width:1px;height:420px;background:var(--hw-thread);
+ position:absolute;left:12.5px;top:-420px;width:1px;height:432px;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{width:30px;height:30px;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}
@@ -138,13 +140,13 @@
.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-spider.hw-still{animation:none;top:calc(var(--sat) + var(--conn, 0px) + 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;
+ position:fixed;top:calc(var(--sat) + var(--conn, 0px) + 4px);left:0;z-index:40;width:70px;height:40px;pointer-events:none;
animation:hw-fly 7.5s linear both;
}
.hw-witchsvg{display:block;width:100%;height:100%;fill:var(--hw-ink);opacity:.8}
diff --git a/frontend/src/seasonal/halloween.jsx b/frontend/src/seasonal/halloween.jsx
index e618c3e24..29ef4958c 100644
--- a/frontend/src/seasonal/halloween.jsx
+++ b/frontend/src/seasonal/halloween.jsx
@@ -93,14 +93,17 @@ const Pumpkin = () => (
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="M.8 28.8c4.8.2 9 1.6 13.2 3.6l.6 3.8c-4.4 2-8.8 3.2-14 3.6 2.6-2.4 3.6-4.6 2.8-6.8-.4-1.6-1.4-3-2.6-4.2Z" />
+ <path d="M14.8 31.6l1.6-.2.8 5.4-1.6.3Z" />
+ <path d="M37.2 17.4c-7.8 1.2-13.4 5.6-17.2 11.2 4.6-1.8 9.4-2.2 14-1.6Z" />
<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="M46 18.4c2.6 2 4.8 4.6 6.4 7.8l-2 .9c-1.8-2.6-4-4.8-5.8-6.6Z" />
<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" />
+ <path d="M43.4 11.4c-3.4.8-5.8 3.4-7.8 7 2.8-1.6 5-2.2 7.6-2.4Z" />
+ <circle cx="46.6" cy="12.6" r="3.4" />
+ <path d="M49.6 12.2l3.8 1.4-3.6.8Z" />
+ <path d="M37.4 10.2c3.2-1.8 13.6-2 17.8-.5.7.3.5 1.4-.3 1.4-5.2-.3-11.6 0-17 .5-.9 0-1.2-.9-.5-1.4Z" />
+ <path d="M41.6 9.6h8.6C48.4 5 45.2 1.2 39.6-1.8c2.8 3.2 3.4 6.6 2 11.4Z" />
</svg>
)
@@ -157,7 +160,7 @@ function SpiderDrop({ still, onGone }) {
/** Decoration for one place in a view. Unknown spots draw nothing. */
export function Deco({ spot }) {
- if (spot === 'home-bats') return <HeaderBats />
+ if (spot === 'header-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 />
diff --git a/frontend/src/views/Home.jsx b/frontend/src/views/Home.jsx
index cecc2985c..c23b6de4f 100644
--- a/frontend/src/views/Home.jsx
+++ b/frontend/src/views/Home.jsx
@@ -106,7 +106,7 @@ export default function Home() {
return <div className="narrow">
<div className="hdr">
- <SeasonDeco spot="home-bats" />
+ <SeasonDeco spot="header-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>
diff --git a/frontend/src/views/Plan.jsx b/frontend/src/views/Plan.jsx
index c0799c786..71624bb8f 100644
--- a/frontend/src/views/Plan.jsx
+++ b/frontend/src/views/Plan.jsx
@@ -169,6 +169,7 @@ export default function Plan() {
return <div className="narrow plan">
<div className="hdr">
+ <SeasonDeco spot="header-bats" />
<div><h1>{t('Plan')}</h1><div className="sub">{mode === 'rotation' ? t('Your routines in a loop') : t('Your weekly routine')}</div></div>
<div className="hdr-actions">
{showCoach && <Button size="sm" variant="tinted" icon="sparkles" onClick={() => nav('/coach')}>{t('Coach')}</Button>}
@@ -304,6 +305,8 @@ function Schedule({ S, update, nav, mode }) {
: <Segmented className="seg-inline" value={mode} onChange={setMode}
options={[{ value: 'week', label: t('Fixed Week') }, { value: 'rotation', label: t('Rotation') }]} />}
</Row>
+ {/* a cobweb in the card's empty top corner, in season (components/Seasonal.jsx) */}
+ <SeasonDeco spot="plan-card" />
</Section>
{!S.routines.length && <div className="empty plan-empty">
@@ -322,7 +325,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))}<SeasonDeco spot="plan-card" /></div>
+ <div className="list plan-week">{weekOrder(ws).map(d => dayRow(d))}</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">