Skip to content

BugFix - Theme toggle from header#9

Merged
devnomadic merged 3 commits into
masterfrom
bugfix/light-dark-toggle
Jul 28, 2025
Merged

BugFix - Theme toggle from header#9
devnomadic merged 3 commits into
masterfrom
bugfix/light-dark-toggle

Conversation

@devnomadic

@devnomadic devnomadic commented Jul 28, 2025

Copy link
Copy Markdown
Owner

This pull request focuses on improving theme handling and simplifying the codebase for a website. The changes streamline the theme-switching logic, remove the theme toggle UI, and enhance the integration of the Giscus comments system with dynamic theme updates.

Theme handling improvements:

  • _includes/giscus.html: Updated the Giscus script to dynamically set the theme based on localStorage or default to dark, ensuring the correct theme is applied on load. Added a mechanism to check for the Giscus iframe more frequently and stop after 10 seconds for better performance. [1] [2]
  • _includes/header.html: Simplified the theme initialization logic to apply the theme directly from localStorage or default to dark, removing redundant checks for user preferences.

Codebase simplification:

  • _includes/header.html: Removed the theme toggle UI, including its associated HTML and JavaScript, as it is no longer necessary with the updated theme handling logic.This pull request removes the theme toggle functionality from the _includes/header.html file. The change simplifies the header by eliminating the associated HTML elements and JavaScript functionality.

Key change:

  • _includes/header.html: Removed the theme toggle feature, including the checkbox input, label, and associated decorative elements (e.g., stars and craters), along with its onclick event handler for the modeSwitcher() function.

@devnomadic devnomadic merged commit 6bfb574 into master Jul 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant