feat(options): menu item text color in the top bar (navbarfontcolor)

- config.xml: new colorpicker "navbarfontcolor" in the Colors category.
- custom_header.twig: applies it to #survey-nav menu links (normal + hover/focus,
  hover at 0.75 opacity), replacing the old bootstrap3 .navbar-default hover rule.
  Pick a color that contrasts with headerbackgroundcolor.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
Tammo ter Hark 2026-11-16 19:51:19 +01:00
commit 193de4b6b9
3 changed files with 19 additions and 2 deletions

View file

@ -18,6 +18,7 @@ copying of files needed.
- `css/custom.css`, `scripts/custom.js` — loaded last, safe for project - `css/custom.css`, `scripts/custom.js` — loaded last, safe for project
tweaks. tweaks.
- `options/` — options page assets. - `options/` — options page assets.
- `variants/` — build/export tooling only. Client variant definitions
(`variants/*.json`) hold confidential house-style values, are gitignored (`variants/*.json`) hold confidential house-style values, are gitignored
(see `.gitignore`) and live in the private variants repo, not here. (see `.gitignore`) and live in the private variants repo, not here.
@ -29,3 +30,9 @@ right. The center logo is absolutely centered in the navbar (see
`sass/plain.sass`). Logo files are looked up in the theme's own `files/` `sass/plain.sass`). Logo files are looked up in the theme's own `files/`
folder first, then in the mother theme's `files/` folder. folder first, then in the mother theme's `files/` folder.
## Menu item color in the top bar
Option `navbarfontcolor` (Colors category) sets the text color of the menu
items in the navbar; it is applied in `views/subviews/header/custom_header.twig`
and should contrast with `headerbackgroundcolor`.

View file

@ -100,6 +100,7 @@
<!-- Various colors --> <!-- Various colors -->
<headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor> <headerbackgroundcolor type="colorpicker" category="Colors" width="12" title="Header background color" options="on|off" optionlabels="Yes|No">#eeeeee</headerbackgroundcolor>
<navbarfontcolor type="colorpicker" category="Colors" width="12" title="Menu item text color in the top bar (should contrast with the header background color)" options="on|off" optionlabels="Yes|No">#444444</navbarfontcolor>
<primarycolor type="colorpicker" category="Colors" width="12" title="Primary color (for buttons)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor> <primarycolor type="colorpicker" category="Colors" width="12" title="Primary color (for buttons)" options="on|off" optionlabels="Yes|No">#5e1c64</primarycolor>
<fontcolor type="colorpicker" category="Colors" width="12" title="Base font color" options="on|off" optionlabels="Yes|No">#444444</fontcolor> <fontcolor type="colorpicker" category="Colors" width="12" title="Base font color" options="on|off" optionlabels="Yes|No">#444444</fontcolor>
<sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor> <sliderhandlecolor type="colorpicker" category="Colors" width="12" title="Slider handle color" options="on|off" optionlabels="Yes|No">#5e1c64</sliderhandlecolor>

View file

@ -145,8 +145,17 @@
background-color: {{ aSurveyInfo.options.headerbackgroundcolor }}; background-color: {{ aSurveyInfo.options.headerbackgroundcolor }};
} }
.navbar-default .navbar-nav > li > a:hover { #survey-nav .navbar-nav > li > a,
color: {{ aSurveyInfo.options.fontcolor }}; #survey-nav .navbar-nav .nav-link {
color: {{ aSurveyInfo.options.navbarfontcolor }};
}
#survey-nav .navbar-nav > li > a:hover,
#survey-nav .navbar-nav > li > a:focus,
#survey-nav .navbar-nav .nav-link:hover,
#survey-nav .navbar-nav .nav-link:focus {
color: {{ aSurveyInfo.options.navbarfontcolor }};
opacity: 0.75;
} }
.progress { .progress {