Commit Graph

544 Commits

Author SHA1 Message Date
Alexander c5e33d5573 css: replace hardcoded values with design tokens
Replace 30 border-radius: 1000px → var(--radius-pill), 6 border-radius:
20px → var(--radius-card), 21 transition: 100ms → var(--transition-fast),
and 32 transition: 200ms → var(--transition-normal) across the codebase.
2026-02-16 09:45:56 +01:00
Alexander e38879d8be css: consolidate stylesheets into single source of truth
Merge nordtheme.css tokens and utility classes into app.css, import
app.css once in root layout, delete redundant files (nordtheme.css,
form.css, rosenkranz.css), move domain CSS to layouts, fix broken
shake keyframe in action_button.css, and scope form styles to the
two pages that need them. 10 CSS files → 6, 41 redundant imports removed.
2026-02-15 22:26:27 +01:00
Alexander 0a13df19f5 fix: streak counter showing zero on second device due to stale localStorage
The RosaryStreakStore singleton survives client-side navigation but
the first mount. Also reorder onMount to merge server data before
assigning to streak, preventing a frame of stale localStorage values.
2026-02-15 22:06:36 +01:00
Alexander bc5dc5da05 rosary: update flagellation mystery image to rubens 2026-02-14 21:30:45 +01:00
Alexander 08848411e8 faith: remove angelus from header 2026-02-14 11:55:15 +01:00
Alexander 5d7460d8b8 rosenkranz: von "Heute" -> "Wochentag" gewechselt 2026-02-13 19:24:03 +01:00
Alexander c305785ee7 prayers: add plenary indulgence explanation to postcommunio 2026-02-13 15:34:20 +01:00
Alexander 0b64cb7a3f prayers: add 5 new prayers, move Angelus route, liturgical seasons
Add Guardian Angel, Apostles' Creed, Tantum Ergo, Angelus, and Regina
Caeli to the prayers collection. Move standalone Angelus route into the
prayers system with a 301 redirect from the old path. Extract Easter
computation into shared utility ($lib/js/easter.svelte.ts) and use it
for liturgical season awareness: during Eastertide the rosary defaults
to Glorious mysteries and swaps Salve Regina for Regina Caeli; during
Lent it defaults to Sorrowful mysteries. Seasonal badges shown on both
the mystery selector and prayer sections.
2026-02-13 14:56:12 +01:00
Alexander bcc4d761b7 rosary: make scroll-to-top button work without JS
Replace <button> with <a href="#top"> anchor link. JS intercepts for
smooth scrolling, no-JS falls back to hash navigation.
2026-02-13 13:18:38 +01:00
Alexander cd99631ed5 rosary: progressive enhancement for no-JS browsers
SVG beads are now anchor links to prayer sections, with CSS :has(:target)
highlighting the active bead. Inline mystery images render in each decade
by default and hide when JS takes over. StreakCounter uses a form action
fallback for logged-in users and hides entirely for anonymous no-JS users.
Show images toggle now works via ?images= URL param like the other toggles.
2026-02-13 13:04:11 +01:00
Alexander 4caed69b24 prayers: fix minor issues 2026-02-12 21:17:07 +01:00
Alexander 6d9b5eb668 fix: sync payments page state on URL param changes
$state() only captured initial data prop values, so navigating to
different offset/limit params always showed the first page results.
2026-02-12 17:44:58 +01:00
Alexander 5e11fa0899 rosary: snap mystery images instantly at edges
When jumping to the top or bottom of the rosary, snap the mystery
image column instantly instead of smooth scrolling.
2026-02-12 17:37:30 +01:00
Alexander ca27c25809 rosary: prevent manual scrolling on mystery image column
Change overflow-y from auto to hidden so the image column only
scrolls programmatically in sync with prayers, not via user input.
2026-02-12 16:48:34 +01:00
Alexander 67a74a70a0 rosary: remove scroll polyfill and optimize SVGs
Drop the smooth-scroll polyfill (now universally supported) and run
SVGO on benedictus.svg (35KB→19KB) and the cross glyph path.
2026-02-12 08:32:03 +01:00
Alexander ee61ed8bb3 rosary: only show embers after 14 days, not flame 2026-02-11 20:43:12 +01:00
Alexander f8842c857c refactor: extract sub-components and modules from rosary +page.svelte
Break the 1889-line rosary page into focused modules:
- rosaryData.js: mystery data, labels, weekday schedule, SVG positions
- rosaryScrollSync.js: bidirectional scroll sync (prayers ↔ SVG ↔ images)
- RosarySvg.svelte: SVG bead visualization
- MysterySelector.svelte: mystery picker grid
- MysteryImageColumn.svelte: desktop image column
2026-02-11 14:33:37 +01:00
Alexander 6aaee4c8f1 add forgotten routes in to build 2026-02-11 10:19:11 +01:00
Alexander 134b3deaa4 add Douay-Rheims Bible to the project for english bible references 2026-02-11 10:15:54 +01:00
Alexander 84033ef8c0 refactor: replace all any types in translation.ts with proper interfaces 2026-02-11 09:55:07 +01:00
Alexander 1a7e41f18b refactor: merge api/recipes and api/rezepte into unified recipeLang route
Consolidate duplicate recipe API routes into a single
api/[recipeLang=recipeLang]/ structure. Both /api/recipes/ and
/api/rezepte/ URLs continue to work via the param matcher. Shared
read endpoints now serve both languages with caching for both.

