summaryrefslogtreecommitdiffstats
path: root/themes/danix-xyz-hacker/assets/js/theme-toggle.js
AgeCommit message (Collapse)AuthorFilesLines
2026-04-15Fix theme toggle icon to always sync with actual page themeDanilo M.1-14/+23
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 <noreply@anthropic.com>
2026-04-15Fix Hugo v0.160 compatibility: remove os.Getenv and fix template syntaxDanilo M.1-0/+14
- Remove os.Getenv("THEME") call that violates security policy - Use CSS variables and data attributes for theme-aware badge colors - Update theme-toggle.js to update badge colors on theme switch - Fix .LastMod → .Lastmod (correct API) - Fix template syntax for date comparison in article-header.html Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-15feat: create theme toggle with localStorage persistenceDanilo M.1-0/+30