Allow to switch to dark mode
Many people find it easier on the eyes to view pages on a screen with a dark background. Experts refer to this as “dark mode”. OpenCulturas now allows you to reverse the color scheme. To prevent this from simply sneaking into your existing platform, the new feature is not there automatically. If requires only a few settings (administrator role):
- Enable module Dark Mode Toggle
- Place the likewise named block in the region Utilities links: URL /admin/structure/block or via menu: Strukture > Block layout. Make sure that the toggle "Display title" is on.
Your platform visitors and users can now choose between these color schemes:
- Light (like you have known it)
- Auto (following the user preference set in the browser or operating system)
- Dark (enforces dark mode)
This setting effects the back-end as well so that you won't be flashed when switching to an edit form.
Managed OpenCulturas
You will find a new "CSS injector" in the back-end. Feel free to adjust the colors to fit your design.
Alles was ihr braucht, stellen wir in einem CSS-Injector bereit. Die Farben könnt ihr dann selbst anpassen. Please contact us if you require assistance!
Plattforms with a custom design (theme)
Pretty sure you'll want to adjust the colors to your design. Since you have worked with the CSS custom properties as the OpenCulturas base theme has always provided and suggested, this will be a fast and easy job. You'll find the variables to copy in the variables file starting around line 260: profile/themes/openculturas_base/scss_config/_variables.scss. Paste them in your theme and adjust the colors.
After that you might want to recognize these files:
- profile/themes/openculturas_base/templates/page/header.scss (line 95)
- profile/themes/openculturas_base/scss_config/dark-mode/_index.scss
- profile/themes/openculturas_base/scss_config/style.scss (and cke5-wysiwyg.scss) for integration of dark mode-related scss files