Commit Graph

47 Commits

Author SHA1 Message Date
940f9f14a2 fix tag styling on Cards
All checks were successful
CI / update (push) Successful in 1m19s
2026-01-23 16:14:34 +01:00
63e9b3de21 Move more CSS styling to a global css files to reduce bundle size
All checks were successful
CI / update (push) Successful in 2m53s
2026-01-23 15:37:32 +01:00
bfba0870e3 fix hover on Card not red
All checks were successful
CI / update (push) Successful in 1m11s
2026-01-05 23:50:03 +01:00
f66334290a refactor: complete Svelte 5 migration to eliminate all deprecation warnings
All checks were successful
CI / update (push) Successful in 1m35s
Migrated all components and routes to Svelte 5 syntax standards:

Event Handlers:
- Updated all deprecated on:* directives to new on* attribute syntax
- Changed on:click → onclick, on:keydown → onkeydown, on:input → oninput
- Updated on:blur, on:focus, on:load, on:submit, on:cancel handlers

Reactive State:
- Added $state() declarations for all reactive variables
- Fixed non-reactive update warnings in layout and component files

Component API:
- Replaced <slot /> with {@render children()} pattern
- Added children prop to components using slots

Accessibility:
- Added id attributes to inputs and for attributes to labels
- Fixed label-control associations across forms
- Removed event listeners from non-interactive elements

HTML Fixes:
- Fixed self-closing textarea tags
- Corrected implicitly closed elements
- Proper element nesting

CSS Cleanup:
- Removed 20+ unused CSS selectors across components
- Cleaned up orphaned styles from refactoring

All vite-plugin-svelte warnings resolved. Codebase now fully compliant with Svelte 5.
2026-01-05 23:39:44 +01:00
4ffc0940ef feat: add AI-powered alt text generation for recipe images
All checks were successful
CI / update (push) Successful in 1m10s
- Implement local Ollama integration for bilingual (DE/EN) alt text generation
- Add image management UI to German edit page and English translation section
- Update Card and recipe detail pages to display alt text from images array
- Include GenerateAltTextButton component for manual alt text generation
- Add bulk processing admin page for batch alt text generation
- Optimize images to 1024x1024 before AI processing for 75% faster generation
- Store alt text in recipe.images[].alt and translations.en.images[].alt
2026-01-05 17:28:19 +01:00
cc978e73b4 feat: improve accessibility and update color scheme based on PageSpeed insights
All checks were successful
CI / update (push) Successful in 1m13s
- Add aria-labels to icon-only links (add button, edit button, logo, nav toggle)
- Add main landmark element for better page structure
- Fix heading hierarchy on recipe pages (h1 → h2 → h3 progression)
- Add role="status" to loading placeholders to allow aria-label usage
- Update link colors from red to blue for better contrast in both light and dark modes
- Change hover colors from orange/red to light blue across all interactive elements
- Reduce font size of section labels (Season, Keywords) while maintaining semantic structure

These changes address PageSpeed accessibility recommendations including low-contrast text,
missing accessible names, prohibited ARIA attributes, missing landmarks, and improper
heading order.
2026-01-05 16:14:37 +01:00
efb548511f feat: add untranslated recipes page for recipe admins
All checks were successful
CI / update (push) Successful in 1m9s
Add new page at /rezepte/untranslated for recipe admins to view and manage recipes without approved English translations. Includes translation status tracking, statistics dashboard, and visual badges.

Changes:
- Add API endpoint to fetch recipes without approved translations
- Create untranslated recipes page with auth checks for rezepte_users group
- Add translation status badges to Card component (pending, needs_update, none)
- Add database index on translations.en.translationStatus for performance
- Create layout for /rezepte route with header navigation
- Add "Unübersetzt" link to navigation for authorized users
2026-01-03 20:03:36 +01:00
ccf3fd7ea2 implement content-hash based image cache invalidation
Add content-based hashing to recipe images for proper cache invalidation
while maintaining graceful degradation through dual file storage.

Changes:
- Add imageHash utility with SHA-256 content hashing (8-char)
- Update Recipe model to store hashed filenames in images[0].mediapath
- Modify image upload endpoint to save both hashed and unhashed versions
- Update frontend components to use images[0].mediapath with fallback
- Add migration endpoint to hash existing images (production-only)
- Update image delete/rename endpoints to handle both file versions

