@openeuropa/bcl-theme-default 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/oe-bcl-default.css +379 -365
- package/css/oe-bcl-default.css.map +1 -1
- package/css/oe-bcl-default.min.css +1 -1
- package/css/oe-bcl-default.min.css.map +1 -1
- package/js/oe-bcl-default.bundle.js +3 -3
- package/js/oe-bcl-default.bundle.js.map +1 -1
- package/js/oe-bcl-default.bundle.min.js +1 -1
- package/js/oe-bcl-default.bundle.min.js.map +1 -1
- package/js/oe-bcl-default.esm.js +3 -3
- package/js/oe-bcl-default.esm.js.map +1 -1
- package/js/oe-bcl-default.esm.min.js +1 -1
- package/js/oe-bcl-default.esm.min.js.map +1 -1
- package/js/oe-bcl-default.umd.js +3 -3
- package/js/oe-bcl-default.umd.js.map +1 -1
- package/js/oe-bcl-default.umd.min.js +1 -1
- package/js/oe-bcl-default.umd.min.js.map +1 -1
- package/package.json +5 -5
- package/src/js/gallery/gallery.js +3 -3
- package/src/scss/_gallery.scss +7 -0
- package/src/scss/base/_colors.scss +17 -6
- package/src/scss/base/_utilities.scss +9 -0
- package/templates/bcl-alert/alert.html.twig +9 -1
- package/templates/bcl-banner/banner.html.twig +16 -9
- package/templates/bcl-description-list/description-list.html.twig +7 -4
- package/templates/bcl-fact-figures/fact-figures.html.twig +6 -2
- package/templates/bcl-file/file.html.twig +8 -5
- package/templates/bcl-form/form.html.twig +7 -4
- package/templates/bcl-gallery/gallery.html.twig +9 -6
- package/templates/bcl-heading/heading.html.twig +42 -0
- package/templates/bcl-links-block/links-block.html.twig +8 -2
- package/templates/bcl-listing/listing.html.twig +7 -4
- package/templates/bcl-project/project-lists.html.twig +67 -0
- package/templates/bcl-project/project.html.twig +53 -70
- package/templates/bcl-project-status/project-contributions.html.twig +56 -0
- package/templates/bcl-project-status/project-status.html.twig +14 -44
- package/templates/bcl-timeline/timeline.html.twig +7 -4
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-theme-default",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.22.0",
|
|
6
6
|
"description": "OE - BCL theme default",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"align-templates": "lerna --scope \"@openeuropa/bcl-twig-templates\" run prepublish",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"@ecl/resources-ec-logo": "3.2.3",
|
|
22
22
|
"@ecl/resources-eu-logo": "3.2.3",
|
|
23
23
|
"@ecl/resources-flag-icons": "3.2.3",
|
|
24
|
-
"@openeuropa/bcl-bootstrap": "^0.
|
|
25
|
-
"@openeuropa/bcl-builder": "^0.
|
|
26
|
-
"@openeuropa/bcl-twig-templates": "^0.
|
|
24
|
+
"@openeuropa/bcl-bootstrap": "^0.22.0",
|
|
25
|
+
"@openeuropa/bcl-builder": "^0.22.0",
|
|
26
|
+
"@openeuropa/bcl-twig-templates": "^0.22.0",
|
|
27
27
|
"copyfiles": "2.4.1",
|
|
28
28
|
"cross-env": "7.0.3",
|
|
29
29
|
"glob": "7.2.0",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"design-system",
|
|
48
48
|
"twig"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
|
|
51
51
|
}
|
|
@@ -29,7 +29,7 @@ const CAROUSEL_SELECTOR = '.carousel'
|
|
|
29
29
|
const CAROUSEL_PAGER_SELECTOR = '.carousel-pager span'
|
|
30
30
|
const CAROUSEL_ACTIVE_SELECTOR = '.carousel-item.active'
|
|
31
31
|
const CAROUSEL_ITEM_SELECTOR = '.carousel-item'
|
|
32
|
-
const THUMBNAIL_SELECTOR = '.bcl-gallery__grid a'
|
|
32
|
+
const THUMBNAIL_SELECTOR = '.bcl-gallery__grid a, .bcl-gallery__mobile-view-more'
|
|
33
33
|
const MODAL_SELECTOR = '.modal'
|
|
34
34
|
const EVENT_MODAL_HIDE = 'hide.bs.modal'
|
|
35
35
|
const CAROUSEL_EVENT = 'slide.bs.carousel'
|
|
@@ -149,8 +149,8 @@ class Gallery extends BaseComponent {
|
|
|
149
149
|
*/
|
|
150
150
|
|
|
151
151
|
EventHandler.on(document, EVENT_CLICK_DATA_API, THUMBNAIL_SELECTOR, function (event) {
|
|
152
|
-
const gallery = event.
|
|
153
|
-
const firstSlide = event.
|
|
152
|
+
const gallery = event.target.closest('div.bcl-gallery')
|
|
153
|
+
const firstSlide = event.target.parentNode.getAttribute('data-bs-slide-to');
|
|
154
154
|
gallery.dataset.galleryStart = firstSlide;
|
|
155
155
|
|
|
156
156
|
Gallery.galleryInterface(gallery, Gallery.getInstance(gallery))
|
package/src/scss/_gallery.scss
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
// Custom theme colors
|
|
2
2
|
|
|
3
|
-
$primary: #
|
|
4
|
-
$secondary: #
|
|
5
|
-
$info: #
|
|
6
|
-
$danger: #
|
|
7
|
-
$warning: #
|
|
8
|
-
$success: #
|
|
3
|
+
$primary: #253ebe;
|
|
4
|
+
$secondary: #70254a;
|
|
5
|
+
$info: #0d768b;
|
|
6
|
+
$danger: #a51f2c;
|
|
7
|
+
$warning: #ffba07;
|
|
8
|
+
$success: #09854c;
|
|
9
9
|
$light: #f8f9fa;
|
|
10
10
|
$dark: #212529;
|
|
11
11
|
|
|
12
12
|
$text-muted: #495057;
|
|
13
|
+
|
|
14
|
+
$link-visited: #6b22b5;
|
|
15
|
+
|
|
16
|
+
// Color variants scales
|
|
17
|
+
|
|
18
|
+
// Tables
|
|
19
|
+
$table-hover-bg-factor: 0.1;
|
|
20
|
+
|
|
21
|
+
// Alerts
|
|
22
|
+
$alert-bg-scale: -90%;
|
|
23
|
+
$alert-border-scale: -80%;
|
|
@@ -63,6 +63,7 @@ $utilities: map-merge(
|
|
|
63
63
|
)
|
|
64
64
|
);
|
|
65
65
|
|
|
66
|
+
/* stylelint-disable no-descending-specificity */
|
|
66
67
|
a {
|
|
67
68
|
text-underline-offset: 2px;
|
|
68
69
|
|
|
@@ -81,7 +82,15 @@ a {
|
|
|
81
82
|
text-decoration: underline;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
85
|
+
|
|
86
|
+
&:visited {
|
|
87
|
+
color: $link-visited;
|
|
88
|
+
&:hover {
|
|
89
|
+
color: shade-color($link-visited, 20%);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
84
92
|
}
|
|
93
|
+
/* stylelint-enable no-descending-specificity */
|
|
85
94
|
|
|
86
95
|
svg {
|
|
87
96
|
fill: currentColor;
|
|
@@ -37,6 +37,14 @@
|
|
|
37
37
|
{% set _classes = _classes|merge(['fade', 'show']) %}
|
|
38
38
|
{% endif %}
|
|
39
39
|
|
|
40
|
+
{% set _classes = _classes|merge(['text-dark']) %}
|
|
41
|
+
|
|
42
|
+
{% set _icon_classes = ['flex-shrink-0 me-3 mt-1 align-self-start' ] %}
|
|
43
|
+
|
|
44
|
+
{% if _variant != 'light' %}
|
|
45
|
+
{% set _icon_classes = _icon_classes|merge(['text-' ~ _variant]) %}
|
|
46
|
+
{% endif %}
|
|
47
|
+
|
|
40
48
|
{% if attributes is empty %}
|
|
41
49
|
{% set attributes = create_attribute() %}
|
|
42
50
|
{% endif %}
|
|
@@ -49,7 +57,7 @@
|
|
|
49
57
|
name: _icon_name ?: _icon_names[_variant],
|
|
50
58
|
size: 's',
|
|
51
59
|
path: _icon_path,
|
|
52
|
-
attributes: create_attribute().addClass(
|
|
60
|
+
attributes: create_attribute().addClass(_icon_classes),
|
|
53
61
|
} only %}
|
|
54
62
|
{% endif %}
|
|
55
63
|
<div class="alert-content flex-grow-1">
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
{% set _title = title|default('') %}
|
|
16
16
|
{% set _title_tag = title_tag|default('div') %}
|
|
17
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
17
18
|
{% set _description = description|default('') %}
|
|
18
19
|
{% set _link = link|default({}) %}
|
|
19
20
|
{% set _image = image|default('') %}
|
|
@@ -28,11 +29,13 @@
|
|
|
28
29
|
{% set _content_class = _content_class ~ " " ~ _content_classes %}
|
|
29
30
|
{% endif %}
|
|
30
31
|
|
|
31
|
-
{% set _title_classes =
|
|
32
|
+
{% set _title_classes = ['display-6'] %}
|
|
32
33
|
{% if _description is not empty or _link is not empty %}
|
|
33
|
-
{% set _title_classes = _title_classes
|
|
34
|
+
{% set _title_classes = _title_classes|merge(['mb-3']) %}
|
|
34
35
|
{% endif %}
|
|
35
36
|
|
|
37
|
+
{% set _title_attributes = _title_attributes.addClass(_title_classes) %}
|
|
38
|
+
|
|
36
39
|
{% set _classes = [
|
|
37
40
|
'bcl-banner',
|
|
38
41
|
_shade ? 'shade',
|
|
@@ -53,14 +56,18 @@
|
|
|
53
56
|
{% endif %}
|
|
54
57
|
<div class="container">
|
|
55
58
|
<div class="{{ _content_class }}">
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
59
|
+
{% if _title is not empty %}
|
|
60
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
61
|
+
title: _title,
|
|
62
|
+
title_tag: _title_tag,
|
|
63
|
+
attributes: _title_attributes,
|
|
64
|
+
} only %}
|
|
63
65
|
{% endif %}
|
|
66
|
+
{% if _description is not empty %}
|
|
67
|
+
<p class="mb-4">{{ _description }}</p>
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% if _link.path %}
|
|
70
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
64
71
|
{% endif %}
|
|
65
72
|
</div>
|
|
66
73
|
</div>
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Parameters:
|
|
5
5
|
- title: (string) (default: "")
|
|
6
6
|
- title_tag: (string) (default: "h2")
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
7
8
|
- "items" (array) (default: []): format: [
|
|
8
9
|
{
|
|
9
10
|
"term" (object or array of object) -format: {
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
|
|
23
24
|
{% set _title = title|default('') %}
|
|
24
25
|
{% set _title_tag = title_tag|default('h2') %}
|
|
26
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
25
27
|
{% set _items = items|default([]) %}
|
|
26
28
|
{% set _variant = variant|default('') %}
|
|
27
29
|
|
|
@@ -34,10 +36,11 @@
|
|
|
34
36
|
{% endif %}
|
|
35
37
|
|
|
36
38
|
{% if _title is not empty %}
|
|
37
|
-
{%
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
40
|
+
title: _title,
|
|
41
|
+
title_tag: _title_tag,
|
|
42
|
+
attributes: _title_attributes,
|
|
43
|
+
} only %}
|
|
41
44
|
{% endif %}
|
|
42
45
|
|
|
43
46
|
<dl
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
|
|
27
27
|
{% set _title = title|default('') %}
|
|
28
28
|
{% set _title_tag = title_tag|default('h2') %}
|
|
29
|
+
{% set _title_attributes = title_attributes ?: create_attribute().addClass(['fw-bold']) %}
|
|
29
30
|
{% set _variant = variant|default('default') %}
|
|
30
31
|
{% set _css_classes = ['bcl-fact-figures', 'bcl-fact-figures--' ~ _variant] %}
|
|
31
32
|
{% set _display_icons = display_icons ?? true %}
|
|
@@ -68,8 +69,11 @@
|
|
|
68
69
|
|
|
69
70
|
<div {{ attributes }}>
|
|
70
71
|
{% if _title is not empty %}
|
|
71
|
-
{%
|
|
72
|
-
|
|
72
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
73
|
+
title: _title,
|
|
74
|
+
title_tag: _title_tag,
|
|
75
|
+
attributes: _title_attributes,
|
|
76
|
+
} only %}
|
|
73
77
|
{% endif %}
|
|
74
78
|
<div
|
|
75
79
|
{% if _wrapper_classes is not empty %}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
Parameters:
|
|
5
5
|
- title (string) (default: '')
|
|
6
6
|
- title_tag (string) (default: 'h2')
|
|
7
|
+
- title_attributes (drupal attrs)
|
|
7
8
|
- item_title (string) (default: '')
|
|
8
9
|
- icon (icon Object) (default: {})
|
|
9
10
|
- text (string) (default: '')
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
{% set _icon = icon|default({}) %}
|
|
38
39
|
{% set _title = title|default('') %}
|
|
39
40
|
{% set _title_tag = title_tag|default('h2') %}
|
|
41
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
40
42
|
{% set _item_title = item_title|default('') %}
|
|
41
43
|
{% set _text = text|default('') %}
|
|
42
44
|
{% set _content = content|default('') %}
|
|
@@ -62,10 +64,11 @@
|
|
|
62
64
|
{% endif %}
|
|
63
65
|
|
|
64
66
|
{% if _title is not empty %}
|
|
65
|
-
{%
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
68
|
+
title: _title,
|
|
69
|
+
title_tag: _title_tag,
|
|
70
|
+
attributes: _title_attributes,
|
|
71
|
+
} only %}
|
|
69
72
|
{% endif %}
|
|
70
73
|
|
|
71
74
|
{% if _variant == 'card' %}
|
|
@@ -168,7 +171,7 @@
|
|
|
168
171
|
{% if _item.title is not empty %}
|
|
169
172
|
<p class="fw-bold m-0">{{ _item.title }}</p>
|
|
170
173
|
{% endif %}
|
|
171
|
-
{% if _item.
|
|
174
|
+
{% if _item.description is not empty %}
|
|
172
175
|
<p class="m-0">{{ _item.description }}</p>
|
|
173
176
|
{% endif %}
|
|
174
177
|
{% if _item.language is not empty or _item.meta is not empty %}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
{# Parameters:
|
|
4
4
|
- title: (string) (default: '')
|
|
5
5
|
- title_tag: (string) (default: 'h2')
|
|
6
|
+
- title_attributes (drupal attrs)
|
|
6
7
|
- helper_text (string) (default: '')
|
|
7
8
|
- antispam (string) (default: '')
|
|
8
9
|
- items (array of array of objects) (default: []) format: [
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
|
|
27
28
|
{% set _title = title|default('') %}
|
|
28
29
|
{% set _title_tag = title_tag|default('h2') %}
|
|
30
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
29
31
|
{% set _helper_text = helper_text|default('') %}
|
|
30
32
|
{% set _items = items|default([]) %}
|
|
31
33
|
{% set _antispam = antispam|default('') %}
|
|
@@ -36,10 +38,11 @@
|
|
|
36
38
|
{% endif %}
|
|
37
39
|
|
|
38
40
|
{% if _title is not empty %}
|
|
39
|
-
{%
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
42
|
+
title: _title,
|
|
43
|
+
title_tag: _title_tag,
|
|
44
|
+
attributes: _title_attributes,
|
|
45
|
+
} only %}
|
|
43
46
|
{% endif %}
|
|
44
47
|
|
|
45
48
|
{% if _helper_text is not empty %}
|
|
@@ -5,6 +5,7 @@ Parameters:
|
|
|
5
5
|
- "id" (string) (default: '')
|
|
6
6
|
- "title" (string) (default: '')
|
|
7
7
|
- "title_tag" (string) (default: 'h2')
|
|
8
|
+
- "title_attributes" (drupal attrs)
|
|
8
9
|
- "counter" (string) (default: '')
|
|
9
10
|
- "toggle_collapsed" (string) (default: '')
|
|
10
11
|
- "toggle_expanded" (string) (default: '')
|
|
@@ -30,6 +31,7 @@ Parameters:
|
|
|
30
31
|
{% set _id = id|default('gallery-' ~ random(1000)) %}
|
|
31
32
|
{% set _title = title|default('') %}
|
|
32
33
|
{% set _title_tag = title_tag|default('h2') %}
|
|
34
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
33
35
|
{% set _counter = counter|default('') %}
|
|
34
36
|
{% set _toggle_collapsed = toggle_collapsed|default('') %}
|
|
35
37
|
{% set _toggle_expanded = toggle_expanded|default('') %}
|
|
@@ -59,12 +61,13 @@ Parameters:
|
|
|
59
61
|
{% if _items is iterable %}
|
|
60
62
|
<div class="d-sm-flex flex-sm-row align-items-sm-center">
|
|
61
63
|
<div class="flex-sm-grow-1">
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
{% if _title is not empty %}
|
|
65
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
66
|
+
title: _title,
|
|
67
|
+
title_tag: _title_tag,
|
|
68
|
+
attributes: _title_attributes,
|
|
69
|
+
} only %}
|
|
70
|
+
{% endif %}
|
|
68
71
|
</div>
|
|
69
72
|
<div class="mb-3 mb-sm-0 fw-bold">
|
|
70
73
|
{%- if _counter is not empty -%}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{% spaceless %}
|
|
2
|
+
|
|
3
|
+
{# Parameters:
|
|
4
|
+
- title (string) (default: '')
|
|
5
|
+
- title_tag (string) (default: 'h2')
|
|
6
|
+
- path (string) (default: '')
|
|
7
|
+
- link: (object) (default: {})
|
|
8
|
+
- attributes (drupal attrs)
|
|
9
|
+
#}
|
|
10
|
+
|
|
11
|
+
{% set _title = title|default('') %}
|
|
12
|
+
{% set _path = path|default('') %}
|
|
13
|
+
{% set _title_tag = title_tag|default('h2') %}
|
|
14
|
+
{% set _link = link|default({}) %}
|
|
15
|
+
|
|
16
|
+
{% if attributes is empty %}
|
|
17
|
+
{% set attributes = create_attribute() %}
|
|
18
|
+
{% endif %}
|
|
19
|
+
|
|
20
|
+
{% if attributes.class is empty %}
|
|
21
|
+
{% set attributes = attributes.addClass(['fw-bold', 'mb-4']) %}
|
|
22
|
+
{% endif %}
|
|
23
|
+
|
|
24
|
+
{% set attributes = attributes.addClass(['bcl-heading']) %}
|
|
25
|
+
|
|
26
|
+
{% if _link is not empty and _title is not empty and _link.label is empty %}
|
|
27
|
+
{% set _link = _link|merge({ label: _title }) %}
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
{% if _title is not empty or _link is not empty %}
|
|
31
|
+
<{{ _title_tag }}
|
|
32
|
+
{{- attributes -}}
|
|
33
|
+
>
|
|
34
|
+
{%- if _link is not empty -%}
|
|
35
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
36
|
+
{%- else -%}
|
|
37
|
+
{{- _title -}}
|
|
38
|
+
{%- endif %}
|
|
39
|
+
</{{ _title_tag }}>
|
|
40
|
+
{% endif -%}
|
|
41
|
+
|
|
42
|
+
{% endspaceless %}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
- options ["vertical", "horizontal"]
|
|
8
8
|
- title: (string) (default: "")
|
|
9
9
|
- title_tag: (string) (default: "h2")
|
|
10
|
+
- title_attributes (drupal attrs)
|
|
10
11
|
- links (array of link objects) (default: [])
|
|
11
12
|
#}
|
|
12
13
|
|
|
@@ -14,6 +15,8 @@
|
|
|
14
15
|
{% set _variant = variant|default("vertical") %}
|
|
15
16
|
{% set _title = title|default("") %}
|
|
16
17
|
{% set _title_tag = title_tag|default("h2") %}
|
|
18
|
+
{% set _title_classes = ['fw-bold', 'pb-3', 'mb-3', 'border-bottom'] %}
|
|
19
|
+
{% set _title_attributes = title_attributes ?: create_attribute().addClass(_title_classes) %}
|
|
17
20
|
{% set _links = links|default([])%}
|
|
18
21
|
|
|
19
22
|
{% if attributes is empty %}
|
|
@@ -28,8 +31,11 @@
|
|
|
28
31
|
{{ attributes }}
|
|
29
32
|
>
|
|
30
33
|
{% if _title is not empty %}
|
|
31
|
-
{%
|
|
32
|
-
|
|
34
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
35
|
+
title: _title,
|
|
36
|
+
title_tag: _title_tag,
|
|
37
|
+
attributes: _title_attributes,
|
|
38
|
+
} only %}
|
|
33
39
|
{% endif %}
|
|
34
40
|
{% if _links is not empty and _links is iterable %}
|
|
35
41
|
<ul class="ps-0 mb-0">
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[ default-1-col, highlight-1-col, default-2-col, default-3-col, highlight-2-col, highlight-3-col ]
|
|
6
6
|
- title: (string) (default: "")
|
|
7
7
|
- title_tag: (string) (default: "h2")
|
|
8
|
+
- title_attributes (drupal attrs)
|
|
8
9
|
- items: (array of objects of type card)
|
|
9
10
|
- link: (object of type link)
|
|
10
11
|
- alignment: (string) (default: '') options:
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
{% set _variant = variant|default('default-1-col') %}
|
|
16
17
|
{% set _title = title|default('') %}
|
|
17
18
|
{% set _title_tag = title_tag|default('h2') %}
|
|
19
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
18
20
|
{% set _alignment = alignment|default('') %}
|
|
19
21
|
{% set _link = link|default({}) %}
|
|
20
22
|
{% set _classes = ['bcl-listing', 'bcl-listing--' ~ _variant] %}
|
|
@@ -35,10 +37,11 @@
|
|
|
35
37
|
<div {{ attributes }}>
|
|
36
38
|
|
|
37
39
|
{% if _title is not empty %}
|
|
38
|
-
{%
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
41
|
+
title: _title,
|
|
42
|
+
title_tag: _title_tag,
|
|
43
|
+
title_attributes: _title_attributes,
|
|
44
|
+
} only %}
|
|
42
45
|
{% endif %}
|
|
43
46
|
|
|
44
47
|
{% if _items is not empty %}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{% spaceless %}
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
{#
|
|
5
|
+
Parameters:
|
|
6
|
+
- title (heading object) (default: {})
|
|
7
|
+
- items (array) (default: [])
|
|
8
|
+
{
|
|
9
|
+
title: (heading object),
|
|
10
|
+
content: [
|
|
11
|
+
description list object
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
#}
|
|
15
|
+
|
|
16
|
+
{% set _title = title|default('') %}
|
|
17
|
+
{% set _title_tag = title_tag|default('h3') %}
|
|
18
|
+
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
19
|
+
{% set _items = items|default([]) %}
|
|
20
|
+
|
|
21
|
+
{% if attributes is empty %}
|
|
22
|
+
{% set attributes = create_attribute() %}
|
|
23
|
+
{% endif %}
|
|
24
|
+
|
|
25
|
+
{% set _title_classes = ['fw-bold', 'my-4-5'] %}
|
|
26
|
+
{% set _title_attributes = _title_attributes.addClass(_title_classes) %}
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
{{ attributes }}
|
|
30
|
+
>
|
|
31
|
+
{% if _title is not empty %}
|
|
32
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
33
|
+
title: _title,
|
|
34
|
+
title_tag: _title_tag,
|
|
35
|
+
attributes: _title_attributes,
|
|
36
|
+
} only %}
|
|
37
|
+
{% endif %}
|
|
38
|
+
{% if _items is defined and _items is not empty %}
|
|
39
|
+
{% for _item in _items %}
|
|
40
|
+
{% if _item.title is not empty %}
|
|
41
|
+
{% set _item_title_attributes = _item.title_attributes ?: create_attribute() %}
|
|
42
|
+
{% set _item_title_attributes = _item_title_attributes.addClass(['fw-bold', 'mb-3']) %}
|
|
43
|
+
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
44
|
+
title: _item.title,
|
|
45
|
+
title_tag: _item.title_tag|default('h4'),
|
|
46
|
+
attributes: _item_title_attributes,
|
|
47
|
+
} only %}
|
|
48
|
+
{% endif %}
|
|
49
|
+
{% for _list in _item.content %}
|
|
50
|
+
{% if _list.attributes is empty %}
|
|
51
|
+
{% set _list = _list|merge({
|
|
52
|
+
attributes: create_attribute()
|
|
53
|
+
}) %}
|
|
54
|
+
{% endif %}
|
|
55
|
+
{% if not loop.last %}
|
|
56
|
+
{% set _list = _list|merge({
|
|
57
|
+
attributes: _list.attributes.addClass(['border-bottom', 'pb-3'])
|
|
58
|
+
})
|
|
59
|
+
%}
|
|
60
|
+
{% endif %}
|
|
61
|
+
{% include '@oe-bcl/bcl-description-list/description-list.html.twig' with _list only %}
|
|
62
|
+
{% endfor %}
|
|
63
|
+
{% endfor %}
|
|
64
|
+
{% endif %}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
{% endspaceless %}
|