Commit Graph

857 Commits

Author SHA1 Message Date
Alexander f447520aaa fix(faith): resolve 1962 bundles via createRequire and add deploy pre-push hook
CI / update (push) Successful in 1m27s
romcal's 1962 bundle files live outside the package's exports map and were
being loaded via a cwd-relative path. Under systemd the server runs with
cwd /usr/share/webapps/homepage/dist/, so node_modules/romcal/... resolved
against dist/ and hit ERR_MODULE_NOT_FOUND. Switch to createRequire +
require.resolve('romcal/package.json') so the bundle path is anchored to
the actual package root regardless of cwd.

Also track scripts/hooks/pre-push which runs scripts/deploy.sh after a
master push to origin. Git has no native post-push hook; pre-push is the
closest client-side equivalent — if deploy fails the push is aborted.
Install with: ln -sf ../../scripts/hooks/pre-push .git/hooks/pre-push
2026-04-20 16:44:59 +02:00
Alexander 9c119b8df2 feat(fitness): add guided body-parts measurement wizard
New /fitness/measure/body-parts route with step-by-step tape-measure
flow, per-step tips, L/R paired inputs, inline history chart, and
review-before-save summary. Measure page replaces the old body-parts
accordion with a launch button. Fitness layout goes full-bleed and
hides the site footer for this route via a :has() attribute selector,
and the desktop 3-column grid now extends rail and side panel up past
the floating nav while the middle column compensates with padding.
2026-04-20 16:28:09 +02:00
Alexander b2b69301aa feat(fitness): add how-to-measure hints to body-parts form
Inline italic captions under each single-sided input (neck, shoulders,
chest, waist, hips) and row-spanning captions with a primary accent bar
under each paired row (biceps, forearms, thighs, calves) — one tip per
pair, not per side. EN + DE copy.
2026-04-20 13:42:31 +02:00
Alexander e9010b9e13 fix(fitness): save and recall paired L/R body measurements
Schema uses flat keys (leftBicep, rightBicep, leftForearm, ...), but
create/edit forms built nested objects (biceps: {left, right}), which
Mongoose silently stripped — so paired parts never persisted. The
latest-measurements endpoint also wraps the body-parts doc in
{value, date}; the display path skipped the .value hop, hiding every
body-part field. Switch client to flat keys end-to-end.
2026-04-20 13:22:34 +02:00
Alexander 8e0b1d7b96 feat(faith): enrich ring with next-year wedge, feast pill, and LY-aware navigation
- Reserve an angular gap in the ring and render a clickable green triangle
  that jumps to Advent I of the following liturgical year; on hover the
  center numeral previews the upcoming LY in a muted color.
- Show the liturgical year (not civil) in the ring center so Advent 2025
  already reads 2026, and promote the selected arc to the top of the
  SVG paint order so its highlighted border is never clipped by neighbors.
- Lift the selected-season glow by mixing the season tint with the
  foreground color so purple stays visible on dark backgrounds and white
  on light backgrounds.
- On feast-dot hover, pop a colored SVG pill with the short date and feast
  name, tracked by ISO so it auto-clears when the dot is unmounted by
  navigation.
- Server now derives the liturgical year from the selected date, shifting
  yearMap forward when the URL civil date lies past Advent I of that year
  so clicks on Dec 25 no longer select the prior post-Pentecost cycle.
- Add data-sveltekit-keepfocus on ring anchors to avoid the focus-scroll
  jump after client-side navigation.
