Introduce dark mode toggle/theme#157
Conversation
There was a problem hiding this comment.
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-themeusinglocalStorageandprefers-color-scheme. - Add desktop + mobile theme toggle controls in the navbar.
- Register a new
cakephp-darkDaisyUI 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.
9139d1e to
24d2015
Compare
|
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? |
I could clean this up by targetting the "pie" path with the typical cake red color :)
Yes using prefers-color-scheme => https://github.com/cakephp/plugins.cakephp.org/pull/157/changes#diff-19efa77022d02e72d1c598ef2f2687da466c7459920c6a9460bfe4cc6c03ee6fR40 |
|
i am fine with how it is now 👍🏻 |
Introduces a dark-mode theme and toggle