@openeuropa/bcl-twig-templates 0.4230.202512021730 → 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 -43
  3. package/templates/bcl-alert/alert.html.twig +18 -18
  4. package/templates/bcl-badge/badge.html.twig +11 -12
  5. package/templates/bcl-banner/banner.html.twig +34 -34
  6. package/templates/bcl-base-templates/content-type.html.twig +63 -64
  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 -17
  10. package/templates/bcl-breadcrumb/breadcrumb.html.twig +24 -25
  11. package/templates/bcl-button/button.html.twig +24 -24
  12. package/templates/bcl-button-group/button-group.html.twig +25 -26
  13. package/templates/bcl-card/card.html.twig +98 -98
  14. package/templates/bcl-card-layout/card-layout.html.twig +34 -34
  15. package/templates/bcl-carousel/carousel.html.twig +64 -64
  16. package/templates/bcl-contact-form/contact-form.html.twig +1 -1
  17. package/templates/bcl-content-banner/content-banner.html.twig +37 -37
  18. package/templates/bcl-date-block/date-block.html.twig +26 -26
  19. package/templates/bcl-description-list/description-list-details.html.twig +6 -6
  20. package/templates/bcl-description-list/description-list-title.html.twig +11 -11
  21. package/templates/bcl-description-list/description-list.html.twig +44 -45
  22. package/templates/bcl-dropdown/dropdown.html.twig +48 -49
  23. package/templates/bcl-event/event.html.twig +7 -7
  24. package/templates/bcl-fact-figures/fact-figures.html.twig +34 -34
  25. package/templates/bcl-featured-media/featured-media.html.twig +42 -43
  26. package/templates/bcl-file/file-translations.html.twig +29 -29
  27. package/templates/bcl-file/file.html.twig +46 -46
  28. package/templates/bcl-footer/footer.html.twig +31 -31
  29. package/templates/bcl-form/form.html.twig +70 -70
  30. package/templates/bcl-form-input/form-input.html.twig +57 -58
  31. package/templates/bcl-gallery/gallery-item.html.twig +20 -20
  32. package/templates/bcl-gallery/gallery.html.twig +62 -63
  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 -79
  38. package/templates/bcl-heading/heading.html.twig +13 -14
  39. package/templates/bcl-icon/icon.html.twig +10 -10
  40. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +20 -20
  41. package/templates/bcl-landing-page/landing-page.html.twig +33 -33
  42. package/templates/bcl-language-list/language-list-grid.html.twig +25 -25
  43. package/templates/bcl-language-list/language-list-modal.html.twig +52 -52
  44. package/templates/bcl-language-list/language-list.html.twig +33 -34
  45. package/templates/bcl-language-switcher/language-switcher.html.twig +12 -12
  46. package/templates/bcl-link/link.html.twig +24 -24
  47. package/templates/bcl-links-block/links-block.html.twig +29 -30
  48. package/templates/bcl-list-group/list-group.html.twig +43 -44
  49. package/templates/bcl-listing/listing.html.twig +88 -88
  50. package/templates/bcl-mega-menu/mega-menu-items.html.twig +18 -18
  51. package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +27 -22
  52. package/templates/bcl-mega-menu/mega-menu.html.twig +37 -35
  53. package/templates/bcl-modal/modal.html.twig +17 -17
  54. package/templates/bcl-navbar/navbar.html.twig +35 -35
  55. package/templates/bcl-navigation/navigation.html.twig +106 -106
  56. package/templates/bcl-offcanvas/offcanvas.html.twig +33 -33
  57. package/templates/bcl-page/page.html.twig +27 -27
  58. package/templates/bcl-pagination/pagination-item.html.twig +22 -23
  59. package/templates/bcl-pagination/pagination.html.twig +59 -59
  60. package/templates/bcl-pagination-v2/pagination-item.html.twig +31 -32
  61. package/templates/bcl-pagination-v2/pagination.html.twig +79 -79
  62. package/templates/bcl-person/person.html.twig +12 -12
  63. package/templates/bcl-placeholder/placeholder.html.twig +14 -15
  64. package/templates/bcl-progress/progress.html.twig +16 -17
  65. package/templates/bcl-project/project-lists.html.twig +25 -25
  66. package/templates/bcl-project/project.html.twig +35 -35
  67. package/templates/bcl-project-status/project-contributions.html.twig +25 -25
  68. package/templates/bcl-project-status/project-status.html.twig +32 -34
  69. package/templates/bcl-recent-activities/recent-activities.html.twig +13 -13
  70. package/templates/bcl-search/search.html.twig +12 -12
  71. package/templates/bcl-search-form/search-form.html.twig +21 -21
  72. package/templates/bcl-select/select.html.twig +52 -53
  73. package/templates/bcl-spinner/spinner.html.twig +10 -10
  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 -14
  77. package/templates/bcl-table/table.html.twig +61 -62
  78. package/templates/bcl-textarea/textarea.html.twig +44 -44
  79. package/templates/bcl-timeline/timeline-item.html.twig +12 -12
  80. package/templates/bcl-timeline/timeline.html.twig +42 -42
  81. package/templates/bcl-toasts/toasts.html.twig +56 -57
  82. package/templates/bcl-user/user-compact.html.twig +24 -24
  83. package/templates/bcl-user/user-terms.html.twig +6 -6
  84. package/templates/bcl-user/user.html.twig +117 -117
@@ -21,7 +21,7 @@
21
21
  - attributes (drupal attrs)
22
22
  #}
23
23
 
24
- {% set _id = id|default('') %}
24
+ {%- set _id = id|default('') %}
25
25
  {% set _label = label|default('') %}
26
26
  {% set _required = required ?? false %}
27
27
  {% set _disabled = disabled ?? false %}
@@ -40,60 +40,60 @@
40
40
  {% set _horizontal_class = horizontal_class|default('col-sm-10') %}
41
41
  {% set _horizontal_label_class = horizontal_label_class|default('col-sm-2') %}
42
42
 
43
- {% set _label_block = false %}
43
+ {%- set _label_block = false %}
44
44
  {% set _label_class = 'form-label' %}
45
45
  {% set _classes = ['form-control'] %}
46
46
 
47
- {% if _invalid is not empty %}
48
- {% set _classes = _classes|merge(['is-invalid']) %}
47
+ {%- if _invalid is not empty %}
48
+ {%- set _classes = _classes|merge(['is-invalid']) %}
49
49
  {% endif %}
50
50
  {% if _valid is not empty %}
51
- {% set _classes = _classes|merge(['is-valid']) %}
51
+ {%- set _classes = _classes|merge(['is-valid']) %}
52
52
  {% endif %}
53
53
  {% set _placeholder = placeholder|default('') %}
54
54
  {% if _horizontal %}
55
- {% set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
55
+ {%- set _label_class = 'col-form-label ' ~ _horizontal_label_class %}
56
56
  {% endif %}
57
57
  {% if _hidden_label %}
58
- {% set _label_class = _label_class ~ ' visually-hidden' %}
58
+ {%- set _label_class = _label_class ~ ' visually-hidden' %}
59
59
  {% endif %}
60
60
 
61
- {% if attributes is empty %}
62
- {% set attributes = create_attribute() %}
61
+ {%- if attributes is empty %}
62
+ {%- set attributes = create_attribute() %}
63
63
  {% endif %}
64
64
 
65
- {% set attributes = attributes.addClass(_classes).setAttribute('rows', _rows) %}
65
+ {%- set attributes = attributes.addClass(_classes).setAttribute('rows', _rows) %}
66
66
 
67
- {% if _id %}
68
- {% set attributes = attributes.setAttribute('id', _id) %}
67
+ {%- if _id %}
68
+ {%- set attributes = attributes.setAttribute('id', _id) %}
69
69
  {% endif %}
70
70
 
71
- {% if _required %}
72
- {% set attributes = attributes.setAttribute('required', true) %}
71
+ {%- if _required %}
72
+ {%- set attributes = attributes.setAttribute('required', true) %}
73
73
  {% endif %}
74
74
 
75
- {% if _disabled %}
76
- {% set attributes = attributes.setAttribute('disabled', true) %}
75
+ {%- if _disabled %}
76
+ {%- set attributes = attributes.setAttribute('disabled', true) %}
77
77
  {% endif %}
78
78
 
79
- {% if _readonly %}
80
- {% set attributes = attributes.setAttribute('readonly', true) %}
79
+ {%- if _readonly %}
80
+ {%- set attributes = attributes.setAttribute('readonly', true) %}
81
81
  {% endif %}
82
82
 
83
- {% if _placeholder is not empty %}
84
- {% set attributes = attributes.setAttribute('placeholder', _placeholder) %}
83
+ {%- if _placeholder is not empty %}
84
+ {%- set attributes = attributes.setAttribute('placeholder', _placeholder) %}
85
85
  {% endif %}
86
86
 
87
- {% if _helper_text_id is not empty %}
88
- {% 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) %}
89
89
  {% endif %}
