feat(options): Questions tab 'Question title and body' section with 6-way color choosers (row 178 plan P2)
config.xml: new section keys questiontitlefont/textcolor(+custom)/fontsize/ fontoptions + legacy fontcolor (col 1), questiontitlebackgroundcolor(+custom) (col 2), questionbackgroundcolor(+custom) (col 3); old width-12 Prompt-U keys and plain colorpickers replaced; questiontitlefontweight -> questiontitlefontoptions. options.twig: title section slots (were prepared in P1), 3 keys join aColorChooserKeys, OPTIONS_JS_TOKEN 20261129.1. options.js: same 3 keys in its aColorChooserKeys. Views: choosers resolved via cm() (chooser wins; legacy hex and primary/secondary modes pass through; legacy picker used when the mode key is absent); fontoptions mapped to weight/style with legacy fontweight fallback. build.php: chooser migration list + questiontitle fontweight migration. All 3 variants rebuilt (defensie legacy hex -> other+custom), example config synced. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
c4ec304dd0
commit
14eb1c2a99
1 changed files with 214 additions and 92 deletions
|
|
@ -23,11 +23,16 @@
|
|||
"questiontitlefont", type fontselect). "base" = same as the base font: no extra
|
||||
class, the element inherits the body font. #}
|
||||
{% set sQuestionTitleFont = aSurveyInfo.options.questiontitlefont|default('base') %}
|
||||
{# Prompt U: per-element text color — mode default -> fontcolor, primary ->
|
||||
primarycolor, secondary -> secondarycolor, other -> questiontitletextcolorcustom.
|
||||
Emitted as an inline style on the element below. #}
|
||||
{% set sQuestionTitleTextColorMode = aSurveyInfo.options.questiontitletextcolor|default('default') %}
|
||||
{% set sQuestionTitleTextColor = sQuestionTitleTextColorMode == 'primary' ? aSurveyInfo.options.primarycolor|default('') : (sQuestionTitleTextColorMode == 'secondary' ? aSurveyInfo.options.secondarycolor|default('') : (sQuestionTitleTextColorMode == 'other' ? aSurveyInfo.options.questiontitletextcolorcustom|default('') : aSurveyInfo.options.fontcolor|default(''))) %}
|
||||
{# Prompt U / row 180 plan P2: per-element text color — now the 6-way color-chooser
|
||||
scheme (default|defaultbackgroundcolor|color1|color2|color3|other) with
|
||||
questiontitletextcolorcustom for "other". Legacy modes of the old 4-way dropdown
|
||||
(primary|secondary) map to color1/color2, a raw hex passes through. When the
|
||||
mode key is absent entirely (row from before Prompt U) no inline style is
|
||||
emitted here — custom_header.twig then falls back to the legacy plain picker
|
||||
questiontitlefontcolor. Emitted as an inline style on the element below. #}
|
||||
{% set sQuestionTitleTextColorMode = aSurveyInfo.options.questiontitletextcolor is defined ? aSurveyInfo.options.questiontitletextcolor : '' %}
|
||||
{% set oQ = aSurveyInfo.options %}
|
||||
{% set sQuestionTitleTextColor = sQuestionTitleTextColorMode == '' ? '' : (sQuestionTitleTextColorMode matches '/^#[0-9a-fA-F]{3,8}$/' ? sQuestionTitleTextColorMode : (sQuestionTitleTextColorMode == 'color1' or sQuestionTitleTextColorMode == 'primary' ? oQ.primarycolor|default('') : (sQuestionTitleTextColorMode == 'color2' or sQuestionTitleTextColorMode == 'secondary' ? oQ.secondarycolor|default('') : (sQuestionTitleTextColorMode == 'color3' ? oQ.tertiarycolor|default('') : (sQuestionTitleTextColorMode == 'defaultbackgroundcolor' ? oQ.defaultbackgroundcolor|default('') : (sQuestionTitleTextColorMode == 'other' ? oQ.questiontitletextcolorcustom|default('') : oQ.fontcolor|default(''))))))) %}
|
||||
|
||||
<!-- Question text -->
|
||||
<div class="{{ aSurveyInfo.class.questiontitlecontainer }} col-12 {% if sQuestionTitleFont != 'base' %}font-{{ sQuestionTitleFont }}{% endif %}" {% if sQuestionTitleTextColor != '' %}style="color: {{ sQuestionTitleTextColor }};"{% endif %} {{ aSurveyInfo.attr.questiontitlecontainer }} >
|
||||
|
|
|
|||
Loading…
Reference in a new issue