Skip to content

about.html theme toggle does nothing — page is stuck in light mode #272

Description

@fancyboi999

The theme toggle button on /about.html does nothing. The page is permanently rendered in light mode and ignores both the stored theme and the OS prefers-color-scheme.

Steps to reproduce

  1. Open https://aiengineeringfromscratch.com/about.html
  2. Click the theme toggle (top-right, the N/D button)
  3. Nothing happens — data-theme stays light.

Alternatively: switch the site to dark on any other page (e.g. /catalog.html), then open /about.html — it reverts to light.

Root cause

Unlike every other page, about.html includes neither app.js (whose initThemeToggle() is the only JS that wires #themeToggle) nor the inline theme <script> that catalog.html / glossary.html / prereqs.html / lesson.html each carry. So the toggle button has no click handler, and <html data-theme="light"> is never updated.

The dark CSS itself works fine — running document.documentElement.setAttribute("data-theme","dark") in the console renders about.html correctly in dark. This is purely a missing-script wiring bug.

Verified

  • Live: after clicking the toggle, data-theme stays light; document.scripts shows no app.js and no inline theme script.
  • After adding the standard inline theme script, the toggle works (light ↔ dark), the icon updates (N ↔ D), and the choice persists in localStorage.

Suggested fix

Add the same self-contained inline theme-init script that the other standalone pages use to about.html (right after the existing <script> tags). PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions