@openeuropa/bcl-theme-default 0.13.0 → 0.17.0

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 (83) hide show
  1. package/bcl-builder.config.js +4 -0
  2. package/css/oe-bcl-default.css +243 -29
  3. package/css/oe-bcl-default.css.map +1 -1
  4. package/css/oe-bcl-default.min.css +1 -1
  5. package/css/oe-bcl-default.min.css.map +1 -1
  6. package/icons/bcl-default-icons.svg +1 -0
  7. package/icons/icons-flag.svg +1 -0
  8. package/js/oe-bcl-default.bundle.js +53 -21
  9. package/js/oe-bcl-default.bundle.js.map +1 -1
  10. package/js/oe-bcl-default.bundle.min.js +1 -1
  11. package/js/oe-bcl-default.bundle.min.js.map +1 -1
  12. package/js/oe-bcl-default.esm.min.js.map +1 -1
  13. package/js/oe-bcl-default.umd.js +61 -24
  14. package/js/oe-bcl-default.umd.js.map +1 -1
  15. package/js/oe-bcl-default.umd.min.js +1 -1
  16. package/js/oe-bcl-default.umd.min.js.map +1 -1
  17. package/package.json +6 -5
  18. package/src/scss/_badge.scss +15 -0
  19. package/src/scss/_banners.scss +8 -6
  20. package/src/scss/_bcl-offcanvas.scss +4 -4
  21. package/src/scss/_footer.scss +16 -7
  22. package/src/scss/_header.scss +86 -17
  23. package/src/scss/_inpage-navigation.scss +1 -1
  24. package/src/scss/_multiselect.scss +3 -2
  25. package/src/scss/_utilities.scss +9 -0
  26. package/src/scss/_variables.scss +11 -6
  27. package/src/scss/oe-bcl-default.scss +1 -0
  28. package/templates/bcl-accordion/accordion.html.twig +9 -0
  29. package/templates/bcl-alert/alert.html.twig +4 -0
  30. package/templates/bcl-badge/badge.html.twig +9 -1
  31. package/templates/bcl-banner/banner.html.twig +12 -5
  32. package/templates/bcl-base-templates/content-type.html.twig +120 -0
  33. package/templates/bcl-base-templates/listing-page.html.twig +63 -0
  34. package/templates/{bcl-group-landing-listing/group-landing-listing-offcanvas.html.twig → bcl-base-templates/sidebar-search.html.twig} +0 -1
  35. package/templates/bcl-blockquote/blockquote.html.twig +4 -0
  36. package/templates/bcl-breadcrumb/breadcrumb.html.twig +6 -2
  37. package/templates/bcl-button/button.html.twig +8 -2
  38. package/templates/bcl-button-group/button-group.html.twig +4 -0
  39. package/templates/bcl-card/card.html.twig +28 -29
  40. package/templates/bcl-card-layout/card-layout.html.twig +4 -0
  41. package/templates/bcl-carousel/carousel.html.twig +4 -0
  42. package/templates/bcl-content-banner/content-banner.html.twig +107 -0
  43. package/templates/bcl-date-block/date-block.html.twig +4 -0
  44. package/templates/bcl-description-list/description-list.html.twig +114 -0
  45. package/templates/bcl-event/event.html.twig +41 -0
  46. package/templates/bcl-fact-figures/fact-figures.html.twig +13 -5
  47. package/templates/bcl-featured-media/featured-media.html.twig +53 -5
  48. package/templates/bcl-file/file.html.twig +209 -0
  49. package/templates/bcl-footer/footer.html.twig +4 -1
  50. package/templates/bcl-form/form.html.twig +4 -0
  51. package/templates/bcl-group/group-landing.html.twig +101 -0
  52. package/templates/bcl-group/group.html.twig +27 -0
  53. package/templates/bcl-header/header.html.twig +11 -2
  54. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +14 -1
  55. package/templates/bcl-landing-page/landing-page.html.twig +46 -52
  56. package/templates/bcl-links-block/links-block.html.twig +5 -2
  57. package/templates/bcl-list-group/list-group.html.twig +6 -0
  58. package/templates/bcl-listing/listing.html.twig +29 -16
  59. package/templates/bcl-navbar/navbar.html.twig +22 -20
  60. package/templates/bcl-navigation/navigation.html.twig +135 -110
  61. package/templates/bcl-offcanvas/offcanvas.html.twig +4 -0
  62. package/templates/bcl-page/page.html.twig +64 -0
  63. package/templates/bcl-pagination/pagination.html.twig +5 -1
  64. package/templates/bcl-placeholder/placeholder.html.twig +43 -0
  65. package/templates/bcl-progress/progress.html.twig +4 -0
  66. package/templates/bcl-recent-activities/recent-activities.html.twig +4 -0
  67. package/templates/bcl-search/search.html.twig +10 -40
  68. package/templates/bcl-search-form/search-form.html.twig +52 -0
  69. package/templates/bcl-select/select.html.twig +6 -0
  70. package/templates/bcl-table/table.html.twig +4 -0
  71. package/templates/bcl-timeline/timeline.html.twig +16 -1
  72. package/templates/bcl-toast/toasts.html.twig +4 -0
  73. package/templates/bcl-user/user-edit.html.twig +38 -0
  74. package/templates/{bcl-user-view → bcl-user}/user-view-compact.html.twig +5 -1
  75. package/templates/bcl-user/user-view.html.twig +96 -0
  76. package/templates/bcl-group-landing/group-landing.html.twig +0 -106
  77. package/templates/bcl-group-landing-listing/group-landing-listing.html.twig +0 -69
  78. package/templates/bcl-search/search-offcanvas.html.twig +0 -8
  79. package/templates/bcl-user-edit/edit-contents.html.twig +0 -32
  80. package/templates/bcl-user-edit/user-edit.html.twig +0 -19
  81. package/templates/bcl-user-listing/user-listing-offcanvas.html.twig +0 -8
  82. package/templates/bcl-user-listing/user-listing.html.twig +0 -45
  83. package/templates/bcl-user-view/user-view.html.twig +0 -106
@@ -14,6 +14,10 @@
14
14
  {% set _alignment = alignment|default('left') %}
15
15
  {% set _classes = ['text-' ~ _alignment] %}
16
16
 
17
+ {% if attributes is empty %}
18
+ {% set attributes = create_attribute() %}
19
+ {% endif %}
20
+
17
21
  {% set attributes = attributes.addClass(_classes) %}
18
22
 
19
23
  <figure
@@ -8,6 +8,10 @@
8
8
  {% set _links = links|default([]) %}
9
9
  {% set _icons_path = icons_path|default('') %}
10
10
 
11
+ {% if attributes is empty %}
12
+ {% set attributes = create_attribute() %}
13
+ {% endif %}
14
+
11
15
  {% set attributes = attributes.setAttribute('aria-label', 'breadcrumb') %}
12
16
 
13
17
  {% if _links is not empty %}
@@ -18,7 +22,7 @@
18
22
  class="{{ _classes }}"
19
23
  >
20
24
  {% for _link in _links %}
21
- {% set _segment_classes = 'breadcrumb-item d-none d-md-block' %}
25
+ {% set _segment_classes = 'breadcrumb-item d-none d-md-block' %}
22
26
  {% if loop.revindex == 2 %}
23
27
  {% set _segment_classes = 'breadcrumb-item' %}
24
28
  {% endif %}
@@ -29,7 +33,7 @@
29
33
  {% endif %}
30
34
  <li
31
35
  class="{{ _segment_classes }}"
32
- {{ _segment_attrs }}
36
+ {{ _segment_attrs|raw }}
33
37
  >
34
38
  {%- if _link.path -%}
35
39
  {% if loop.revindex == 2 %}
@@ -15,6 +15,8 @@
15
15
  - icon (icon object) (default: {}): predefined structure for Icon component
16
16
  - icon_position (string) (default: after)
17
17
  - options ["after", "before"]
18
+ - icon_spacing (string) (default: '')
19
+ - options ["sm", "md", "lg"]
18
20
  - clean_class (boolean) (default: false)
19
21
  - spinner (spinner object) (default: {})
20
22
  - show_spinner (boolean) (default: false)
@@ -31,6 +33,7 @@
31
33
  {% set _id = id|default('') %}
32
34
  {% set _icon = icon|default({}) %}
33
35
  {% set _icon_position = icon_position|default('after') %}
36
+ {% set _icon_spacing = icon_spacing|default('') %}
34
37
  {% set _show_spinner = show_spinner|default(false) %}
35
38
  {% set _spinner = spinner|default({}) %}
36
39
  {% set _clean_class = clean_class|default(false) %}
@@ -54,6 +57,9 @@
54
57
  {% if _classes is not empty %}
55
58
  {% set attributes = attributes.addClass(_classes) %}
56
59
  {% endif %}
60
+ {% if _icon_spacing is not empty %}
61
+ {% set _icon_spacing = _icon_spacing ~ '-' %}
62
+ {% endif %}
57
63
  {% set attributes = attributes.setAttribute('type', _type) %}
58
64
  {% if _icon is not empty %}
59
65
  {% set _icon = _icon|merge({
@@ -69,12 +75,12 @@
69
75
  {% endif %}
70
76
  {% if _icon_position == 'before' %}
71
77
  {% set _icon = _icon|merge({
72
- attributes: _icon.attributes.addClass('me-2-5')
78
+ attributes: _icon.attributes.addClass('me-' ~ _icon_spacing ~ '2-5')
73
79
  })
74
80
  %}
75
81
  {% else %}
76
82
  {% set _icon = _icon|merge({
77
- attributes: _icon.attributes.addClass('ms-2-5')
83
+ attributes: _icon.attributes.addClass('ms-' ~ _icon_spacing ~ '2-5')
78
84
  })
79
85
  %}
80
86
  {% endif %}
@@ -24,6 +24,10 @@
24
24
 
25
25
  {% set _classes = _classes|merge(['btn-group-' ~ _size]) %}
26
26
 
27
+ {% if attributes is empty %}
28
+ {% set attributes = create_attribute() %}
29
+ {% endif %}
30
+
27
31
  {% if _aria_label is not empty %}
28
32
  {% set attributes = attributes.setAttribute('aria-label', _aria_label) %}
29
33
  {% endif %}
@@ -133,19 +133,19 @@
133
133
  {% set _img_class = _img_class ~ " " ~ _image.classes %}
134
134
  {% endif %}
135
135
  {% endif %}
136
- {% if _horizontal %}
136
+ {% if _horizontal and (_image is not empty or _date is not empty) %}
137
137
  <div class='{{ _horizontal_grid.left_col_classes }}'>
138
138
  {% endif %}
139
139
  {% if _date is not empty %}
140
140
  {% include '@oe-bcl/bcl-date-block/date-block.html.twig' with _date only %}
141
- {% elseif _image is not empty %}
141
+ {% elseif _image is not empty and _image.position != "bottom" %}
142
142
  <img
143
143
  src="{{ _image.path }}"
144
144
  alt="{{ _image.alt }}"
145
145
  class="{{ _img_class }}"
146
146
  >
147
147
  {% endif %}
148
- {% if _horizontal %}
148
+ {% if _horizontal and (_image is not empty or _date is not empty) %}
149
149
  </div>
150
150
  {% endif %}
151
151
  {% if _image.position == 'background' %}
@@ -155,35 +155,12 @@
155
155
  <div class='{{ _horizontal_grid.right_col_classes }}'>
156
156
  {% endif %}
157
157
  <div class='{{ _body_classes }}'>
158
- {%- if _badges is not empty and _badges is iterable -%}
159
- <div class="mb-3">
160
- {% for _badge in _badges %}
161
- {% if _badge.attributes is empty %}
162
- {% set _badge = _badge|merge({
163
- attributes: create_attribute()
164
- }) %}
165
- {% endif %}
166
- {% if not loop.last %}
167
- {% set _badge = _badge|merge({
168
- attributes: _badge.attributes.addClass('me-2')
169
- })
170
- %}
171
- {% endif %}
172
- {% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
173
- {% endfor %}
174
- </div>
175
- {%- endif -%}
176
158
  {%- if _title is not empty -%}
177
159
  {% set _title_tag = _title.tag ?? 'h5' %}
178
160
  <{{ _title_tag }}
179
- class="card-title{{ title.classes ? ' ' ~ title.classes }}"
180
- {% if _title.attributes is not empty and _title.attributes is iterable %}
181
- {% set _title_attributes = create_attribute() %}
182
- {% for attribute in _title.attributes %}
183
- {% set _title_attributes = _title_attributes.setAttribute(attribute.name, attribute.value) %}
184
- {% endfor %}
185
- {{ _title_attributes }}
186
- {% endif %}
161
+ {% set _title_attributes = title.attributes ?: create_attribute() %}
162
+ {% set _title_attributes = _title_attributes.addClass("card-title") %}
163
+ {{ _title_attributes }}
187
164
  >
188
165
  {{- title.content -}}
189
166
  </{{ _title_tag }}>
@@ -207,6 +184,28 @@
207
184
  {%- if _content is not empty -%}
208
185
  {{- _content -}}
209
186
  {%- endif -%}
187
+ {%- if _badges is not empty and _badges is iterable -%}
188
+ <div class="mt-2-5">
189
+ {% for _badge in _badges %}
190
+ {% if _badge.attributes is empty %}
191
+ {% set _badge = _badge|merge({
192
+ attributes: create_attribute()
193
+ }) %}
194
+ {% endif %}
195
+ {% set _badge = _badge|merge({
196
+ attributes: _badge.attributes.addClass('mb-2')
197
+ })
198
+ %}
199
+ {% if not loop.last %}
200
+ {% set _badge = _badge|merge({
201
+ attributes: _badge.attributes.addClass('me-2')
202
+ })
203
+ %}
204
+ {% endif %}
205
+ {% include '@oe-bcl/bcl-badge/badge.html.twig' with _badge only %}
206
+ {% endfor %}
207
+ </div>
208
+ {%- endif -%}
210
209
  </div>
211
210
  {% if _horizontal %}
212
211
  </div>
@@ -41,6 +41,10 @@
41
41
  {% endif %}
42
42
  {% endif %}
43
43
 
44
+ {% if attributes is empty %}
45
+ {% set attributes = create_attribute() %}
46
+ {% endif %}
47
+
44
48
  {% set attributes = attributes.addClass(_classes) %}
45
49
 
46
50
  <div
@@ -43,6 +43,10 @@
43
43
  {% set _classes = _classes|merge(['carousel-dark']) %}
44
44
  {% endif %}
45
45
 
46
+ {% if attributes is empty %}
47
+ {% set attributes = create_attribute() %}
48
+ {% endif %}
49
+
46
50
  {% if _id is not empty %}
47
51
  {% set attributes = attributes.setAttribute('id', _id) %}
48
52
  {% endif %}
@@ -0,0 +1,107 @@
1
+ {% spaceless %}
2
+
3
+ {#
4
+ Parameters:
5
+ - "background" (string) (default: 'white')
6
+ options: [ white, gray ]
7
+ - "banner" (object)
8
+ - "title" (object)
9
+ - "image" (object)
10
+ - "content" (string)
11
+ - "badges" (array of objects of type badge)
12
+ - "action_button" (object of type button) (default: {})
13
+ - "service_buttons" (array of objects of type button) (default: [])
14
+ - "attributes" (drupal attrs)
15
+ #}
16
+
17
+ {% set _background = background|default('white') %}
18
+ {% set _action_button = action_button|default({}) %}
19
+ {% set _service_buttons = service_buttons|default([]) %}
20
+ {% set _image = image|default({}) %}
21
+
22
+ {% set _css_classes = [
23
+ 'bcl-content-banner',
24
+ 'vw-100',
25
+ 'pt-lg-4-75',
26
+ ] %}
27
+
28
+ {% if _background != 'white' %}
29
+ {% set _css_classes = _css_classes|merge([
30
+ 'pb-md-4-75',
31
+ 'pb-4',
32
+ 'pt-4',
33
+ ]) %}
34
+ {% else %}
35
+ {% set _css_classes = _css_classes|merge([
36
+ 'pt-3'
37
+ ]) %}
38
+ {% endif %}
39
+
40
+ {% set _modifiers = {
41
+ 'white': 'bg-white',
42
+ 'gray': 'bg-lighter',
43
+ } %}
44
+
45
+ {% if attributes is empty %}
46
+ {% set attributes = create_attribute() %}
47
+ {% endif %}
48
+
49
+ {% set _card = {
50
+ title: title|default({})|merge({
51
+ tag: 'h2',
52
+ attributes: create_attribute().addClass(['fw-bold']),
53
+ }),
54
+ horizontal: true,
55
+ horizontal_grid: {
56
+ right_col_classes: 'col-md-8 col-lg-9 col-xxl-8',
57
+ },
58
+ extra_classes_header: 'bg-transparent pt-0 pb-0 border-0',
59
+ extra_classes_body: 'pt-0 px-0 pb-0',
60
+ } %}
61
+
62
+ {% if _image is not empty %}
63
+ {% set _card = _card|merge({
64
+ horizontal_grid: _card.horizontal_grid|merge({
65
+ left_col_classes: 'col-md-4 col-lg-3',
66
+ }),
67
+ extra_classes_body: 'pt-md-0 px-0 px-md-3 pb-0',
68
+ }) %}
69
+ {% else %}
70
+ {% set _card = _card|merge({
71
+ horizontal_grid: {
72
+ right_col_classes: 'col-md-8 col-lg-9 col-xxl-8 px-sm-0 px-md-2-5',
73
+ },
74
+ }) %}
75
+ {% endif %}
76
+
77
+ {% set _css_classes = _css_classes|merge([_modifiers[_background]]) %}
78
+ {% set _attributes = attributes.addClass(['bg-transparent', 'border-0']) %}
79
+
80
+ {% if _button is not empty %}
81
+ {% set _attributes = attributes.addClass(['col-md-10']) %}
82
+ {% endif %}
83
+
84
+ <div class="{{ _css_classes|join(' ') }}">
85
+ <div class="container">
86
+ <div class="row">
87
+ {% include '@oe-bcl/bcl-card/card.html.twig' with _card %}
88
+
89
+ {% if _action_button is not empty %}
90
+ <div class="col-12 col-md-2 text-end">
91
+ <div class="d-grid d-md-block">
92
+ {% include '@oe-bcl/bcl-button/button.html.twig' with _action_button only %}
93
+ </div>
94
+ </div>
95
+ {% endif %}
96
+ {% if _service_buttons is not empty %}
97
+ <div class="d-flex justify-content-end">
98
+ {% for _button in _service_buttons %}
99
+ {% include '@oe-bcl/bcl-button/button.html.twig' with _button only %}
100
+ {% endfor %}
101
+ </div>
102
+ {% endif %}
103
+ </div>
104
+ </div>
105
+ </div>
106
+
107
+ {% endspaceless %}
@@ -27,6 +27,10 @@
27
27
  'mw-date',
28
28
  ] %}
29
29
 
30
+ {% if attributes is empty %}
31
+ {% set attributes = create_attribute() %}
32
+ {% endif %}
33
+
30
34
  {% set attributes = attributes.addClass(_css_classes) %}
31
35
 
32
36
  {% if _date_time is not empty %}
@@ -0,0 +1,114 @@
1
+ {% spaceless %}
2
+
3
+ {#
4
+ Parameters:
5
+ - title: (string) (default: "")
6
+ - title_tag: (string) (default: "h2")
7
+ - "items" (array) (default: []): format: [
8
+ {
9
+ "term" (object or array of object) -format: {
10
+ icon: {} - icon object,
11
+ label: ""
12
+ }
13
+ "definition" (block or array of string)
14
+ },
15
+ ...
16
+ ]
17
+ - "variant" (string) (default: '')
18
+ - option: ["horizontal"]
19
+ #}
20
+
21
+ {# Parameters #}
22
+
23
+ {% set _title = title|default('') %}
24
+ {% set _title_tag = title_tag|default('h2') %}
25
+ {% set _items = items|default([]) %}
26
+ {% set _variant = variant|default('') %}
27
+
28
+ {% if attributes is empty %}
29
+ {% set attributes = create_attribute() %}
30
+ {% endif %}
31
+
32
+ {% if _variant == 'horizontal' %}
33
+ {% set attributes = attributes.addClass(["d-md-grid", "grid-3-9"]) %}
34
+ {% endif %}
35
+
36
+ {% if _title is not empty %}
37
+ {% set _title_classes = 'fw-bold mb-4' %}
38
+ <{{ _title_tag }} class="{{ _title_classes }}">
39
+ {{- _title -}}
40
+ </{{ _title_tag }}>
41
+ {% endif %}
42
+
43
+ <dl
44
+ {{ attributes }}
45
+ >
46
+ {% for _item in _items %}
47
+ {% if _item.term is not empty %}
48
+ {% if _item.term is iterable %}
49
+ {% if _variant == 'horizontal' %}
50
+ <div>
51
+ {% endif %}
52
+ {% for _term in _item.term %}
53
+ <dt
54
+ {% if _variant == 'horizontal' and _term.icon is not empty %}
55
+ class="d-flex"
56
+ {% endif %}
57
+ >
58
+ {%- if _term.icon is not empty -%}
59
+ {% set _icon_classes = ["me-2"] %}
60
+ {% if _variant == 'horizontal' %}
61
+ {% set _icon_classes = _icon_classes|merge(["mt-1"]) %}
62
+ {% endif %}
63
+ {% include '@oe-bcl/bcl-icon/icon.html.twig' with _term.icon|merge({
64
+ attributes: create_attribute().addClass(_icon_classes)
65
+ }) only %}
66
+ {%- endif -%}
67
+ {{- _term.label -}}
68
+ </dt>
69
+ {% endfor %}
70
+ {% if _variant == 'horizontal' %}
71
+ </div>
72
+ {% endif %}
73
+ {% else %}
74
+ <dt
75
+ {% if _variant == 'horizontal' and _item.term.icon is not empty %}
76
+ class="d-flex"
77
+ {% endif %}
78
+ >
79
+ {% if _item.term.icon is not empty %}
80
+ {% set _icon_classes = ["me-2"] %}
81
+ {% if _variant == 'horizontal' %}
82
+ {% set _icon_classes = _icon_classes|merge(["mt-1"]) %}
83
+ {% endif %}
84
+ {%- include '@oe-bcl/bcl-icon/icon.html.twig' with _item.term.icon|merge({
85
+ attributes: create_attribute().addClass(_icon_classes)
86
+ }) only -%}
87
+ {% endif %}
88
+ {{- _item.term.label -}}
89
+ </dt>
90
+ {% endif %}
91
+ {% endif %}
92
+ {% if _item.definition is not empty %}
93
+ {% if _item.definition is iterable %}
94
+ {% if _variant == 'horizontal' %}
95
+ <div>
96
+ {% endif %}
97
+ {% for _definition in _item.definition %}
98
+ {% if _definition.label is not defined %}
99
+ <dd>{{- _definition -}}</dd>
100
+ {% endif %}
101
+ {% endfor %}
102
+ {% if _variant == 'horizontal' %}
103
+ </div>
104
+ {% endif %}
105
+ {% else %}
106
+ <dd>
107
+ {%- block definition _item.definition -%}
108
+ </dd>
109
+ {% endif %}
110
+ {% endif %}
111
+ {% endfor %}
112
+ </dl>
113
+
114
+ {% endspaceless %}
@@ -0,0 +1,41 @@
1
+ {% extends '@oe-bcl/bcl-base-templates/content-type.html.twig' %}
2
+
3
+ {% block sidebar %}
4
+ {% if sidebar.image is not empty %}
5
+ <img class="mb-4" src="https://picsum.photos/275?random=1" alt="image" />
6
+ {% endif %}
7
+ <div class="bcl-event-details mb-4">
8
+ <h3 class="fw-bold mb-4">Event Details</h3>
9
+ {% include '@oe-bcl/bcl-description-list/description-list.html.twig' with sidebar only %}
10
+ <div class="mt-3-5">
11
+ {% for badge in sidebar.badges %}
12
+ {% include '@oe-bcl/bcl-badge/badge.html.twig' with badge only %}
13
+ {% endfor %}
14
+ </div>
15
+ </div>
16
+ {% endblock %}
17
+
18
+ {% block content %}
19
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
20
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
21
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
22
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
23
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
24
+ </p>
25
+ <h3 class="fw-bold my-4">Description</h3>
26
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
27
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
28
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
29
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
30
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
31
+ </p>
32
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
33
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet.
34
+ </p>
35
+ {% endblock %}
36
+
37
+ {% block related %}
38
+ <h3 class="fw-bold my-4">Related documents</h3>
39
+ {% include '@oe-bcl/bcl-file/file.html.twig' with files[0] only %}
40
+ {% include '@oe-bcl/bcl-file/file.html.twig' with files[1] only %}
41
+ {% endblock %}
@@ -2,27 +2,30 @@
2
2
 
3
3
  {#
4
4
  Parameters:
5
+ - "title" (string) (default: '')
6
+ - "title_tag" (string) (default: 'h2')
5
7
  - "variant" (string) (default: '') options:
6
8
  [ default, block ]
9
+ - "display_icons" (boolean) (default: true)
7
10
  - "items" (array) (default: []):
8
11
  - "icon" (associate array) (default: { size: 'm' })
9
12
  - "subtitle" (string) (default: '')
10
13
  - "title" (string) (default: '')
11
14
  - "description" (string) (default:'')
12
- - "display_icons" (boolean) (default: true)
13
15
  - "grid_columns" (int) (default: 1)
16
+ - "responsiveness" (string) (default: 'md')
17
+ - "responsive_columns" (integer) (default: 3)
14
18
  - "gutter" (int) (default: 4)
15
- - "equal_height" (boolean) (default: true)
19
+ - "equal_height" (boolean) (default: false)
16
20
  - "cols_extra_classes" (string) (default: '')
17
- - "responsiveness" (string) (default: 'md')
18
21
  - "icons_path" (string) (default: '')
19
22
  - "link_more" (object of type link) (default {})
20
-
21
23
  #}
22
24
 
23
25
  {# Parameters #}
24
26
 
25
27
  {% set _title = title|default('') %}
28
+ {% set _title_tag = title_tag|default('h2') %}
26
29
  {% set _variant = variant|default('default') %}
27
30
  {% set _css_classes = ['bcl-fact-figures', 'bcl-fact-figures--' ~ _variant] %}
28
31
  {% set _display_icons = display_icons ?? true %}
@@ -57,11 +60,16 @@
57
60
  {% if _equal_height %}
58
61
  {% set _cols_classes = _cols_classes ~ ' h-100' %}
59
62
  {% endif %}
63
+ {% if attributes is empty %}
64
+ {% set attributes = create_attribute() %}
65
+ {% endif %}
66
+
60
67
  {% set attributes = attributes.addClass(_css_classes) %}
61
68
 
62
69
  <div {{ attributes }}>
63
70
  {% if _title is not empty %}
64
- <h4 class="fw-bold">{{ _title }}</h4>
71
+ {% set _title_classes = 'fw-bold' %}
72
+ <{{ _title_tag }} class="{{ _title_classes }}">{{ _title }}</{{ _title_tag }}>
65
73
  {% endif %}
66
74
  <div
67
75
  {% if _wrapper_classes is not empty %}
@@ -1,10 +1,16 @@
1
1
  {% spaceless %}
2
2
 
3
3
  {# Parameters:
4
+ - with_text (boolean) (default: false)
5
+ - title: (string) (default: '')
6
+ - title_tag: (string) (default: 'h2')
4
7
  - image: (string) (default: "")
5
8
  - poster_image: (string) (default: "")
6
9
  - content: (string) (default: "")
10
+ - wrapper_classes: (default: '')
7
11
  - content_classes: (string) (default: "")
12
+ - read_more (object) (default: {})
13
+ - description (string) (default: '')
8
14
  - ratio: (string) (default: "16x9")
9
15
  - options ["1x1", "4x3", "16x9", "21x9"]
10
16
  - sources: (array of sources) (default: []) format: [
@@ -26,15 +32,51 @@
26
32
  - "embedded_media"
27
33
  #}
28
34
 
35
+ {% set _title = title|default('') %}
36
+ {% set _title_tag = title_tag|default('h2') %}
37
+ {% set _with_text = with_text|default(false) %}
38
+ {% set _wrapper_classes = 'bcl-featured-item' %}
39
+ {% set _description = description|default('') %}
29
40
  {% set _embedded_media = embedded_media|default('') %}
30
- {% set _image = image|default("") %}
31
- {% set _poster_image = poster_image|default("") %}
32
- {% set _content = content|default("") %}
33
- {% set _content_classes = content_classes|default("") %}
34
- {% set _ratio = ratio|default("16x9") %}
41
+ {% set _image = image|default('') %}
42
+ {% set _poster_image = poster_image|default('') %}
43
+ {% set _content = content|default('') %}
44
+ {% set _alignment = alignment|default('right') %}
45
+ {% set _content_classes = content_classes|default('') %}
46
+ {% set _ratio = ratio|default('16x9') %}
35
47
  {% set _sources = sources|default([]) %}
36
48
  {% set _tracks = tracks|default([]) %}
49
+ {% set _col_classes = 'col-12 col-md-6' %}
50
+ {% set _read_more = read_more|default({}) %}
37
51
 
52
+ {% if wrapper_classes is defined and wrapper_classes is not empty %}
53
+ {% set _wrapper_classes = _wrapper_classes ~ ' ' ~ wrapper_classes %}
54
+ {% endif %}
55
+
56
+ {% if attributes is empty %}
57
+ {% set attributes = create_attribute() %}
58
+ {% endif %}
59
+
60
+ {% if _with_text %}
61
+ <div class="{{ _wrapper_classes }}">
62
+
63
+ {% if _title is not empty %}
64
+ {% set _title_classes = 'fw-bold mb-4' %}
65
+ <{{ _title_tag }} class="{{ _title_classes }}">
66
+ {{- _title -}}
67
+ </{{ _title_tag }}>
68
+ {% endif %}
69
+
70
+ <div class="row">
71
+ <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '1' : '2' }}">
72
+ {{- _description|default('') -}}
73
+
74
+ {% if _read_more is not empty %}
75
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _read_more only %}
76
+ {% endif %}
77
+ </div>
78
+ <div class="{{ _col_classes }} order-{{ _alignment == "right" ? '2' : '1' }}">
79
+ {% endif %}
38
80
 
39
81
  <figure
40
82
  {{ attributes }}
@@ -79,4 +121,10 @@
79
121
  {% endif %}
80
122
  </figure>
81
123
 
124
+ {% if _with_text %}
125
+ </div>
126
+ </div>
127
+ </div>
128
+ {% endif %}
129
+
82
130
  {% endspaceless %}