From 134d00e5bd0f15113e256c8446931d830985fbf4 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 15 Apr 2026 21:48:54 +0200 Subject: Fix theme toggle icon to always sync with actual page theme Replace Alpine.js conditional rendering with plain JavaScript that: - Reads the actual theme class from the html element on page load - Updates icon visibility based on the real DOM state, not internal state - Handles navigation correctly since it checks the current class every time This fixes the issue where navigating between pages caused the icon to become out of sync with the actual theme being displayed. Co-Authored-By: Claude Haiku 4.5 --- themes/danix-xyz-hacker/layouts/partials/header.html | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'themes/danix-xyz-hacker/layouts/partials/header.html') diff --git a/themes/danix-xyz-hacker/layouts/partials/header.html b/themes/danix-xyz-hacker/layouts/partials/header.html index ec12b52..49493c6 100644 --- a/themes/danix-xyz-hacker/layouts/partials/header.html +++ b/themes/danix-xyz-hacker/layouts/partials/header.html @@ -48,20 +48,11 @@ -- cgit v1.2.3