From a05ea86f931b17b0599960a6d496af842b527f00 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 18 Apr 2026 20:03:54 +0200 Subject: feat: theme-aware default thumbnails with picture element - Use HTML element with prefers-color-scheme media query - Fallback dark thumbnail via content: url() CSS for theme-light class - Automatically displays light/dark thumbnails based on user theme - Articles without custom images now show default thumbnails - Maintains all existing hover effects and type badges Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/assets/css/main.css | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'themes/danix-xyz-hacker/assets/css/main.css') diff --git a/themes/danix-xyz-hacker/assets/css/main.css b/themes/danix-xyz-hacker/assets/css/main.css index a2f6b09..f618f2d 100644 --- a/themes/danix-xyz-hacker/assets/css/main.css +++ b/themes/danix-xyz-hacker/assets/css/main.css @@ -72,6 +72,11 @@ html.theme-light { } } +/* Theme-aware picture element for default thumbnails */ +html.theme-light picture img[src="/images/default_thumbnail_dark.png"] { + content: url('/images/default_thumbnail_light.png'); +} + @layer base { html { @apply overflow-x-hidden; -- cgit v1.2.3