2026-04-20 13:14:55 +02:00
Alexander e37d41b180 feat(faith): adopt flat-id romcal fork and simplify 1962 calendar rendering
Switch the romcal dependency to AlexBocken/romcal (monorepo fork with
collapsed bucket prefixes) and strip the runtime prefix-fallback chain
from liturgicalCalendar.ts — name/propers lookups now use a single
flat id. The 1962 data model shrinks to just what the rendering uses
(commem {id,name}, detail carrying propers as {key, la[], local[]})
and the detail + overview pages drop the rubrics/octave/properSource
fields that never got wired in.
2026-04-18 22:28:48 +02:00
Alexander e036588795 feat(faith): animate ring rotation and restyle calendar month/detail
- Rotate the ring smoothly to put the selected day under a static vertical
  needle pin; pivot uses a shortest-arc Tween, respects prefers-reduced-motion,
  and falls back to today when no selection. Pin + bar cross-fade color in
  lockstep (650ms cubicOut) to the selected day's liturgical color (gold when
  selected == today).
- Split the overview into an inline hero (selected day) and a dedicated
  /detail/{yyyy}/{mm}/{dd} route that opens on hero click; drop the old
  inline detail block.
- Restyle the month grid to a minimalist card-grid: taupe feria fills,
  rounded cells, gold today-ring + dot, Roman-numeral rank badges, and
  equal-width columns via minmax(0, 1fr) so long feast names no longer
  stretch a column.
- Default the calendar view to the ring, reorder the view switcher
  (ring first), and match hero-card color transition to the ring timing.
- Extract shared calendar types to $lib/calendarTypes.ts and server helpers
  to $lib/server/liturgicalCalendar.ts so the overview + detail routes share
  one source of truth. Bump romcal dep to the dev branch, alias the Swiss
  1969 bundle so its exports resolve.
- Bump version to 1.35.0.
2026-04-18 17:54:41 +02:00
Alexander 2970dc0451 feat(faith): render 1962 Mass propers with scripture refs and Bible fallback
Show propers text for each 1962 celebration with scripture reference pills
grouping each block. When a translated proper is missing, fall back to the
local-language Bible (Douay-Rheims for en, Allioli for de), showing a note
above the translated column. Handles multi-segment refs (e.g. "Ps 118:85;
118:46") with inherited book/chapter, and shifts Vulgate→Hebrew psalm
numbering for Allioli.

Also restructures date navigation as folder-based optional params
(/yyyy/mm/dd) with the rite forced as a required path segment so day/month
navigation stays within the active rite.
2026-04-14 22:44:03 +02:00
Alexander 3a2e2a9408 feat(faith): show accuracy disclaimer on 1962 calendar and bump romcal
Add a small banner on the 1962 rite view noting that day-to-day data is
still being verified and that local proper calendars (diocese, order,
national feasts) are not yet layered on top of the general Roman
calendar. Bump the romcal dep to AlexBocken/romcal1962#e4731a8 for the
Holy Week / Easter Octave name fixes and the Pentecost-season color fix
(ordinary-time Sundays are now Green, not White/Red).
2026-04-13 18:56:43 +02:00
Alexander af0f50abb6 feat(stickers): expand blobcat catalog with Tirifto set and drop mismatched art
Replace four tastytea-style SVGs (blanket, hammer, teapot, heart_tastytea)
whose 800px viewBox clashed with the 33.866666 viewBox of the rest, and add
the full Tirifto gutkato_ set. Catalog grows from 54 to 113 positive stickers
(new foods/drinks, rose and cat colors, professions, cute expressions, signs).
2026-04-13 18:56:25 +02:00
Alexander a0ac5215c4 feat(faith): add calendar tile to faith landing and soften rite wording
Adds a calendar tile to the /faith (glaube/fides) LinksGrid linking to the
liturgical calendar. Homepage description and WIP body reference the "older
rite" / "alten Ritus" rather than "Tridentine" to avoid loaded connotations;
subtitle labels keep the neutral Ordinary/Extraordinary Form terminology.
2026-04-13 11:39:11 +02:00
Alexander 21c8c196df feat(faith): add liturgical calendar with 1969/1962 rite toggle
Adds `/faith/calendar`, `/glaube/kalender`, `/fides/calendarium` route backed by
romcal v3 + @romcal/calendar.general-roman with native EN/DE/LA locales. Month
grid, today hero, and day detail panel use liturgical colors from the rubric.

Header gets a segmented 1969/1962 pill toggle; selecting 1962 shows a WIP
placeholder (Tridentine calendar data not yet wired up).
2026-04-13 10:55:04 +02:00
Alexander 7ee5f7d183 fix(rosary): trigger haptic on pointerup so iOS Safari vibrates
WebKit's hidden <input type="checkbox" switch> haptic trick is gated on
tap-completion, not tap-start. Firing on pointerdown ran the programmatic
click() before iOS committed to "this is a tap" so the switch-toggle
haptic was suppressed. pointerup lands inside iOS's tap-completion
window — still earlier than click (no movement filter, no 300ms wait).
Android native bridge path is unaffected.
2026-04-13 10:54:07 +02:00
Alexander 4dba5ea4fd feat(nutrition): reactive quick-log recents and favorites
Derive recents from current-day entries merged with historical
server data so logging a food updates the quick-log bar instantly.
FoodSearch now emits onfavoritechange so toggling a heart keeps
the quick-log favorites tab in sync without reloading.
2026-04-13 09:52:31 +02:00
Alexander 465bd9b25a feat(fitness): replace ExercisePicker dropdowns with icon pills
Align muscle group and equipment filters in the exercise picker
with the rest of the fitness UI — horizontal pill scrollers, multi-
select, with Lucide icons for each equipment type.
2026-04-13 09:52:25 +02:00
Alexander 3876e6d384 feat(nutrition): change meal of logged food via edit pills or drag-and-drop
Edit mode now shows a pill row (breakfast/lunch/dinner/snack with their
icons) beneath the grams input so the entry can be moved to another meal.
Food cards are also draggable; dropping onto a different meal section
optimistically moves the entry (rolls back on API error). Desktop/pointer
only — touch devices use the pill row.
2026-04-13 09:34:47 +02:00
Alexander 7c3e90933d feat(fitness): support repeat groups in interval training templates
Allow users to nest steps inside a repeat group (e.g. "5×: 30s sprint,
60s recovery") when building GPS interval templates. Groups are tagged
{ type: 'group', repeat, steps } alongside flat { type: 'step' } entries
and capped at one nesting level. Entries are expanded into a flat list
before handing off to the native Android TTS/interval service, so the
runtime state machine is unchanged.
2026-04-13 09:17:55 +02:00
Alexander 0ef8ee38c5 feat(fitness): classify exercises by type and redesign filter UI
Distinguish stretches, strength, cardio, and plyometric exercises
with a curated `exerciseType` field that overrides mislabels in
ExerciseDB for the hand-curated stretch set. Surface the type as
pills on the detail page and as a filter toggle on the list page.

Replace the muscle-group and equipment dropdowns with horizontally
scrolling pill rows; equipment pills carry Lucide icons, and the
type toggle shows a flexed-bicep / person / layers glyph. Selected
muscle groups hoist to the front of the scroller.
2026-04-13 08:59:12 +02:00
Alexander 4692bf9bf7 feat(recipes): redesign cake-form and baking info with collapsible card pattern
Viewer: cake-form adjust now collapses into a summary trigger with live
factor badge; shape picker replaced with icon-only tiles that flex to
fill the row; numeric inputs gain inline cm suffix; restore-default link
appears when user deviates from the default. Editor: default-Backform
config mirrors the same card + tile pattern (adds "none" tile), plus
inline cm suffixes. Baking info row in instruction editor becomes a
click-to-reveal card with summary chips, mode presets, and editable
fields behind the chevron.
2026-04-12 21:46:51 +02:00
Alexander f108e9ceaa feat: align recipe edit page with viewer design
Replace CardAdd with EditTitleImgParallax so /rezepte/edit/[name]
mirrors the hero-parallax layout of /rezepte/[name]. Add Lucide icons
and a width-constrained info-card grid to CreateStepList's additional
info section. Refactor the English translation view to use semantic
theme vars, side-by-side German/English field comparison, and a card
aesthetic matching the rest of the site.

Fix portions binding bug where the shared portions store was being
written by both language ingredient lists. CreateIngredientList now
accepts a bindable portions prop; the English list uses it with
useStore=false to stay isolated from the German value.
2026-04-12 21:22:53 +02:00
Alexander 69c2e05462 feat: add tactile haptic feedback to rosary prayer cards
Every prayer card now vibrates on tap — non-decade cards advance to the
next section, decade cards increment the Ave Maria counter with auto-scroll
at 10. Two profiles (bead vs card) give distinct tactile feel; the 10th
bead fires the heavier card haptic to mark decade completion.

Native Android path via AndroidBridge.forceVibrate uses VibrationAttributes
USAGE_ACCESSIBILITY so vibration bypasses silent / Do-Not-Disturb inside
the Tauri app. Browser falls back to the web-haptics npm package. Haptic
fires on pointerdown with touch-action: manipulation for near-zero tap
latency; state change stays on click so scroll gestures don't advance.

- Remove CounterButton (whole card is now the tap target)
- Replace emoji with Lucide BookOpen icon, restyle citation as an
  understated inline typographic link (no background chip)
- Drop decade min-height leftover from the pre-auto-advance layout

Bumps site to 1.27.0 and Tauri app to 0.5.0 (new Android capability).
2026-04-12 20:15:40 +02:00
Alexander cfd1d953fb fix: adjust LinksGrid nth-child offsets for earlier, more frequent color pops
Shift pop-b and pop-c selectors so accent colors appear sooner in the
grid and the light/white pop-c repeats more frequently (every 5th
instead of every 7th item).
2026-04-11 21:34:23 +02:00
Alexander a8f07ad800 feat: add chat.bocken.org link to homepage links grid 2026-04-11 19:39:32 +02:00
Alexander db1cd76bb6 feat: add hold timer for timed exercises with full sync support
- Play/Stop button replaces checkmark for duration-only exercises
- Green countdown bar with auto-completion and rest timer chaining
- Display duration in seconds (SEC) instead of minutes for holds
- ActiveWorkout model now preserves distance/duration fields on sync
- Hold timer state syncs across devices via SSE
- Workout summary shows per-set hold times for duration exercises
- Template diff compares and displays duration changes correctly
2026-04-11 17:40:58 +02:00
Alexander c80827b41e fix: add 15 stretching exercises to exercise database
Exercises used by the Day 6 stretching template were only in
exercisedb-map.ts but missing from exercises.ts, causing the
template detail to show raw IDs instead of proper names.
2026-04-11 16:14:34 +02:00
Alexander 1434580c3f feat: record cadence from step detector during GPS workouts
Use Android TYPE_STEP_DETECTOR sensor in LocationForegroundService to
count steps in a 15s rolling window. Cadence (spm) is computed at each
GPS point and stored alongside lat/lng/altitude/speed. Session detail
page shows cadence chart when data is available.

No additional permissions required — step detector is not a restricted
sensor. Gracefully skipped on devices without the sensor.
2026-04-11 15:28:27 +02:00
Alexander 4ae3793c06 feat: add elevation chart and gain/loss stats to GPS workout detail 2026-04-11 15:17:34 +02:00
Alexander 079e14c605 feat: add template library for browsing and adding defaults
Replace auto-seed with a browsable template library. Users can
selectively add built-in templates to their collection via a
BookOpen icon or the empty-state prompt. Each library template
tracks its origin via libraryId to prevent duplicates.

- Extract default templates to shared $lib/data/defaultTemplates.ts
- Add GET/POST /api/fitness/templates/library endpoint
- Add library modal with add/added state per template
- Keep seed endpoint as fallback (imports from shared data)
2026-04-11 15:02:58 +02:00
Alexander 9f5263a0a5 feat: add Day 6 stretching template to seed defaults
Full-body stretching session (~30 min) covering all major muscle
groups with 15 bodyweight exercises: neck, shoulders, chest, back,
spine, hips, hamstrings, quads, glutes, calves, and arms.
Each exercise has 2 sets of 60-90s holds with 15s rest.
2026-04-11 13:17:05 +02:00
Alexander b895088ad8 feat: project exercise kcal from next scheduled template
When no workout is logged for the day, look up the next template
in the schedule rotation and show the kcal from its most recent
session as a projection. Tappable toggle includes/excludes it
from the calorie goal, ring, and macro bars for meal planning.
2026-04-11 13:11:32 +02:00
Alexander d4af6ff5ff fix: increase shopping icon sizes for better visibility
List icons: 44→56px desktop, 36→48px mobile.
Icon picker modal: 42→56px grid cells.
2026-04-11 10:19:17 +02:00
Alexander 45c6be21a1 fix: sync runtime shopping catalog with source catalog
shoppingCatalog.json was missing all 22 new entries (11 icons
with aliases) added to catalog.json, so new icons like stroh80
were never matched at runtime.
2026-04-11 10:14:32 +02:00
Alexander 5a7da0b513 fix: correct ~100 misassigned shopping icon categories
The embedding model assigned many items to wrong categories
(e.g. rum→Milchprodukte, zahnbürsten→Fleisch, pflaumen→Hygiene).
Manually reviewed and corrected all 419 entries.
2026-04-11 09:39:31 +02:00
Alexander f732f897e0 feat: add 11 new shopping icons and processing script
Add processed icons for glasnudeln, grünkohl, kokosnuss, lychee,
mangold, pak choi, pastinaken, reisnudeln, rettich, stroh 80, and
topinambur. Add ImageMagick script to remove Gemini watermark and
black background from raw icons. Update catalog and re-embed.
2026-04-11 09:33:09 +02:00
Alexander 9aa8d87cb7 fix: make macro progress bar labels concise with goal context
Show remaining as "10/150g left" and over as "10g over 150g".
Remove redundant per-day goal from label. Shorten "remaining" to "left".
2026-04-11 08:44:26 +02:00
Alexander 1c313c8db0 fix: make custom meal logging reactive by updating entries locally
logCustomMeal and inlineLogCustomMeal relied on goto() to re-run the
page load function, but SvelteKit skips it when the URL doesn't change.
Now they update the entries array directly like the other log functions.
2026-04-11 08:43:50 +02:00
Alexander 6a701bd51e fix: use Atwater calories for consistent macro/calorie tracking
Calorie ring and macro progress bars now both use Atwater-derived
calories (P×4 + F×9 + C×4) instead of DB calories, so hitting all
three macro goals guarantees hitting the calorie goal exactly.

Also: show full daily TDEE (not time-based), show BMR/NEAT multiplier
breakdown in info tooltip, display macro goal grams on progress bars,
fix TDEE tooltip z-index on desktop.
2026-04-10 21:22:24 +02:00
Alexander ae4b664ac1 feat: restyle recipe info cards with grid layout and lucide icons
Align recipe metadata cards with site-wide design language using
surface colors, borders, and rounded corners. Add distinct lucide
icons per card type (Timer, Wheat, Croissant, Flame, CookingPot,
UtensilsCrossed) and switch from flex-wrap to CSS grid for uniform
card widths.
2026-04-10 20:55:48 +02:00
Alexander 212f35f4fc feat: path-based month URLs for workout history with month navigation
Add ?month=YYYY-MM filter to sessions API. Migrate history page to
/fitness/history/[[month]] optional param route. Default view shows last
2 months; specific month view via /fitness/history/2026-04. Replace
load-more button with prev/next month anchor navigation.
2026-04-10 08:57:13 +02:00
Alexander 768c09eeb1 feat: use path-based date URLs for nutrition page
Migrate /fitness/nutrition?date=YYYY-MM-DD to /fitness/nutrition/YYYY-MM-DD
using SvelteKit optional param [[date=fitnessDate]]. Replace date nav
buttons with anchor tags for native browser navigation. Today resolves to
the clean /fitness/nutrition path without a date segment.
2026-04-10 08:47:48 +02:00
Alexander 636f02d110 feat: replace all native date inputs with custom DatePicker component
Add theme-aware DatePicker with pill display, calendar dropdown, prev/next
day arrows, bilingual month/weekday names, and min/max support. Replace all
15 native <input type="date"> elements across fitness, tasks, and cospend.
2026-04-10 08:36:33 +02:00
Alexander 624e4649bb feat: inline measurement form on /fitness/measure, remove /add route
Move weight hero card, body fat and body parts accordions directly
onto the main measure page. SaveFab only appears when a field has
been changed. After saving, form resets and history updates in place.
Fix response unwrapping (created.measurement) that caused Invalid Date.
2026-04-10 08:22:23 +02:00
Alexander 728417c001 feat: redesign measurement add page with weight-focused layout
Replace flat form with hero weight card (±0.1 stepper, last-weight
placeholder, clear button) and collapsible accordion sections for
body fat and body part measurements. Body parts grouped by region.
2026-04-10 08:12:18 +02:00
Alexander 07fefb1bde fix: compute macro targets dynamically from protein goal and body weight
Fat/carb percentages were stored as absolute values that didn't account
for protein g/kg varying with body weight. Now protein calories are
computed first, and remaining calories are split between fat and carbs
by their stored ratio — guaranteeing all macros sum to the calorie goal.

Exercise burned calories also flow into fat/carb targets via a new
effectiveCalorieGoal derived. Goal editor ring preview and labels
updated to show computed actual percentages.
2026-04-10 08:01:08 +02:00
Alexander 208c630bca fix: include exercise calories in diet adherence calculation
Adherence was comparing intake against the flat calorie goal, ignoring
burned workout calories. Now the per-day target is goal + exercise kcal.
Also expanded workout query from 7 to 30 days to cover the full
adherence window.
2026-04-10 07:53:19 +02:00
Alexander a8b1c1d858 fix: correct week count in period tracker relative dates
Math.floor(days/7) was off by one — e.g. 12 days away showed "in 1 week"
instead of "in 2 weeks". Using Math.ceil matches colloquial usage.
2026-04-09 23:51:07 +02:00
Alexander 1cdcf845d2 fix: show round-off suggestions on future days, not just today
Allow meal prep planning by relaxing the isToday check to isTodayOrFuture
in both SSR and client-side rendering of the round-off card.
2026-04-09 23:51:00 +02:00
Alexander c3e829d3ca feat: SSR shopping list by fetching initial data server-side
Server load now fetches the shopping list from the DB and passes it as
initialList. The sync layer seeds state immediately in the script block
(not onMount) so SSR renders the full list. SSE connects client-side
in onMount for real-time updates.
2026-04-09 23:20:12 +02:00
Alexander 6c4367b939 feat: add 7 new shopping icons and deploy hook
Add Gemini-generated icons: aperol, bulgur, emmentaler, magerquark,
quinoa, raeucherlachs, tortilla_wraps. Update catalog with 11 new
entries (including aliases), regenerate embeddings and categories.
Add post-commit hook to rsync shopping icons to bocken.org.
2026-04-09 23:09:09 +02:00
Alexander 71ae0a2212 fix: align MysterySelector buttons with site-wide design language
Replace hardcoded Nord values and manual dark/light overrides with
semantic CSS variables (--color-surface, --color-primary, --shadow-sm,
--radius-card, etc.). Use scale:1.02 hover pattern and remove all
@media(prefers-color-scheme) and :global(:root[data-theme]) blocks.
2026-04-09 22:08:14 +02:00