Skip to content
Snippets Groups Projects
Commit 15bd3de0 authored by Florent Torregrosa's avatar Florent Torregrosa
Browse files

Merge branch '3494732-remove-layout-options' into '5.1.x'

Issue #3494732 by grimreaper: Remove Layout Options dependency

See merge request !238
parents e20c643e 3ef5a467
No related branches found
No related tags found
No related merge requests found
Pipeline #372456 passed with warnings
......@@ -16,7 +16,6 @@ See the [docs](./docs) folder for more detailed documentation on:
## Requirements
This theme requires the following modules:
- [Layout Options](https://www.drupal.org/project/layout_options)
- [UI Patterns](https://www.drupal.org/project/ui_patterns)
- [UI Styles](https://www.drupal.org/project/ui_styles)
......
......@@ -4,7 +4,6 @@
"license": "GPL-2.0-or-later",
"type": "drupal-theme",
"require": {
"drupal/layout_options": "^1.4",
"drupal/ui_icons": "^1.0",
"drupal/ui_patterns": "^2.0",
"drupal/ui_styles": "^1.7"
......
ui_suite_bootstrap_layout_options_layout_options:
type: layout_plugin.settings
label: "UI Suite Bootstrap layout options"
mapping:
with_container:
type: layout_options.single_valued_option
gutters:
type: layout_options.single_valued_option
gutters_horizontal:
type: layout_options.single_valued_option
gutters_vertical:
type: layout_options.single_valued_option
ui_suite_bootstrap_layout_options_region_options:
type: mapping
label: "UI Suite Bootstrap region options"
mapping:
col_xs:
type: layout_options.single_valued_option
col_sm:
type: layout_options.single_valued_option
col_md:
type: layout_options.single_valued_option
col_lg:
type: layout_options.single_valued_option
col_xl:
type: layout_options.single_valued_option
col_xxl:
type: layout_options.single_valued_option
layout_plugin.settings.bootstrap_grid_row_1:
type: ui_suite_bootstrap_layout_options_layout_options
mapping:
main:
type: ui_suite_bootstrap_layout_options_region_options
layout_plugin.settings.bootstrap_grid_row_2:
type: ui_suite_bootstrap_layout_options_layout_options
mapping:
main:
type: ui_suite_bootstrap_layout_options_region_options
second:
type: ui_suite_bootstrap_layout_options_region_options
layout_plugin.settings.bootstrap_grid_row_3:
type: ui_suite_bootstrap_layout_options_layout_options
mapping:
main:
type: ui_suite_bootstrap_layout_options_region_options
second:
type: ui_suite_bootstrap_layout_options_region_options
third:
type: ui_suite_bootstrap_layout_options_region_options
layout_plugin.settings.bootstrap_grid_row_4:
type: ui_suite_bootstrap_layout_options_layout_options
mapping:
main:
type: ui_suite_bootstrap_layout_options_region_options
second:
type: ui_suite_bootstrap_layout_options_region_options
third:
type: ui_suite_bootstrap_layout_options_region_options
fourth:
type: ui_suite_bootstrap_layout_options_region_options
{#
/**
* @file
* Template for a grid layout.
*/
#}
{%
set classes = [
'layout',
'layout--' ~ layout.id|clean_class,
'row',
]
%}
{% set with_container = attributes.hasClass('with-container') %}
{% set attributes = attributes.removeClass('with-container') %}
{% if content %}
{% if with_container %}
<div class="container">
{% endif %}
<div{{ attributes.addClass(classes) }}>
{% for region in layout.getRegionNames %}
{% if content[region] %}
<div{{ region_attributes[region].addClass('layout__region', 'layout__region--' ~ region|clean_class, 'col') }}>
{{ content[region] }}
</div>
{% endif %}
{% endfor %}
</div>
{% if with_container %}
</div>
{% endif %}
{% endif %}
......@@ -27,7 +27,6 @@ class ComponentValidatorTest extends ComponentKernelTestBase {
'ui_styles',
'ui_styles_entity_status',
'ui_styles_page',
'layout_options',
];
/**
......
......@@ -4,7 +4,6 @@ description: "A site-builder friendly Bootstrap theme, using the UI Suite module
core_version_requirement: ^10.3.4 || ^11
base theme: false
dependencies:
- layout_options:layout_options
- ui_icons:ui_icons_backport
- ui_patterns:ui_patterns
- ui_styles:ui_styles
......
layout_option_definitions:
# Sections options.
with_container:
title: "With container?"
description: "Is the row wrapped in a container? Containers provide a means to center and horizontally pad your site’s contents."
default: ""
plugin: "layout_options_class_radios"
multi: false
layout: true
regions: false
inline: true
options:
"with-container": "Yes"
"": "No"
gutters:
title: "Gutters"
description: "The gutters between columns in our predefined grid classes can be removed with .no-gutters. This removes the negative margins from .row and the horizontal padding from all immediate children columns."
default: ""
plugin: "layout_options_class_select"
multi: false
layout: true
regions: false
options:
g-0: "0"
g-1: "1"
g-2: "2"
g-3: "3"
g-4: "4"
g-5: "5"
gutters_horizontal:
title: "Horizontal gutters"
description: ".gx-* classes can be used to control the horizontal gutter widths. The .container or .container-fluid parent may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility."
default: ""
plugin: "layout_options_class_select"
multi: false
layout: true
regions: false
options:
gx-0: "0"
gx-1: "1"
gx-2: "2"
gx-3: "3"
gx-4: "4"
gx-5: "5"
gutters_vertical:
title: "Vertical gutters"
description: ".gy-* classes can be used to control the vertical gutter widths. Like the horizontal gutters, the vertical gutters can cause some overflow below the .row at the end of a page. If this occurs, you add a wrapper around .row with the .overflow-hidden class."
default: ""
plugin: "layout_options_class_select"
multi: false
layout: true
regions: false
options:
gy-0: "0"
gy-1: "1"
gy-2: "2"
gy-3: "3"
gy-4: "4"
gy-5: "5"
# Regions options.
col_xs:
title: "All (Extra small)"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-1: "1"
col-2: "2"
col-3: "3"
col-4: "4"
col-5: "5"
col-6: "6"
col-7: "7"
col-8: "8"
col-9: "9"
col-10: "10"
col-11: "11"
col-12: "12"
col_sm:
title: "Small"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-sm-1: "1"
col-sm-2: "2"
col-sm-3: "3"
col-sm-4: "4"
col-sm-5: "5"
col-sm-6: "6"
col-sm-7: "7"
col-sm-8: "8"
col-sm-9: "9"
col-sm-10: "10"
col-sm-11: "11"
col-sm-12: "12"
col_md:
title: "Medium"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-md-1: "1"
col-md-2: "2"
col-md-3: "3"
col-md-4: "4"
col-md-5: "5"
col-md-6: "6"
col-md-7: "7"
col-md-8: "8"
col-md-9: "9"
col-md-10: "10"
col-md-11: "11"
col-md-12: "12"
col_lg:
title: "Large"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-lg-1: "1"
col-lg-2: "2"
col-lg-3: "3"
col-lg-4: "4"
col-lg-5: "5"
col-lg-6: "6"
col-lg-7: "7"
col-lg-8: "8"
col-lg-9: "9"
col-lg-10: "10"
col-lg-11: "11"
col-lg-12: "12"
col_xl:
title: "Extra large"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-xl-1: "1"
col-xl-2: "2"
col-xl-3: "3"
col-xl-4: "4"
col-xl-5: "5"
col-xl-6: "6"
col-xl-7: "7"
col-xl-8: "8"
col-xl-9: "9"
col-xl-10: "10"
col-xl-11: "11"
col-xl-12: "12"
col_xxl:
title: "Extra extra large"
description: ""
default: ""
plugin: "layout_options_class_select"
multi: false
layout: false
regions: true
options:
col-xxl-1: "1"
col-xxl-2: "2"
col-xxl-3: "3"
col-xxl-4: "4"
col-xxl-5: "5"
col-xxl-6: "6"
col-xxl-7: "7"
col-xxl-8: "8"
col-xxl-9: "9"
col-xxl-10: "10"
col-xxl-11: "11"
col-xxl-12: "12"
layout_options:
global:
with_container: {}
gutters: {}
gutters_horizontal: {}
gutters_vertical: {}
col_xs: {}
col_sm: {}
col_md: {}
col_lg: {}
col_xl: {}
col_xxl: {}
bootstrap_grid_row_1:
label: "Grid row (1 col) [Bootstrap] (deprecated)"
description: "Deprecated in UI Suite Bootstrap 5.1.x will be removed in UI Suite Bootstrap 5.2.x or 6.0.x."
path: templates
template: layout--grid
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
category: "Deprecated"
default_region: main
icon_map:
- [main]
regions:
main:
label: Main
bootstrap_grid_row_2:
label: "Grid row (2 cols) [Bootstrap] (deprecated)"
description: "Deprecated in UI Suite Bootstrap 5.1.x will be removed in UI Suite Bootstrap 5.2.x or 6.0.x."
path: templates
template: layout--grid
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
category: "Deprecated"
default_region: main
icon_map:
- [main, second]
regions:
main:
label: Main
second:
label: Second
bootstrap_grid_row_3:
label: "Grid row (3 cols) [Bootstrap] (deprecated)"
description: "Deprecated in UI Suite Bootstrap 5.1.x will be removed in UI Suite Bootstrap 5.2.x or 6.0.x."
path: templates
template: layout--grid
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
category: "Deprecated"
default_region: main
icon_map:
- [main, second, third]
regions:
main:
label: Main
second:
label: Second
third:
label: Third
bootstrap_grid_row_4:
label: "Grid row (4 cols) [Bootstrap] (deprecated)"
description: "Deprecated in UI Suite Bootstrap 5.1.x will be removed in UI Suite Bootstrap 5.2.x or 6.0.x."
path: templates
template: layout--grid
class: '\Drupal\layout_options\Plugin\Layout\LayoutOptions'
category: "Deprecated"
default_region: main
icon_map:
- [main, second, third, fourth]
regions:
main:
label: Main
second:
label: Second
third:
label: Third
fourth:
label: Fourth
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment