@openeuropa/bcl-twig-templates 0.4298.202511051800 → 0.4360.202601141610
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 +67 -67
- package/templates/bcl-accordion/accordion.html.twig +42 -46
- package/templates/bcl-alert/alert.html.twig +18 -21
- package/templates/bcl-badge/badge.html.twig +11 -15
- package/templates/bcl-banner/banner.html.twig +34 -37
- package/templates/bcl-base-templates/content-type.html.twig +63 -67
- package/templates/bcl-base-templates/listing-page.html.twig +31 -31
- package/templates/bcl-base-templates/sidebar-search.html.twig +10 -10
- package/templates/bcl-blockquote/blockquote.html.twig +17 -20
- package/templates/bcl-breadcrumb/breadcrumb.html.twig +24 -28
- package/templates/bcl-button/button.html.twig +24 -27
- package/templates/bcl-button-group/button-group.html.twig +25 -29
- package/templates/bcl-card/card.html.twig +98 -101
- package/templates/bcl-card-layout/card-layout.html.twig +34 -37
- package/templates/bcl-carousel/carousel.html.twig +64 -67
- package/templates/bcl-contact-form/contact-form.html.twig +1 -1
- package/templates/bcl-content-banner/content-banner.html.twig +37 -40
- package/templates/bcl-date-block/date-block.html.twig +26 -29
- package/templates/bcl-description-list/description-list-details.html.twig +6 -9
- package/templates/bcl-description-list/description-list-title.html.twig +11 -14
- package/templates/bcl-description-list/description-list.html.twig +44 -48
- package/templates/bcl-dropdown/dropdown.html.twig +48 -52
- package/templates/bcl-event/event.html.twig +7 -7
- package/templates/bcl-fact-figures/fact-figures.html.twig +34 -37
- package/templates/bcl-featured-media/featured-media.html.twig +42 -46
- package/templates/bcl-file/file-translations.html.twig +29 -32
- package/templates/bcl-file/file.html.twig +47 -50
- package/templates/bcl-footer/footer.html.twig +31 -34
- package/templates/bcl-form/form.html.twig +70 -73
- package/templates/bcl-form-input/form-input.html.twig +57 -61
- package/templates/bcl-gallery/gallery-item.html.twig +20 -23
- package/templates/bcl-gallery/gallery.html.twig +62 -66
- package/templates/bcl-glossary/glossary-detail.html.twig +19 -19
- package/templates/bcl-glossary/glossary-listing.html.twig +6 -6
- package/templates/bcl-group/group-landing.html.twig +69 -69
- package/templates/bcl-group/group.html.twig +19 -19
- package/templates/bcl-header/header.html.twig +71 -82
- package/templates/bcl-heading/heading.html.twig +13 -17
- package/templates/bcl-icon/icon.html.twig +10 -13
- package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +20 -23
- package/templates/bcl-landing-page/landing-page.html.twig +33 -33
- package/templates/bcl-language-list/language-list-grid.html.twig +25 -28
- package/templates/bcl-language-list/language-list-modal.html.twig +52 -52
- package/templates/bcl-language-list/language-list.html.twig +33 -37
- package/templates/bcl-language-switcher/language-switcher.html.twig +12 -15
- package/templates/bcl-link/link.html.twig +24 -27
- package/templates/bcl-links-block/links-block.html.twig +30 -34
- package/templates/bcl-list-group/list-group.html.twig +43 -47
- package/templates/bcl-listing/listing.html.twig +88 -91
- package/templates/bcl-mega-menu/mega-menu-items.html.twig +18 -21
- package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +28 -26
- package/templates/bcl-mega-menu/mega-menu.html.twig +37 -38
- package/templates/bcl-modal/modal.html.twig +21 -23
- package/templates/bcl-navbar/navbar.html.twig +35 -38
- package/templates/bcl-navigation/navigation.html.twig +105 -110
- package/templates/bcl-offcanvas/offcanvas.html.twig +33 -36
- package/templates/bcl-page/page.html.twig +27 -27
- package/templates/bcl-pagination/pagination-item.html.twig +22 -26
- package/templates/bcl-pagination/pagination.html.twig +59 -62
- package/templates/bcl-pagination-v2/pagination-item.html.twig +31 -35
- package/templates/bcl-pagination-v2/pagination.html.twig +79 -82
- package/templates/bcl-person/person.html.twig +12 -12
- package/templates/bcl-placeholder/placeholder.html.twig +14 -18
- package/templates/bcl-progress/progress.html.twig +16 -20
- package/templates/bcl-project/project-lists.html.twig +25 -29
- package/templates/bcl-project/project.html.twig +35 -35
- package/templates/bcl-project-status/project-contributions.html.twig +25 -28
- package/templates/bcl-project-status/project-status.html.twig +32 -37
- package/templates/bcl-recent-activities/recent-activities.html.twig +13 -16
- package/templates/bcl-search/search.html.twig +12 -12
- package/templates/bcl-search-form/search-form.html.twig +21 -24
- package/templates/bcl-select/select.html.twig +52 -56
- package/templates/bcl-spinner/spinner.html.twig +10 -13
- package/templates/bcl-subscription/subscription-modal.html.twig +7 -7
- package/templates/bcl-subscription/subscription.html.twig +3 -3
- package/templates/bcl-subscription-block/subscription-block.html.twig +14 -17
- package/templates/bcl-table/table.html.twig +61 -65
- package/templates/bcl-textarea/textarea.html.twig +44 -47
- package/templates/bcl-timeline/timeline-item.html.twig +12 -15
- package/templates/bcl-timeline/timeline.html.twig +42 -45
- package/templates/bcl-toasts/toasts.html.twig +56 -60
- package/templates/bcl-user/user-compact.html.twig +24 -27
- package/templates/bcl-user/user-terms.html.twig +6 -6
- package/templates/bcl-user/user.html.twig +117 -117
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- title: (string) (default: '')
|
|
5
3
|
- title_tag: (string) (default: 'h1')
|
|
@@ -51,8 +49,8 @@
|
|
|
51
49
|
- card_links
|
|
52
50
|
#}
|
|
53
51
|
|
|
54
|
-
{
|
|
55
|
-
{% set _title_tag = title_tag|default('
|
|
52
|
+
{%- set _title = title|default('') %}
|
|
53
|
+
{% set _title_tag = title_tag|default('div') %}
|
|
56
54
|
{% set _title_link = title_link|default({}) %}
|
|
57
55
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
58
56
|
{% set _subtitle = subtitle|default({}) %}
|
|
@@ -77,112 +75,112 @@
|
|
|
77
75
|
{% set _badges = badges|default([]) %}
|
|
78
76
|
{% set _links = links|default([]) %}
|
|
79
77
|
|
|
80
|
-
{
|
|
78
|
+
{%- set _classes = ['card'] %}
|
|
81
79
|
{% if _text_color is not empty %}
|
|
82
|
-
{
|
|
80
|
+
{%- set _classes = _classes|merge(['text-' ~ _text_color]) %}
|
|
83
81
|
{% endif %}
|
|
84
82
|
{% if _variant is not empty %}
|
|
85
|
-
{
|
|
83
|
+
{%- set _classes = _classes|merge(['text-bg-' ~ _variant]) %}
|
|
86
84
|
{% endif %}
|
|
87
85
|
{% if _border_variant is not empty %}
|
|
88
|
-
{
|
|
86
|
+
{%- set _classes = _classes|merge(['border-' ~ _border_variant]) %}
|
|
89
87
|
{% endif %}
|
|
90
88
|
|
|
91
|
-
{
|
|
92
|
-
{
|
|
89
|
+
{%- if attributes is empty %}
|
|
90
|
+
{%- set attributes = create_attribute() %}
|
|
93
91
|
{% endif %}
|
|
94
92
|
|
|
95
|
-
{
|
|
93
|
+
{%- set _body_classes = 'card-body' %}
|
|
96
94
|
{% if _extra_classes_body is not empty %}
|
|
97
|
-
{
|
|
95
|
+
{%- set _body_classes = _body_classes ~ ' ' ~ _extra_classes_body %}
|
|
98
96
|
{% endif %}
|
|
99
97
|
|
|
100
|
-
{
|
|
98
|
+
{%- set _header_classes = 'card-header' %}
|
|
101
99
|
{% if _extra_classes_header is not empty %}
|
|
102
|
-
{
|
|
100
|
+
{%- set _header_classes = _header_classes ~ ' ' ~ _extra_classes_header %}
|
|
103
101
|
{% endif %}
|
|
104
102
|
|
|
105
|
-
{
|
|
103
|
+
{%- set _footer_classes = 'card-footer' %}
|
|
106
104
|
{% if _extra_classes_footer is not empty %}
|
|
107
|
-
{
|
|
105
|
+
{%- set _footer_classes = _footer_classes ~ ' ' ~ _extra_classes_footer %}
|
|
108
106
|
{% endif %}
|
|
109
107
|
|
|
110
|
-
{
|
|
108
|
+
{%- set _row_classes = 'row' %}
|
|
111
109
|
{% if _horizontal_grid.gutter is not empty %}
|
|
112
|
-
{
|
|
110
|
+
{%- set _row_classes = _row_classes ~ ' g-' ~ _horizontal_grid.gutter %}
|
|
113
111
|
{% endif %}
|
|
114
112
|
|
|
115
|
-
{
|
|
113
|
+
{%- set attributes = attributes.addClass(_classes) -%}
|
|
116
114
|
|
|
117
115
|
<article
|
|
118
116
|
{{ attributes }}
|
|
119
117
|
>
|
|
120
|
-
{
|
|
118
|
+
{%- if _card_header is not empty -%}
|
|
121
119
|
<div class='{{ _header_classes }}'>
|
|
122
120
|
{{- _card_header -}}
|
|
123
121
|
</div>
|
|
124
|
-
{
|
|
125
|
-
{% if _horizontal
|
|
122
|
+
{%- endif %}
|
|
123
|
+
{% if _horizontal -%}
|
|
126
124
|
<div class='{{ _row_classes }}'>
|
|
127
|
-
{
|
|
125
|
+
{%- endif %}
|
|
128
126
|
{% if _image is not empty and _image.position != 'bottom' %}
|
|
129
|
-
{
|
|
130
|
-
{
|
|
131
|
-
{
|
|
132
|
-
{
|
|
133
|
-
{
|
|
134
|
-
{
|
|
135
|
-
{
|
|
136
|
-
{
|
|
137
|
-
{
|
|
138
|
-
{
|
|
139
|
-
{
|
|
140
|
-
{
|
|
141
|
-
{
|
|
142
|
-
{
|
|
143
|
-
{
|
|
144
|
-
{
|
|
145
|
-
{
|
|
146
|
-
{
|
|
147
|
-
{% endif %}
|
|
148
|
-
{% if _horizontal and (_image is not empty or _date is not empty) %}
|
|
149
|
-
<div class='{{ _horizontal_grid.left_col_classes }}'>
|
|
127
|
+
{%- set _img_class = 'card-img-top' %}
|
|
128
|
+
{%- if _image.position == 'background' %}
|
|
129
|
+
{%- set _img_class = 'card-img' %}
|
|
130
|
+
{%- endif %}
|
|
131
|
+
{%- if _image.rounded is not empty %}
|
|
132
|
+
{%- set _img_class = _img_class ~ ' rounded-' ~ _image.rounded %}
|
|
133
|
+
{%- elseif _horizontal %}
|
|
134
|
+
{%- if attributes.hasClass('border-0') %}
|
|
135
|
+
{%- set _img_class = _img_class ~ ' rounded-1' %}
|
|
136
|
+
{%- else %}
|
|
137
|
+
{%- set _img_class = _img_class ~ ' rounded-0 rounded-start' %}
|
|
138
|
+
{%- endif %}
|
|
139
|
+
{%- elseif _card_header is not empty %}
|
|
140
|
+
{%- set _img_class = _img_class ~ ' rounded-0' %}
|
|
141
|
+
{%- endif %}
|
|
142
|
+
{%- if _image.classes is not empty %}
|
|
143
|
+
{%- set _img_class = _img_class ~ " " ~ _image.classes %}
|
|
144
|
+
{%- endif %}
|
|
150
145
|
{% endif %}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
146
|
+
{% if _horizontal and (_image is not empty or _date is not empty) -%}
|
|
147
|
+
<div class='{{ _horizontal_grid.left_col_classes }}'>
|
|
148
|
+
{%- endif %}
|
|
149
|
+
{%- if _date is not empty %}
|
|
150
|
+
{%- block card_date %}
|
|
151
|
+
{%- include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
|
|
152
|
+
{%- endblock %}
|
|
153
|
+
{%- elseif _image is not empty and _image.position != "bottom" -%}
|
|
156
154
|
<img
|
|
157
155
|
src="{{ _image.path }}"
|
|
158
156
|
alt="{{ _image.alt }}"
|
|
159
157
|
class="{{ _img_class }}"
|
|
160
158
|
>
|
|
161
|
-
{
|
|
162
|
-
{% if _horizontal and (_image is not empty or _date is not empty)
|
|
159
|
+
{%- endif %}
|
|
160
|
+
{% if _horizontal and (_image is not empty or _date is not empty) -%}
|
|
163
161
|
</div>
|
|
164
|
-
{
|
|
165
|
-
{% if _image.position == 'background'
|
|
162
|
+
{%- endif %}
|
|
163
|
+
{% if _image.position == 'background' -%}
|
|
166
164
|
<div class="card-img-overlay">
|
|
167
|
-
{
|
|
168
|
-
{% if _horizontal
|
|
165
|
+
{%- endif %}
|
|
166
|
+
{% if _horizontal -%}
|
|
169
167
|
<div class='{{ _horizontal_grid.right_col_classes }}'>
|
|
170
|
-
{
|
|
168
|
+
{%- endif -%}
|
|
171
169
|
<div class='{{ _body_classes }}'>
|
|
172
|
-
{
|
|
173
|
-
{
|
|
174
|
-
{
|
|
175
|
-
{
|
|
176
|
-
{
|
|
177
|
-
{
|
|
170
|
+
{%- if _title is not empty %}
|
|
171
|
+
{%- if _title_attributes.class is empty %}
|
|
172
|
+
{%- set _title_attributes = _title_attributes.addClass('h4') %}
|
|
173
|
+
{%- endif %}
|
|
174
|
+
{%- set _title_attributes = _title_attributes.addClass('card-title') %}
|
|
175
|
+
{%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
178
176
|
title: _title,
|
|
179
177
|
title_tag: _title_tag,
|
|
180
178
|
title_link: _title_link,
|
|
181
179
|
attributes: _title_attributes,
|
|
182
180
|
} only %}
|
|
183
|
-
{
|
|
181
|
+
{%- endif %}
|
|
184
182
|
{%- if _subtitle is not empty -%}
|
|
185
|
-
{% set _subtitle_tag = _subtitle.tag ?? 'h6'
|
|
183
|
+
{% set _subtitle_tag = _subtitle.tag ?? 'h6' -%}
|
|
186
184
|
<{{ _subtitle_tag }}
|
|
187
185
|
class='card-subtitle{{ _subtitle.classes ? ' ' ~ _subtitle.classes }}'
|
|
188
186
|
>
|
|
@@ -190,7 +188,7 @@
|
|
|
190
188
|
</{{ _subtitle_tag }}>
|
|
191
189
|
{%- endif -%}
|
|
192
190
|
{%- if _text is not empty -%}
|
|
193
|
-
{% set _text_tag = _text.tag ?? 'p'
|
|
191
|
+
{% set _text_tag = _text.tag ?? 'p' -%}
|
|
194
192
|
<{{ _text_tag }}
|
|
195
193
|
class='card-text{{ _text.classes ? ' ' ~ _text.classes }}'
|
|
196
194
|
>
|
|
@@ -203,73 +201,72 @@
|
|
|
203
201
|
{% block card_badges %}
|
|
204
202
|
{%- if _badges is not empty and _badges is iterable -%}
|
|
205
203
|
<div class="mt-2-5">
|
|
206
|
-
{
|
|
207
|
-
{
|
|
208
|
-
{
|
|
204
|
+
{%- for _badge in _badges %}
|
|
205
|
+
{%- if _badge.attributes is empty %}
|
|
206
|
+
{%- set _badge = _badge|merge({
|
|
209
207
|
attributes: create_attribute()
|
|
210
208
|
}) %}
|
|
211
|
-
{
|
|
212
|
-
{
|
|
209
|
+
{%- endif %}
|
|
210
|
+
{%- set _badge = _badge|merge({
|
|
213
211
|
attributes: _badge.attributes.addClass('mb-2')
|
|
214
212
|
})
|
|
215
213
|
%}
|
|
216
|
-
{
|
|
217
|
-
{
|
|
214
|
+
{%- if not loop.last %}
|
|
215
|
+
{%- set _badge = _badge|merge({
|
|
218
216
|
attributes: _badge.attributes.addClass('me-2')
|
|
219
217
|
})
|
|
220
218
|
%}
|
|
221
|
-
{
|
|
222
|
-
{
|
|
223
|
-
|
|
224
|
-
{
|
|
219
|
+
{%- endif %}
|
|
220
|
+
{%- include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
|
|
221
|
+
|
|
222
|
+
{%- endfor -%}
|
|
225
223
|
</div>
|
|
226
224
|
{%- endif -%}
|
|
227
225
|
{% endblock %}
|
|
228
|
-
{
|
|
226
|
+
{%- block card_links %}
|
|
229
227
|
{%- if _links is not empty and _links is iterable -%}
|
|
230
228
|
<div class="mt-2-5 mb-2">
|
|
231
|
-
{
|
|
229
|
+
{%- for _link in _links -%}
|
|
232
230
|
<div class="mb-3 mb-md-0 d-block d-md-inline-block me-md-4-5">
|
|
233
|
-
{
|
|
231
|
+
{%- include '@oe-bcl/bcl-link/link.html.twig' with _link only -%}
|
|
234
232
|
</div>
|
|
235
|
-
{
|
|
233
|
+
{%- endfor -%}
|
|
236
234
|
</div>
|
|
237
235
|
{%- endif -%}
|
|
238
|
-
{% endblock
|
|
236
|
+
{% endblock -%}
|
|
239
237
|
</div>
|
|
240
|
-
{
|
|
238
|
+
{%- if _horizontal -%}
|
|
241
239
|
</div>
|
|
242
|
-
{
|
|
240
|
+
{%- endif %}
|
|
243
241
|
{% if _image is not empty %}
|
|
244
|
-
{
|
|
242
|
+
{%- if _image.position == 'background' -%}
|
|
245
243
|
</div>
|
|
246
|
-
{
|
|
247
|
-
{
|
|
248
|
-
{
|
|
249
|
-
{
|
|
250
|
-
{
|
|
251
|
-
{
|
|
252
|
-
{
|
|
244
|
+
{%- endif %}
|
|
245
|
+
{%- set _img_class = "card-img-bottom" %}
|
|
246
|
+
{%- if _image.classes is not empty %}
|
|
247
|
+
{%- set _img_class = _img_class ~ " " ~ _image.classes %}
|
|
248
|
+
{%- endif %}
|
|
249
|
+
{%- if _image.position == 'bottom' %}
|
|
250
|
+
{%- if _horizontal -%}
|
|
253
251
|
<div class="col-4">
|
|
254
|
-
{
|
|
252
|
+
{%- endif -%}
|
|
255
253
|
<img
|
|
256
254
|
src="{{ _image.path }}"
|
|
257
255
|
alt="{{ _image.alt }}"
|
|
258
256
|
class="{{ _img_class }}"
|
|
259
257
|
>
|
|
260
|
-
{
|
|
258
|
+
{%- if _horizontal -%}
|
|
261
259
|
</div>
|
|
262
|
-
{
|
|
263
|
-
{
|
|
260
|
+
{%- endif %}
|
|
261
|
+
{%- endif %}
|
|
264
262
|
{% endif %}
|
|
265
|
-
{% if _horizontal
|
|
263
|
+
{% if _horizontal -%}
|
|
266
264
|
</div>
|
|
267
|
-
{
|
|
268
|
-
{% if _card_footer is not empty
|
|
265
|
+
{%- endif %}
|
|
266
|
+
{% if _card_footer is not empty -%}
|
|
269
267
|
<div class="{{ _footer_classes }}">
|
|
270
268
|
{{- _card_footer -}}
|
|
271
269
|
</div>
|
|
272
|
-
{
|
|
270
|
+
{%- endif -%}
|
|
273
271
|
</article>
|
|
274
|
-
|
|
275
|
-
{% endapply %}
|
|
272
|
+
{#--#}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- type (string) (default: 'group')
|
|
5
3
|
options: ['group', 'grid', 'masonry']
|
|
@@ -20,7 +18,7 @@
|
|
|
20
18
|
- card_layout_card
|
|
21
19
|
#}
|
|
22
20
|
|
|
23
|
-
{
|
|
21
|
+
{%- set _type = type|default('group') %}
|
|
24
22
|
{% set _items = items|default([]) %}
|
|
25
23
|
{% set _grid_columns = grid_columns|default(1) %}
|
|
26
24
|
{% set _responsiveness = responsiveness|default('md') %}
|
|
@@ -29,59 +27,58 @@
|
|
|
29
27
|
{% set _equal_height = equal_height ?? false %}
|
|
30
28
|
{% set _cols_extra_classes = cols_extra_classes|default('') %}
|
|
31
29
|
|
|
32
|
-
{
|
|
30
|
+
{%- set _cols_classes = 'col' %}
|
|
33
31
|
|
|
34
|
-
{
|
|
35
|
-
{
|
|
32
|
+
{%- if _cols_extra_classes is not empty %}
|
|
33
|
+
{%- set _cols_classes = _cols_classes ~ ' ' ~ _cols_extra_classes %}
|
|
36
34
|
{% endif %}
|
|
37
35
|
{% if _type == 'group' %}
|
|
38
|
-
{
|
|
36
|
+
{%- set _classes = ['card-group'] %}
|
|
39
37
|
{% elseif type == 'grid' or type == 'masonry' %}
|
|
40
|
-
{
|
|
41
|
-
{
|
|
42
|
-
{
|
|
43
|
-
{
|
|
44
|
-
{
|
|
45
|
-
{
|
|
46
|
-
{
|
|
38
|
+
{%- set _classes = ['row', 'row-cols-' ~ _grid_columns] %}
|
|
39
|
+
{%- if _responsive_columns is not empty %}
|
|
40
|
+
{%- set _classes = _classes|merge(['row-cols-' ~ _responsiveness ~ '-' ~ _responsive_columns]) %}
|
|
41
|
+
{%- endif %}
|
|
42
|
+
{%- if _gutter is not empty %}
|
|
43
|
+
{%- set _classes = _classes|merge(['g-' ~ _gutter]) %}
|
|
44
|
+
{%- endif %}
|
|
47
45
|
{% endif %}
|
|
48
46
|
|
|
49
|
-
{
|
|
50
|
-
{
|
|
47
|
+
{%- if attributes is empty %}
|
|
48
|
+
{%- set attributes = create_attribute() %}
|
|
51
49
|
{% endif %}
|
|
52
50
|
|
|
53
|
-
{
|
|
51
|
+
{%- set attributes = attributes.addClass(_classes) -%}
|
|
54
52
|
|
|
55
53
|
<div
|
|
56
54
|
{{ attributes }}
|
|
57
|
-
{
|
|
55
|
+
{%- if _type == 'masonry' %}
|
|
58
56
|
data-masonry='{"percentPosition": true }'
|
|
59
57
|
{% endif %}
|
|
60
58
|
>
|
|
61
|
-
{
|
|
62
|
-
{
|
|
63
|
-
{
|
|
64
|
-
{
|
|
59
|
+
{%- if _items is not empty and _items is iterable %}
|
|
60
|
+
{%- for _item in _items %}
|
|
61
|
+
{%- if _item.attributes is empty %}
|
|
62
|
+
{%- set _item = _item|merge({
|
|
65
63
|
attributes: create_attribute()
|
|
66
64
|
}) %}
|
|
67
|
-
{
|
|
68
|
-
{
|
|
69
|
-
{
|
|
65
|
+
{%- endif %}
|
|
66
|
+
{%- if _equal_height %}
|
|
67
|
+
{%- set _item = _item|merge({
|
|
70
68
|
attributes: _item.attributes.addClass('h-100')
|
|
71
69
|
})
|
|
72
70
|
%}
|
|
73
|
-
{
|
|
74
|
-
{
|
|
71
|
+
{%- endif %}
|
|
72
|
+
{%- if _type == 'grid' or _type == 'masonry' -%}
|
|
75
73
|
<div class="{{ _cols_classes }}">
|
|
76
|
-
{
|
|
77
|
-
{
|
|
78
|
-
{
|
|
79
|
-
{
|
|
80
|
-
{
|
|
74
|
+
{%- endif %}
|
|
75
|
+
{%- block card_layout_card %}
|
|
76
|
+
{%- include '@oe-bcl/bcl-card/card.html.twig' with _item only %}
|
|
77
|
+
{%- endblock %}
|
|
78
|
+
{%- if _type == 'grid' or _type == 'masonry' -%}
|
|
81
79
|
</div>
|
|
82
|
-
{
|
|
83
|
-
{
|
|
84
|
-
{% endif
|
|
80
|
+
{%- endif %}
|
|
81
|
+
{%- endfor %}
|
|
82
|
+
{% endif -%}
|
|
85
83
|
</div>
|
|
86
|
-
|
|
87
|
-
{% endapply %}
|
|
84
|
+
{#--#}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- title (string) (default: '')
|
|
5
3
|
- title_tag (string) (default: 'h2')
|
|
@@ -14,7 +12,7 @@
|
|
|
14
12
|
image: (string) <img> tag
|
|
15
13
|
caption (string)
|
|
16
14
|
caption_classes (string)
|
|
17
|
-
caption_title (string)
|
|
15
|
+
caption_title (string)
|
|
18
16
|
interval (integer) (default: 0)
|
|
19
17
|
}
|
|
20
18
|
],
|
|
@@ -28,7 +26,7 @@
|
|
|
28
26
|
- attributes (drupal attrs)
|
|
29
27
|
#}
|
|
30
28
|
|
|
31
|
-
{
|
|
29
|
+
{%- set _title = title|default('') %}
|
|
32
30
|
{% set _title_tag = title_tag|default('h2') %}
|
|
33
31
|
{% set _title_link = title_link|default({}) %}
|
|
34
32
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
@@ -45,36 +43,36 @@
|
|
|
45
43
|
{% set _rounded_indicators = rounded_indicators ?? false %}
|
|
46
44
|
{% set _disable_touch = disable_touch ?? false %}
|
|
47
45
|
|
|
48
|
-
{
|
|
46
|
+
{%- set _classes = ['carousel', 'slide'] %}
|
|
49
47
|
|
|
50
|
-
{
|
|
51
|
-
{
|
|
48
|
+
{%- if _fade %}
|
|
49
|
+
{%- set _classes = _classes|merge(['carousel-fade']) %}
|
|
52
50
|
{% endif %}
|
|
53
51
|
{% if _dark %}
|
|
54
|
-
{
|
|
52
|
+
{%- set _classes = _classes|merge(['carousel-dark']) %}
|
|
55
53
|
{% endif %}
|
|
56
54
|
|
|
57
|
-
{
|
|
58
|
-
{
|
|
55
|
+
{%- if attributes is empty %}
|
|
56
|
+
{%- set attributes = create_attribute() %}
|
|
59
57
|
{% endif %}
|
|
60
58
|
|
|
61
|
-
{
|
|
62
|
-
{
|
|
59
|
+
{%- if _id is not empty %}
|
|
60
|
+
{%- set attributes = attributes.setAttribute('id', _id) %}
|
|
63
61
|
{% endif %}
|
|
64
62
|
|
|
65
|
-
{
|
|
66
|
-
{
|
|
63
|
+
{%- if _autoplay %}
|
|
64
|
+
{%- set attributes = attributes.setAttribute('data-bs-ride', 'carousel') %}
|
|
67
65
|
{% endif %}
|
|
68
66
|
|
|
69
|
-
{
|
|
70
|
-
{
|
|
67
|
+
{%- if _disable_touch %}
|
|
68
|
+
{%- set attributes = attributes.setAttribute('data-bs-touch', 'false') %}
|
|
71
69
|
{% endif %}
|
|
72
70
|
|
|
73
|
-
{
|
|
74
|
-
{
|
|
71
|
+
{%- if _rounded_indicators %}
|
|
72
|
+
{%- set attributes = attributes.addClass('rounded-indicators') %}
|
|
75
73
|
{% endif %}
|
|
76
74
|
|
|
77
|
-
{
|
|
75
|
+
{%- set attributes = attributes.addClass(_classes) %}
|
|
78
76
|
|
|
79
77
|
{%- if _title is not empty -%}
|
|
80
78
|
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
@@ -88,93 +86,92 @@
|
|
|
88
86
|
<div
|
|
89
87
|
{{ attributes }}
|
|
90
88
|
>
|
|
91
|
-
{
|
|
89
|
+
{%- if _with_indicators -%}
|
|
92
90
|
<div class="carousel-indicators d-none d-md-flex">
|
|
93
|
-
{
|
|
94
|
-
{
|
|
91
|
+
{%- for _i in 0..(_items|length - 1) %}
|
|
92
|
+
{%- set button_attributes = create_attribute()
|
|
95
93
|
.setAttribute('aria-label', 'Slide ' ~ (_i + 1))
|
|
96
94
|
.setAttribute('data-bs-target', '#' ~ _id)
|
|
97
95
|
.setAttribute('data-bs-slide-to', _i)
|
|
98
96
|
%}
|
|
99
|
-
{
|
|
100
|
-
{
|
|
101
|
-
{
|
|
102
|
-
{
|
|
97
|
+
{%- if loop.index == _active_item %}
|
|
98
|
+
{%- set button_attributes = button_attributes.setAttribute('aria-current', true).addClass(['active']) %}
|
|
99
|
+
{%- endif %}
|
|
100
|
+
{%- include '@oe-bcl/bcl-button/button.html.twig' with {
|
|
103
101
|
clean_class: true,
|
|
104
102
|
attributes: button_attributes
|
|
105
103
|
} only %}
|
|
106
|
-
{
|
|
104
|
+
{%- endfor -%}
|
|
107
105
|
</div>
|
|
108
|
-
{
|
|
106
|
+
{%- endif -%}
|
|
109
107
|
<div class="carousel-inner">
|
|
110
|
-
{
|
|
111
|
-
{
|
|
112
|
-
{
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
{
|
|
108
|
+
{%- if _items is not empty and _items is iterable %}
|
|
109
|
+
{%- for _item in items %}
|
|
110
|
+
{%- set _item_classes = 'carousel-item' %}
|
|
111
|
+
{%- if loop.index == _active_item %}
|
|
112
|
+
{%- set _item_classes = _item_classes ~ ' active' %}
|
|
113
|
+
{%- endif -%}
|
|
116
114
|
<div
|
|
117
115
|
class="{{ _item_classes }}"
|
|
118
116
|
{% if _item.interval is defined %}
|
|
119
117
|
data-bs-interval="{{ _item.interval }}"
|
|
120
118
|
{% endif %}
|
|
121
119
|
>
|
|
122
|
-
{
|
|
123
|
-
{{ _item.image }}
|
|
124
|
-
{
|
|
125
|
-
{
|
|
126
|
-
{
|
|
127
|
-
{
|
|
128
|
-
{
|
|
129
|
-
{
|
|
120
|
+
{%- if _item.image is defined and _item.image is not empty %}
|
|
121
|
+
{{- _item.image }}
|
|
122
|
+
{%- endif %}
|
|
123
|
+
{%- if (_item.caption is defined and _item.caption is not empty) or (_item.link is defined and _item.link is not empty) or (_item.caption_title is defined and _item.caption_title is not empty) %}
|
|
124
|
+
{%- set _caption_classes = 'carousel-caption' %}
|
|
125
|
+
{%- if _item.caption is not empty and _item.link is empty %}
|
|
126
|
+
{%- set _caption_classes = _caption_classes ~ ' d-none d-md-block' %}
|
|
127
|
+
{%- endif -%}
|
|
130
128
|
<div
|
|
131
129
|
class="{{ _caption_classes }}"
|
|
132
130
|
>
|
|
133
|
-
{
|
|
134
|
-
{
|
|
131
|
+
{%- if _item.caption is not empty or _item.caption_title is not empty %}
|
|
132
|
+
{%- if _item.caption_classes is defined and _item.caption_classes is not empty -%}
|
|
135
133
|
<div class="{{ _item.caption_classes }}">
|
|
136
|
-
{
|
|
137
|
-
{
|
|
134
|
+
{%- endif %}
|
|
135
|
+
{%- if _item.caption_title is not empty -%}
|
|
138
136
|
<div class="fs-5">{{ _item.caption_title }}</div>
|
|
139
|
-
{
|
|
137
|
+
{%- endif %}
|
|
140
138
|
{{- _item.caption -}}
|
|
141
|
-
{% if _item.caption_classes is defined and _item.caption_classes is not empty
|
|
139
|
+
{% if _item.caption_classes is defined and _item.caption_classes is not empty -%}
|
|
142
140
|
</div>
|
|
143
|
-
{
|
|
144
|
-
{
|
|
145
|
-
{
|
|
146
|
-
{
|
|
147
|
-
{
|
|
141
|
+
{%- endif %}
|
|
142
|
+
{%- endif %}
|
|
143
|
+
{%- if _item.link is defined and _item.link is not empty %}
|
|
144
|
+
{%- include '@oe-bcl/bcl-link/link.html.twig' with _item.link only %}
|
|
145
|
+
{%- endif -%}
|
|
148
146
|
</div>
|
|
149
|
-
{
|
|
147
|
+
{%- endif -%}
|
|
150
148
|
</div>
|
|
151
|
-
{
|
|
152
|
-
{
|
|
149
|
+
{%- endfor %}
|
|
150
|
+
{%- endif -%}
|
|
153
151
|
</div>
|
|
154
|
-
{
|
|
152
|
+
{%- if _with_controls -%}
|
|
155
153
|
<button
|
|
156
154
|
class="carousel-control-prev"
|
|
157
155
|
type="button"
|
|
158
156
|
data-bs-target="#{{ _id }}"
|
|
159
157
|
data-bs-slide="prev"
|
|
160
|
-
>
|
|
158
|
+
>{# -#}
|
|
161
159
|
<span class="carousel-control-prev-icon"></span>
|
|
162
|
-
{
|
|
160
|
+
{%- if _prev_label is not empty -%}
|
|
163
161
|
<span class="visually-hidden">{{ _prev_label }}</span>
|
|
164
|
-
{
|
|
165
|
-
</button>
|
|
162
|
+
{%- endif -%}
|
|
163
|
+
</button>{# -#}
|
|
166
164
|
<button
|
|
167
165
|
class="carousel-control-next"
|
|
168
166
|
type="button"
|
|
169
167
|
data-bs-target="#{{ _id }}"
|
|
170
168
|
data-bs-slide="next"
|
|
171
|
-
>
|
|
169
|
+
>{# -#}
|
|
172
170
|
<span class="carousel-control-next-icon"></span>
|
|
173
|
-
{
|
|
171
|
+
{%- if _next_label is not empty -%}
|
|
174
172
|
<span class="visually-hidden">{{ _next_label }}</span>
|
|
175
|
-
{
|
|
173
|
+
{%- endif -%}
|
|
176
174
|
</button>
|
|
177
|
-
{
|
|
175
|
+
{%- endif -%}
|
|
178
176
|
</div>
|
|
179
|
-
|
|
180
|
-
{% endapply %}
|
|
177
|
+
{#--#}
|