@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.
Files changed (84) hide show
  1. package/package.json +67 -67
  2. package/templates/bcl-accordion/accordion.html.twig +42 -46
  3. package/templates/bcl-alert/alert.html.twig +18 -21
  4. package/templates/bcl-badge/badge.html.twig +11 -15
  5. package/templates/bcl-banner/banner.html.twig +34 -37
  6. package/templates/bcl-base-templates/content-type.html.twig +63 -67
  7. package/templates/bcl-base-templates/listing-page.html.twig +31 -31
  8. package/templates/bcl-base-templates/sidebar-search.html.twig +10 -10
  9. package/templates/bcl-blockquote/blockquote.html.twig +17 -20
  10. package/templates/bcl-breadcrumb/breadcrumb.html.twig +24 -28
  11. package/templates/bcl-button/button.html.twig +24 -27
  12. package/templates/bcl-button-group/button-group.html.twig +25 -29
  13. package/templates/bcl-card/card.html.twig +98 -101
  14. package/templates/bcl-card-layout/card-layout.html.twig +34 -37
  15. package/templates/bcl-carousel/carousel.html.twig +64 -67
  16. package/templates/bcl-contact-form/contact-form.html.twig +1 -1
  17. package/templates/bcl-content-banner/content-banner.html.twig +37 -40
  18. package/templates/bcl-date-block/date-block.html.twig +26 -29
  19. package/templates/bcl-description-list/description-list-details.html.twig +6 -9
  20. package/templates/bcl-description-list/description-list-title.html.twig +11 -14
  21. package/templates/bcl-description-list/description-list.html.twig +44 -48
  22. package/templates/bcl-dropdown/dropdown.html.twig +48 -52
  23. package/templates/bcl-event/event.html.twig +7 -7
  24. package/templates/bcl-fact-figures/fact-figures.html.twig +34 -37
  25. package/templates/bcl-featured-media/featured-media.html.twig +42 -46
  26. package/templates/bcl-file/file-translations.html.twig +29 -32
  27. package/templates/bcl-file/file.html.twig +47 -50
  28. package/templates/bcl-footer/footer.html.twig +31 -34
  29. package/templates/bcl-form/form.html.twig +70 -73
  30. package/templates/bcl-form-input/form-input.html.twig +57 -61
  31. package/templates/bcl-gallery/gallery-item.html.twig +20 -23
  32. package/templates/bcl-gallery/gallery.html.twig +62 -66
  33. package/templates/bcl-glossary/glossary-detail.html.twig +19 -19
  34. package/templates/bcl-glossary/glossary-listing.html.twig +6 -6
  35. package/templates/bcl-group/group-landing.html.twig +69 -69
  36. package/templates/bcl-group/group.html.twig +19 -19
  37. package/templates/bcl-header/header.html.twig +71 -82
  38. package/templates/bcl-heading/heading.html.twig +13 -17
  39. package/templates/bcl-icon/icon.html.twig +10 -13
  40. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +20 -23
  41. package/templates/bcl-landing-page/landing-page.html.twig +33 -33
  42. package/templates/bcl-language-list/language-list-grid.html.twig +25 -28
  43. package/templates/bcl-language-list/language-list-modal.html.twig +52 -52
  44. package/templates/bcl-language-list/language-list.html.twig +33 -37
  45. package/templates/bcl-language-switcher/language-switcher.html.twig +12 -15
  46. package/templates/bcl-link/link.html.twig +24 -27
  47. package/templates/bcl-links-block/links-block.html.twig +30 -34
  48. package/templates/bcl-list-group/list-group.html.twig +43 -47
  49. package/templates/bcl-listing/listing.html.twig +88 -91
  50. package/templates/bcl-mega-menu/mega-menu-items.html.twig +18 -21
  51. package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +28 -26
  52. package/templates/bcl-mega-menu/mega-menu.html.twig +37 -38
  53. package/templates/bcl-modal/modal.html.twig +21 -23
  54. package/templates/bcl-navbar/navbar.html.twig +35 -38
  55. package/templates/bcl-navigation/navigation.html.twig +105 -110
  56. package/templates/bcl-offcanvas/offcanvas.html.twig +33 -36
  57. package/templates/bcl-page/page.html.twig +27 -27
  58. package/templates/bcl-pagination/pagination-item.html.twig +22 -26
  59. package/templates/bcl-pagination/pagination.html.twig +59 -62
  60. package/templates/bcl-pagination-v2/pagination-item.html.twig +31 -35
  61. package/templates/bcl-pagination-v2/pagination.html.twig +79 -82
  62. package/templates/bcl-person/person.html.twig +12 -12
  63. package/templates/bcl-placeholder/placeholder.html.twig +14 -18
  64. package/templates/bcl-progress/progress.html.twig +16 -20
  65. package/templates/bcl-project/project-lists.html.twig +25 -29
  66. package/templates/bcl-project/project.html.twig +35 -35
  67. package/templates/bcl-project-status/project-contributions.html.twig +25 -28
  68. package/templates/bcl-project-status/project-status.html.twig +32 -37
  69. package/templates/bcl-recent-activities/recent-activities.html.twig +13 -16
  70. package/templates/bcl-search/search.html.twig +12 -12
  71. package/templates/bcl-search-form/search-form.html.twig +21 -24
  72. package/templates/bcl-select/select.html.twig +52 -56
  73. package/templates/bcl-spinner/spinner.html.twig +10 -13
  74. package/templates/bcl-subscription/subscription-modal.html.twig +7 -7
  75. package/templates/bcl-subscription/subscription.html.twig +3 -3
  76. package/templates/bcl-subscription-block/subscription-block.html.twig +14 -17
  77. package/templates/bcl-table/table.html.twig +61 -65
  78. package/templates/bcl-textarea/textarea.html.twig +44 -47
  79. package/templates/bcl-timeline/timeline-item.html.twig +12 -15
  80. package/templates/bcl-timeline/timeline.html.twig +42 -45
  81. package/templates/bcl-toasts/toasts.html.twig +56 -60
  82. package/templates/bcl-user/user-compact.html.twig +24 -27
  83. package/templates/bcl-user/user-terms.html.twig +6 -6
  84. 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
  - content: (string) (default: '')
@@ -7,32 +5,31 @@
7
5
  - attributes (drupal attrs)
8
6
  #}
9
7
 
10
- {% set _title = title|default('') %}
8
+ {%- set _title = title|default('') %}
11
9
  {% set _content = content|default('') %}
12
10
  {% set _button = button|default({}) %}
13
11
 
14
- {% set _classes = ['bcl-subscription-block', 'text-bg-light', 'px-4-5', 'pt-4', 'pb-4-5'] %}
12
+ {%- set _classes = ['bcl-subscription-block', 'text-bg-light', 'px-4-5', 'pt-4', 'pb-4-5'] %}
15
13
 
16
- {% if attributes is empty %}
17
- {% set attributes = create_attribute() %}
14
+ {%- if attributes is empty %}
15
+ {%- set attributes = create_attribute() %}
18
16
  {% endif %}
19
17
 
20
- {% set attributes = attributes.addClass(_classes) %}
18
+ {%- set attributes = attributes.addClass(_classes) -%}
21
19
 
22
20
  <div
23
21
  {{ attributes }}
24
22
  >
25
- {% if _title is not empty %}
23
+ {%- if _title is not empty -%}
26
24
  <div class="fs-2 fw-normal">{{ _title }}</div>
27
- {% endif %}
28
- {% if _content is not empty %}
29
- {{ _content }}
30
- {% endif %}
31
- {% if _button is not empty %}
25
+ {%- endif %}
26
+ {%- if _content is not empty %}
27
+ {{- _content }}
28
+ {%- endif %}
29
+ {%- if _button is not empty -%}
32
30
  <div class="pb-2">
33
- {% include '@oe-bcl/bcl-button/button.html.twig' with _button only %}
31
+ {%- include '@oe-bcl/bcl-button/button.html.twig' with _button only -%}
34
32
  </div>
35
- {% endif %}
33
+ {%- endif -%}
36
34
  </div>
37
-
38
- {% endapply %}
35
+ {#--#}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - striped (boolean) (default: false)
5
3
  - hoverable (boolean) (default: false)
@@ -46,7 +44,7 @@
46
44
  - attributes (drupal attrs)
47
45
  #}
48
46
 
49
- {% set _striped = striped ?? false %}
47
+ {%- set _striped = striped ?? false %}
50
48
  {% set _hoverable = hoverable ?? false %}
51
49
  {% set _table_responsive = table_responsive|default('') %}
52
50
  {% set _variant = variant|default('') %}
@@ -60,42 +58,42 @@
60
58
  {% set _table_head = table_head|default({}) %}
61
59
  {% set _rows = rows|default([]) %}
62
60
 
63
- {% set _classes = ['table'] %}
61
+ {%- set _classes = ['table'] %}
64
62
  {% if _striped %}
65
- {% set _classes = _classes|merge(['table-striped']) %}
63
+ {%- set _classes = _classes|merge(['table-striped']) %}
66
64
  {% endif %}
67
65
  {% if _hoverable %}
68
- {% set _classes = _classes|merge(['table-hover']) %}
66
+ {%- set _classes = _classes|merge(['table-hover']) %}
69
67
  {% endif %}
70
68
  {% if _alignment is not empty %}
71
- {% set _classes = _classes|merge(['align-' ~ _alignment]) %}
69
+ {%- set _classes = _classes|merge(['align-' ~ _alignment]) %}
72
70
  {% endif %}
73
71
  {% if _variant is not empty %}
74
- {% set _classes = _classes|merge(['table-' ~ _variant]) %}
72
+ {%- set _classes = _classes|merge(['table-' ~ _variant]) %}
75
73
  {% endif %}
76
74
  {% if _small %}
77
- {% set _classes = _classes|merge(['table-sm']) %}
75
+ {%- set _classes = _classes|merge(['table-sm']) %}
78
76
  {% endif %}
79
77
  {% if _border is not empty %}
80
- {% set _classes = _classes|merge(['table-bordered', 'border-' ~ _border]) %}
78
+ {%- set _classes = _classes|merge(['table-bordered', 'border-' ~ _border]) %}
81
79
  {% endif %}
82
80
  {% if _borderless %}
83
- {% set _classes = _classes|merge(['table-borderless']) %}
81
+ {%- set _classes = _classes|merge(['table-borderless']) %}
84
82
  {% endif %}
85
83
 
86
- {% if attributes is empty %}
87
- {% set attributes = create_attribute() %}
84
+ {%- if attributes is empty %}
85
+ {%- set attributes = create_attribute() %}
88
86
  {% endif %}
89
87
 
90
- {% set attributes = attributes.addClass(_classes) %}
88
+ {%- set attributes = attributes.addClass(_classes) %}
91
89
 
92
- {% if _table_responsive is not empty %}
93
- {% set _responsive_class = 'table-responsive' %}
94
- {% if _table_responsive != 'all' %}
95
- {% set _responsive_class = _responsive_class ~ '-' ~ _table_responsive %}
96
- {% endif %}
90
+ {%- if _table_responsive is not empty %}
91
+ {%- set _responsive_class = 'table-responsive' %}
92
+ {%- if _table_responsive != 'all' %}
93
+ {%- set _responsive_class = _responsive_class ~ '-' ~ _table_responsive %}
94
+ {%- endif -%}
97
95
  <div class="{{ _responsive_class }}">
98
- {% endif %}
96
+ {%- endif -%}
99
97
 
100
98
  <table
101
99
  {{ attributes }}
@@ -109,87 +107,85 @@
109
107
  {{- _caption -}}
110
108
  </caption>
111
109
  {%- endif -%}
112
- {% if _table_head is not empty %}
110
+ {% if _table_head is not empty -%}
113
111
  <thead>
114
- {% if _table_head.cells is not empty and _table_head.cells is iterable %}
112
+ {%- if _table_head.cells is not empty and _table_head.cells is iterable -%}
115
113
  <tr>
116
- {% for _cell in _table_head.cells %}
114
+ {%- for _cell in _table_head.cells -%}
117
115
  <td
118
116
  {% if _cell.col_span is not empty %}
119
117
  colspan={{ _cell.col_span }}
120
- {% endif %}
118
+ {%- endif %}
121
119
  >
122
120
  {{- _cell.content -}}
123
121
  </td>
124
- {% endfor %}
122
+ {%- endfor -%}
125
123
  </tr>
126
- {% endif %}
124
+ {%- endif -%}
127
125
  </thead>
128
- {% endif %}
126
+ {%- endif %}
129
127
 
130
- {% if _rows is not empty and _rows is iterable %}
128
+ {%- if _rows is not empty and _rows is iterable -%}
131
129
  <tbody>
132
- {% for _row in _rows %}
133
- {% set _row_class = '' %}
134
- {% if _row.active %}
135
- {% set _row_class = 'table-active' %}
136
- {% endif %}
137
- {% if _row.alignment is not empty %}
138
- {% if _row_class is not empty %}
139
- {% set _row_class = _row_class ~ ' align-' ~ _row.alignment %}
140
- {% else %}
141
- {% set _row_class = 'align-' ~ _row.alignment %}
142
- {% endif %}
143
- {% endif %}
144
- {% if _row.variant is not empty %}
145
- {% if _row_class is not empty %}
146
- {% set _row_class = _row_class ~ ' table-' ~ _row.variant %}
147
- {% else %}
148
- {% set _row_class = 'table-' ~ _row.variant %}
149
- {% endif %}
150
- {% endif %}
130
+ {%- for _row in _rows %}
131
+ {%- set _row_class = '' %}
132
+ {%- if _row.active %}
133
+ {%- set _row_class = 'table-active' %}
134
+ {%- endif %}
135
+ {%- if _row.alignment is not empty %}
136
+ {%- if _row_class is not empty %}
137
+ {%- set _row_class = _row_class ~ ' align-' ~ _row.alignment %}
138
+ {%- else %}
139
+ {%- set _row_class = 'align-' ~ _row.alignment %}
140
+ {%- endif %}
141
+ {%- endif %}
142
+ {%- if _row.variant is not empty %}
143
+ {%- if _row_class is not empty %}
144
+ {%- set _row_class = _row_class ~ ' table-' ~ _row.variant %}
145
+ {%- else %}
146
+ {%- set _row_class = 'table-' ~ _row.variant %}
147
+ {%- endif %}
148
+ {%- endif -%}
151
149
  <tr
152
150
  {% if _row_class is not empty %}
153
151
  class="{{ _row_class }}"
154
152
  {% endif %}
155
153
  >
156
- {% if _row.cells is defined and _row.cells is not empty and _row.cells is iterable %}
157
- {% for _cell in _row.cells %}
154
+ {%- if _row.cells is defined and _row.cells is not empty and _row.cells is iterable %}
155
+ {%- for _cell in _row.cells -%}
158
156
  <td
159
157
  {% if _cell.col_span is defined and _cell.col_span is not empty %}
160
158
  colspan={{ _cell.col_span }}
161
- {% endif %}
159
+ {%- endif %}
162
160
  >
163
161
  {{- _cell.content -}}
164
162
  </td>
165
- {% endfor %}
166
- {% endif %}
163
+ {%- endfor %}
164
+ {%- endif -%}
167
165
  </tr>
168
- {% endfor %}
166
+ {%- endfor -%}
169
167
  </tbody>
170
- {% endif %}
168
+ {%- endif %}
171
169
 
172
- {% if _table_footer is not empty %}
170
+ {%- if _table_footer is not empty -%}
173
171
  <tfoot>
174
- {% if _table_footer.cells is not empty and _table_footer.cells is iterable %}
172
+ {%- if _table_footer.cells is not empty and _table_footer.cells is iterable -%}
175
173
  <tr>
176
- {% for _cell in _table_footer.cells %}
174
+ {%- for _cell in _table_footer.cells -%}
177
175
  <td
178
176
  {% if _cell.col_span is not empty %}
179
177
  colspan={{ _cell.col_span }}
180
- {% endif %}
178
+ {%- endif %}
181
179
  >
182
180
  {{- _cell.content -}}
183
181
  </td>
184
- {% endfor %}
182
+ {%- endfor -%}
185
183
  </tr>
186
- {% endif %}
184
+ {%- endif -%}
187
185
  </tfoot>
188
- {% endif %}
186
+ {%- endif -%}
189
187
  </table>
190
188
 
191
- {% if _table_responsive is not empty %}
189
+ {%- if _table_responsive is not empty -%}
192
190
  </div>
193
- {% endif %}
194
-
195
- {% endapply %}
191
+ {%- endif -%}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {#
4
2
  Parameters:
5
3
  - id (string) (default: '')
@@ -23,7 +21,7 @@
23
21
  - attributes (drupal attrs)
24
22
  #}
25
23
 
26
- {% set _id = id|default('') %}
24
+ {%- set _id = id|default('') %}
27
25
  {% set _label = label|default('') %}
28
26
  {% set _required = required ?? false %}
29
27
  {% set _disabled = disabled ?? false %}
@@ -42,60 +40,60 @@
42
40
  {% set _horizontal_class = horizontal_class|default('col-sm-10') %}
43
41
  {% set _horizontal_label_class = horizontal_label_class|default('col-sm-2') %}
44
42
 
45
- {% set _label_block = false %}
43
+ {%- set _label_block = false %}
46
44
  {% set _label_class = 'form-label' %}
47
45
  {% set _classes = ['form-control'] %}
48
46
 
49
- {% if _invalid is not empty %}
50
- {% set _classes = _classes|merge(['is-invalid']) %}
47
+ {%- if _invalid is not empty %}
48
+ {%- set _classes = _classes|merge(['is-invalid']) %}
51
49
  {% endif %}
52
50
  {% if _valid is not empty %}
53
- {% set _classes = _classes|merge(['is-valid']) %}
51
+ {%- set _classes = _classes|merge(['is-valid']) %}
54
52
  {% endif %}
55
53
  {% set _placeholder = placeholder|default('') %}
56
54
  {% if _horizontal %}
57
- {% set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
55
+ {%- set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
58
56
  {% endif %}
59
57
  {% if _hidden_label %}
60
- {% set _label_class = _label_class ~ ' visually-hidden' %}
58
+ {%- set _label_class = _label_class ~ ' visually-hidden' %}
61
59
  {% endif %}
62
60
 
63
- {% if attributes is empty %}
64
- {% set attributes = create_attribute() %}
61
+ {%- if attributes is empty %}
62
+ {%- set attributes = create_attribute() %}
65
63
  {% endif %}
66
64
 
67
- {% set attributes = attributes.addClass(_classes).setAttribute('rows', _rows) %}
65
+ {%- set attributes = attributes.addClass(_classes).setAttribute('rows', _rows) %}
68
66
 
69
- {% if _id %}
70
- {% set attributes = attributes.setAttribute('id', _id) %}
67
+ {%- if _id %}
68
+ {%- set attributes = attributes.setAttribute('id', _id) %}
71
69
  {% endif %}
72
70
 
73
- {% if _required %}
74
- {% set attributes = attributes.setAttribute('required', true) %}
71
+ {%- if _required %}
72
+ {%- set attributes = attributes.setAttribute('required', true) %}
75
73
  {% endif %}
76
74
 
77
- {% if _disabled %}
78
- {% set attributes = attributes.setAttribute('disabled', true) %}
75
+ {%- if _disabled %}
76
+ {%- set attributes = attributes.setAttribute('disabled', true) %}
79
77
  {% endif %}
80
78
 
81
- {% if _readonly %}
82
- {% set attributes = attributes.setAttribute('readonly', true) %}
79
+ {%- if _readonly %}
80
+ {%- set attributes = attributes.setAttribute('readonly', true) %}
83
81
  {% endif %}
84
82
 
85
- {% if _placeholder is not empty %}
86
- {% set attributes = attributes.setAttribute('placeholder', _placeholder) %}
83
+ {%- if _placeholder is not empty %}
84
+ {%- set attributes = attributes.setAttribute('placeholder', _placeholder) %}
87
85
  {% endif %}
88
86
 
89
- {% if _helper_text_id is not empty %}
90
- {% set attributes = attributes.setAttribute('aria-describedby', _helper_text_id) %}
87
+ {%- if _helper_text_id is not empty %}
88
+ {%- set attributes = attributes.setAttribute('aria-describedby', _helper_text_id) %}
91
89
  {% endif %}
92
90
 
93
- {% if _floating or _horizontal %}
94
- {% set _wrapper_class = _floating ? 'form-floating' : 'row' %}
91
+ {%- if _floating or _horizontal %}
92
+ {% set _wrapper_class = _floating ? 'form-floating' : 'row' -%}
95
93
  <div class="{{ _wrapper_class }}">
96
- {% endif %}
94
+ {%- endif %}
97
95
  {% if _label is not empty %}
98
- {% set _label_block %}
96
+ {%- set _label_block -%}
99
97
  <label
100
98
  {% if _id %}
101
99
  for="{{ _id|e('html_attr') }}"
@@ -104,37 +102,37 @@
104
102
  >
105
103
  {{- label -}}
106
104
  </label>
107
- {% endset %}
105
+ {%- endset %}
108
106
  {% endif %}
109
107
 
110
- {% if _label_block and _floating == false %}
111
- {{ _label_block|raw }}
112
- {% endif %}
113
- {% if _horizontal and floating == false %}
108
+ {%- if _label_block and _floating == false %}
109
+ {{- _label_block|raw }}
110
+ {%- endif %}
111
+ {% if _horizontal and floating == false -%}
114
112
  <div class="{{ _horizontal_class }}">
115
- {% endif %}
113
+ {%- endif -%}
116
114
  <textarea
117
115
  {{ attributes }}
118
116
  >
119
117
  {{- _text -}}
120
118
  </textarea>
121
- {% if _horizontal and floating == false %}
119
+ {%- if _horizontal and floating == false -%}
122
120
  </div>
123
- {% endif %}
121
+ {%- endif %}
124
122
  {% if _label_block and _floating %}
125
- {{ _label_block|raw }}
126
- {% endif %}
127
- {% if _invalid_feedback is not empty %}
123
+ {{- _label_block|raw }}
124
+ {%- endif %}
125
+ {% if _invalid_feedback is not empty -%}
128
126
  <div class="invalid-feedback">
129
127
  {{- _invalid_feedback -}}
130
128
  </div>
131
- {% endif %}
132
- {% if _valid_feedback is not empty %}
129
+ {%- endif %}
130
+ {% if _valid_feedback is not empty -%}
133
131
  <div class="valid-feedback">
134
132
  {{- _valid_feedback -}}
135
133
  </div>
136
- {% endif %}
137
- {% if _helper_text is not empty %}
134
+ {%- endif %}
135
+ {% if _helper_text is not empty -%}
138
136
  <div
139
137
  class="form-text"
140
138
  {%- if _helper_text_id is not empty -%}
@@ -142,8 +140,7 @@
142
140
  {%- endif -%}>
143
141
  {{- _helper_text -}}
144
142
  </div>
145
- {% endif %}
146
- {% if _floating or _horizontal %}
143
+ {%- endif %}
144
+ {% if _floating or _horizontal -%}
147
145
  </div>
148
- {% endif %}
149
- {% endapply %}
146
+ {%- endif -%}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - id (string) (default: '')
5
3
  - label (string) (default: '')
@@ -7,28 +5,27 @@
7
5
  - content (string) (default: '')
8
6
  #}
9
7
 
10
- {% set _id = id|default('') %}
8
+ {%- set _id = id|default('') %}
11
9
  {% set _label = label|default('') %}
12
10
  {% set _title = title|default('') %}
13
11
  {% set _content = content|default('') %}
14
12
 
15
- {% if attributes is empty %}
16
- {% set attributes = create_attribute() %}
13
+ {%- if attributes is empty %}
14
+ {%- set attributes = create_attribute() %}
17
15
  {% endif %}
18
16
 
19
- {% if _id is not empty %}
20
- {% set attributes = attributes.setAttribute('id', _id) %}
21
- {% endif %}
17
+ {%- if _id is not empty %}
18
+ {%- set attributes = attributes.setAttribute('id', _id) %}
19
+ {% endif -%}
22
20
 
23
21
  <li
24
- {{ attributes }}>
22
+ {{ attributes }}>{# -#}
25
23
  <p class="fs-5 mb-1 fw-medium">{{ _label }}</p>
26
- {% if _title is not empty %}
24
+ {%- if _title is not empty -%}
27
25
  <p class="fs-6 mb-1 fw-medium">{{ _title }}</p>
28
- {% endif %}
29
- {% if _content is not empty %}
26
+ {%- endif %}
27
+ {%- if _content is not empty -%}
30
28
  <div>{{ _content }}</div>
31
- {% endif %}
29
+ {%- endif -%}
32
30
  </li>
33
-
34
- {% endapply %}
31
+ {#--#}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {#
4
2
  Parameters:
5
3
  - id: (integer) (default: random(10000))
@@ -25,7 +23,7 @@ Parameters:
25
23
  - icon_path (string) (default: ''): file containing the svg icons
26
24
  #}
27
25
 
28
- {% set _id = id|default(random(10000)) %}
26
+ {%- set _id = id|default(random(10000)) %}
29
27
  {% set _title = title|default('') %}
30
28
  {% set _title_tag = title_tag|default('h2') %}
31
29
  {% set _title_link = title_link|default({}) %}
@@ -37,33 +35,33 @@ Parameters:
37
35
  {% set _hide_to = hide.to|default(items|length) %}
38
36
  {% set _icon_path = icon_path|default('') %}
39
37
 
40
- {% if attributes is empty %}
41
- {% set attributes = create_attribute() %}
38
+ {%- if attributes is empty %}
39
+ {%- set attributes = create_attribute() %}
42
40
  {% endif %}
43
41
 
44
- {% set attributes = attributes.addClass('bcl-timeline') %}
42
+ {%- set attributes = attributes.addClass('bcl-timeline') %}
45
43
 
46
- {# Internal logic - Process properties #}
44
+ {#- Internal logic - Process properties #}
47
45
 
48
- {% set _display_amount = items|length %}
46
+ {%- set _display_amount = items|length %}
49
47
  {% set _hide_amount = 0 %}
50
48
  {% set _bottom_amount = 0 %}
51
49
 
52
- {% if _hide_from > 0 %}
53
- {% if _hide_to > 0 %}
54
- {% set _bottom_amount = _display_amount - _hide_to %}
55
- {% else %}
56
- {% set _bottom_amount = _hide_to|abs %}
57
- {% endif %}
58
- {% set _countbase = items|length - _bottom_amount %}
59
- {% set _display_amount = _hide_from %}
60
- {% set _hide_amount = _countbase - _display_amount %}
61
- {% set _toggle_collapsed = _toggle_collapsed|replace({'%d': _hide_amount}) %}
62
- {% set _toggle_expanded = _toggle_expanded|replace({'%d': _hide_amount}) %}
50
+ {%- if _hide_from > 0 %}
51
+ {%- if _hide_to > 0 %}
52
+ {%- set _bottom_amount = _display_amount - _hide_to %}
53
+ {%- else %}
54
+ {%- set _bottom_amount = _hide_to|abs %}
55
+ {%- endif %}
56
+ {%- set _countbase = items|length - _bottom_amount %}
57
+ {%- set _display_amount = _hide_from %}
58
+ {%- set _hide_amount = _countbase - _display_amount %}
59
+ {%- set _toggle_collapsed = _toggle_collapsed|replace({'%d': _hide_amount}) %}
60
+ {%- set _toggle_expanded = _toggle_expanded|replace({'%d': _hide_amount}) %}
63
61
  {% endif %}
64
62
 
65
- {% if _title is not empty %}
66
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
63
+ {%- if _title is not empty %}
64
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
67
65
  title: _title,
68
66
  title_tag: _title_tag,
69
67
  title_link: _title_link,
@@ -71,45 +69,44 @@ Parameters:
71
69
  } only %}
72
70
  {% endif %}
73
71
 
74
- {# Print the result #}
72
+ {#- Print the result -#}
75
73
  <ol {{ attributes }}>
76
- {% if _items is not empty %}
77
- {% for _item in _items %}
78
- {# Decide on per item if it should display. #}
79
- {% if _item.attributes is empty %}
80
- {% set _item = _item|merge({
74
+ {%- if _items is not empty %}
75
+ {%- for _item in _items %}
76
+ {#- Decide on per item if it should display. #}
77
+ {%- if _item.attributes is empty %}
78
+ {%- set _item = _item|merge({
81
79
  attributes: create_attribute()
82
80
  }) %}
83
- {% endif %}
84
- {% if loop.index > _display_amount and loop.revindex > _bottom_amount %}
85
- {% set _item = _item|merge({
81
+ {%- endif %}
82
+ {%- if loop.index > _display_amount and loop.revindex > _bottom_amount %}
83
+ {%- set _item = _item|merge({
86
84
  attributes: _item.attributes.addClass('collapse', 'collapse-' ~ _id)
87
85
  }) %}
88
- {% endif %}
89
- {% include '@oe-bcl/bcl-timeline/timeline-item.html.twig' with _item only %}
90
- {# Display the show more button if required. #}
91
- {% if (_hide_amount > 0 and loop.revindex == _bottom_amount + 1) or (_hide_amount > 0 and _hide_to == 0 and loop.revindex == 1) %}
92
- <li class="bcl-timeline__item--toggle">
86
+ {%- endif %}
87
+ {%- include '@oe-bcl/bcl-timeline/timeline-item.html.twig' with _item only %}
88
+ {#- Display the show more button if required. #}
89
+ {%- if (_hide_amount > 0 and loop.revindex == _bottom_amount + 1) or (_hide_amount > 0 and _hide_to == 0 and loop.revindex == 1) -%}
90
+ <li class="bcl-timeline__item--toggle">{# -#}
93
91
  <button
94
92
  aria-expanded="false"
95
93
  data-bs-toggle="collapse"
96
94
  data-bs-target=".collapse-{{ _id }}"
97
95
  class="btn btn-light btn-md"
98
96
  type="button"
99
- >
100
- <span class="label-collapsed">{{ _toggle_collapsed }}</span>
97
+ >{# -#}
98
+ <span class="label-collapsed">{{ _toggle_collapsed }}</span>{# -#}
101
99
  <span class="label-expanded">{{ _toggle_expanded }}</span>
102
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
100
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
103
101
  name: 'chevron-down',
104
102
  size: 'fluid',
105
103
  path: _icon_path,
106
104
  attributes: create_attribute().addClass('ms-2-5'),
107
- } only %}
108
- </button>
105
+ } only -%}
106
+ </button>{# -#}
109
107
  </li>
110
- {% endif %}
111
- {% endfor %}
112
- {% endif %}
108
+ {%- endif %}
109
+ {%- endfor %}
110
+ {%- endif -%}
113
111
  </ol>
114
-
115
- {% endapply %}
112
+ {#--#}