fix(options): Page background tab in two col-md-6 columns; option wrappers full column width
Row 163/164: the Page background pane used three col-md-4 columns with an empty third, and its option wrappers rendered col-12 col-md-<width> inside the slot columns (bImagesPane was missing from the wrapClass condition), so each option only used the left part of its column. Now two col-md-6 columns under the full-width h2/p intro, wrappers plain col-12; config.xml widths of the 6 Page background options 4 -> 6 (width = pane column width). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
d05b5ce226
commit
dc2f09e73c
2 changed files with 32 additions and 23 deletions
17
config.xml
17
config.xml
|
|
@ -337,7 +337,7 @@
|
||||||
"other" + hex into bodybackgroundcolorcustom (options.js), and
|
"other" + hex into bodybackgroundcolorcustom (options.js), and
|
||||||
custom_header.twig resolves the mode via the cm() macro (a raw hex still
|
custom_header.twig resolves the mode via the cm() macro (a raw hex still
|
||||||
passes through directly). -->
|
passes through directly). -->
|
||||||
<bodybackgroundcolor type="dropdown" category="Page background" width="4" title="Overall background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
|
<bodybackgroundcolor type="dropdown" category="Page background" width="6" title="Overall background color" options="default|defaultbackgroundcolor|color1|color2|color3|other" optionlabels="Default font color|Default background color|Color 1|Color 2|Color 3|Other ...">defaultbackgroundcolor
|
||||||
<dropdownoptions>
|
<dropdownoptions>
|
||||||
<option value="default">Default font color</option>
|
<option value="default">Default font color</option>
|
||||||
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
|
<option value="defaultbackgroundcolor" data-default="1">[Default background color]</option>
|
||||||
|
|
@ -346,19 +346,20 @@
|
||||||
<option value="color3">Color 3</option>
|
<option value="color3">Color 3</option>
|
||||||
<option value="other">Other ...</option>
|
<option value="other">Other ...</option>
|
||||||
</dropdownoptions></bodybackgroundcolor>
|
</dropdownoptions></bodybackgroundcolor>
|
||||||
<bodybackgroundcolorcustom type="colorpicker" category="Page background" width="4" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#ffffff</bodybackgroundcolorcustom>
|
<bodybackgroundcolorcustom type="colorpicker" category="Page background" width="6" title="Custom overall background color (for 'Other ...')" parent="bodybackgroundcolor">#ffffff</bodybackgroundcolorcustom>
|
||||||
<!-- Prompt Q: order fixed — Background image, then Overall background color
|
<!-- Prompt Q: order fixed — Background image, then Overall background color
|
||||||
(always relevant), then the three image-detail options which are only
|
(always relevant), then the three image-detail options which are only
|
||||||
relevant when a background image is shown (parent="backgroundimage",
|
relevant when a background image is shown (parent="backgroundimage",
|
||||||
shown/hidden via .option-visibility in options.twig/options.js).
|
shown/hidden via .option-visibility in options.twig/options.js).
|
||||||
Row 149: the "Page background" pane lays these out in three columns —
|
Row 149/163: the "Page background" pane lays these out in TWO columns
|
||||||
|
(width 6 = the two col-md-6 columns) under the full-width intro —
|
||||||
col 1 = overall background color (chooser) + background image on/off,
|
col 1 = overall background color (chooser) + background image on/off,
|
||||||
col 2 = the three image-detail options (hidden as a whole when the
|
col 2 = the three image-detail options (hidden as a whole when the
|
||||||
image is off), col 3 empty. -->
|
image is off). -->
|
||||||
<backgroundimage type="buttons" category="Page background" width="4" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
|
<backgroundimage type="buttons" category="Page background" width="6" title="Background image (behind body of page)" options="on|off" optionlabels="Yes|No">on</backgroundimage>
|
||||||
<backgroundimagefile type="imagefile" category="Page background" width="4" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
|
<backgroundimagefile type="imagefile" category="Page background" width="6" title="Background image file" parent="backgroundimage">./files/tiledtexture.png</backgroundimagefile>
|
||||||
<backgroundimagefixed type="buttons" category="Page background" width="4" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll" parent="backgroundimage">scroll</backgroundimagefixed>
|
<backgroundimagefixed type="buttons" category="Page background" width="6" title="Background image fixed or scroll" options="fixed|scroll" optionlabels="Fixed|Scroll" parent="backgroundimage">scroll</backgroundimagefixed>
|
||||||
<backgroundimagedisplay type="buttons" category="Page background" width="4" title="Background image display" options="tile|cover" optionlabels="Tile|Cover" parent="backgroundimage">tile</backgroundimagedisplay>
|
<backgroundimagedisplay type="buttons" category="Page background" width="6" title="Background image display" options="tile|cover" optionlabels="Tile|Cover" parent="backgroundimage">tile</backgroundimagedisplay>
|
||||||
|
|
||||||
<!-- Groups tab (options.twig tab 4, aGroupKeys order): col 1 = group title, col 2 = group description (width 6 = the two col-md-6 columns). -->
|
<!-- Groups tab (options.twig tab 4, aGroupKeys order): col 1 = group title, col 2 = group description (width 6 = the two col-md-6 columns). -->
|
||||||
<!-- Row 157/159: the group options carry category "Groups" (row 159: the
|
<!-- Row 157/159: the group options carry category "Groups" (row 159: the
|
||||||
|
|
|
||||||
|
|
@ -317,9 +317,10 @@
|
||||||
{% set aImagesKeys = aImagesKeys|merge([key]) %}
|
{% set aImagesKeys = aImagesKeys|merge([key]) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{# row 149: the Page background pane has an explicit key order (slot layout below):
|
{# row 149/163: the Page background pane has an explicit key order (slot layout below):
|
||||||
col 1 = overall background color (chooser + custom) + in-column hr + background
|
TWO columns (col-md-6 each) under the full-width intro — col 1 = overall background
|
||||||
image on/off; col 2 = the three image-detail options; col 3 stays empty #}
|
color (chooser + custom) + in-column hr + background image on/off; col 2 = the three
|
||||||
|
image-detail options + the upload facility #}
|
||||||
{% set aImagesPaneKeys = ['bodybackgroundcolor', 'bodybackgroundcolorcustom', 'backgroundimage', 'backgroundimagefile', 'backgroundimagefixed', 'backgroundimagedisplay'] %}
|
{% set aImagesPaneKeys = ['bodybackgroundcolor', 'bodybackgroundcolorcustom', 'backgroundimage', 'backgroundimagefile', 'backgroundimagefixed', 'backgroundimagedisplay'] %}
|
||||||
{% if aImagesKeys is not empty %}
|
{% if aImagesKeys is not empty %}
|
||||||
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Page background', 'keys': aImagesPaneKeys }]) %}
|
{% set aTabs = aTabs|merge([{ 'id': 'category-images', 'label': 'Page background', 'category': 'Page background', 'keys': aImagesPaneKeys }]) %}
|
||||||
|
|
@ -517,12 +518,12 @@
|
||||||
{% elseif fSlot == 'ppos' %}<div class="row action_hide_on_inherit progress-block"><div class="col-md-4">
|
{% elseif fSlot == 'ppos' %}<div class="row action_hide_on_inherit progress-block"><div class="col-md-4">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elseif bImagesPane %}
|
{% elseif bImagesPane %}
|
||||||
{# row 149: Page background transitions — bg1 -> bg2 closes col 1
|
{# row 149/163: Page background transitions — bg1 -> bg2 closes
|
||||||
and opens col 2 (the whole column carries option-visibility,
|
col 1 and opens col 2, both col-md-6 (the whole column carries
|
||||||
so it is hidden when the background image is off); the first
|
option-visibility, so it is hidden when the background image
|
||||||
bg1 key opens col 1 #}
|
is off); the first bg1 key opens col 1 #}
|
||||||
{% if fLastSlot == 'bg1' %}</div><div class="col-md-4 border-start images-col-2 option-visibility{% if bgImgVal != 'on' %} d-none{% endif %}" data-show-if-parent="backgroundimage" data-show-if-value="on">{% endif %}
|
{% if fLastSlot == 'bg1' %}</div><div class="col-md-6 border-start images-col-2 option-visibility{% if bgImgVal != 'on' %} d-none{% endif %}" data-show-if-parent="backgroundimage" data-show-if-value="on">{% endif %}
|
||||||
{% if fSlot == 'bg1' %}<div class="col-md-4 images-col-1">{% endif %}
|
{% if fSlot == 'bg1' %}<div class="col-md-6 images-col-1">{% endif %}
|
||||||
{% elseif bGroupsPane %}
|
{% elseif bGroupsPane %}
|
||||||
{# row 157: Groups transitions — g1 -> g2 closes col 1 and opens
|
{# row 157: Groups transitions — g1 -> g2 closes col 1 and opens
|
||||||
col 2 (border-start); the first g1 key opens col 1 #}
|
col 2 (border-start); the first g1 key opens col 1 #}
|
||||||
|
|
@ -644,7 +645,13 @@
|
||||||
{% set qLastCol = qCol %}
|
{% set qLastCol = qCol %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bQuestionsPane or bTopPane or bGroupsPane or (bFontsPane and fSlot != 'rest') %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
|
{# row 163: inside a slot pane (Questions columns, Header, Page
|
||||||
|
background, Groups, Fonts slots) every option wrapper is col-12
|
||||||
|
(full width of its slot column) — attr.width only applies to the
|
||||||
|
plain grid panes. Without bImagesPane here the wrappers rendered
|
||||||
|
col-12 col-md-<width> INSIDE the col-md-6 slot column, i.e. only
|
||||||
|
the left part of each column was used. #}
|
||||||
|
{% if bQuestionsPane or bTopPane or bGroupsPane or bImagesPane or (bFontsPane and fSlot != 'rest') %}{% set wrapClass = 'col-12' %}{% else %}{% set wrapClass = 'col-12 col-md-' ~ attr.width|default(2) %}{% endif %}
|
||||||
{# server-side current value for this option (checked/selected/value) #}
|
{# server-side current value for this option (checked/selected/value) #}
|
||||||
{% set currentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[key] is defined ? aCurrentOptions[key] : (oParentOptions[key] is defined ? oParentOptions[key] : '')) %}
|
{% set currentValue = bGeneralInherit ? 'inherit' : (aCurrentOptions[key] is defined ? aCurrentOptions[key] : (oParentOptions[key] is defined ? oParentOptions[key] : '')) %}
|
||||||
{# parent != '': this field is only visible when the parent option's value
|
{# parent != '': this field is only visible when the parent option's value
|
||||||
|
|
@ -834,10 +841,11 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if tab.category == 'Page background' %}
|
{% if tab.category == 'Page background' %}
|
||||||
{# row 149/150: close the open Page background column; after col 2 append
|
{# row 149/150/163: close the open Page background column (two col-md-6
|
||||||
the empty col 3. Row 150: INSIDE col 2, under the image options, the
|
columns, no empty third). Row 150: INSIDE col 2, under the image
|
||||||
upload facility + help text — the column div carries option-visibility
|
options, the upload facility + help text — the column div carries
|
||||||
on backgroundimage, so the upload only shows when the image is on.
|
option-visibility on backgroundimage, so the upload only shows when
|
||||||
|
the image is on.
|
||||||
The actual upload form (#upload_frontend) is rendered by themeOptions/update.php #}
|
The actual upload form (#upload_frontend) is rendered by themeOptions/update.php #}
|
||||||
{% if fLastSlot == 'bg2' %}
|
{% if fLastSlot == 'bg2' %}
|
||||||
<div class="col-12 upload-file-row">
|
<div class="col-12 upload-file-row">
|
||||||
|
|
@ -874,7 +882,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div><div class="col-md-4 images-col-3"></div>
|
</div>
|
||||||
{% elseif fLastSlot == 'bg1' %}</div>
|
{% elseif fLastSlot == 'bg1' %}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue