Commit Graph

721 Commits

Author SHA1 Message Date
Alexander de55e51301 fitness: add per-exercise metrics, cardio support, and stats page
- Add metrics system (weight/reps/rpe/distance/duration) per exercise type
  so cardio exercises show distance+duration instead of weight+reps
- Add 8 new cardio exercises: swimming, hiking, rowing outdoor, cycling
  outdoor, elliptical, stair climber, jump rope, walking
- Add bilateral flag to dumbbell exercises for accurate tonnage calculation
- Make SetTable, SessionCard, history detail, template editor, and exercise
  stats API all render/compute dynamically based on exercise metrics
- Rename Profile to Stats with lifetime cards: workouts, tonnage, cardio km
- Move route /fitness/profile -> /fitness/stats, API /stats/profile -> /stats/overview
2026-03-19 18:57:52 +01:00
Alexander 2deb2c6c09 add fzf-style fuzzy search to exercises, recipes, and prayers
Replace substring matching with a shared fuzzy scorer that matches
characters in order (non-contiguous) with bonuses for consecutive
and word-boundary hits. Results are ranked by match quality.
2026-03-19 10:10:38 +01:00
Alexander 620b955ea2 fitness: fix duration display treating minutes as seconds
The DB stores duration in minutes but formatDuration was dividing
by 3600/60 as if receiving seconds, always showing 0m.
2026-03-19 09:46:25 +01:00
Alexander dff67c7059 fitness: add multi-device workout sync via SSE and rest timer improvements
Enables real-time workout synchronization across devices using
Server-Sent Events and an ephemeral MongoDB document (24h TTL).
Rest timers now use absolute timestamps instead of interval-based
countdown for accurate cross-device sync. Adds +/-30s rest timer
adjust buttons.
2026-03-19 09:44:24 +01:00
Alexander 620687f8f3 fitness: limit workouts-per-week chart to 10 weeks and trim empty leading weeks
Reduce the chart window from 12 to 10 weeks and trim leading weeks
with zero workouts so the chart starts from the first week with data.
2026-03-19 09:14:47 +01:00
Alexander 2fdfa2df6a fitness: fix light/dark theme with semantic CSS variables
Replace hardcoded Nord color references with semantic CSS variables
across all fitness components and pages. Use --color-primary instead
of --nord8 for interactive elements (auto-switches between --nord10
in light mode and --nord8 in dark mode). Change RPE color from
--nord13 (yellow) to --nord12 (orange) for better light mode contrast.
Fix mobile responsiveness on measure page form inputs.
2026-03-19 09:08:30 +01:00
Alexander cd7b1e21f2 fitness: fix type errors, hydration warning, and add gym link
- Add exerciseId to WorkoutSession model (interface + schema)
- Fix button-in-button hydration warning in TemplateCard (use div)
- Expand FitnessChart dataset type to include all Chart.js properties
- Fix getTime type error in session update with proper cast
- Fix weight nullable type in profile stats with non-null assertion
- Fix $or query typing in templates list endpoint
- Re-add gym link on homepage pointing to /fitness
2026-03-19 08:42:51 +01:00
Alexander 0618cf7f73 homepage: re-add gym link pointing to /fitness
Re-introduce the dumbbell SVG icon and "Gym" link that previously
pointed to health.bocken.org, now linking to the internal /fitness route.
2026-03-19 08:35:46 +01:00
Alexander 1228677498 fitness: add 5 default workout templates and new exercises
Add all 5 PPL+Upper/Lower templates matching the target split,
with Day 3 (Legs) adjusted to include Bulgarian split squats and
standing calf raises, and Day 5 (Lower) reworked with front squats,
hip thrusts, and goblet squats — all equipment-free of machines.

Also adds incline row, decline crunch, flat leg raise, and nordic
hamstring curl to the exercise list, and updates the WorkoutTemplate
model to use exerciseId instead of name for exercise references.
2026-03-19 08:32:41 +01:00
Alexander c5e3719a0c fitness: add complete fitness tracker frontend
- 5-tab layout (Profile, History, Workout, Exercises, Measure) with shared header nav
- Workout system: template CRUD, active workout on /fitness/workout/active with localStorage persistence, pause/resume timer, rest timer, RPE input
- Shared workout singleton (getWorkout) so active workout state is accessible across all fitness routes
- Floating workout FAB indicator on all /fitness routes when workout is active
- AddActionButton component for button-based FABs (measure + template creation)
- Profile page with workouts-per-week bar chart and weight line chart with SMA trend line + ±1σ confidence band
- Exercise detail with history, charts, and records tabs using static exercise data
- Session history with grouped-by-month list, session detail with stats/PRs
- Body measurements with latest values, body part display, add form
- Card styling matching rosary/prayer route patterns (accent-dark, nord5 light, box-shadow, hover lift)
- FitnessChart: fix SSR hang by moving Chart.register to client-side, remove redundant $effect
- Exercise API: use static in-repo data instead of empty MongoDB collection
- Workout finish: include exercise name for WorkoutSession model validation
2026-03-19 08:17:55 +01:00
Alexander 28d5f4b0a0 recipes: fix filter panel on category, tag, and favorites pages
Search component needs access to all recipes to filter across
categories/tags/etc. Previously these pages only passed their
pre-filtered subset, so selecting additional filters yielded
no results. Now each page fetches allRecipes in parallel and
passes it to Search, falling back to the route-specific subset
when no filters are active.
2026-03-10 10:36:24 +01:00
Alexander 202c2c749b readme: add features overview and clean up completed TODOs 2026-03-10 10:29:54 +01:00
Alexander 482de5d589 recipes: pass lang prop to LanguageSelector for no-JS support 2026-03-10 10:27:02 +01:00
Alexander d24c4b6633 rosary: fix missing space after comma in painting caption 2026-03-10 10:26:49 +01:00
Alexander dcc8403d78 pwa: fix offline caching for prayer/faith routes
The glob in sync.ts targeted a nonexistent /src/routes/glaube/ directory
instead of the actual [faithLang=faithLang] parameterized route. This meant
zero prayer pages were ever precached for offline use.

- Fix glob to match [faithLang=faithLang] and expand param segments to
  both language variants (glaube/faith, gebete/prayers, rosenkranz/rosary)
- Extract validPrayerSlugs to shared module for build-time route enumeration
- Add faith to service worker cacheable route regex
2026-03-09 17:49:32 +01:00
Alexander 23bd5a55ee rosary: fix mystery image timing and SVG container clipping
Show first mystery image at the Pater Noster instead of the Gloria Patri
by removing the early lbead2 trigger. Fix IntersectionObserver to prefer
the topmost intersecting entry so short _pater sections aren't skipped.
Use full viewport height (100dvh) for the SVG container to prevent
clipping at edges.
2026-03-08 20:46:07 +01:00
Alexander df34ed0628 searxng: add Nord theme and deploy script
Override SearXNG's native CSS variables with Nord palette (cream white
light mode, true black dark mode). Replace SearXNG logo with Bocken
logo. Custom base.html template injects the CSS. Deploy script supports
reset to restore original state.
2026-03-08 20:33:26 +01:00
Alexander df50c6737a gitea: directly link to OIDC login via Header link 2026-03-05 08:06:31 +01:00
Alexander a8d02146d3 prayers: remove redundant "in" typo 2026-03-04 21:31:07 +01:00
Alexander b625155d5a gitea: make all avatars fully round circles 2026-03-04 19:12:41 +01:00
Alexander a2aed23401 gitea: theme toggle improvements and header height increase
- Move theme toggle to right side of header (before notifications)
- Remove border from toggle, style consistently with other nav icons
- Fix dark mode hover background on toggle button
- Use exact Lucide SunMoon icon for system theme
- Dark logo filter in light mode
- Increase header height to 3.5rem
- Light mode with homepage warm beige palette (no pure white)
2026-03-04 19:12:19 +01:00
Alexander 70fce281a4 gitea: use homepage dark grey scale for backgrounds
Match the homepage dark mode surface colors (#000/#111/#1a1a1a/#222)
for boxes, code, inputs, cards, and menus instead of Nord greys.
Keeps Nord only for accent colors and text.
2026-03-03 19:04:20 +01:00
Alexander 4bfba0461e gitea: apply Nord color scheme to theme
Remap all accent, status, badge, diff, text, and background colors
to the Nord palette matching the homepage and jellyfin themes.
2026-03-03 19:00:14 +01:00
Alexander 87d78ffdf3 gitea: floating glass pill header, black background, custom navbar
- Floating glass pill navbar matching homepage/jellyfin header style
- Full black page background
- Custom head_navbar template: logo links to bocken.org, home button
  for logged-in users, icons on all nav items, remove Help/Explore
- Icon-only nav on mobile, hide dropdown triangles, round avatar
- Deploy script to rsync theme + template to server
2026-03-03 18:55:28 +01:00
Alexander 5e1e2fb969 jellyfin: copy logo link to clipboard on mobile app with toast
WebView doesn't allow opening external browser, so on mobile app
the logo link copies URL to clipboard and shows a toast notification.
2026-03-03 18:02:15 +01:00
Alexander d10931ff32 jellyfin: link Bocken logo to bocken.org with Nord lightblue hover 2026-03-03 17:46:08 +01:00
Alexander 3722a41d44 jellyfin: floating glass pill header, nav icons, click-to-play cards
- Restyle header as floating glassmorphism pill matching bocken.org
- Replace Home/Favorites tab bar with icon buttons (house + heart) in header right
- Add play triangle overlay on card thumbnails with click-to-play
- Black backgrounds for detail page containers
- Always show detail logo regardless of screen width
- Mobile adjustments for pill header
2026-03-02 20:59:57 +01:00
Alexander 19e46b2b3a fix: replace any types with proper types across codebase
Replace ~100 `any` usages with proper types: use existing interfaces
(RecipeModelType, BriefRecipeType, IPayment, etc.), Record<string, unknown>
for dynamic objects, unknown for catch clauses with proper narrowing,
and inline types for callbacks. Remaining `any` types are in Svelte
components and cases where mongoose document mutation requires casts.
2026-03-02 20:15:08 +01:00
Alexander b83d793f61 jellyfin: blackout mode 2026-03-02 17:48:03 +01:00
Alexander 9f18cafe73 fix: language switching now works on all pages, not just root
LanguageSelector and language store previously only dispatched
languagechange events on '/'. Now any page that isn't a recipe or
faith route gets inline language switching via the custom event.
2026-03-02 13:37:31 +01:00
Alexander 116b2d8761 fix: disable default view transition crossfade on page content
Only named elements (header, logo, etc.) should animate during
navigation; the root crossfade caused a flash on every page change.
2026-03-02 13:37:10 +01:00
Alexander d2ac67fb44 fix: resolve all 1008 svelte-check type errors across codebase
Add type annotations, JSDoc types, null checks, and proper generics
to eliminate all svelte-check errors. Key changes include:
- Type $state(null) variables to avoid 'never' inference
- Add JSDoc typedefs for plain <script> components
- Fix mongoose model typing with Model<any> to avoid union complexity
- Add App.Error/App.PageState interfaces in app.d.ts
- Fix tuple types to array types in types.ts
- Type catch block errors and API handler params
- Add null safety for DOM queries and optional chaining
- Add standard line-clamp property alongside -webkit- prefix
2026-03-02 08:40:18 +01:00
Alexander 9c50133dfe fix: type errors in UserHeader querySelector calls 2026-03-01 21:12:47 +01:00
Alexander 11e94ca980 fix: silence state_referenced_locally warning in theme store 2026-03-01 21:07:26 +01:00
Alexander ff7a86e922 deps: add lucide-svelte 2026-03-01 21:02:50 +01:00
Alexander 2faed678ec header: unify dropdown menus, nav text colors, minor fixes
Rework UserHeader and LanguageSelector dropdowns to use wrapper +
triangle pattern with theme-aware backgrounds. Use solid grey for
inactive nav text instead of semi-transparent. Reduce instruction
info box shadow. Add emoji font to CompactCard favorites.
2026-03-01 21:00:21 +01:00
Alexander e8cb8f8232 header: add colored icon fills for active nav links, cospend icons
Active nav icons now fill with per-link colors (recipes, faith, cospend).
Cospend gets Lucide icons with background shape fills for Wallet and
RefreshCw. Shrink profile picture and use solid grey for inactive nav text.
2026-03-01 20:41:38 +01:00
Alexander fdbbca3942 feat: add light/dark mode toggle with header view transitions
Add theme cycling (system/light/dark) with localStorage persistence
and FOUC prevention. Restructure CSS color tokens to respond to
data-theme attribute across all components. Redesign header as a
floating glass pill bar with smooth view transitions including
clip-reveal logo animation.
2026-03-01 16:15:49 +01:00
Alexander 3942a18b2b fix: show positive amount for "gets" in recurring payment splits 2026-02-28 21:11:08 +01:00
Alexander ef98cccee9 fix: correct formatCurrency calls defaulting to EUR on payments page
Fix misplaced parenthesis in Math.abs() call that caused formatCurrency
to receive no currency arg (defaulting to EUR), and remove extra arg
in foreign currency formatting.
2026-02-28 21:09:28 +01:00
Alexander 12c64bd6ef header: thinner active page underline, closer to text 2026-02-27 20:14:43 +01:00
Alexander f82ef5bebc recipes: add defaultForm cake pan selector to add page 2026-02-27 20:11:45 +01:00
Alexander 12f45c5cbb recipes: add cake form size scaling for ingredient multiplier
Allow recipes to specify a default pan shape (round, rectangular, gugelhupf)
with dimensions. On the recipe page, users can enter their own pan size to
auto-calculate an ingredient multiplier based on the 2D area ratio.
2026-02-27 20:10:21 +01:00
Alexander 2e047768da recipes: preload hero images with high priority
Add fetchpriority="high" and <link rel="preload"> hints to hero images
on both the recipe listing and detail pages. Also prefetch the full-size
hero image on card hover via new Image() to warm the cache before navigation.
2026-02-26 19:49:17 +01:00
Alexander e6396fa2dc auth: smart login/logout redirect back to original page
Login link now includes callbackUrl for the current page. Logout
redirects intelligently: stays on public pages, falls back to the
recipe detail for /edit/[name], to the recipe root for auth-only
sub-routes (add, favorites, to-try, admin), and to / for cospend.
2026-02-26 19:25:47 +01:00
Alexander c9e3308965 recipes: restrict to-try page to editors, remove addedBy
- Gate page and API on rezepte_users group instead of any logged-in user
- Remove addedBy field from schema, API POST, and ToTryCard display
2026-02-26 19:18:58 +01:00
Alexander 95300d223a rosary: move mystery title to pater noster as a separate card
Each mystery now starts with its own title + Pater Noster card, before
the Ave Maria decade card. Transition cards (Gloria Patri + Fatima Prayer)
no longer contain the Pater Noster.

Mystery image column stays on the current mystery during transition prayers
(including the final Gloria/Fatima after decade 5) and only advances to the
next mystery at the Pater Noster card.

The new secret{N}_pater section IDs are tracked and mapped to their
corresponding large bead via svgActiveSection, so both transition and
pater sections highlight the correct large bead. CSS :has rules updated
for no-JS fallback.
2026-02-26 19:18:26 +01:00
Alexander 5a6334f771 rosary: reset expired streak on client to prevent SSR microflash
When the client hydrates and finds the merged streak is still expired
(localStorage couldn't rescue it), reset to zero and push to the server.
This ensures subsequent SSR loads render the correct value from the start.
2026-02-22 21:30:46 +01:00
Alexander 87c0941d85 build: use pnpm exec instead of npx for vite-node in prebuild
Fixes build failure on server where system npm has a broken
lru-cache/Yallist dependency. Also adds vite-node as an explicit
dev dependency so it's always available via pnpm.
2026-02-22 21:24:12 +01:00
Alexander a5849292e8 rosary: recommend Glorious mysteries on Lenten Sundays
Sundays during Lent are "little Easters", so treat them like ordinary
Sundays (Glorious mysteries, no Fastenzeit badge) rather than Lent.
2026-02-22 20:54:56 +01:00