@openeuropa/bcl-twig-templates 0.19.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/package.json +64 -56
- package/templates/bcl-alert/alert.html.twig +13 -5
- package/templates/bcl-badge/badge.html.twig +4 -4
- package/templates/bcl-banner/banner.html.twig +16 -9
- package/templates/bcl-base-templates/listing-page.html.twig +13 -13
- package/templates/bcl-breadcrumb/breadcrumb.html.twig +2 -2
- package/templates/bcl-card/card.html.twig +42 -20
- package/templates/bcl-card-layout/card-layout.html.twig +6 -1
- package/templates/bcl-carousel/carousel.html.twig +26 -5
- package/templates/bcl-content-banner/content-banner.html.twig +39 -33
- package/templates/bcl-date-block/date-block.html.twig +29 -9
- package/templates/bcl-description-list/description-list.html.twig +23 -12
- package/templates/bcl-fact-figures/fact-figures.html.twig +9 -5
- package/templates/bcl-file/file.html.twig +11 -8
- package/templates/bcl-footer/footer.html.twig +3 -1
- package/templates/bcl-form/form.html.twig +7 -4
- package/templates/bcl-gallery/gallery.html.twig +206 -0
- package/templates/bcl-header/header.html.twig +31 -15
- package/templates/bcl-heading/heading.html.twig +42 -0
- package/templates/bcl-language-list/language-list-grid.html.twig +68 -0
- package/templates/bcl-language-list/language-list-modal.html.twig +58 -0
- package/templates/bcl-language-list/language-list.html.twig +111 -0
- package/templates/bcl-language-switcher/language-switcher.html.twig +44 -0
- package/templates/bcl-link/link.html.twig +1 -1
- package/templates/bcl-links-block/links-block.html.twig +9 -3
- package/templates/bcl-listing/listing.html.twig +12 -8
- package/templates/bcl-modal/modal.html.twig +12 -1
- package/templates/bcl-navbar/navbar.html.twig +39 -28
- package/templates/bcl-page/page.html.twig +1 -1
- package/templates/bcl-pagination/pagination.html.twig +123 -9
- package/templates/bcl-person/person.html.twig +44 -0
- package/templates/bcl-project/project-lists.html.twig +67 -0
- package/templates/bcl-project/project.html.twig +84 -49
- package/templates/bcl-project-status/project-contributions.html.twig +56 -0
- package/templates/bcl-project-status/project-status.html.twig +13 -24
- package/templates/bcl-select/select.html.twig +13 -3
- package/templates/bcl-subscription/subscription-modal.html.twig +24 -0
- package/templates/bcl-subscription/subscription.html.twig +10 -0
- package/templates/bcl-subscription-block/subscription-block.html.twig +36 -0
- package/templates/bcl-timeline/timeline.html.twig +10 -7
- package/templates/bcl-user/user-view-compact.html.twig +9 -2
- package/templates/bcl-user/user-view.html.twig +0 -10
package/package.json
CHANGED
|
@@ -2,66 +2,74 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-twig-templates",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.22.0",
|
|
6
6
|
"description": "OE Bcl Twig Templates",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"@openeuropa/bcl-accordion": "^0.
|
|
12
|
-
"@openeuropa/bcl-alert": "^0.
|
|
13
|
-
"@openeuropa/bcl-badge": "^0.
|
|
14
|
-
"@openeuropa/bcl-banner": "^0.
|
|
15
|
-
"@openeuropa/bcl-base-templates": "^0.
|
|
16
|
-
"@openeuropa/bcl-blockquote": "^0.
|
|
17
|
-
"@openeuropa/bcl-breadcrumb": "^0.
|
|
18
|
-
"@openeuropa/bcl-button": "^0.
|
|
19
|
-
"@openeuropa/bcl-button-group": "^0.
|
|
20
|
-
"@openeuropa/bcl-card": "^0.
|
|
21
|
-
"@openeuropa/bcl-card-layout": "^0.
|
|
22
|
-
"@openeuropa/bcl-carousel": "^0.
|
|
23
|
-
"@openeuropa/bcl-contact-form": "^0.
|
|
24
|
-
"@openeuropa/bcl-content-banner": "^0.
|
|
25
|
-
"@openeuropa/bcl-date-block": "^0.
|
|
26
|
-
"@openeuropa/bcl-description-list": "^0.
|
|
27
|
-
"@openeuropa/bcl-dropdown": "^0.
|
|
28
|
-
"@openeuropa/bcl-event": "^0.
|
|
29
|
-
"@openeuropa/bcl-fact-figures": "^0.
|
|
30
|
-
"@openeuropa/bcl-featured-media": "^0.
|
|
31
|
-
"@openeuropa/bcl-file": "^0.
|
|
32
|
-
"@openeuropa/bcl-footer": "^0.
|
|
33
|
-
"@openeuropa/bcl-form": "^0.
|
|
34
|
-
"@openeuropa/bcl-form-input": "^0.
|
|
35
|
-
"@openeuropa/bcl-
|
|
36
|
-
"@openeuropa/bcl-
|
|
37
|
-
"@openeuropa/bcl-
|
|
38
|
-
"@openeuropa/bcl-
|
|
39
|
-
"@openeuropa/bcl-
|
|
40
|
-
"@openeuropa/bcl-
|
|
41
|
-
"@openeuropa/bcl-
|
|
42
|
-
"@openeuropa/bcl-list
|
|
43
|
-
"@openeuropa/bcl-
|
|
44
|
-
"@openeuropa/bcl-
|
|
45
|
-
"@openeuropa/bcl-
|
|
46
|
-
"@openeuropa/bcl-
|
|
47
|
-
"@openeuropa/bcl-
|
|
48
|
-
"@openeuropa/bcl-
|
|
49
|
-
"@openeuropa/bcl-
|
|
50
|
-
"@openeuropa/bcl-
|
|
51
|
-
"@openeuropa/bcl-
|
|
52
|
-
"@openeuropa/bcl-
|
|
53
|
-
"@openeuropa/bcl-
|
|
54
|
-
"@openeuropa/bcl-
|
|
55
|
-
"@openeuropa/bcl-
|
|
56
|
-
"@openeuropa/bcl-
|
|
57
|
-
"@openeuropa/bcl-
|
|
58
|
-
"@openeuropa/bcl-
|
|
59
|
-
"@openeuropa/bcl-
|
|
60
|
-
"@openeuropa/bcl-
|
|
61
|
-
"@openeuropa/bcl-
|
|
62
|
-
"@openeuropa/bcl-
|
|
63
|
-
"@openeuropa/bcl-
|
|
64
|
-
"@openeuropa/bcl-
|
|
11
|
+
"@openeuropa/bcl-accordion": "^0.22.0",
|
|
12
|
+
"@openeuropa/bcl-alert": "^0.22.0",
|
|
13
|
+
"@openeuropa/bcl-badge": "^0.22.0",
|
|
14
|
+
"@openeuropa/bcl-banner": "^0.22.0",
|
|
15
|
+
"@openeuropa/bcl-base-templates": "^0.22.0",
|
|
16
|
+
"@openeuropa/bcl-blockquote": "^0.22.0",
|
|
17
|
+
"@openeuropa/bcl-breadcrumb": "^0.22.0",
|
|
18
|
+
"@openeuropa/bcl-button": "^0.22.0",
|
|
19
|
+
"@openeuropa/bcl-button-group": "^0.22.0",
|
|
20
|
+
"@openeuropa/bcl-card": "^0.22.0",
|
|
21
|
+
"@openeuropa/bcl-card-layout": "^0.22.0",
|
|
22
|
+
"@openeuropa/bcl-carousel": "^0.22.0",
|
|
23
|
+
"@openeuropa/bcl-contact-form": "^0.22.0",
|
|
24
|
+
"@openeuropa/bcl-content-banner": "^0.22.0",
|
|
25
|
+
"@openeuropa/bcl-date-block": "^0.22.0",
|
|
26
|
+
"@openeuropa/bcl-description-list": "^0.22.0",
|
|
27
|
+
"@openeuropa/bcl-dropdown": "^0.22.0",
|
|
28
|
+
"@openeuropa/bcl-event": "^0.22.0",
|
|
29
|
+
"@openeuropa/bcl-fact-figures": "^0.22.0",
|
|
30
|
+
"@openeuropa/bcl-featured-media": "^0.22.0",
|
|
31
|
+
"@openeuropa/bcl-file": "^0.22.0",
|
|
32
|
+
"@openeuropa/bcl-footer": "^0.22.0",
|
|
33
|
+
"@openeuropa/bcl-form": "^0.22.0",
|
|
34
|
+
"@openeuropa/bcl-form-input": "^0.22.0",
|
|
35
|
+
"@openeuropa/bcl-gallery": "^0.22.0",
|
|
36
|
+
"@openeuropa/bcl-group": "^0.22.0",
|
|
37
|
+
"@openeuropa/bcl-header": "^0.22.0",
|
|
38
|
+
"@openeuropa/bcl-heading": "^0.22.0",
|
|
39
|
+
"@openeuropa/bcl-icon": "^0.22.0",
|
|
40
|
+
"@openeuropa/bcl-inpage-navigation": "^0.22.0",
|
|
41
|
+
"@openeuropa/bcl-landing-page": "^0.22.0",
|
|
42
|
+
"@openeuropa/bcl-language-list": "^0.22.0",
|
|
43
|
+
"@openeuropa/bcl-language-switcher": "^0.22.0",
|
|
44
|
+
"@openeuropa/bcl-link": "^0.22.0",
|
|
45
|
+
"@openeuropa/bcl-links-block": "^0.22.0",
|
|
46
|
+
"@openeuropa/bcl-list-group": "^0.22.0",
|
|
47
|
+
"@openeuropa/bcl-listing": "^0.22.0",
|
|
48
|
+
"@openeuropa/bcl-modal": "^0.22.0",
|
|
49
|
+
"@openeuropa/bcl-multilingual": "^0.22.0",
|
|
50
|
+
"@openeuropa/bcl-navbar": "^0.22.0",
|
|
51
|
+
"@openeuropa/bcl-navigation": "^0.22.0",
|
|
52
|
+
"@openeuropa/bcl-news": "^0.22.0",
|
|
53
|
+
"@openeuropa/bcl-offcanvas": "^0.22.0",
|
|
54
|
+
"@openeuropa/bcl-page": "^0.22.0",
|
|
55
|
+
"@openeuropa/bcl-pagination": "^0.22.0",
|
|
56
|
+
"@openeuropa/bcl-person": "^0.22.0",
|
|
57
|
+
"@openeuropa/bcl-placeholder": "^0.22.0",
|
|
58
|
+
"@openeuropa/bcl-progress": "^0.22.0",
|
|
59
|
+
"@openeuropa/bcl-project": "^0.22.0",
|
|
60
|
+
"@openeuropa/bcl-project-status": "^0.22.0",
|
|
61
|
+
"@openeuropa/bcl-recent-activities": "^0.22.0",
|
|
62
|
+
"@openeuropa/bcl-search": "^0.22.0",
|
|
63
|
+
"@openeuropa/bcl-search-form": "^0.22.0",
|
|
64
|
+
"@openeuropa/bcl-select": "^0.22.0",
|
|
65
|
+
"@openeuropa/bcl-spinner": "^0.22.0",
|
|
66
|
+
"@openeuropa/bcl-subscription": "^0.22.0",
|
|
67
|
+
"@openeuropa/bcl-subscription-block": "^0.22.0",
|
|
68
|
+
"@openeuropa/bcl-table": "^0.22.0",
|
|
69
|
+
"@openeuropa/bcl-textarea": "^0.22.0",
|
|
70
|
+
"@openeuropa/bcl-timeline": "^0.22.0",
|
|
71
|
+
"@openeuropa/bcl-toast": "^0.22.0",
|
|
72
|
+
"@openeuropa/bcl-user": "^0.22.0",
|
|
65
73
|
"copyfiles": "2.4.1",
|
|
66
74
|
"rimraf": "3.0.2"
|
|
67
75
|
},
|
|
@@ -84,5 +92,5 @@
|
|
|
84
92
|
"design-system",
|
|
85
93
|
"twig"
|
|
86
94
|
],
|
|
87
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "57304ad94ae3c234f2f2b904208ce540a7a53f23"
|
|
88
96
|
}
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
- variant (string) (default: 'primary')
|
|
7
7
|
- dismissible (boolean) (default: true)
|
|
8
8
|
- animated_dismiss (boolean) (default: true)
|
|
9
|
-
-
|
|
9
|
+
- icon_path (string) (default: '')
|
|
10
10
|
- icon_name (string) (default: '')
|
|
11
11
|
#}
|
|
12
12
|
|
|
13
13
|
{% set _message = message|default('') %}
|
|
14
14
|
{% set _variant = variant|default('primary') %}
|
|
15
15
|
{% set _heading = heading|default('') %}
|
|
16
|
-
{% set
|
|
16
|
+
{% set _icon_path = icon_path|default('') %}
|
|
17
17
|
{% set _dismissible = dismissible ?? true %}
|
|
18
18
|
{% set _animated_dismiss = animated_dismiss ?? true %}
|
|
19
19
|
{% set _icon_name = icon_name|default('') %}
|
|
@@ -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 %}
|
|
@@ -44,12 +52,12 @@
|
|
|
44
52
|
{% set attributes = attributes.addClass(_classes).setAttribute('role', 'alert') %}
|
|
45
53
|
|
|
46
54
|
<div {{ attributes }}>
|
|
47
|
-
{% if
|
|
55
|
+
{% if _icon_path is not empty %}
|
|
48
56
|
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
49
57
|
name: _icon_name ?: _icon_names[_variant],
|
|
50
58
|
size: 's',
|
|
51
|
-
path:
|
|
52
|
-
attributes: create_attribute().addClass(
|
|
59
|
+
path: _icon_path,
|
|
60
|
+
attributes: create_attribute().addClass(_icon_classes),
|
|
53
61
|
} only %}
|
|
54
62
|
{% endif %}
|
|
55
63
|
<div class="alert-content flex-grow-1">
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- assistive_text (string) (default: '')
|
|
10
10
|
- rounded_pill (boolean) (default: false)
|
|
11
11
|
- outline (boolean) (default: false)
|
|
12
|
-
-
|
|
12
|
+
- icon_path (string) (default: '')
|
|
13
13
|
#}
|
|
14
14
|
|
|
15
15
|
{% set _rounded_pill = rounded_pill|default(false) %}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
{% set _label = label|default('') %}
|
|
19
19
|
{% set _classes = ['badge'] %}
|
|
20
20
|
{% set _url = url|default('') %}
|
|
21
|
-
{% set
|
|
21
|
+
{% set _icon_path = icon_path|default('') %}
|
|
22
22
|
{% set _title = title|default(_label) %}
|
|
23
23
|
{% set _dismissible = dismissible|default(false) %}
|
|
24
24
|
{% set _assistive_text = assistive_text|default('') %}
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
{%- if _dismissible -%}
|
|
59
59
|
<span class="icon--close" aria-hidden="true">
|
|
60
60
|
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
61
|
-
name: "x",
|
|
62
|
-
path:
|
|
61
|
+
name: "x-lg",
|
|
62
|
+
path: _icon_path,
|
|
63
63
|
} only %}
|
|
64
64
|
</span>
|
|
65
65
|
{%- endif -%}
|
|
@@ -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>
|
|
@@ -17,32 +17,32 @@
|
|
|
17
17
|
{% block content_top %}
|
|
18
18
|
{% include '@oe-bcl/bcl-button/button.html.twig' with filter_button only %}
|
|
19
19
|
<div class="row">
|
|
20
|
-
<div class="col-md-6 col-lg-8">
|
|
21
|
-
<h4>
|
|
20
|
+
<div class="col-md-6 col-lg-8 align-self-center">
|
|
21
|
+
<h4 class="mb-0">
|
|
22
22
|
<span class="text-capitalize">
|
|
23
23
|
{{- _page_title -}}
|
|
24
24
|
</span>
|
|
25
25
|
({{ listing.items.length }})
|
|
26
26
|
</h4>
|
|
27
27
|
</div>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
{% if badges is not empty and badges is iterable %}
|
|
29
|
+
<div class="col-md-12 order-md-2 mt-3">
|
|
30
|
+
{% for badge in badges %}
|
|
31
|
+
{% include '@oe-bcl/bcl-badge/badge.html.twig' with badge|merge({
|
|
32
|
+
attributes: create_attribute().addClass(["mb-2", "me-2"])
|
|
33
|
+
}) only %}
|
|
34
|
+
{% endfor %}
|
|
35
|
+
</div>
|
|
36
|
+
{% endif %}
|
|
37
37
|
<div class="col-md-6 col-lg-4 mt-3 mt-md-0">
|
|
38
38
|
<div class="float-md-end d-md-flex align-items-center mb-4 mb-md-0">
|
|
39
39
|
{% include '@oe-bcl/bcl-select/select.html.twig' with sort_select|merge({
|
|
40
|
-
attributes: create_attribute().addClass(['ms-md-2
|
|
40
|
+
attributes: create_attribute().addClass(['ms-md-2']),
|
|
41
41
|
}) only %}
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
|
-
<hr class="d-none d-md-block mb-4"/>
|
|
45
|
+
<hr class="d-none d-md-block mb-4-75"/>
|
|
46
46
|
{% endblock %}
|
|
47
47
|
|
|
48
48
|
{% block content %}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
{% set _classes = 'breadcrumb' %}
|
|
8
8
|
{% set _links = links|default([]) %}
|
|
9
|
-
{% set
|
|
9
|
+
{% set _icon_path = icon_path|default('') %}
|
|
10
10
|
|
|
11
11
|
{% if attributes is empty %}
|
|
12
12
|
{% set attributes = create_attribute() %}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
icon_position: 'before',
|
|
42
42
|
icon: {
|
|
43
43
|
name: "arrow-left",
|
|
44
|
-
path:
|
|
44
|
+
path: _icon_path,
|
|
45
45
|
attributes: create_attribute().addClass(['d-md-none ms-0 me-2']),
|
|
46
46
|
},
|
|
47
47
|
}) %}
|
|
@@ -44,6 +44,11 @@
|
|
|
44
44
|
- extra_classes_header (string) (default: '')
|
|
45
45
|
- extra_classes_footer (string) (default: '')
|
|
46
46
|
- badges (array of badge object) (default: [])
|
|
47
|
+
|
|
48
|
+
Blocks
|
|
49
|
+
- card_date
|
|
50
|
+
- card_badges
|
|
51
|
+
- card_links
|
|
47
52
|
#}
|
|
48
53
|
|
|
49
54
|
{% set _title = title|default({}) %}
|
|
@@ -66,6 +71,7 @@
|
|
|
66
71
|
{% set _extra_classes_header = extra_classes_header|default('') %}
|
|
67
72
|
{% set _extra_classes_footer = extra_classes_footer|default('') %}
|
|
68
73
|
{% set _badges = badges|default([]) %}
|
|
74
|
+
{% set _links = links|default([]) %}
|
|
69
75
|
{% set _classes = ['card'] %}
|
|
70
76
|
{% if _text_color is not empty %}
|
|
71
77
|
{% set _classes = _classes|merge(['text-' ~ _text_color]) %}
|
|
@@ -145,7 +151,9 @@
|
|
|
145
151
|
<div class='{{ _horizontal_grid.left_col_classes }}'>
|
|
146
152
|
{% endif %}
|
|
147
153
|
{% if _date is not empty %}
|
|
148
|
-
{%
|
|
154
|
+
{% block card_date %}
|
|
155
|
+
{% include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
|
|
156
|
+
{% endblock %}
|
|
149
157
|
{% elseif _image is not empty and _image.position != "bottom" %}
|
|
150
158
|
<img
|
|
151
159
|
src="{{ _image.path }}"
|
|
@@ -192,28 +200,42 @@
|
|
|
192
200
|
{%- if _content is not empty -%}
|
|
193
201
|
{{- _content -}}
|
|
194
202
|
{%- endif -%}
|
|
195
|
-
{
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
{%
|
|
199
|
-
{%
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
attributes: _badge.attributes.addClass('mb-2')
|
|
205
|
-
})
|
|
206
|
-
%}
|
|
207
|
-
{% if not loop.last %}
|
|
203
|
+
{% block card_badges %}
|
|
204
|
+
{%- if _badges is not empty and _badges is iterable -%}
|
|
205
|
+
<div class="mt-2-5">
|
|
206
|
+
{% for _badge in _badges %}
|
|
207
|
+
{% if _badge.attributes is empty %}
|
|
208
|
+
{% set _badge = _badge|merge({
|
|
209
|
+
attributes: create_attribute()
|
|
210
|
+
}) %}
|
|
211
|
+
{% endif %}
|
|
208
212
|
{% set _badge = _badge|merge({
|
|
209
|
-
attributes: _badge.attributes.addClass('
|
|
213
|
+
attributes: _badge.attributes.addClass('mb-2')
|
|
210
214
|
})
|
|
211
215
|
%}
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
{% if not loop.last %}
|
|
217
|
+
{% set _badge = _badge|merge({
|
|
218
|
+
attributes: _badge.attributes.addClass('me-2')
|
|
219
|
+
})
|
|
220
|
+
%}
|
|
221
|
+
{% endif %}
|
|
222
|
+
{% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
|
|
223
|
+
|
|
224
|
+
{% endfor %}
|
|
225
|
+
</div>
|
|
226
|
+
{%- endif -%}
|
|
227
|
+
{% endblock %}
|
|
228
|
+
{% block card_links %}
|
|
229
|
+
{%- if _links is not empty and _links is iterable -%}
|
|
230
|
+
<div class="mt-2-5 mb-2">
|
|
231
|
+
{% for _link in _links %}
|
|
232
|
+
<div class="mb-3 mb-md-0 d-block d-md-inline-block me-4-5">
|
|
233
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _link only %}
|
|
234
|
+
</div>
|
|
235
|
+
{% endfor %}
|
|
236
|
+
</div>
|
|
237
|
+
{%- endif -%}
|
|
238
|
+
{% endblock %}
|
|
217
239
|
</div>
|
|
218
240
|
{% if _horizontal %}
|
|
219
241
|
</div>
|
|
@@ -14,6 +14,9 @@
|
|
|
14
14
|
options: ['0', '1', '2', '3', '4', '5']
|
|
15
15
|
- equal_height (boolean) (default: false)
|
|
16
16
|
- cols_extra_classes (string) (default: '')
|
|
17
|
+
|
|
18
|
+
Blocks
|
|
19
|
+
- card_layout_card
|
|
17
20
|
#}
|
|
18
21
|
|
|
19
22
|
{% set _type = type|default('group') %}
|
|
@@ -69,7 +72,9 @@
|
|
|
69
72
|
{% if _type == 'grid' or _type == 'masonry' %}
|
|
70
73
|
<div class="{{ _cols_classes }}">
|
|
71
74
|
{% endif %}
|
|
72
|
-
{%
|
|
75
|
+
{% block card_layout_card %}
|
|
76
|
+
{% include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
|
|
77
|
+
{% endblock %}
|
|
73
78
|
{% if _type == 'grid' or _type == 'masonry' %}
|
|
74
79
|
</div>
|
|
75
80
|
{% endif %}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
image: (string) <img> tag
|
|
12
12
|
caption (string)
|
|
13
13
|
caption_classes (string)
|
|
14
|
+
caption_title (string)
|
|
14
15
|
interval (integer) (default: 0)
|
|
15
16
|
}
|
|
16
17
|
...
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
- previous_label (string) (default: '')
|
|
21
22
|
- next_label (string) (default: '')
|
|
22
23
|
- with_indicators (boolean) (default: false)
|
|
24
|
+
- rounded_indicators (boolean) (default: false)
|
|
23
25
|
#}
|
|
24
26
|
|
|
25
27
|
{% set _id = id|default('') %}
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
{% set _prev_label = prev_label|default('') %}
|
|
30
32
|
{% set _next_label = next_label|default('') %}
|
|
31
33
|
{% set _with_indicators = with_indicators|default(false) %}
|
|
34
|
+
{% set _rounded_indicators = rounded_indicators|default(false) %}
|
|
32
35
|
{% set _classes = ['carousel slide'] %}
|
|
33
36
|
{% set _autoinit = autoinit ?? true %}
|
|
34
37
|
{% set _autoplay = autoplay ?? true %}
|
|
@@ -59,6 +62,10 @@
|
|
|
59
62
|
{% set attributes = attributes.setAttribute('data-bs-touch', 'false') %}
|
|
60
63
|
{% endif %}
|
|
61
64
|
|
|
65
|
+
{% if _rounded_indicators %}
|
|
66
|
+
{% set attributes = attributes.addClass('rounded-indicators') %}
|
|
67
|
+
{% endif %}
|
|
68
|
+
|
|
62
69
|
{% if not _autoplay %}
|
|
63
70
|
{% set attributes = attributes.setAttribute('data-bs-interval', 'false') %}
|
|
64
71
|
{% endif %}
|
|
@@ -69,7 +76,7 @@
|
|
|
69
76
|
{{ attributes }}
|
|
70
77
|
>
|
|
71
78
|
{% if _with_indicators %}
|
|
72
|
-
<div class="carousel-indicators">
|
|
79
|
+
<div class="carousel-indicators d-none d-md-flex">
|
|
73
80
|
{% for _i in 0..(_items|length - 1) %}
|
|
74
81
|
{% set button_attributes = create_attribute()
|
|
75
82
|
.setAttribute('aria-label', 'Slide ' ~ (_i + 1))
|
|
@@ -102,15 +109,29 @@
|
|
|
102
109
|
{% if _item.image is defined and _item.image is not empty %}
|
|
103
110
|
{{ _item.image }}
|
|
104
111
|
{% endif %}
|
|
105
|
-
{% if _item.caption is defined and _item.caption is not empty %}
|
|
112
|
+
{% if (_item.caption is defined and _item.caption is not empty) or (_item.link is defined and _item.link is not empty) %}
|
|
106
113
|
{% set _caption_classes = 'carousel-caption' %}
|
|
107
|
-
{% if _item.
|
|
108
|
-
{% set _caption_classes = _caption_classes ~ ' '
|
|
114
|
+
{% if _item.caption is not empty and _item.link is empty %}
|
|
115
|
+
{% set _caption_classes = _caption_classes ~ ' d-none d-md-block' %}
|
|
109
116
|
{% endif %}
|
|
110
117
|
<div
|
|
111
118
|
class="{{ _caption_classes }}"
|
|
112
119
|
>
|
|
113
|
-
{
|
|
120
|
+
{% if _item.caption is not empty or _item.caption_title is not empty %}
|
|
121
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty %}
|
|
122
|
+
<div class="{{ _item.caption_classes }}">
|
|
123
|
+
{% endif %}
|
|
124
|
+
{% if _item.caption_title is not empty %}
|
|
125
|
+
<h5>{{ _item.caption_title }}</h5>
|
|
126
|
+
{% endif %}
|
|
127
|
+
{{- _item.caption -}}
|
|
128
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty %}
|
|
129
|
+
</div>
|
|
130
|
+
{% endif %}
|
|
131
|
+
{% endif %}
|
|
132
|
+
{% if _item.link is defined and _item.link is not empty %}
|
|
133
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _item.link only %}
|
|
134
|
+
{% endif %}
|
|
114
135
|
</div>
|
|
115
136
|
{% endif %}
|
|
116
137
|
</div>
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
Parameters:
|
|
5
5
|
- "background" (string) (default: 'white')
|
|
6
6
|
options: [ white, gray ]
|
|
7
|
-
- "banner" (object)
|
|
8
7
|
- "title" (object)
|
|
9
8
|
- "image" (object)
|
|
9
|
+
- "image_size" (string)
|
|
10
|
+
options: ['sm', 'md', 'lg']
|
|
10
11
|
- "content" (string)
|
|
11
12
|
- "badges" (array of objects of type badge)
|
|
13
|
+
- "links" (array of objects of type link)
|
|
12
14
|
- "action_button" (object of type button) (default: {})
|
|
13
15
|
- "service_buttons" (array of objects of type button) (default: [])
|
|
14
16
|
- "attributes" (drupal attrs)
|
|
@@ -18,6 +20,7 @@
|
|
|
18
20
|
{% set _action_button = action_button|default({}) %}
|
|
19
21
|
{% set _service_buttons = service_buttons|default([]) %}
|
|
20
22
|
{% set _image = image|default({}) %}
|
|
23
|
+
{% set _image_size = image_size|default('md') %}
|
|
21
24
|
|
|
22
25
|
{% set _css_classes = [
|
|
23
26
|
'bcl-content-banner',
|
|
@@ -45,34 +48,39 @@
|
|
|
45
48
|
{% set attributes = create_attribute() %}
|
|
46
49
|
{% endif %}
|
|
47
50
|
|
|
51
|
+
{% set _body_classes = 'pt-0 px-0 pb-0' %}
|
|
52
|
+
{% set _left_col_classes = '' %}
|
|
53
|
+
{% set _right_col_classes = 'col-md-8 col-lg-9 col-xxl-8' %}
|
|
54
|
+
|
|
55
|
+
{% if _image is not empty %}
|
|
56
|
+
{% set _left_col_classes = 'col-8 col-md-4 col-lg-3 offset-2 offset-md-0' %}
|
|
57
|
+
{% set _right_col_classes = 'col-md-8 col-lg-9 col-xxl-8' %}
|
|
58
|
+
{% set _body_classes = 'pt-4 pt-md-0 px-0 px-md-3 pb-0' %}
|
|
59
|
+
{% if _image_size == 'lg' %}
|
|
60
|
+
{% set _left_col_classes = 'col-md-4' %}
|
|
61
|
+
{% set _right_col_classes = 'col-md-8' %}
|
|
62
|
+
{% endif %}
|
|
63
|
+
{% if _image_size == 'sm' %}
|
|
64
|
+
{% set _left_col_classes = 'col-6 col-md-4 col-lg-2 offset-3 offset-md-0' %}
|
|
65
|
+
{% endif %}
|
|
66
|
+
{% endif %}
|
|
67
|
+
|
|
68
|
+
{% set _horizontal_classes = {
|
|
69
|
+
left_col_classes: _left_col_classes,
|
|
70
|
+
right_col_classes: _right_col_classes,
|
|
71
|
+
} %}
|
|
72
|
+
|
|
48
73
|
{% set _card = {
|
|
49
74
|
title: title|default({})|merge({
|
|
50
75
|
tag: 'h2',
|
|
51
76
|
attributes: create_attribute().addClass(['fw-bold']),
|
|
52
77
|
}),
|
|
53
78
|
horizontal: true,
|
|
54
|
-
horizontal_grid:
|
|
55
|
-
right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
|
|
56
|
-
},
|
|
79
|
+
horizontal_grid: _horizontal_classes,
|
|
57
80
|
extra_classes_header: 'bg-transparent pt-0 pb-0 border-0',
|
|
58
|
-
extra_classes_body:
|
|
81
|
+
extra_classes_body: _body_classes,
|
|
59
82
|
} %}
|
|
60
83
|
|
|
61
|
-
{% if _image is not empty %}
|
|
62
|
-
{% set _card = _card|merge({
|
|
63
|
-
horizontal_grid: _card.horizontal_grid|merge({
|
|
64
|
-
left_col_classes: 'col-md-4 col-lg-3',
|
|
65
|
-
}),
|
|
66
|
-
extra_classes_body: 'pt-md-0 px-0 px-md-3 pb-0',
|
|
67
|
-
}) %}
|
|
68
|
-
{% else %}
|
|
69
|
-
{% set _card = _card|merge({
|
|
70
|
-
horizontal_grid: {
|
|
71
|
-
right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
|
|
72
|
-
},
|
|
73
|
-
}) %}
|
|
74
|
-
{% endif %}
|
|
75
|
-
|
|
76
84
|
{% set _css_classes = _css_classes|merge([_modifiers[_background]]) %}
|
|
77
85
|
{% set _attributes = attributes.addClass(['bg-transparent', 'border-0']) %}
|
|
78
86
|
|
|
@@ -82,24 +90,22 @@
|
|
|
82
90
|
|
|
83
91
|
<div class="{{ _css_classes|join(' ') }}">
|
|
84
92
|
<div class="container">
|
|
85
|
-
|
|
86
|
-
{% include '@oe-bcl/bcl-card/card.html.twig' with _card %}
|
|
93
|
+
{% include '@oe-bcl/bcl-card/card.html.twig' with _card %}
|
|
87
94
|
|
|
88
|
-
{% if _action_button is not empty %}
|
|
89
|
-
<div class="
|
|
90
|
-
|
|
95
|
+
{% if _service_buttons is not empty or _action_button is not empty %}
|
|
96
|
+
<div class="d-flex justify-content-end mt-2 align-items-center">
|
|
97
|
+
{% if _service_buttons is not empty %}
|
|
98
|
+
{% for _button in _service_buttons %}
|
|
99
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with _button only %}
|
|
100
|
+
{% endfor %}
|
|
101
|
+
{% endif %}
|
|
102
|
+
{% if _action_button is not empty %}
|
|
103
|
+
<div class="d-grid d-md-block ms-3">
|
|
91
104
|
{% include '@oe-bcl/bcl-button/button.html.twig' with _action_button only %}
|
|
92
105
|
</div>
|
|
106
|
+
{% endif %}
|
|
93
107
|
</div>
|
|
94
108
|
{% endif %}
|
|
95
|
-
{% if _service_buttons is not empty %}
|
|
96
|
-
<div class="d-flex justify-content-end">
|
|
97
|
-
{% for _button in _service_buttons %}
|
|
98
|
-
{% include '@oe-bcl/bcl-button/button.html.twig' with _button only %}
|
|
99
|
-
{% endfor %}
|
|
100
|
-
</div>
|
|
101
|
-
{% endif %}
|
|
102
|
-
</div>
|
|
103
109
|
</div>
|
|
104
110
|
</div>
|
|
105
111
|
|