@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,9 +1,7 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- variant (string) (default: 'neutral')
|
|
5
3
|
- options: ['eu', 'ec', 'neutral']
|
|
6
|
-
- rows (object[]) (default: []) - format:
|
|
4
|
+
- rows (object[]) (default: []) - format:
|
|
7
5
|
[
|
|
8
6
|
{
|
|
9
7
|
extra_classes: ""
|
|
@@ -32,59 +30,58 @@
|
|
|
32
30
|
- attributes (drupal attrs)
|
|
33
31
|
#}
|
|
34
32
|
|
|
35
|
-
{
|
|
33
|
+
{%- set _variant = variant|default('neutral') %}
|
|
36
34
|
{% set _rows = rows|default([]) %}
|
|
37
35
|
|
|
38
|
-
{
|
|
39
|
-
{
|
|
36
|
+
{%- if attributes is empty %}
|
|
37
|
+
{%- set attributes = create_attribute() %}
|
|
40
38
|
{% endif %}
|
|
41
39
|
|
|
42
|
-
{
|
|
40
|
+
{%- set attributes = attributes.addClass(['bcl-footer', 'bcl-footer--' ~ _variant]) -%}
|
|
43
41
|
|
|
44
42
|
<footer
|
|
45
43
|
{{ attributes }}
|
|
46
|
-
>
|
|
44
|
+
>{# -#}
|
|
47
45
|
<div class="container">
|
|
48
|
-
{
|
|
49
|
-
{
|
|
46
|
+
{%- if rows is not empty and rows is iterable %}
|
|
47
|
+
{%- for row in _rows -%}
|
|
50
48
|
<div class="{{ row.extra_classes ? row.extra_classes ~ ' row' : 'row' }}">
|
|
51
|
-
{
|
|
49
|
+
{%- for col in row.cols -%}
|
|
52
50
|
<div class="{{ col.classes }}">
|
|
53
|
-
{
|
|
54
|
-
{
|
|
55
|
-
{
|
|
51
|
+
{%- if col.items is not empty and col.items is iterable %}
|
|
52
|
+
{%- for item in col.items %}
|
|
53
|
+
{%- if item.type == 'image' -%}
|
|
56
54
|
<img
|
|
57
55
|
{% if item.path is not empty %}
|
|
58
56
|
src="{{ item.path }}"
|
|
59
57
|
{% endif %}
|
|
60
|
-
{
|
|
58
|
+
{%- if item.alt is not empty %}
|
|
61
59
|
alt="{{ item.alt }}"
|
|
62
60
|
{% endif %}
|
|
63
|
-
{
|
|
61
|
+
{%- if item.classes is not empty %}
|
|
64
62
|
class="{{ item.classes }}"
|
|
65
63
|
{% endif %}
|
|
66
64
|
>
|
|
67
|
-
{
|
|
68
|
-
{
|
|
69
|
-
{{ item.content }}
|
|
70
|
-
{
|
|
71
|
-
{
|
|
72
|
-
{
|
|
65
|
+
{%- endif %}
|
|
66
|
+
{%- if item.type == 'content' %}
|
|
67
|
+
{{- item.content }}
|
|
68
|
+
{%- endif %}
|
|
69
|
+
{%- if item.type == 'links' %}
|
|
70
|
+
{%- for link in item.links -%}
|
|
73
71
|
<div class="mb-1">
|
|
74
|
-
{
|
|
72
|
+
{%- include '@oe-bcl/bcl-link/link.html.twig' with link|merge({
|
|
75
73
|
attributes: create_attribute().addClass(['standalone'])
|
|
76
|
-
}) only
|
|
74
|
+
}) only -%}
|
|
77
75
|
</div>
|
|
78
|
-
{
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
{
|
|
76
|
+
{%- endfor %}
|
|
77
|
+
{%- endif %}
|
|
78
|
+
{%- endfor %}
|
|
79
|
+
{%- endif -%}
|
|
82
80
|
</div>
|
|
83
|
-
{
|
|
81
|
+
{%- endfor -%}
|
|
84
82
|
</div>
|
|
85
|
-
{
|
|
86
|
-
{
|
|
87
|
-
</div>
|
|
83
|
+
{%- endfor %}
|
|
84
|
+
{%- endif -%}
|
|
85
|
+
</div>{# -#}
|
|
88
86
|
</footer>
|
|
89
|
-
|
|
90
|
-
{% endapply %}
|
|
87
|
+
{#--#}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{# Parameters:
|
|
4
2
|
- title: (string) (default: '')
|
|
5
3
|
- title_tag: (string) (default: 'h2')
|
|
@@ -24,7 +22,7 @@
|
|
|
24
22
|
- attributes (drupal attrs)
|
|
25
23
|
#}
|
|
26
24
|
|
|
27
|
-
{
|
|
25
|
+
{%- set _title = title|default('') %}
|
|
28
26
|
{% set _title_tag = title_tag|default('h2') %}
|
|
29
27
|
{% set _title_link = title_link|default({}) %}
|
|
30
28
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
@@ -33,12 +31,12 @@
|
|
|
33
31
|
{% set _items = items|default([]) %}
|
|
34
32
|
{% set _submit = submit|default({}) %}
|
|
35
33
|
|
|
36
|
-
{
|
|
37
|
-
{
|
|
34
|
+
{%- if attributes is empty %}
|
|
35
|
+
{%- set attributes = create_attribute() %}
|
|
38
36
|
{% endif %}
|
|
39
37
|
|
|
40
|
-
{
|
|
41
|
-
{
|
|
38
|
+
{%- if _title is not empty %}
|
|
39
|
+
{%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
42
40
|
title: _title,
|
|
43
41
|
title_tag: _title_tag,
|
|
44
42
|
title_link: _title_link,
|
|
@@ -46,39 +44,39 @@
|
|
|
46
44
|
} only %}
|
|
47
45
|
{% endif %}
|
|
48
46
|
|
|
49
|
-
{
|
|
47
|
+
{%- if _helper_text is not empty -%}
|
|
50
48
|
<p>{{ _helper_text }}</p>
|
|
51
|
-
{
|
|
49
|
+
{%- endif -%}
|
|
52
50
|
|
|
53
51
|
<form
|
|
54
52
|
{{ attributes }}
|
|
55
53
|
>
|
|
56
|
-
{
|
|
54
|
+
{%- if _items is not empty and _items is iterable %}
|
|
57
55
|
{% for _item_group in _items %}
|
|
58
|
-
{
|
|
59
|
-
{
|
|
60
|
-
{
|
|
61
|
-
{
|
|
62
|
-
{
|
|
63
|
-
{
|
|
64
|
-
{
|
|
65
|
-
{
|
|
66
|
-
{
|
|
67
|
-
{
|
|
68
|
-
{
|
|
69
|
-
{
|
|
56
|
+
{%- set _group_classes = '' %}
|
|
57
|
+
{%- set _legend_classes = '' %}
|
|
58
|
+
{%- set _fieldset_classes = '' %}
|
|
59
|
+
{%- if _item_group is not empty and _item_group is iterable %}
|
|
60
|
+
{%- if _item_group[0].classes is defined and _item_group[0].classes is not empty %}
|
|
61
|
+
{%- set _group_classes = _item_group[0].classes %}
|
|
62
|
+
{%- endif %}
|
|
63
|
+
{#- fieldset #}
|
|
64
|
+
{%- if _item_group[0].type == 'fieldset' %}
|
|
65
|
+
{%- if _item_group[0].fieldset_classes is defined and _item_group[0].fieldset_classes is not empty %}
|
|
66
|
+
{%- set _fieldset_classes = _item_group[0].fieldset_classes %}
|
|
67
|
+
{%- endif -%}
|
|
70
68
|
<fieldset
|
|
71
69
|
{% if _fieldset_classes is not empty %}
|
|
72
70
|
class="{{ _fieldset_classes }}"
|
|
73
71
|
{% endif %}
|
|
74
|
-
{
|
|
72
|
+
{%- if _item_group[0].disabled %}
|
|
75
73
|
disabled
|
|
76
74
|
{% endif %}
|
|
77
75
|
>
|
|
78
|
-
{
|
|
79
|
-
{
|
|
80
|
-
{
|
|
81
|
-
{
|
|
76
|
+
{%- if _item_group[0].legend is defined and _item_group[0].legend is not empty %}
|
|
77
|
+
{%- if _item_group[0].legend_classes is defined and _item_group[0].legend_classes is not empty %}
|
|
78
|
+
{%- set _legend_classes = _item_group[0].legend_classes %}
|
|
79
|
+
{%- endif -%}
|
|
82
80
|
<legend
|
|
83
81
|
{% if _legend_classes is not empty %}
|
|
84
82
|
class="{{ _legend_classes }}"
|
|
@@ -86,65 +84,64 @@
|
|
|
86
84
|
>
|
|
87
85
|
{{- _item_group[0].legend -}}
|
|
88
86
|
</legend>
|
|
89
|
-
{
|
|
90
|
-
{
|
|
91
|
-
{
|
|
87
|
+
{%- endif %}
|
|
88
|
+
{%- endif %}
|
|
89
|
+
{%- if _group_classes is not empty -%}
|
|
92
90
|
<div class="{{ _group_classes }}">
|
|
93
|
-
{
|
|
94
|
-
{
|
|
95
|
-
{
|
|
96
|
-
{
|
|
97
|
-
{
|
|
91
|
+
{%- endif %}
|
|
92
|
+
{%- for _item in _item_group %}
|
|
93
|
+
{%- if _item.type != 'fieldset' %}
|
|
94
|
+
{#- grouping input fields wrapper #}
|
|
95
|
+
{%- if _item.wrapper_classes is defined and _item.wrapper_classes is not empty -%}
|
|
98
96
|
<div class="{{ _item.wrapper_classes }}">
|
|
99
|
-
{
|
|
100
|
-
{
|
|
101
|
-
{
|
|
102
|
-
{
|
|
103
|
-
{
|
|
104
|
-
{
|
|
105
|
-
{
|
|
106
|
-
{
|
|
107
|
-
{
|
|
108
|
-
{
|
|
109
|
-
{
|
|
110
|
-
{
|
|
97
|
+
{%- endif %}
|
|
98
|
+
{#- textarea #}
|
|
99
|
+
{%- if _item.type == 'textarea' %}
|
|
100
|
+
{%- include '@oe-bcl/bcl-textarea/textarea.html.twig' with _item only %}
|
|
101
|
+
{#- select #}
|
|
102
|
+
{%- elseif _item.type == 'select' %}
|
|
103
|
+
{%- include '@oe-bcl/bcl-select/select.html.twig' with _item only %}
|
|
104
|
+
{%- else %}
|
|
105
|
+
{#- any other input type #}
|
|
106
|
+
{%- include '@oe-bcl/bcl-form-input/form-input.html.twig' with _item only %}
|
|
107
|
+
{%- endif %}
|
|
108
|
+
{%- if _item.wrapper_classes is defined and _item.wrapper_classes is not empty -%}
|
|
111
109
|
</div>
|
|
112
|
-
{
|
|
113
|
-
{
|
|
114
|
-
{
|
|
115
|
-
{
|
|
110
|
+
{%- endif %}
|
|
111
|
+
{%- endif %}
|
|
112
|
+
{%- endfor %}
|
|
113
|
+
{%- if _group_classes is not empty -%}
|
|
116
114
|
</div>
|
|
117
|
-
{
|
|
118
|
-
{
|
|
115
|
+
{%- endif %}
|
|
116
|
+
{%- if _item_group[0].type == 'fieldset' -%}
|
|
119
117
|
</fieldset>
|
|
120
|
-
{
|
|
121
|
-
{
|
|
118
|
+
{%- endif %}
|
|
119
|
+
{%- endif %}
|
|
122
120
|
{% endfor %}
|
|
123
121
|
{% endif %}
|
|
124
|
-
{% if _antispam is not empty
|
|
125
|
-
<div class="mt-4 mb-2">
|
|
122
|
+
{% if _antispam is not empty -%}
|
|
123
|
+
<div class="mt-4 mb-2">{# -#}
|
|
126
124
|
<div class="text-bg-light">
|
|
127
|
-
{{ _antispam }}
|
|
128
|
-
</div>
|
|
125
|
+
{{- _antispam -}}
|
|
126
|
+
</div>{# -#}
|
|
129
127
|
</div>
|
|
130
|
-
{
|
|
128
|
+
{%- endif %}
|
|
131
129
|
{# submit #}
|
|
132
130
|
{% if _submit is not empty %}
|
|
133
|
-
{
|
|
134
|
-
{
|
|
131
|
+
{%- if _submit.items is empty %}
|
|
132
|
+
{%- set _submit = _submit|merge({
|
|
135
133
|
items: [_submit]
|
|
136
134
|
}) %}
|
|
137
|
-
{
|
|
138
|
-
{
|
|
135
|
+
{%- endif %}
|
|
136
|
+
{%- if _submit.wrapper is defined and _submit.wrapper is not empty -%}
|
|
139
137
|
<div class="{{ _submit.wrapper }}">
|
|
140
|
-
{
|
|
141
|
-
{
|
|
142
|
-
{
|
|
143
|
-
{
|
|
144
|
-
{
|
|
138
|
+
{%- endif %}
|
|
139
|
+
{%- for _item in _submit.items %}
|
|
140
|
+
{%- include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
|
|
141
|
+
{%- endfor %}
|
|
142
|
+
{%- if _submit.wrapper is defined and _submit.wrapper is not empty -%}
|
|
145
143
|
</div>
|
|
146
|
-
{
|
|
147
|
-
{% endif
|
|
144
|
+
{%- endif %}
|
|
145
|
+
{% endif -%}
|
|
148
146
|
</form>
|
|
149
|
-
|
|
150
|
-
{% endapply %}
|
|
147
|
+
{#--#}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{#
|
|
4
2
|
Parameters:
|
|
5
3
|
- id (string) (default: '')
|
|
@@ -28,7 +26,7 @@
|
|
|
28
26
|
- attributes (drupal attrs)
|
|
29
27
|
#}
|
|
30
28
|
|
|
31
|
-
{
|
|
29
|
+
{%- set _id = id|default('') %}
|
|
32
30
|
{% set _input_type = input_type|default('text') %}
|
|
33
31
|
{% set _label = label|default('') %}
|
|
34
32
|
{% set _required = required ?? false %}
|
|
@@ -52,70 +50,70 @@
|
|
|
52
50
|
{% set _toggle_variant = toggle_variant|default('primary') %}
|
|
53
51
|
{% set _remove_wrapper = remove_wrapper ?? false %}
|
|
54
52
|
|
|
55
|
-
{
|
|
53
|
+
{%- set _label_block = false %}
|
|
56
54
|
{% set _label_class = 'form-label' %}
|
|
57
55
|
{% set _classes = ['form-control'] %}
|
|
58
56
|
|
|
59
|
-
{
|
|
60
|
-
{
|
|
57
|
+
{%- if input_type == 'range' %}
|
|
58
|
+
{%- set _classes = ['form-range'] %}
|
|
61
59
|
{% endif %}
|
|
62
60
|
{% if _input_type == 'checkbox' or _input_type == 'radio' %}
|
|
63
|
-
{
|
|
64
|
-
{
|
|
61
|
+
{%- set _classes = ['form-check-input'] %}
|
|
62
|
+
{%- set _label_class = 'form-check-label' %}
|
|
65
63
|
{% endif %}
|
|
66
64
|
{% if _invalid is not empty %}
|
|
67
|
-
{
|
|
65
|
+
{%- set _classes = _classes|merge(['is-invalid']) %}
|
|
68
66
|
{% endif %}
|
|
69
67
|
{% if _valid is not empty %}
|
|
70
|
-
{
|
|
68
|
+
{%- set _classes = _classes|merge(['is-valid']) %}
|
|
71
69
|
{% endif %}
|
|
72
70
|
{% if _horizontal %}
|
|
73
|
-
{
|
|
71
|
+
{%- set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
|
|
74
72
|
{% endif %}
|
|
75
73
|
{% if _hidden_label %}
|
|
76
|
-
{
|
|
74
|
+
{%- set _label_class = _label_class ~ ' visually-hidden' %}
|
|
77
75
|
{% endif %}
|
|
78
76
|
{% if _toggle %}
|
|
79
|
-
{
|
|
80
|
-
{
|
|
77
|
+
{%- set _label_class = _label_class ~ ' btn btn-' ~ _toggle_variant %}
|
|
78
|
+
{%- set _classes = _classes|merge(['btn-check']) %}
|
|
81
79
|
{% endif %}
|
|
82
80
|
|
|
83
|
-
{
|
|
84
|
-
{
|
|
81
|
+
{%- if attributes is empty %}
|
|
82
|
+
{%- set attributes = create_attribute() %}
|
|
85
83
|
{% endif %}
|
|
86
84
|
|
|
87
|
-
{
|
|
85
|
+
{%- set attributes = attributes.addClass(_classes).setAttribute('type', _input_type) %}
|
|
88
86
|
|
|
89
|
-
{
|
|
90
|
-
{
|
|
87
|
+
{%- if _id %}
|
|
88
|
+
{%- set attributes = attributes.setAttribute('id', _id) %}
|
|
91
89
|
{% endif %}
|
|
92
90
|
|
|
93
|
-
{
|
|
94
|
-
{
|
|
91
|
+
{%- if _required %}
|
|
92
|
+
{%- set attributes = attributes.setAttribute('required', true) %}
|
|
95
93
|
{% endif %}
|
|
96
94
|
|
|
97
|
-
{
|
|
98
|
-
{
|
|
95
|
+
{%- if _disabled %}
|
|
96
|
+
{%- set attributes = attributes.setAttribute('disabled', true) %}
|
|
99
97
|
{% endif %}
|
|
100
98
|
|
|
101
|
-
{
|
|
102
|
-
{
|
|
99
|
+
{%- if _readonly %}
|
|
100
|
+
{%- set attributes = attributes.setAttribute('readonly', true) %}
|
|
103
101
|
{% endif %}
|
|
104
102
|
|
|
105
|
-
{
|
|
106
|
-
{
|
|
103
|
+
{%- if _checked %}
|
|
104
|
+
{%- set attributes = attributes.setAttribute('checked', true) %}
|
|
107
105
|
{% endif %}
|
|
108
106
|
|
|
109
|
-
{
|
|
110
|
-
{
|
|
107
|
+
{%- if _placeholder is not empty %}
|
|
108
|
+
{%- set attributes = attributes.setAttribute('placeholder', _placeholder) %}
|
|
111
109
|
{% endif %}
|
|
112
110
|
|
|
113
|
-
{
|
|
114
|
-
{
|
|
111
|
+
{%- if _helper_text_id is not empty %}
|
|
112
|
+
{%- set attributes = attributes.setAttribute('aria-describedby', _helper_text_id) %}
|
|
115
113
|
{% endif %}
|
|
116
114
|
|
|
117
|
-
{
|
|
118
|
-
{
|
|
115
|
+
{%- if _label is not empty %}
|
|
116
|
+
{%- set _label_block -%}
|
|
119
117
|
<label
|
|
120
118
|
{% if _id %}
|
|
121
119
|
for="{{ _id }}"
|
|
@@ -124,50 +122,50 @@
|
|
|
124
122
|
>
|
|
125
123
|
{{- label -}}
|
|
126
124
|
</label>
|
|
127
|
-
{
|
|
125
|
+
{%- endset %}
|
|
128
126
|
{% endif %}
|
|
129
127
|
|
|
130
|
-
{
|
|
128
|
+
{%- if (_floating or _horizontal or _input_type == 'checkbox' or _input_type == 'radio') and
|
|
131
129
|
not _toggle and
|
|
132
130
|
not _remove_wrapper
|
|
133
131
|
%}
|
|
134
|
-
{
|
|
132
|
+
{%- set _wrapper_class = _floating ? 'form-floating' : '' %}
|
|
135
133
|
{% if (_input_type == 'checkbox' or _input_type == 'radio') %}
|
|
136
|
-
{
|
|
137
|
-
{
|
|
138
|
-
{
|
|
139
|
-
{
|
|
134
|
+
{%- set _wrapper_class = 'form-check' %}
|
|
135
|
+
{%- if _switch %}
|
|
136
|
+
{%- set _wrapper_class = _wrapper_class ~ ' form-switch' %}
|
|
137
|
+
{%- endif %}
|
|
140
138
|
{% endif %}
|
|
141
|
-
{% if _wrapper_class is not empty
|
|
139
|
+
{% if _wrapper_class is not empty -%}
|
|
142
140
|
<div class="{{ _wrapper_class }}">
|
|
143
|
-
{
|
|
141
|
+
{%- endif %}
|
|
144
142
|
{% endif %}
|
|
145
143
|
{% if _label_block and _floating == false and _input_type != 'checkbox' and _input_type != 'radio' %}
|
|
146
|
-
{{ _label_block|raw }}
|
|
147
|
-
{
|
|
148
|
-
{% if _horizontal and floating == false
|
|
144
|
+
{{- _label_block|raw }}
|
|
145
|
+
{%- endif %}
|
|
146
|
+
{% if _horizontal and floating == false -%}
|
|
149
147
|
<div class="{{ _horizontal_class }}">
|
|
150
|
-
{
|
|
148
|
+
{%- endif -%}
|
|
151
149
|
<input
|
|
152
150
|
{{ attributes }}
|
|
153
151
|
>
|
|
154
|
-
{
|
|
152
|
+
{%- if _horizontal and floating == false -%}
|
|
155
153
|
</div>
|
|
156
|
-
{
|
|
157
|
-
{% if _label_block and (_floating or _input_type == 'checkbox' or _input_type == 'radio')
|
|
158
|
-
{{ _label_block|raw }}
|
|
159
|
-
{
|
|
160
|
-
{% if _invalid_feedback is not empty
|
|
154
|
+
{%- endif %}
|
|
155
|
+
{% if _label_block and (_floating or _input_type == 'checkbox' or _input_type == 'radio') %}
|
|
156
|
+
{{- _label_block|raw }}
|
|
157
|
+
{%- endif %}
|
|
158
|
+
{% if _invalid_feedback is not empty -%}
|
|
161
159
|
<div class="invalid-feedback">
|
|
162
160
|
{{- _invalid_feedback -}}
|
|
163
161
|
</div>
|
|
164
|
-
{
|
|
165
|
-
{% if _valid_feedback is not empty
|
|
162
|
+
{%- endif %}
|
|
163
|
+
{% if _valid_feedback is not empty -%}
|
|
166
164
|
<div class="valid-feedback">
|
|
167
165
|
{{- _valid_feedback -}}
|
|
168
166
|
</div>
|
|
169
|
-
{
|
|
170
|
-
{% if _helper_text is not empty
|
|
167
|
+
{%- endif %}
|
|
168
|
+
{% if _helper_text is not empty -%}
|
|
171
169
|
<div
|
|
172
170
|
class="form-text"
|
|
173
171
|
{%- if _helper_text_id is not empty -%}
|
|
@@ -175,9 +173,7 @@
|
|
|
175
173
|
{%- endif -%}>
|
|
176
174
|
{{- _helper_text -}}
|
|
177
175
|
</div>
|
|
178
|
-
{
|
|
179
|
-
{% if _wrapper_class is not empty
|
|
176
|
+
{%- endif %}
|
|
177
|
+
{% if _wrapper_class is not empty -%}
|
|
180
178
|
</div>
|
|
181
|
-
{
|
|
182
|
-
|
|
183
|
-
{% endapply %}
|
|
179
|
+
{%- endif -%}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
{% apply spaceless %}
|
|
2
|
-
|
|
3
1
|
{#
|
|
4
2
|
Parameters:
|
|
5
3
|
- item (object) (default: {})
|
|
@@ -17,49 +15,48 @@ Parameters:
|
|
|
17
15
|
- attributes (drupal attrs)
|
|
18
16
|
#}
|
|
19
17
|
|
|
20
|
-
{
|
|
18
|
+
{%- set _item = item|default({}) %}
|
|
21
19
|
{% set _carousel_id = carousel_id|default('') %}
|
|
22
20
|
{% set _modal_id = modal_id|default('') %}
|
|
23
21
|
{% set _icon_path = icon_path|default('') %}
|
|
24
22
|
{% set _carousel_anchor = carousel_anchor|default('') %}
|
|
25
23
|
|
|
26
|
-
{
|
|
27
|
-
{
|
|
24
|
+
{%- if attributes is empty %}
|
|
25
|
+
{%- set attributes = create_attribute() %}
|
|
28
26
|
{% endif %}
|
|
29
27
|
|
|
30
|
-
{
|
|
28
|
+
{%- set attributes = attributes.addClass(['bcl-gallery__item', 'd-block', 'w-100', 'img-fluid'])
|
|
31
29
|
.setAttribute('data-bs-target', '#' ~ _carousel_id)
|
|
32
30
|
.setAttribute('data-bs-slide-to', _carousel_anchor)
|
|
33
31
|
.setAttribute('tabindex', '0')
|
|
34
|
-
|
|
32
|
+
-%}
|
|
35
33
|
|
|
36
|
-
<a
|
|
34
|
+
<a
|
|
37
35
|
{{ attributes }}
|
|
38
|
-
>
|
|
36
|
+
>{# -#}
|
|
39
37
|
<div class="bcl-gallery__item-overlay" data-bs-target="#{{ _modal_id }}" data-bs-toggle="modal">
|
|
40
|
-
{
|
|
38
|
+
{%- if _item.is_playable -%}
|
|
41
39
|
<span class="bcl-gallery__item-play-icon">
|
|
42
|
-
{
|
|
40
|
+
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
43
41
|
name: 'play-fill',
|
|
44
42
|
size: 's',
|
|
45
43
|
path: _icon_path,
|
|
46
|
-
} only
|
|
44
|
+
} only -%}
|
|
47
45
|
</span>
|
|
48
|
-
{
|
|
49
|
-
{
|
|
46
|
+
{%- endif %}
|
|
47
|
+
{%- if _item.caption is not empty or item.caption_title is not empty -%}
|
|
50
48
|
<div class="bcl-gallery__item-caption">
|
|
51
|
-
{
|
|
49
|
+
{%- if _item.caption_title is not empty -%}
|
|
52
50
|
<div class="fs-5">{{ _item.caption_title }}</div>
|
|
53
|
-
{
|
|
54
|
-
{
|
|
51
|
+
{%- endif %}
|
|
52
|
+
{%- if _item.caption is not empty -%}
|
|
55
53
|
<div class="bcl-gallery__item-description">
|
|
56
|
-
{{ _item.caption }}
|
|
54
|
+
{{- _item.caption -}}
|
|
57
55
|
</div>
|
|
58
|
-
{
|
|
56
|
+
{%- endif -%}
|
|
59
57
|
</div>
|
|
60
|
-
{
|
|
58
|
+
{%- endif -%}
|
|
61
59
|
</div>
|
|
62
|
-
{{ _item.thumbnail }}
|
|
60
|
+
{{- _item.thumbnail -}}
|
|
63
61
|
</a>
|
|
64
|
-
|
|
65
|
-
{% endapply %}
|
|
62
|
+
{#--#}
|