Skip to content

Introduce dark mode toggle/theme#157

Open
josbeir wants to merge 3 commits into
masterfrom
feat/ui-dark-mode
Open

Introduce dark mode toggle/theme#157
josbeir wants to merge 3 commits into
masterfrom
feat/ui-dark-mode

Conversation

@josbeir
Copy link
Copy Markdown
Contributor

@josbeir josbeir commented Jun 5, 2026

Introduces a dark-mode theme and toggle

image image

Copilot AI review requested due to automatic review settings June 5, 2026 18:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a DaisyUI-backed dark theme to the site and introduces UI controls to toggle between light/dark modes, persisting the choice in the browser.

Changes:

  • Initialize the active theme via data-theme using localStorage and prefers-color-scheme.
  • Add desktop + mobile theme toggle controls in the navbar.
  • Register a new cakephp-dark DaisyUI theme and add dark-mode-specific CSS overrides (SlimSelect, navbar, placeholders).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
templates/layout/default.php Sets the initial data-theme early in the document based on stored/system preference.
templates/element/search.php Switches the search input background to theme-aware bg-base-100.
templates/element/navbar.php Adds theme toggle controls (desktop + mobile) and small spacing/utility tweaks.
resources/css/style.css Registers cakephp-dark theme and adds dark-mode style overrides.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread templates/layout/default.php
Comment thread templates/element/navbar.php
Comment thread templates/element/navbar.php
Comment thread templates/element/navbar.php
Comment thread templates/element/navbar.php Outdated
Comment thread resources/css/style.css
@josbeir josbeir force-pushed the feat/ui-dark-mode branch from 9139d1e to 24d2015 Compare June 5, 2026 18:54
@LordSimal
Copy link
Copy Markdown
Contributor

Unfortunately we don't have a dark variant colorset on https://cakephp.org/logos but this feels pretty good to be honest.

Does this automatically use the dark theme if the browser has dark theme preferences set?

@josbeir
Copy link
Copy Markdown
Contributor Author

josbeir commented Jun 5, 2026

Unfortunately we don't have a dark variant colorset on https://cakephp.org/logos but this feels pretty good to be honest.

I could clean this up by targetting the "pie" path with the typical cake red color :)

Does this automatically use the dark theme if the browser has dark theme preferences set?

Yes using prefers-color-scheme => https://github.com/cakephp/plugins.cakephp.org/pull/157/changes#diff-19efa77022d02e72d1c598ef2f2687da466c7459920c6a9460bfe4cc6c03ee6fR40

@LordSimal
Copy link
Copy Markdown
Contributor

i am fine with how it is now 👍🏻

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.

3 participants