90
90
 
91
- {% if _floating or _horizontal %}
92
- {% set _wrapper_class = _floating ? 'form-floating' : 'row' %}
91
+ {%- if _floating or _horizontal %}
92
+ {% set _wrapper_class = _floating ? 'form-floating' : 'row' -%}
93
93
  <div class="{{ _wrapper_class }}">
94
- {% endif %}
94
+ {%- endif %}
95
95
  {% if _label is not empty %}
96
- {% set _label_block %}
96
+ {%- set _label_block -%}
97
97
  <label
98
98
  {% if _id %}
99
99
  for="{{ _id|e('html_attr') }}"
@@ -102,37 +102,37 @@
102
102
  >
103
103
  {{- label -}}
104
104
  </label>
105
- {% endset %}
105
+ {%- endset %}
106
106
  {% endif %}
107
107
 
108
- {% if _label_block and _floating == false %}
109
- {{ _label_block|raw }}
110
- {% endif %}
111
- {% if _horizontal and floating == false %}
108
+ {%- if _label_block and _floating == false %}
109
+ {{- _label_block|raw }}
110
+ {%- endif %}
111
+ {% if _horizontal and floating == false -%}
112
112
  <div class="{{ _horizontal_class }}">
113
- {% endif %}
113
+ {%- endif -%}
114
114
  <textarea
115
115
  {{ attributes }}
116
116
  >
117
117
  {{- _text -}}
118
118
  </textarea>
119
- {% if _horizontal and floating == false %}
119
+ {%- if _horizontal and floating == false -%}
120
120
  </div>
121
- {% endif %}
121
+ {%- endif %}
122
122
  {% if _label_block and _floating %}
123
- {{ _label_block|raw }}
124
- {% endif %}
125
- {% if _invalid_feedback is not empty %}
123
+ {{- _label_block|raw }}
124
+ {%- endif %}
125
+ {% if _invalid_feedback is not empty -%}
126
126
  <div class="invalid-feedback">
127
127
  {{- _invalid_feedback -}}
128
128
  </div>
129
- {% endif %}
130
- {% if _valid_feedback is not empty %}
129
+ {%- endif %}
130
+ {% if _valid_feedback is not empty -%}
131
131
  <div class="valid-feedback">
132
132
  {{- _valid_feedback -}}
133
133
  </div>
134
- {% endif %}
135
- {% if _helper_text is not empty %}
134
+ {%- endif %}
135
+ {% if _helper_text is not empty -%}
136
136
  <div
137
137
  class="form-text"
138
138
  {%- if _helper_text_id is not empty -%}
@@ -140,7 +140,7 @@
140
140
  {%- endif -%}>
141
141
  {{- _helper_text -}}
142
142
  </div>
143
- {% endif %}
144
- {% if _floating or _horizontal %}
143
+ {%- endif %}
144
+ {% if _floating or _horizontal -%}
145
145
  </div>
146
- {% endif %}
146
+ {%- endif -%}
@@ -5,27 +5,27 @@
5
5
  - content (string) (default: '')
6
6
  #}
7
7
 
8
- {% set _id = id|default('') %}
8
+ {%- set _id = id|default('') %}
9
9
  {% set _label = label|default('') %}
10
10
  {% set _title = title|default('') %}
11
11
  {% set _content = content|default('') %}
12
12
 
13
- {% if attributes is empty %}
14
- {% set attributes = create_attribute() %}
13
+ {%- if attributes is empty %}
14
+ {%- set attributes = create_attribute() %}
15
15
  {% endif %}
16
16
 
17
- {% if _id is not empty %}
18
- {% set attributes = attributes.setAttribute('id', _id) %}
19
- {% endif %}
17
+ {%- if _id is not empty %}
18
+ {%- set attributes = attributes.setAttribute('id', _id) %}
19
+ {% endif -%}
20
20
 
21
21
  <li
22
- {{ attributes }}>
22
+ {{ attributes }}>{# -#}
23
23
  <p class="fs-5 mb-1 fw-medium">{{ _label }}</p>
24
- {% if _title is not empty %}
24
+ {%- if _title is not empty -%}
25
25
  <p class="fs-6 mb-1 fw-medium">{{ _title }}</p>
26
- {% endif %}
27
- {% if _content is not empty %}
26
+ {%- endif %}
27
+ {%- if _content is not empty -%}
28
28
  <div>{{ _content }}</div>
29
- {% endif %}
29
+ {%- endif -%}
30
30
  </li>
31
-
31
+ {#--#}
@@ -23,7 +23,7 @@ Parameters:
23
23
  - icon_path (string) (default: ''): file containing the svg icons
24
24
  #}
25
25
 
26
- {% set _id = id|default(random(10000)) %}
26
+ {%- set _id = id|default(random(10000)) %}
27
27
  {% set _title = title|default('') %}
28
28
  {% set _title_tag = title_tag|default('h2') %}
29
29
  {% set _title_link = title_link|default({}) %}
@@ -35,33 +35,33 @@ Parameters:
35
35
  {% set _hide_to = hide.to|default(items|length) %}
36
36
  {% set _icon_path = icon_path|default('') %}
37
37
 
38
- {% if attributes is empty %}
39
- {% set attributes = create_attribute() %}
38
+ {%- if attributes is empty %}
39
+ {%- set attributes = create_attribute() %}
40
40
  {% endif %}
41
41
 
42
- {% set attributes = attributes.addClass('bcl-timeline') %}
42
+ {%- set attributes = attributes.addClass('bcl-timeline') %}
43
43
 
44
- {# Internal logic - Process properties #}
44
+ {#- Internal logic - Process properties #}
45
45
 
46
- {% set _display_amount = items|length %}
46
+ {%- set _display_amount = items|length %}
47
47
  {% set _hide_amount = 0 %}
48
48
  {% set _bottom_amount = 0 %}
49
49
 
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}) %}
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}) %}
61
61
  {% endif %}
62
62
 
63
- {% if _title is not empty %}
64
- {% 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 {
65
65
  title: _title,
66
66
  title_tag: _title_tag,
67
67
  title_link: _title_link,
@@ -69,44 +69,44 @@ Parameters:
69
69
  } only %}
70
70
  {% endif %}
71
71
 
72
- {# Print the result #}
72
+ {#- Print the result -#}
73
73
  <ol {{ attributes }}>
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({
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({
79
79
  attributes: create_attribute()
80
80
  }) %}
81
- {% endif %}
82
- {% if loop.index > _display_amount and loop.revindex > _bottom_amount %}
83
- {% set _item = _item|merge({
81
+ {%- endif %}
82
+ {%- if loop.index > _display_amount and loop.revindex > _bottom_amount %}
83
+ {%- set _item = _item|merge({
84
84
  attributes: _item.attributes.addClass('collapse', 'collapse-' ~ _id)
85
85
  }) %}
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">
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">{# -#}
91
91
  <button
92
92
  aria-expanded="false"
93
93
  data-bs-toggle="collapse"
94
94
  data-bs-target=".collapse-{{ _id }}"
95
95
  class="btn btn-light btn-md"
96
96
  type="button"
97
- >
98
- <span class="label-collapsed">{{ _toggle_collapsed }}</span>
97
+ >{# -#}
98
+ <span class="label-collapsed">{{ _toggle_collapsed }}</span>{# -#}
99
99
  <span class="label-expanded">{{ _toggle_expanded }}</span>
100
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with {
100
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
101
101
  name: 'chevron-down',
102
102
  size: 'fluid',
103
103
  path: _icon_path,
104
104
  attributes: create_attribute().addClass('ms-2-5'),
105
- } only %}
106
- </button>
105
+ } only -%}
106
+ </button>{# -#}
107
107
  </li>
108
- {% endif %}
109
- {% endfor %}
110
- {% endif %}
108
+ {%- endif %}
109
+ {%- endfor %}
110
+ {%- endif -%}
111
111
  </ol>
112
-
112
+ {#--#}
@@ -24,106 +24,105 @@
24
24
  - attributes (drupal attrs)
25
25
  #}
26
26
 
27
- {% set _with_wrapper = with_wrapper ?? false %}
27
+ {%- set _with_wrapper = with_wrapper ?? false %}
28
28
  {% set _wrapper_classes = wrapper_classes|default('') %}
29
29
  {% set _wrapper_aria_live = wrapper_aria_live|default('') %}
30
30
  {% set _with_container = with_container ?? false %}
31
31
  {% set _toasts = toasts|default([]) %}
32
32
 
33
- {% set _container_classes = 'toast-container' %}
33
+ {%- set _container_classes = 'toast-container' %}
34
34
 
35
- {% if container_classes %}
36
- {% set _container_classes = _container_classes ~ ' ' ~ container_classes %}
35
+ {%- if container_classes %}
36
+ {%- set _container_classes = _container_classes ~ ' ' ~ container_classes %}
37
37
  {% endif %}
38
38
 
39
- {% if attributes is empty %}
40
- {% set attributes = create_attribute() %}
39
+ {%- if attributes is empty %}
40
+ {%- set attributes = create_attribute() %}
41
41
  {% endif %}
42
42
 
43
- {# wrapper #}
43
+ {#- wrapper #}
44
44
  {% if _with_wrapper %}
45
- {% set attributes = attributes.setAttribute('aria-atomic', "true") %}
46
- {% if _wrapper_aria_live %}
47
- {% set attributes = attributes.setAttribute('aria-live', _wrapper_aria_live) %}
48
- {% endif %}
49
- {% if _wrapper_classes %}
50
- {% set attributes = attributes.addClass(_wrapper_classes|split(' ')) %}
51
- {% endif %}
45
+ {%- set attributes = attributes.setAttribute('aria-atomic', "true") %}
46
+ {%- if _wrapper_aria_live %}
47
+ {%- set attributes = attributes.setAttribute('aria-live', _wrapper_aria_live) %}
48
+ {%- endif %}
49
+ {%- if _wrapper_classes %}
50
+ {%- set attributes = attributes.addClass(_wrapper_classes|split(' ')) %}
51
+ {%- endif -%}
52
52
 
53
53
  <div {{ attributes }}>
54
54
 
55
- {% endif %}
55
+ {%- endif %}
56
56
  {# container #}
57
- {% if _with_container %}
57
+ {% if _with_container -%}
58
58
  <div class="{{ _container_classes }}">
59
- {% endif %}
59
+ {%- endif %}
60
60
  {# toasts #}
61
61
  {% if _toasts is not empty %}
62
- {% for _toast in _toasts %}
63
- {% set _classes = ['toast'] %}
64
- {% set _body = _toast.body|default('') %}
65
- {% set _role = _toast.role|default('') %}
66
- {% set _with_close = _toast.with_close ?? true %}
67
- {% set _aria_live = _toast.aria_live|default('') %}
68
- {% set _autohide = _toast.autohide ?? true %}
69
- {% set _with_body_wrapper = _toast.with_body_wrapper ?? false %}
70
- {% set _body_wrapper_classes = _toast.body_wrapper_classes|default('') %}
71
- {% set _toast_attributes = _toast.attributes ?: create_attribute() %}
72
- {% set _body_attributes = _toast.body_attributes ?: create_attribute() %}
73
- {% set _header_attributes = _toast.header_attributes ?: create_attribute() %}
74
- {% set _button_attributes = _toast.button_attributes ?: create_attribute() %}
75
- {% set _toast_attributes = _toast_attributes.addClass(_classes).setAttribute('aria-atomic', 'true') %}
76
- {% if _aria_live is not empty %}
77
- {% set _toast_attributes = _toast_attributes.setAttribute('aria-live', _aria_live) %}
78
- {% endif %}
79
- {% if _role is not empty %}
80
- {% set _toast_attributes = _toast_attributes.setAttribute('role', _role) %}
81
- {% endif %}
82
- {% if not _autohide %}
83
- {% set _toast_attributes = _toast_attributes.setAttribute('data-bs-autohide', 'false') %}
84
- {% endif %}
62
+ {%- for _toast in _toasts %}
63
+ {%- set _classes = ['toast'] %}
64
+ {%- set _body = _toast.body|default('') %}
65
+ {%- set _role = _toast.role|default('') %}
66
+ {%- set _with_close = _toast.with_close ?? true %}
67
+ {%- set _aria_live = _toast.aria_live|default('') %}
68
+ {%- set _autohide = _toast.autohide ?? true %}
69
+ {%- set _with_body_wrapper = _toast.with_body_wrapper ?? false %}
70
+ {%- set _body_wrapper_classes = _toast.body_wrapper_classes|default('') %}
71
+ {%- set _toast_attributes = _toast.attributes ?: create_attribute() %}
72
+ {%- set _body_attributes = _toast.body_attributes ?: create_attribute() %}
73
+ {%- set _header_attributes = _toast.header_attributes ?: create_attribute() %}
74
+ {%- set _button_attributes = _toast.button_attributes ?: create_attribute() %}
75
+ {%- set _toast_attributes = _toast_attributes.addClass(_classes).setAttribute('aria-atomic', 'true') %}
76
+ {%- if _aria_live is not empty %}
77
+ {%- set _toast_attributes = _toast_attributes.setAttribute('aria-live', _aria_live) %}
78
+ {%- endif %}
79
+ {%- if _role is not empty %}
80
+ {%- set _toast_attributes = _toast_attributes.setAttribute('role', _role) %}
81
+ {%- endif %}
82
+ {%- if not _autohide %}
83
+ {%- set _toast_attributes = _toast_attributes.setAttribute('data-bs-autohide', 'false') %}
84
+ {%- endif -%}
85
85
  <div
86
86
  {{ _toast_attributes }}
87
87
  >
88
- {% if _with_close or
88
+ {%- if _with_close or
89
89
  (_toast.header is defined and _toast.header is not empty)
90
- %}
90
+ -%}
91
91
  <div{{ _header_attributes.addClass(['toast-header']) }}>
92
92
  {{- _toast.header|default('') -}}
93
93
  {% if _with_close %}
94
- {% if not _button_attributes.hasAttribute('aria-label') %}
95
- {% set _button_attributes = _button_attributes.setAttribute('aria-label', 'Close') %}
96
- {% endif %}
94
+ {%- if not _button_attributes.hasAttribute('aria-label') %}
95
+ {%- set _button_attributes = _button_attributes.setAttribute('aria-label', 'Close') %}
96
+ {%- endif %}
97
97
  {%- include '@oe-bcl/bcl-button/button.html.twig' with {
98
98
  attributes: _button_attributes
99
99
  .addClass(['btn-close'])
100
100
  .setAttribute('data-bs-dismiss', 'toast'),
101
101
  clean_class: true
102
102
  } only -%}
103
- {% endif %}
103
+ {% endif -%}
104
104
  </div>
105
- {% endif %}
106
- {% if _with_body_wrapper %}
105
+ {%- endif %}
106
+ {%- if _with_body_wrapper -%}
107
107
  <div
108
108
  {% if _body_wrapper_classes %}
109
109
  class="{{ _body_wrapper_classes }}"
110
110
  {% endif %}
111
111
  >
112
- {% endif %}
112
+ {%- endif -%}
113
113
  <div{{ _body_attributes.addClass(['toast-body']) }}>
114
114
  {{- _body -}}
115
115
  </div>
116
- {% if _with_body_wrapper %}
116
+ {%- if _with_body_wrapper -%}
117
117
  </div>
118
- {% endif %}
118
+ {%- endif %}
119
119
  {{- _toast.custom_content|default('') -}}
120
120
  </div>
121
- {% endfor %}
121
+ {%- endfor %}
122
122
  {% endif %}
123
- {% if _with_container %}
123
+ {% if _with_container -%}
124
124
  </div>
125
- {% endif %}
126
- {% if _with_wrapper %}
125
+ {%- endif %}
126
+ {% if _with_wrapper -%}
127
127
  </div>
128
- {% endif %}
129
-
128
+ {%- endif -%}
@@ -13,49 +13,49 @@
13
13
  - infos (string[]) (default: [])
14
14
  #}
15
15
 
16
- {% set _picture = picture|default({}) %}
16
+ {%- set _picture = picture|default({}) %}
17
17
  {% set _name = name|default({}) %}
18
18
  {% set _infos = infos|default([]) %}
19
19
 
20
- {% set _picture_classes = 'rounded-pill' %}
20
+ {%- set _picture_classes = 'rounded-pill' %}
21
21
  {% set _classes = ['bcl-user-compact', 'd-flex', 'mb-3'] %}
22
22
 
23
- {% if attributes is empty %}
24
- {% set attributes = create_attribute() %}
23
+ {%- if attributes is empty %}
24
+ {%- set attributes = create_attribute() %}
25
25
  {% endif %}
26
26
 
27
- {% set attributes = attributes.addClass(_classes) %}
27
+ {%- set attributes = attributes.addClass(_classes) %}
28
28
 
29
- {% if _picture is not empty and _picture.classes is not empty %}
30
- {% set _picture_classes = _picture_classes ~ ' ' ~ _picture.classes %}
31
- {% endif %}
29
+ {%- if _picture is not empty and _picture.classes is not empty %}
30
+ {%- set _picture_classes = _picture_classes ~ ' ' ~ _picture.classes %}
31
+ {% endif -%}
32
32
 
33
33
  <div
34
34
  {{ attributes }}
35
- >
36
- <div class="flex-shrink-0">
35
+ >{# -#}
36
+ <div class="flex-shrink-0">{# -#}
37
37
  <img
38
38
  class="{{ _picture_classes }}"
39
39
  src="{{ _picture.path }}"
40
40
  alt="{{ _picture.alt }}"
41
- >
42
- </div>
41
+ >{# -#}
42
+ </div>{# -#}
43
43
  <div class="flex-grow-1 ms-3">
44
- {% if _name.link is not empty %}
44
+ {%- if _name.link is not empty -%}
45
45
  <a href="{{ _name.link }}" class="fs-5 standalone mb-0">{{ _name.text }}</a>
46
- {% else %}
46
+ {%- else -%}
47
47
  <p class="fs-5 mb-0 text-primary">{{ _name.text }}</p>
48
- {% endif %}
48
+ {%- endif %}
49
49
 
50
- {% if _infos is not empty %}
50
+ {%- if _infos is not empty -%}
51
51
  <div class="d-flex flex-wrap">
52
- {% for _info in _infos %}
53
- {% if _info is not empty %}
54
- <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5'}}">{{ _info }}</span>
55
- {% endif %}
56
- {% endfor %}
52
+ {%- for _info in _infos %}
53
+ {%- if _info is not empty -%}
54
+ <span class="text-muted text-nowrap{{ loop.last ? '' :' me-4-5' }}">{{ _info }}</span>
55
+ {%- endif %}
56
+ {%- endfor -%}
57
57
  </div>
58
- {% endif %}
59
- </div>
58
+ {%- endif -%}
59
+ </div>{# -#}
60
60
  </div>
61
-
61
+ {#--#}
@@ -1,11 +1,11 @@
1
1
  {% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" -%}
2
2
 
3
3
  {%- block content %}
4
- {{ get_dummy_text(4, true) }}
5
- <ul class="mb-4-5">
6
- <li>{{ get_dummy_text() }}</li>
7
- <li>{{ get_dummy_text() }}</li>
8
- <li>{{ get_dummy_text() }}</li>
4
+ {{- get_dummy_text(4, true) -}}
5
+ <ul class="mb-4-5">{# -#}
6
+ <li>{{ get_dummy_text() }}</li>{# -#}
7
+ <li>{{ get_dummy_text() }}</li>{# -#}
8
+ <li>{{ get_dummy_text() }}</li>{# -#}
9
9
  </ul>
10
- {% include '@oe-bcl/bcl-form/form.html.twig' with terms_form only %}
10
+ {%- include '@oe-bcl/bcl-form/form.html.twig' with terms_form only %}
11
11
  {%- endblock -%}