Images are now stored as:
  - recipe.a1b2c3d4.webp (hashed, cached forever)
  - recipe.webp (unhashed, graceful degradation fallback)

Database stores hashed filename for cache busting, while unhashed
version remains on disk for backward compatibility and manual uploads.
2026-01-02 12:06:56 +01:00
8a7d50ceb7 fix duplicate image IDs and migrate TitleImgParallax to Svelte 5 runes
Replace id="image" with class="image" in both Card and TitleImgParallax
components to prevent duplicate IDs when multiple instances appear on the
same page. Update TitleImgParallax to use Svelte 5 $props() and $state()
runes instead of legacy export let syntax, and modernize event handlers
to use onload/onclick attributes.
2025-12-31 17:53:03 +01:00
e6839f56f9 migrate Card component to Svelte 5 runes to fix image hydration
All checks were successful
CI / update (push) Successful in 1m10s
Use $props(), $state(), and $derived() to make image references properly
reactive. This fixes the issue where recipe card images weren't updating
correctly when switching between languages.
2025-12-26 23:01:33 +01:00
36a7fac39a add English translation support for recipes with DeepL integration
- Add embedded translations schema to Recipe model with English support
- Create DeepL translation service with batch translation and change detection
- Build translation approval UI with side-by-side editing for all recipe fields
- Integrate translation workflow into add/edit pages with field comparison
- Create complete English recipe routes at /recipes/* mirroring German structure
- Add language switcher component with hreflang SEO tags
- Support image loading from German short_name for English recipes
- Add English API endpoints for all recipe filters (category, tag, icon, season)
- Include layout with English navigation header for all recipe subroutes
2025-12-26 20:28:43 +01:00
4efc592ab8 fix: adjust z-index values to prevent recipe card elements from overlapping header and add button 2025-12-12 22:48:40 +01:00
87bf880c0b fix: make nested links clickable in recipe cards
Use the card wrapper pattern with absolute positioned main link and elevated z-index for nested links.
This maintains proper HTML semantics (no nested <a> tags) while allowing category, icon, and tag links to be clickable.

- Replace outer <a> wrapper with <div>
- Add invisible overlay link for main card click area (z-index: 1)
- Elevate nested links (category, tags, icon) with z-index: 10
- Maintain all existing hover effects and accessibility
- Keep semantic HTML structure without nesting <a> tags
2025-11-18 15:29:33 +01:00
b9e9a8724e fix nested links not working on recipe cards 2025-10-02 14:30:31 +02:00
bccab68d51 Fix Card component z-index and favorite indicator positioning
- Reduce icon z-index from 10 to 5 to prevent overlap with header
- Adjust favorite indicator position from -0.5em to 0.1em for better spacing

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 16:49:04 +02:00
82c71ad136 Add favorite indicators to recipe cards and improve favorites UI
- Add heart emoji indicators to recipe cards (top-left positioning)
- Show favorites across all recipe list pages (season, category, icon, tag)
- Create favorites utility functions for server-side data merging
- Convert client-side load files to server-side for session access
- Redesign favorite button with emoji hearts (🖤/❤️) and bottom-right positioning
- Fix randomizer array mutation issue causing card display glitches
- Implement consistent favorite indicators with drop shadows for visibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-01 20:45:28 +02:00
36bdb0d65c Card.svelte: fix top-right icon offset 2025-08-31 21:09:34 +02:00
22ddee4942 Fix Card.svelte icon positioning and styling
- Restored icon to top-right position with absolute positioning
- Added proper circular background with nord0 color
- Set correct dimensions (50px × 50px) and border-radius for circular shape
- Added shadow and hover effects to match original design
- Fixed z-index to ensure icon appears above other elements
- Maintained shake animation on card hover for visual feedback

The icon now appears correctly in the top-right corner with a round
background instead of being positioned at bottom center with transparent
background.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 21:07:10 +02:00
c8d879d4f9 Upgrade SvelteKit 4 to SvelteKit 5 with latest dependencies
Major changes:
- Upgraded Svelte from v4 to v5.38.6 (latest stable)
- Upgraded SvelteKit from v2.0.0 to v2.37.0 (latest)
- Upgraded Vite from v5 to v7.1.3 for better performance
- Updated all related packages to latest compatible versions
- Added pnpm as package manager with packageManager field
- Fixed Card.svelte nested anchor tags issue by converting inner links to buttons
- Updated component styling to maintain visual consistency
- Removed incompatible svelte-preprocess-import-assets package

Dependencies updated:
- @sveltejs/kit: ^2.0.0 → ^2.37.0
- @sveltejs/vite-plugin-svelte: ^3.0.0 → ^6.1.3
- svelte: ^4.0.0 → ^5.38.6
- vite: ^5.0.0 → ^7.1.3
- @sveltejs/adapter-auto: ^3.0.0 → ^6.1.0
- @sveltejs/adapter-node: ^2.0.0 → ^5.0.0
- svelte-check: ^3.4.6 → ^4.0.0
- mongoose: ^7.4.0 → ^8.0.0
- sharp: ^0.32.3 → ^0.33.0

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-31 21:01:19 +02:00
f69310dfec render HTML in Recipe Card description 2024-10-22 17:29:29 +02:00
e725a0430a eager image loading for top recipes on page 2024-02-25 12:54:30 +01:00
0f0321a42d specify emoji font for icons 2024-02-25 11:15:06 +01:00
5eede48406 first attempt in disabling image coursel on redirect 2024-02-18 19:53:47 +01:00
5b34fa7a9c first attempt of img cache invalidation 2024-02-18 14:43:42 +01:00
8029c8bbee only margin-right in MediaScroller 2024-01-24 11:09:54 +01:00
d5edf25393 fix weird shift in Cards due to double insertion of <a> tag on server 2024-01-22 15:09:08 +01:00
f6887af97a Card.svelte: placeholder image also blurred if JS disabled 2024-01-22 14:53:26 +01:00
74b9de25fb fix Search 2024-01-22 14:47:22 +01:00
df4a3763c1 no blurred image if JS disabled 2024-01-22 14:43:52 +01:00
7dcd495e0c Card is now fully loaded in itself
No longer do we have this weird shift of the description to the right of
the Card until some magical JS is loaded to fix it.
Not yet perfect: The now wrapping a-tag is for some reason still weirdly
sent to client until some js cleans it up. Currently results in a too
large gap which is fixed by local js.

Still TODO: do not blur images if no js present
2024-01-22 14:13:56 +01:00
8f53f66286 Card.svelte: get rid of :has() and Firefox-specific hacks 2024-01-22 12:40:55 +01:00
895c5c5157 slightly improve js-free Card rendering 2024-01-21 10:34:23 +01:00
6812a90fad Safari and Firefox render cards correctly 2023-10-19 14:04:44 +02:00
1a3d486f43 move from new.bocken.org to bocken.org 2023-10-05 10:09:50 +02:00
e3de4e8db9 less mislicks, switched to :focus where appropriate 2023-07-13 18:27:02 +02:00
fa23378952 Card hover effect smooth, mobile navbar hides on click 2023-07-13 13:54:42 +02:00
950506dc10 reliably unblur, only use unblur if image not already loaded 2023-07-12 12:44:44 +02:00
5ee699ea68 fix placeholder thumbnail misalignment 2023-07-11 19:14:39 +02:00
800ca29531 initial implementation of placeholder images, thumbnails and blurring between using sharp 2023-07-11 18:47:29 +02:00
099bf61dec fix some icon animations 2023-07-10 13:19:35 +02:00
357e2f7eeb randomize order of recipes based on day 2023-07-10 13:00:11 +02:00
d1d3edd65b stack tags from bottom of card 2023-07-05 18:48:59 +02:00
7eb731181a Icon route added 2023-07-03 12:39:34 +02:00
a48b9686e7 Remove unnecessary a11y warnings 2023-07-03 00:09:00 +02:00
bdfb7280e1 First almost fully functioning MVP.
Lacking:
- Seasons cannot be added/edited
- image upload
- layout recipe/adding
2023-06-24 15:35:38 +02:00
b4223f8eb0 Lots of changes, started on working /add 2023-06-24 15:35:37 +02:00
120781a57a first working prototype 2023-06-24 15:35:37 +02:00