Skip to content

Add dark mode support - #24

Merged
kberzinch merged 2 commits into
mainfrom
cursor/dark-mode-support-7151
Jul 19, 2026
Merged

kberzinch merged 2 commits into
mainfrom
cursor/dark-mode-support-7151

Conversation

@kberzinch

@kberzinch kberzinch commented Jul 19, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds Bootstrap 5.3 color-mode dark theme support with a plain brightness-6 icon toggle next to the logged-in username.

  • Early script in layout.html applies data-bs-theme before paint from localStorage or system preference
  • Elm toggle flips theme via setTheme port; JS persists to localStorage and updates the document root
  • Navbar glass styles use --bs-body-bg-rgb so they track the active theme

Test plan

  • Open the SPA and confirm the brightness icon appears next to the username (home + navbar)
  • Toggle theme and confirm Bootstrap components (cards, text, form controls) switch light/dark
  • Reload and confirm the chosen theme persists
  • Clear localStorage.theme and confirm the app follows prefers-color-scheme
Open in Web Open in Cursor 

Persist light/dark preference in localStorage, default to system
prefers-color-scheme, and apply Bootstrap data-bs-theme via an Elm port.

Co-authored-by: Kristaps Berzinch <kristaps@berzin.ch>
@cursor
cursor Bot temporarily deployed to production July 19, 2026 19:36 Inactive
Tooltip and aria-label show the theme that would be selected next
(e.g. "Switch to dark theme").

Co-authored-by: Kristaps Berzinch <kristaps@berzin.ch>
@cursor
cursor Bot temporarily deployed to production July 19, 2026 19:45 Inactive
@kberzinch
kberzinch marked this pull request as ready for review July 19, 2026 19:47
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@kberzinch
kberzinch merged commit 13d93d8 into main Jul 19, 2026
4 checks passed
@kberzinch
kberzinch deleted the cursor/dark-mode-support-7151 branch July 19, 2026 19:47

This branch was previously deployed

1 inactive deployment
production — 85e93d61 Deployed Jul 19, 2026 by cursor[bot] via Deploy / production #157
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.

2 participants