Also: remove dead code (5 unused components, cookie.js) and the
redundant cron-execute recurring payment route.
2026-02-11 09:49:50 +01:00
Alexander 9e7ab0b16f refactor: reorganize components into domain subfolders and replace relative imports
Move components from flat src/lib/components/ into recipes/, faith/, and
cospend/ subdirectories. Replace ~144 relative imports across API routes
and lib files with $models, $utils, $types, and $lib aliases. Add $types
alias to svelte.config.js. Remove unused EditRecipe.svelte.
2026-02-11 09:49:11 +01:00
Alexander 896a99382d refactor: extract PipImage component from inline PiP markup
Deduplicates mobile PiP image code shared between the rosary page and
StickyImage. Adds fullscreen support to StickyImage and fixes hidden PiP
elements capturing pointer events via pointer-events: none default.
2026-02-10 21:16:05 +01:00
Alexander f4acf02b39 rosary: add mystery images for all four mystery types with PiP fullscreen
Generalize mystery images from sorrowful-only to all mystery types (joyful,
sorrowful, glorious, luminous). Add PiP fullscreen mode with tap-to-show
controls and double-tap to toggle enlarged/fullscreen.
2026-02-09 23:02:34 +01:00
Alexander 91e383b13c rosary: fix mystery image column clipping at edges
Use taller edge pads (100vh) for before/after targets so images don't
peek at viewport top or bottom. Scroll to edge pads with zero offset
so previous/next images hide fully behind the sticky header.
2026-02-09 15:18:14 +01:00
Alexander c7cf61d3d9 fix: PiP show/hide on resize and skip observer at page top
- Resize handler calls pip.show()/hide() instead of just reposition(),
  fixing PiP not appearing when resizing from desktop to mobile
- IntersectionObserver skips all updates when scrollY < 50, preventing
  stale activeSection from re-scrolling SVG after jump-to-top
2026-02-09 14:32:39 +01:00
Alexander b03b763ca6 rosary: add all 5 sorrowful mystery images with artist captions
- One image per mystery (garden, flagellation, mocking, carry, crucifixion)
- Desktop: figcaption with artist, title (translated DE/EN), and year
- Fix Map.has vs `in` operator bug preventing PiP from showing
- Reposition PiP on image load to prevent off-screen positioning
- Mystery image column clips behind header (top: 0 + padding-top: 6rem)
- Snap SVG and images instantly to top; reset activeSection to cross
2026-02-09 14:16:28 +01:00
Alexander b40cca6fb8 fix: make hasLoadedFromStorage reactive so localStorage saves trigger 2026-02-09 09:18:17 +01:00
Alexander 6f4a88682d rosary: add show/hide images toggle, fix PiP timing and breakpoint
- Add "Bilder anzeigen" / "Show Images" toggle persisted to localStorage
- Bump mystery image column/PiP breakpoint from 900px to 1200px so
  prayers keep full width on medium screens
- Fix PiP not appearing on page load by splitting $effect and using
  tick() to wait for DOM before measuring element dimensions
- Fix Toggle checkbox default margin causing misalignment
2026-02-09 09:12:34 +01:00
Alexander a08b77a454 extract PiP drag/snap/enlarge logic into shared createPip() utility
Both StickyImage and rosary page now use the same pip.svelte.ts factory
for mobile drag-to-corner, snap, and double-tap enlarge behavior.
2026-02-09 08:48:20 +01:00
Alexander 23e9bfec08 rosary: add mystery images with scrollable sticky column and mobile PiP
Add a third grid column for sorrowful mystery images (mocking for
mysteries 2-3, crucifixion for mystery 5). Desktop uses a scrollable
sticky sidebar synced to prayer scroll position. Mobile shows a
floating PiP thumbnail. Extract prayer page PiP logic into reusable
StickyImage component.
2026-02-09 08:47:53 +01:00
Alexander bd0dc70380 ablassgebete: add prayer page with sticky crucifix and draggable PiP
- Add AblassGebete component and crucifix images
- Desktop: sticky crucifix on right, centered prayer with balanced spacing
- Mobile: draggable picture-in-picture thumbnail that snaps to corners
- Double-tap to enlarge/shrink with directional animation
- Monolingual sections override bilingual grey styling
- 404 for English route /faith/prayers/ablassgebete (German only)
- Reposition on window resize including desktop/mobile breakpoint crossing
2026-02-08 22:13:23 +01:00
Alexander 220292b65b rosary: show broken streak reset on page visit, not only after clicking "prayed" 2026-02-05 20:47:19 +01:00
Alexander 56e3bd1791 cospend: filter recent activity by chart category selection
Clicking a category on the bar chart now filters the recent activity
list to show only payments in that category. Includes a clear filter
button and empty state message. Also increases recent splits from 10
to 30 for better coverage when filtering.
2026-02-04 16:57:49 +01:00
Alexander fb215156af fix: remove Svelte 4 object reassignment causing $effect infinite loop
The splitAmounts = { ...splitAmounts } pattern created a circular
dependency inside $effect blocks—reading and writing the same reactive
value—which Svelte 5 killed via loop protection, leaving the split
method selector non-reactive when selecting "50/50 + personal".
2026-02-04 16:52:12 +01:00
Alexander 9826ff8480 faith: progressive enhancement for all faith pages without JS
- Rosary: mystery selection, luminous toggle, and latin toggle fall back
  to URL params (?mystery=, ?luminous=, ?latin=) for no-JS navigation
