GameServerWeb.Plugs.ColorMode
(game_server_web v1.0.943)
Copy Markdown
Reads the phx_theme cookie (set by the client-side theme switcher) and
assigns :color_mode so that the root layout can render the data-theme
attribute server-side, preventing a Flash of Unstyled Content (FOUC) when
the user has selected dark mode.
Only accepts "dark" or "light" — any other value is ignored.