@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
  {#
4
2
  Parameters:
5
3
  - title (string) (default: '')
@@ -24,7 +22,7 @@
24
22
  - link_more (object of type link) (default {})
25
23
  #}
26
24
 
27
- {% set _title = title|default('') %}
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() %}
@@ -40,89 +38,88 @@
40
38
  {% set _icon_path = icon_path|default('') %}
41
39
  {% set _link_more = link_more|default({}) %}
42
40
 
43
- {% set _cols_classes = 'col' %}
41
+ {%- set _cols_classes = 'col' %}
44
42
  {% set _classes = ['bcl-fact-figures', 'bcl-fact-figures--' ~ _variant] %}
45
43
  {% set _wrapper_classes = [] %}
46
44
 
47
- {% set _grid_classes = [
45
+ {%- set _grid_classes = [
48
46
  'row-cols-' ~ _responsiveness ~ '-' ~ _responsive_columns,
49
47
  'row', 'row-cols-' ~ _grid_columns
50
48
  ] %}
51
49
  {% if _responsive_columns == 3 %}
52
- {% set _grid_classes = _grid_classes|merge(['row-cols-sm-2']) %}
50
+ {%- set _grid_classes = _grid_classes|merge(['row-cols-sm-2']) %}
53
51
  {% endif %}
54
52
  {% if _variant == 'block' or _variant == 'block-primary' %}
55
- {% set _wrapper_classes = _wrapper_classes|merge(['bg-light p-3-5 pt-0']) %}
53
+ {%- set _wrapper_classes = _wrapper_classes|merge(['bg-light p-3-5 pt-0']) %}
56
54
  {% endif %}
57
55
  {% if _gutter is not empty %}
58
- {% set _grid_classes = _grid_classes|merge(['g-' ~ _gutter]) %}
56
+ {%- set _grid_classes = _grid_classes|merge(['g-' ~ _gutter]) %}
59
57
  {% endif %}
60
58
  {% if _title is not empty %}
61
- {% set _grid_classes = _grid_classes|merge(['mt-3']) %}
59
+ {%- set _grid_classes = _grid_classes|merge(['mt-3']) %}
62
60
  {% endif %}
63
61
  {% if _equal_height %}
64
- {% set _cols_classes = _cols_classes ~ ' h-100' %}
62
+ {%- set _cols_classes = _cols_classes ~ ' h-100' %}
65
63
  {% endif %}
66
64
  {% if attributes is empty %}
67
- {% set attributes = create_attribute() %}
65
+ {%- set attributes = create_attribute() %}
68
66
  {% endif %}
69
67
 
70
- {% set attributes = attributes.addClass(_classes) %}
68
+ {%- set attributes = attributes.addClass(_classes) -%}
71
69
 
72
70
  <div {{ attributes }}>
73
- {% if _title is not empty %}
74
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
71
+ {%- if _title is not empty %}
72
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
75
73
  title: _title,
76
74
  title_tag: _title_tag,
77
75
  title_link: _title_link,
78
76
  attributes: _title_attributes,
79
77
  } only %}
80
- {% endif %}
78
+ {% endif -%}
81
79
  <div
82
80
  {% if _wrapper_classes is not empty %}
83
81
  class="{{ _wrapper_classes|join(' ') }}"
84
82
  {% endif %}
85
- >
83
+ >{# -#}
86
84
  <div class="{{ _grid_classes|join(' ') }}">
87
- {% if _items is defined and _items is not empty and _items is iterable %}
88
- {% for _item in _items %}
85
+ {%- if _items is defined and _items is not empty and _items is iterable %}
86
+ {%- for _item in _items -%}
89
87
  <div class="{{ _cols_classes }}">
90
- {% if _item.icon is defined and _item.icon is not empty and _display_icons %}
91
- {% set _icon_attributes = _item.icon.attributes ?: create_attribute() %}
92
- {% set _item = _item|merge({
88
+ {%- if _item.icon is defined and _item.icon is not empty and _display_icons %}
89
+ {%- set _icon_attributes = _item.icon.attributes ?: create_attribute() %}
90
+ {%- set _item = _item|merge({
93
91
  icon: _item.icon|merge({
94
92
  path: _icon_path,
95
93
  size: 'l',
96
94
  attributes: _icon_attributes.addClass(['mb-2', 'icon--primary']),
97
95
  })
98
96
  }) %}
99
- {% include '@oe-bcl/bcl-icon/icon.html.twig' with _item.icon only %}
100
- {% endif %}
101
- {% if _item.title is defined and _item.title is not empty %}
97
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _item.icon only %}
98
+ {%- endif %}
99
+ {%- if _item.title is defined and _item.title is not empty -%}
102
100
  <div class="fs-4 fw-medium">
103
101
  {{- _item.title -}}
104
102
  </div>
105
- {% endif %}
106
- {% if _item.subtitle is defined and _item.subtitle is not empty %}
103
+ {%- endif %}
104
+ {%- if _item.subtitle is defined and _item.subtitle is not empty -%}
107
105
  <div class="fs-5 fw-medium">
108
106
  {{- _item.subtitle -}}
109
107
  </div>
110
- {% endif %}
111
- {% if _item.description is defined and _item.description is not empty %}
108
+ {%- endif %}
109
+ {%- if _item.description is defined and _item.description is not empty -%}
112
110
  <p>
113
111
  {{- _item.description -}}
114
112
  </p>
115
- {% endif %}
113
+ {%- endif -%}
116
114
  </div>
117
- {% endfor %}
118
- {% endif %}
115
+ {%- endfor %}
116
+ {%- endif -%}
119
117
  </div>
120
- {% if _link_more is defined and _link_more is not empty %}
118
+ {%- if _link_more is defined and _link_more is not empty -%}
121
119
  <div class="border-top d-block pt-3 mt-3">
122
- {% include '@oe-bcl/bcl-link/link.html.twig' with _link_more only %}
120
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _link_more only -%}
123
121
  </div>
124
- {% endif %}
125
- </div>
122
+ {%- endif -%}
123
+ </div>{# -#}
126
124
  </div>
127
-
128
- {% endapply %}
125
+ {#--#}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - title (string) (default: '')
5
3
  - title_tag (string) (default: 'h2')
@@ -40,7 +38,7 @@
40
38
  - "embedded_media"
41
39
  #}
42
40
 
43
- {% set _title = title|default('') %}
41
+ {%- set _title = title|default('') %}
44
42
  {% set _title_tag = title_tag|default('h2') %}
45
43
  {% set _title_link = title_link|default({}) %}
46
44
  {% set _title_attributes = title_attributes ?: create_attribute() %}
@@ -62,34 +60,34 @@
62
60
  {% set _tracks = tracks|default([]) %}
63
61
  {% set _embedded_media = embedded_media|default('') %}
64
62
 
65
- {% set _classes = 'bcl-featured-item' %}
63
+ {%- set _classes = 'bcl-featured-item' %}
66
64
  {% set _col_classes = 'col-12 col-md-6' %}
67
65
 
68
- {% if _wrapper_classes is not empty %}
69
- {% set _classes = _classes ~ ' ' ~ wrapper_classes %}
66
+ {%- if _wrapper_classes is not empty %}
67
+ {%- set _classes = _classes ~ ' ' ~ wrapper_classes %}
70
68
  {% endif %}
71
69
 
72
- {% if attributes is empty %}
73
- {% set attributes = create_attribute() %}
70
+ {%- if attributes is empty %}
71
+ {%- set attributes = create_attribute() %}
74
72
  {% endif %}
75
73
 
76
- {% set attributes = attributes.addClass(["rounded", "overflow-hidden"]) %}
74
+ {%- set attributes = attributes.addClass(["rounded", "overflow-hidden"]) %}
77
75
 
78
- {% if _image is not empty %}
79
- {% set attributes = attributes.addClass(["d-inline-flex", "flex-wrap"]) %}
80
- {% if _content_classes is not empty %}
81
- {% set _content_classes = _content_classes ~ ' flex-1 w-min-content' %}
82
- {% else %}
83
- {% set _content_classes = 'flex-1 w-min-content' %}
84
- {% endif %}
76
+ {%- if _image is not empty %}
77
+ {%- set attributes = attributes.addClass(["d-inline-flex", "flex-wrap"]) %}
78
+ {%- if _content_classes is not empty %}
79
+ {%- set _content_classes = _content_classes ~ ' flex-1 w-min-content' %}
80
+ {%- else %}
81
+ {%- set _content_classes = 'flex-1 w-min-content' %}
82
+ {%- endif %}
85
83
  {% endif %}
86
84
 
87
- {% if _with_text or _force_wrapper %}
85
+ {%- if _with_text or _force_wrapper -%}
88
86
  <div class="{{ _classes }}">
89
- {% endif %}
90
- {% if _with_text %}
87
+ {%- endif %}
88
+ {% if _with_text -%}
91
89
  <div class="row">
92
- {% endif %}
90
+ {%- endif %}
93
91
 
94
92
  {%- if _title is not empty -%}
95
93
  {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
@@ -100,7 +98,7 @@
100
98
  } only %}
101
99
  {%- endif -%}
102
100
 
103
- {% if _with_text %}
101
+ {% if _with_text -%}
104
102
  <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '1' : '2' }}">
105
103
  {%- if _description_title is not empty -%}
106
104
  {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
@@ -112,45 +110,45 @@
112
110
  {{- _description|default('') -}}
113
111
 
114
112
  {% if _read_more is not empty %}
115
- {% include '@oe-bcl/bcl-link/link.html.twig' with _read_more only %}
116
- {% endif %}
117
- </div>
113
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _read_more only %}
114
+ {%- endif -%}
115
+ </div>{# -#}
118
116
  <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '2 mt-4 mt-md-0' : '1' }}">
119
- {% endif %}
117
+ {%- endif -%}
120
118
 
121
119
  <figure
122
120
  {{ attributes }}
123
121
  >
124
- {% if _embedded_media is not empty %}
125
- {% set _video_classes = "ratio ratio-" ~ _ratio %}
122
+ {%- if _embedded_media is not empty %}
123
+ {%- set _video_classes = "ratio ratio-" ~ _ratio -%}
126
124
  <div class="{{ _video_classes }}">
127
125
  {%- block embedded_media _embedded_media -%}
128
126
  </div>
129
- {% elseif _sources is not empty and _sources is iterable %}
127
+ {%- elseif _sources is not empty and _sources is iterable -%}
130
128
  <video
131
129
  controls
132
130
  poster="{{ _poster_image }}"
133
131
  class="w-100 d-block"
134
132
  >
135
- {% for source in _sources %}
133
+ {%- for source in _sources -%}
136
134
  <source type="{{ source.type }}" src="{{ source.src }}" />
137
- {% endfor %}
138
- {% if _tracks is not empty and _tracks is iterable %}
139
- {% for track in _tracks %}
135
+ {%- endfor %}
136
+ {%- if _tracks is not empty and _tracks is iterable %}
137
+ {%- for track in _tracks -%}
140
138
  <track
141
139
  kind="{{ track.kind }}"
142
140
  label="{{ track.label }}"
143
141
  src="{{ track.src }}"
144
142
  srclang="{{ track.src_lang }}"
145
143
  />
146
- {% endfor %}
147
- {% endif %}
144
+ {%- endfor %}
145
+ {%- endif -%}
148
146
  </video>
149
- {% else %}
150
- {{ _image }}
151
- {% endif %}
147
+ {%- else %}
148
+ {{- _image }}
149
+ {%- endif %}
152
150
 
153
- {% if _content is not empty %}
151
+ {%- if _content is not empty -%}
154
152
  <figcaption
155
153
  {% if _content_classes is not empty %}
156
154
  class="{{ _content_classes }}"
@@ -158,15 +156,13 @@
158
156
  >
159
157
  {{- _content -}}
160
158
  </figcaption>
161
- {% endif %}
159
+ {%- endif -%}
162
160
  </figure>
163
161
 
164
- {% if _with_text %}
165
- </div>
162
+ {%- if _with_text -%}
163
+ </div>{# -#}
166
164
  </div>
167
- {% endif %}
168
- {% if _with_text or _force_wrapper %}
165
+ {%- endif %}
166
+ {% if _with_text or _force_wrapper -%}
169
167
  </div>
170
- {% endif %}
171
-
172
- {% endapply %}
168
+ {%- endif -%}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {# Parameters:
4
2
  - id (string) (default: language-dropdown-random(10000))
5
3
  - label (string) (default: '')
@@ -15,21 +13,21 @@
15
13
  ]
16
14
  #}
17
15
 
18
- {% set _id = id|default('language-dropdown' ~ random(10000)) %}
16
+ {%- set _id = id|default('language-dropdown' ~ random(10000)) %}
19
17
  {% set _label = label|default('') %}
20
18
  {% set _icon_path = icon_path|default('') %}
21
19
  {% set _items = items|default([]) %}
22
20
 
23
- {% if attributes is empty %}
24
- {% set attributes = create_attribute() %}
21
+ {%- if attributes is empty %}
22
+ {%- set attributes = create_attribute() %}
25
23
  {% endif %}
26
24
 
27
- {% set attributes = attributes.addClass(['bg-lighter', 'py-3', 'px-4', 'border-top']) %}
25
+ {%- set attributes = attributes.addClass(['bg-lighter', 'py-3', 'px-4', 'border-top']) -%}
28
26
 
29
27
  <div
30
- {{ attributes }}>
28
+ {{ attributes }}>{# -#}
31
29
  <div class="text-end text-md-center">
32
- {% include '@oe-bcl/bcl-link/link.html.twig' with _label|merge({
30
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _label|merge({
33
31
  path: '#' ~ _id,
34
32
  attributes: create_attribute()
35
33
  .addClass(['standalone'])
@@ -37,25 +35,25 @@
37
35
  .setAttribute('data-bs-toggle', 'collapse')
38
36
  .setAttribute('aria-expanded', 'false')
39
37
  .setAttribute('role', 'button'),
40
- }) only %}
38
+ }) only -%}
41
39
  </div>
42
- {% if _items is not empty and _items is iterable %}
40
+ {%- if _items is not empty and _items is iterable -%}
43
41
  <div class="collapse" id="{{ _id }}">
44
- {% for _item in _items %}
45
- {% set _item_classes = loop.last ? 'pt-3' : 'py-3 border-bottom' %}
42
+ {%- for _item in _items %}
43
+ {%- set _item_classes = loop.last ? 'pt-3' : 'py-3 border-bottom' -%}
46
44
  <div class="{{ _item_classes }}">
47
- {% if _item.type == 'content' %}
48
- {{ _item.content }}
49
- {% else %}
50
- <div class="row">
45
+ {%- if _item.type == 'content' %}
46
+ {{- _item.content }}
47
+ {%- else -%}
48
+ <div class="row">{# -#}
51
49
  <div class="col-12 col-md-9">
52
- {% if _item.title is not empty %}
50
+ {%- if _item.title is not empty -%}
53
51
  <p class="fw-bold m-0">{{ _item.title }}</p>
54
- {% endif %}
55
- {% if _item.description is not empty %}
52
+ {%- endif %}
53
+ {%- if _item.description is not empty -%}
56
54
  <p class="m-0">{{ _item.description }}</p>
57
- {% endif %}
58
- {% if _item.language is not empty or _item.meta is not empty %}
55
+ {%- endif %}
56
+ {%- if _item.language is not empty or _item.meta is not empty -%}
59
57
  <small class="fw-bold m-0">
60
58
  {%- if _item.language is not empty -%}
61
59
  {{- _item.language -}}
@@ -66,15 +64,15 @@
66
64
  </span>
67
65
  {%- endif -%}
68
66
  </small>
69
- {% endif %}
70
- </div>
67
+ {%- endif -%}
68
+ </div>{# -#}
71
69
  <div class="col-12 col-md-3 align-self-end text-md-end">
72
- {% set download_attributes = create_attribute()
70
+ {%- set download_attributes = create_attribute()
73
71
  .setAttribute('download', true)
74
72
  .setAttribute('target', '_blank')
75
73
  .addClass(['d-block', 'standalone', 'mt-1'])
76
74
  %}
77
- {% set _download_item = _item.download|merge({
75
+ {%- set _download_item = _item.download|merge({
78
76
  icon_position: "after",
79
77
  icon: {
80
78
  name: "download",
@@ -83,14 +81,13 @@
83
81
  }|merge(_item.download.icon|default({})),
84
82
  attributes: download_attributes.merge(_item.download.attributes|default(create_attribute()))
85
83
  }) %}
86
- {% include '@oe-bcl/bcl-link/link.html.twig' with _download_item only %}
87
- </div>
84
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _download_item only -%}
85
+ </div>{# -#}
88
86
  </div>
89
- {% endif %}
87
+ {%- endif -%}
90
88
  </div>
91
- {% endfor %}
89
+ {%- endfor -%}
92
90
  </div>
93
- {% endif %}
91
+ {%- endif -%}
94
92
  </div>
95
-
96
- {% endapply %}
93
+ {#--#}
@@ -1,5 +1,3 @@
1
- {% apply spaceless %}
2
-
3
1
  {#
4
2
  Parameters:
5
3
  - title (string) (default: '')
@@ -36,9 +34,9 @@
36
34
  - attributes (drupal attrs)
37
35
  #}
38
36
 
39
- {# Internal properties #}
37
+ {#- Internal properties #}
40
38
 
41
- {% set _title = title|default('') %}
39
+ {%- set _title = title|default('') %}
42
40
  {% set _title_tag = title_tag|default('h2') %}
43
41
  {% set _title_link = title_link|default({}) %}
44
42
  {% set _title_attributes = title_attributes ?: create_attribute() %}
@@ -56,23 +54,23 @@
56
54
  {% set _translation = translation|default({}) %}
57
55
  {% set _icon_path = icon_path|default('') %}
58
56
 
59
- {% set _classes = ['bcl-file'] %}
57
+ {%- set _classes = ['bcl-file'] %}
60
58
 
61
- {% if attributes is empty %}
62
- {% set attributes = create_attribute() %}
59
+ {%- if attributes is empty %}
60
+ {%- set attributes = create_attribute() %}
63
61
  {% endif %}
64
62
 
65
- {% set attributes = attributes.addClass(_classes) %}
63
+ {%- set attributes = attributes.addClass(_classes) %}
66
64
 
67
- {% if _icon is not empty %}
68
- {% set _container_classes = _container_classes ~ ' ms-2-5' %}
69
- {% set _icon = _icon|merge({
65
+ {%- if _icon is not empty %}
66
+ {%- set _container_classes = _container_classes ~ ' ms-2-5' %}
67
+ {%- set _icon = _icon|merge({
70
68
  attributes: create_attribute().addClass(['mt-1', 'icon--file'])
71
69
  }) %}
72
70
  {% endif %}
73
71
 
74
- {% if _title is not empty %}
75
- {% include '@oe-bcl/bcl-heading/heading.html.twig' with {
72
+ {%- if _title is not empty %}
73
+ {%- include '@oe-bcl/bcl-heading/heading.html.twig' with {
76
74
  title: _title,
77
75
  title_tag: _title_tag,
78
76
  title_link: _title_link,
@@ -80,52 +78,52 @@
80
78
  } only %}
81
79
  {% endif %}
82
80
 
83
- {% set attributes = attributes.addClass(['border', 'rounded']) %}
81
+ {%- set attributes = attributes.addClass(['border', 'rounded']) %}
84
82
 
85
- {% set _container_classes = 'd-md-flex flex-grow-1' %}
83
+ {%- set _container_classes = 'd-md-flex flex-grow-1' -%}
86
84
 
87
85
  <div
88
86
  {{ attributes }}
89
87
  >
90
- {% if _variant == 'card' %}
91
- <div class="border-bottom px-3-5 py-3 d-md-flex">
88
+ {%- if _variant == 'card' -%}
89
+ <div class="border-bottom px-3-5 py-3 d-md-flex">{# -#}
92
90
  <div class="pe-2 pb-2">
93
- {% if _icon is not empty %}
91
+ {%- if _icon is not empty %}
94
92
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
95
93
  path: _icon_path,
96
94
  }) only -%}
97
- {% endif %}
98
- </div>
95
+ {% endif -%}
96
+ </div>{# -#}
99
97
  <div>
100
- {% if _item_title is not empty %}
98
+ {%- if _item_title is not empty -%}
101
99
  <p class="fw-medium mb-2 fs-5">{{ _item_title }}</p>
102
- {% endif %}
103
- {% if _text is not empty %}
100
+ {%- endif %}
101
+ {%- if _text is not empty -%}
104
102
  <p class="mb-3">{{ _text }}</p>
105
- {% endif %}
106
- {% if _content is not empty %}
107
- {{ _content }}
108
- {% endif %}
109
- </div>
103
+ {%- endif %}
104
+ {%- if _content is not empty %}
105
+ {{- _content }}
106
+ {%- endif -%}
107
+ </div>{# -#}
110
108
  </div>
111
- {% endif %}
112
- <div class="px-3-5 py-3">
109
+ {%- endif -%}
110
+ <div class="px-3-5 py-3">{# -#}
113
111
  <div class="d-md-flex">
114
- {% if _icon is not empty and _variant == 'default' %}
112
+ {%- if _icon is not empty and _variant == 'default' -%}
115
113
  <div class="pe-2 pb-2">
116
- {% if _icon is not empty %}
114
+ {%- if _icon is not empty %}
117
115
  {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _icon|merge({
118
116
  path: _icon_path,
119
117
  }) only -%}
120
- {% endif %}
118
+ {% endif -%}
121
119
  </div>
122
- {% endif %}
123
- <div class="{{ _container_classes }}">
120
+ {%- endif -%}
121
+ <div class="{{ _container_classes }}">{# -#}
124
122
  <div class="flex-grow-1">
125
- {% if _item_title is not empty and _variant == 'default' %}
123
+ {%- if _item_title is not empty and _variant == 'default' -%}
126
124
  <p class="fw-medium m-0 fs-5">{{ _item_title }}</p>
127
- {% endif %}
128
- {% if _language is not empty or _meta is not empty %}
125
+ {%- endif %}
126
+ {%- if _language is not empty or _meta is not empty -%}
129
127
  <small class="fw-medium m-0">
130
128
  {%- if _language is not empty -%}
131
129
  {{- _language -}}
@@ -136,13 +134,13 @@
136
134
  </span>
137
135
  {%- endif -%}
138
136
  </small>
139
- {% endif %}
137
+ {%- endif -%}
140
138
  </div>
141
- {% set download_attributes = create_attribute()
142
- .setAttribute('download', 'true')
139
+ {%- set download_attributes = create_attribute()
140
+ .setAttribute('download', true)
143
141
  .setAttribute('target', '_blank')
144
142
  .addClass(['standalone', 'align-self-center', 'd-inline-block', 'mt-1', 'mt-md-0', 'flex-shrink-0']) %}
145
- {% set _download = _download|merge({
143
+ {%- set _download = _download|merge({
146
144
  icon_position: "after",
147
145
  icon: {
148
146
  name: "download",
@@ -151,15 +149,14 @@
151
149
  }|merge(_download.icon|default({})),
152
150
  attributes: download_attributes.merge(_download.attributes|default(create_attribute()))
153
151
  }) %}
154
- {% include '@oe-bcl/bcl-link/link.html.twig' with _download only %}
155
- </div>
156
- </div>
152
+ {%- include '@oe-bcl/bcl-link/link.html.twig' with _download only -%}
153
+ </div>{# -#}
154
+ </div>{# -#}
157
155
  </div>
158
- {% if _translation is not empty %}
159
- {% include '@oe-bcl/bcl-file/file-translations.html.twig' with _translation|merge({
156
+ {%- if _translation is not empty %}
157
+ {%- include '@oe-bcl/bcl-file/file-translations.html.twig' with _translation|merge({
160
158
  icon_path: _icon_path
161
159
  }) only %}
162
- {% endif %}
160
+ {%- endif -%}
163
161
  </div>
164
-
165
- {% endapply %}
162
+ {#--#}