- Prayers/Angelus: latin toggle uses URL param fallback
- Search on prayers page hidden without JS (requires DOM queries)
- Toggle component supports href prop for link-based no-JS self-submit
- LanguageSelector uses <a> links with computed paths and :focus-within
  dropdown for no-JS; displays correct language via server-provided prop
- Recipe language links use translated slugs from $page.data
- URL params cleaned via replaceState after hydration to avoid clutter
2026-02-04 14:14:13 +01:00
Alexander 9054d3935e fix: use accent-dark with nord5 light override for prayer backgrounds
var(--color-bg-secondary) from app.css is not available since app.css
is never imported. Use var(--accent-dark) from nordtheme.css with
explicit light mode overrides using var(--nord5).
2026-02-04 13:05:08 +01:00
Alexander 813c938f26 fix: use semantic color for prayer section backgrounds in light mode
Replace var(--accent-dark) with var(--color-bg-secondary) which maps
to the correct color in both modes, removing dead @media overrides
that referenced the undefined var(--accent-light). Also match rosary
cross fill to Benedictus medal color in light mode.
2026-02-04 13:01:54 +01:00
Alexander 536ae907a7 rosary: inline cross glyph as SVG path for consistent rendering
Replace <text> elements using the crosses web font with inlined SVG
paths extracted from the font file. Web fonts in SVG <text> elements
don't load reliably on Android, causing fallback rendering.
2026-02-04 12:09:00 +01:00
Alexander 8a74bda83a rosary: derive SVG bead positions from sectionPositions dictionary
Use sectionPositions as single source of truth for all bead coordinates.
Compute transition bead positions as midpoints between decades, generate
decade beads and hitboxes via loops, and adjust bead spacing.
2026-02-04 12:04:08 +01:00
Alexander c5744780f3 rosary: split final prayers into individual bead sections with scroll tracking
Map each ending bead to its corresponding prayer (Gloria/Fatima,
Salve Regina, Schlussgebet, St. Michael, Paternoster, Sign of the Cross),
add scroll-to-top button with action_button styling, and fix SVG scroll
lock to prevent snap-back when scrolling to top.
2026-02-04 11:18:54 +01:00
Alexander d098d8bf01 rosary: progressively shrink mystery selectors instead of stacking on small screens 2026-02-04 10:03:58 +01:00
Alexander 72d924cc7c rosary: reduce bundle size and improve responsive layout
Remove redundant CSS already handled by Prayer.svelte, drop unused
rosenkranz.css import, and replace inline BenedictusMedal component
(34KB, ~52 DOM elements) with a static SVG referenced via <image>.
Use fluid sidebar width (clamp) for smoother desktop/mobile transition.
2026-02-03 20:51:32 +01:00
Alexander ac4c03e5f8 rosary: fix mystery selection lost when excluding luminous
The on:change handler on the Toggle component was silently ignored
since Toggle is a Svelte 5 component that doesn't support the Svelte 4
event directive. Replace with a reactive $effect that reverts to
today's mystery when luminous is excluded while selected.
2026-02-03 15:01:53 +01:00
Alexander 480b0d687b rosary: fix today badge z-index 2026-02-03 14:48:47 +01:00
Alexander 3eccb7ca50 perf: pre-generate Bible verse data and reduce DOM via conditional rendering
- Extract Bible lookup logic into shared src/lib/server/bible.ts module
- Add build script to pre-generate all 20 mystery verse lookups as static data,
  eliminating runtime API calls on rosary page load
- Update Prayer.svelte to pass showLatin/urlLang as snippet parameters; all 14
  prayer components now conditionally render only visible language elements
  instead of hiding via CSS
- Extract 4 inline mystery selector SVGs into MysteryIcon.svelte component
- Remove unused CSS selectors from angelus page
2026-02-03 14:28:09 +01:00
Alexander ca0f78c9ff fix: remove default figure margin shifting parallax hero image 2026-02-03 08:27:43 +01:00
Alexander c1be1c73ff fix: apply border-radius directly on card images for older WebKit 2026-02-03 08:21:55 +01:00
Alexander 191ee1f138 fix: center parallax hero image cross-browser
Replace Firefox-specific @supports hack with explicit absolute
centering (left/right/margin-inline: auto) on the image container.
2026-02-03 08:18:36 +01:00
Alexander 91686a6841 rosary: add SVG hitboxes for easier bead tapping on mobile 2026-02-03 08:14:50 +01:00