@openeuropa/bcl-theme-default 0.14.0 → 0.18.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 (74) hide show
  1. package/bcl-builder.config.js +4 -0
  2. package/css/oe-bcl-default.css +252 -46
  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/slimselect.min.js +1 -1
  9. package/package.json +7 -6
  10. package/src/scss/_badge.scss +15 -0
  11. package/src/scss/_bcl-offcanvas.scss +4 -4
  12. package/src/scss/_footer.scss +19 -7
  13. package/src/scss/_header.scss +90 -18
  14. package/src/scss/_inpage-navigation.scss +1 -1
  15. package/src/scss/_multiselect.scss +3 -2
  16. package/src/scss/_utilities.scss +1 -1
  17. package/src/scss/_variables.scss +16 -7
  18. package/src/scss/oe-bcl-default.scss +1 -0
  19. package/templates/bcl-accordion/accordion.html.twig +9 -0
  20. package/templates/bcl-alert/alert.html.twig +4 -0
  21. package/templates/bcl-badge/badge.html.twig +9 -1
  22. package/templates/bcl-banner/banner.html.twig +12 -5
  23. package/templates/bcl-base-templates/content-type.html.twig +48 -20
  24. package/templates/bcl-base-templates/listing-page.html.twig +26 -21
  25. package/templates/bcl-blockquote/blockquote.html.twig +4 -0
  26. package/templates/bcl-breadcrumb/breadcrumb.html.twig +6 -2
  27. package/templates/bcl-button/button.html.twig +8 -2
  28. package/templates/bcl-button-group/button-group.html.twig +4 -0
  29. package/templates/bcl-card/card.html.twig +24 -20
  30. package/templates/bcl-card-layout/card-layout.html.twig +4 -0
  31. package/templates/bcl-carousel/carousel.html.twig +4 -0
  32. package/templates/bcl-content-banner/content-banner.html.twig +33 -8
  33. package/templates/bcl-date-block/date-block.html.twig +4 -0
  34. package/templates/bcl-description-list/description-list.html.twig +37 -8
  35. package/templates/bcl-event/event.html.twig +41 -0
  36. package/templates/bcl-fact-figures/fact-figures.html.twig +15 -7
  37. package/templates/bcl-featured-media/featured-media.html.twig +53 -5
  38. package/templates/bcl-file/file.html.twig +19 -4
  39. package/templates/bcl-footer/footer.html.twig +4 -1
  40. package/templates/bcl-form/form.html.twig +4 -0
  41. package/templates/bcl-group/group-landing.html.twig +101 -0
  42. package/templates/bcl-group/group.html.twig +27 -0
  43. package/templates/bcl-header/header.html.twig +11 -2
  44. package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +14 -1
  45. package/templates/bcl-landing-page/landing-page.html.twig +46 -52
  46. package/templates/bcl-links-block/links-block.html.twig +5 -2
  47. package/templates/bcl-list-group/list-group.html.twig +6 -0
  48. package/templates/bcl-listing/listing.html.twig +29 -16
  49. package/templates/bcl-navbar/navbar.html.twig +22 -20
  50. package/templates/bcl-navigation/navigation.html.twig +141 -111
  51. package/templates/bcl-offcanvas/offcanvas.html.twig +4 -0
  52. package/templates/bcl-page/page.html.twig +64 -0
  53. package/templates/bcl-pagination/pagination.html.twig +13 -1
  54. package/templates/bcl-placeholder/placeholder.html.twig +43 -0
  55. package/templates/bcl-progress/progress.html.twig +5 -0
  56. package/templates/bcl-recent-activities/recent-activities.html.twig +4 -0
  57. package/templates/bcl-search/search.html.twig +10 -40
  58. package/templates/bcl-search-form/search-form.html.twig +52 -0
  59. package/templates/bcl-select/select.html.twig +6 -0
  60. package/templates/bcl-table/table.html.twig +4 -0
  61. package/templates/bcl-timeline/timeline.html.twig +16 -1
  62. package/templates/bcl-toast/toasts.html.twig +5 -0
  63. package/templates/bcl-user/user-edit.html.twig +38 -0
  64. package/templates/{bcl-user-view → bcl-user}/user-view-compact.html.twig +5 -1
  65. package/templates/bcl-user/user-view.html.twig +96 -0
  66. package/templates/bcl-group-landing/group-landing.html.twig +0 -106
  67. package/templates/bcl-group-landing-listing/group-landing-listing-offcanvas.html.twig +0 -8
  68. package/templates/bcl-group-landing-listing/group-landing-listing.html.twig +0 -69
  69. package/templates/bcl-search/search-offcanvas.html.twig +0 -8
  70. package/templates/bcl-user-edit/edit-contents.html.twig +0 -32
  71. package/templates/bcl-user-edit/user-edit.html.twig +0 -19
  72. package/templates/bcl-user-listing/user-listing-offcanvas.html.twig +0 -8
  73. package/templates/bcl-user-listing/user-listing.html.twig +0 -45
  74. package/templates/bcl-user-view/user-view.html.twig +0 -106
@@ -4,7 +4,7 @@
4
4
  - variant: (string) (default: "horizontal") options:
5
5
  [ default-1-col, highlight-1-col, default-2-col, default-3-col, highlight-2-col, highlight-3-col ]
6
6
  - title: (string) (default: "")
7
- - title_tag: (string) (default: "h4")
7
+ - title_tag: (string) (default: "h2")
8
8
  - items: (array of objects of type card)
9
9
  - link: (object of type link)
10
10
  - alignment: (string) (default: '') options:
@@ -14,8 +14,8 @@
14
14
  {% set _items = items|default([]) %}
15
15
  {% set _variant = variant|default('default-1-col') %}
16
16
  {% set _title = title|default('') %}
17
+ {% set _title_tag = title_tag|default('h2') %}
17
18
  {% set _alignment = alignment|default('') %}
18
- {% set _title_tag = title_tag|default('h4') %}
19
19
  {% set _link = link|default({}) %}
20
20
  {% set _classes = ['bcl-listing', 'bcl-listing--' ~ _variant] %}
21
21
  {% set _cards = [] %}
@@ -25,6 +25,11 @@
25
25
  gutter: '4',
26
26
  attributes: create_attribute(),
27
27
  } %}
28
+
29
+ {% if attributes is empty %}
30
+ {% set attributes = create_attribute() %}
31
+ {% endif %}
32
+
28
33
  {% set attributes = attributes.addClass(_classes) %}
29
34
 
30
35
  <div {{ attributes }}>
@@ -32,17 +37,20 @@
32
37
  {% if _title is not empty %}
33
38
  {% set _title_classes = 'fw-bold mb-4' %}
34
39
  <{{ _title_tag }} class="{{ _title_classes }}">
35
- {{ _title }}
40
+ {{- _title -}}
36
41
  </{{ _title_tag }}>
37
42
  {% endif %}
38
43
 
39
44
  {% if _items is not empty %}
40
45
  {% for _card in _items %}
46
+ {% set _alignment_class = '' %}
41
47
  {% set _max_width = '' %}
42
48
  {% set _image = {} %}
43
49
  {% if _card.image is not empty %}
44
50
  {% set _max_width = 'mw-listing-img' %}
45
- {% set _image_classes = _card.image.classes ? _card.image.classes ~ " mb-3" : "mb-3" %}
51
+ {% if not _alignment == 'center' %}
52
+ {% set _image_classes = _card.image.classes ? _card.image.classes ~ ' mb-3' : 'mb-3' %}
53
+ {% endif %}
46
54
  {% set _card = _card|merge({image: _card.image|merge({
47
55
  classes: _image_classes
48
56
  })}) %}
@@ -50,7 +58,7 @@
50
58
  {% set _max_width = 'mw-date mb-3' %}
51
59
  {% endif %}
52
60
  {% if _alignment is not empty %}
53
- {% set _alignment = ' align-self-' ~ _alignment %}
61
+ {% set _alignment_class = ' align-self-' ~ _alignment %}
54
62
  {% endif %}
55
63
  {% set _card_classes = [] %}
56
64
  {% set _card_attributes = card.attributes ? card.attributes : create_attribute() %}
@@ -67,8 +75,8 @@
67
75
  horizontal: true,
68
76
  extra_classes_body: 'p-0 pb-md-0 pb-3',
69
77
  horizontal_grid: {
70
- left_col_classes: 'col-md-3 col-lg-2 rounded ' ~ _max_width ~ _alignment,
71
- right_col_classes: 'col-md-9 col-lg-10' ~ _alignment,
78
+ left_col_classes: 'col-md-3 col-lg-2 rounded ' ~ _max_width ~ _alignment_class,
79
+ right_col_classes: 'col-md-9 col-lg-10' ~ _alignment_class,
72
80
  },
73
81
  attributes: _card_attributes,
74
82
  }) %}
@@ -91,8 +99,8 @@
91
99
  {% if _variant == 'default-2-col' %}
92
100
  {% set _card = _card|merge({
93
101
  horizontal_grid: {
94
- left_col_classes: 'col-xl-3 col-md-5 ' ~ _max_width ~ _alignment,
95
- right_col_classes: 'col-xl-9 col-md-7' ~ _alignment,
102
+ left_col_classes: 'col-xl-3 col-md-5 ' ~ _max_width ~ _alignment_class,
103
+ right_col_classes: 'col-xl-9 col-md-7' ~ _alignment_class,
96
104
  },
97
105
  }) %}
98
106
  {% set _card_layout = _card_layout|merge({
@@ -101,8 +109,8 @@
101
109
  {% else %}
102
110
  {% set _card = _card|merge({
103
111
  horizontal_grid: {
104
- left_col_classes: 'col-lg-4 col-md-6 ' ~ _max_width ~ _alignment,
105
- right_col_classes: 'col-lg-8 col-md-6' ~ _alignment,
112
+ left_col_classes: 'col-lg-4 col-md-6 ' ~ _max_width ~ _alignment_class,
113
+ right_col_classes: 'col-lg-8 col-md-6' ~ _alignment_class,
106
114
  },
107
115
  }) %}
108
116
  {% set _card_layout = _card_layout|merge({
@@ -121,10 +129,14 @@
121
129
  ] %}
122
130
  {% set _card_attributes = _card_attributes.addClass(_card_classes) %}
123
131
  {% set _card = _card|merge({
124
- extra_classes_body: 'pb-4',
125
132
  wrapper_class: 'col',
126
133
  attributes: _card_attributes,
127
134
  }) %}
135
+ {% if _card.image is defined and _card.image is not empty %}
136
+ {% set _card = _card|merge({
137
+ extra_classes_body: "pt-0",
138
+ }) %}
139
+ {% endif %}
128
140
  {% set _card_layout = _card_layout|merge({
129
141
  cols_extra_classes: 'mt-4-5',
130
142
  }) %}
@@ -141,9 +153,13 @@
141
153
  {% set _card_attributes = _card_attributes.addClass(_card_classes) %}
142
154
  {% set _card = _card|merge({
143
155
  wrapper_class: 'col',
144
- extra_classes_body: 'pt-0',
145
156
  attributes: _card_attributes,
146
157
  }) %}
158
+ {% if _card.image is defined and _card.image is not empty %}
159
+ {% set _card = _card|merge({
160
+ extra_classes_body: 'pt-0',
161
+ }) %}
162
+ {% endif %}
147
163
  {% set _card_layout = _card_layout|merge({ gutter: '4' }) %}
148
164
  {% if variant == 'highlight-2-col' %}
149
165
  {% set _card_layout = _card_layout|merge({ responsive_columns: 2 }) %}
@@ -161,9 +177,6 @@
161
177
  {% if _link is not empty %}
162
178
  {% set _link_attributes = _link.attributes ? _link.attributes : create_attribute() %}
163
179
  {% set _link_attributes = _link_attributes.addClass(['mt-3-5', 'd-inline-block']) %}
164
- {% if _variant == 'default-1-col' or _variant == 'default-2-col' or variant == 'default-3-col' %}
165
- {% set _link_attributes = _link_attributes.addClass(['ps-3-5']) %}
166
- {% endif %}
167
180
  {% include '@oe-bcl/bcl-link/link.html.twig' with _link|merge({
168
181
  attributes: _link_attributes,
169
182
  icon: _link.icon|merge({
@@ -45,26 +45,28 @@
45
45
  {{ attributes }}
46
46
  >
47
47
  <div class='container'>
48
- {% if _brand is not empty %}
49
- <a class='navbar-brand' href='{{ _brand.link }}'>
50
- {%- if _brand.label is defined -%}
51
- {{- _brand.label -}}
52
- {%- else -%}
53
- {% for logo in _brand.logos %}
54
- <img
55
- src='{{ logo.src }}'
56
- {% if logo.alt is not empty %}
57
- alt='{{ logo.alt }}'
58
- {% endif %}
59
- {% if logo.class is not empty %}
60
- class='{{ logo.class }}'
61
- {% endif %}
62
- />
63
- {% endfor %}
64
- {%- endif -%}
65
- </a>
66
- {% endif %}
67
- {% if not _disable_collapse %}
48
+ {% if _brand is not empty %}
49
+ <a class='navbar-brand' href='{{ _brand.link }}'>
50
+ {% for logo in _brand.logos %}
51
+ <img
52
+ src='{{ logo.src }}'
53
+ {% if logo.alt is not empty %}
54
+ alt='{{ logo.alt }}'
55
+ {% endif %}
56
+ {% if logo.class is not empty %}
57
+ class='{{ logo.class }}'
58
+ {% endif %}
59
+ />
60
+ {% endfor %}
61
+ {%- if _brand.label is defined -%}
62
+ <div class="h5 ms-4-5 d-none d-lg-inline-block">
63
+ {{- _brand.label -}}
64
+ </div>
65
+ {% endif %}
66
+ </a>
67
+ {% endif %}
68
+
69
+ {% if not _disable_collapse %}
68
70
  <button
69
71
  class='navbar-toggler'
70
72
  type='button'
@@ -1,8 +1,9 @@
1
+ {% import _self as navigation %}
1
2
  {% spaceless %}
2
3
 
3
4
  {# Parameters:
4
5
  - pills (boolean) (default: false)
5
- - tabs (boolean) (default: false)
6
+ - tabs (boolean) (default: false) - If tabs is set to true, the nav should also be set to true for accessibility reasons
6
7
  - vertical (boolean) (default: false)
7
8
  - full_width (boolean) (default: false)
8
9
  - alignment (string) (default: '')
@@ -17,131 +18,160 @@
17
18
  - active (boolean)
18
19
  - button (boolean) - set to button
19
20
  - content (string) - content for tab
21
+ - navigation (navigation Object) - set for multiple level or navigation, items inside is required
20
22
  }
21
23
  ]
22
24
  #}
23
25
 
24
- {% set _pills = pills|default(false) %}
25
- {% set _tabs = tabs|default(false) %}
26
- {% set _vertical = vertical|default(false) %}
27
- {% set _full_width = full_width|default(false) %}
28
- {% set _alignment = alignment|default('') %}
29
- {% set _id = id|default('') %}
30
- {% set _tabs_content = tabs_content|default(false) %}
31
- {% set _nav = nav|default(false) %}
32
- {% set _navbar = navbar|default(false) %}
33
- {% set _items = items|default([]) %}
26
+ {# Define main macro #}
27
+ {% macro render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) %}
28
+ {% spaceless %}
29
+ {% import _self as navigation %}
34
30
 
35
- {% if _navbar %}
36
- {% set _classes = ['navbar-nav'] %}
37
- {% else %}
38
- {% set _classes = ['nav'] %}
39
- {% endif %}
40
- {% if _pills %}
41
- {% set _classes = _classes|merge(['nav-pills']) %}
42
- {% endif %}
43
- {% if _tabs %}
44
- {% set _classes = _classes|merge(['nav-tabs']) %}
45
- {% endif %}
46
- {% if _vertical %}
47
- {% set _classes = _classes|merge(['flex-column']) %}
48
- {% endif %}
49
- {% if _full_width %}
50
- {% set _classes = _classes|merge(['nav-fill']) %}
51
- {% endif %}
52
- {% if _alignment is not empty %}
53
- {% set _classes = _classes|merge(['justify-content-' ~ _alignment]) %}
54
- {% endif %}
31
+ {% set _pills = pills|default(false) %}
32
+ {% set _tabs = tabs|default(false) %}
33
+ {% set _vertical = vertical|default(false) %}
34
+ {% set _full_width = full_width|default(false) %}
35
+ {% set _alignment = alignment|default('') %}
36
+ {% set _id = id|default('') %}
37
+ {% set _tabs_content = tabs_content|default(false) %}
38
+ {% set _nav = nav|default(false) %}
39
+ {% set _navbar = navbar|default(false) %}
40
+ {% set _items = items|default([]) %}
55
41
 
56
- {% if attributes is empty %}
57
- {% set attributes = create_attribute() %}
58
- {% endif %}
42
+ {% if _navbar %}
43
+ {% set _classes = ['navbar-nav'] %}
44
+ {% else %}
45
+ {% set _classes = ['nav'] %}
46
+ {% endif %}
47
+ {% if _pills %}
48
+ {% set _classes = _classes|merge(['nav-pills']) %}
49
+ {% endif %}
50
+ {% if _tabs %}
51
+ {% set _classes = _classes|merge(['nav-tabs']) %}
52
+ {% endif %}
53
+ {% if _vertical %}
54
+ {% set _classes = _classes|merge(['flex-column']) %}
55
+ {% endif %}
56
+ {% if _full_width %}
57
+ {% set _classes = _classes|merge(['nav-fill']) %}
58
+ {% endif %}
59
+ {% if _alignment is not empty %}
60
+ {% set _classes = _classes|merge(['justify-content-' ~ _alignment]) %}
61
+ {% endif %}
59
62
 
60
- {% if _id is not empty %}
61
- {% set attributes = attributes.setAttribute('id', _id) %}
62
- {% endif %}
63
+ {% if attributes is empty %}
64
+ {% set attributes = create_attribute() %}
65
+ {% endif %}
63
66
 
64
- {% if not _nav and _tabs %}
65
- {% set attributes = attributes.setAttribute('role', 'tablist') %}
66
- {% endif %}
67
+ {% if _id is not empty %}
68
+ {% set attributes = attributes.setAttribute('id', _id) %}
69
+ {% endif %}
67
70
 
68
- {% set attributes = attributes.addClass(_classes) %}
71
+ {% if _tabs %}
72
+ {% set attributes = attributes.setAttribute('role', 'tablist') %}
73
+ {% endif %}
74
+ {% set attributes = attributes.addClass(_classes) %}
69
75
 
70
- {% if _nav %}
71
- <nav
72
- {{ attributes }}
73
- >
74
- {% else %}
75
- <ul
76
- {{ attributes }}
77
- >
78
- {% endif %}
79
- {% if _items is not empty and _items is iterable %}
80
- {% for _item in _items %}
81
- {% set _nav_class = 'nav-item' %}
82
- {% if _item.dropdown %}
83
- {% set _nav_class = _nav_class ~ ' dropdown' %}
84
- {% set _item = _item|merge({remove_wrapper: true}) %}
85
- {% endif %}
86
- {% if _item.dropdown %}
87
- {% set _item_classes = [] %}
88
- {% else %}
89
- {% set _item_classes = ['nav-link'] %}
90
- {% endif %}
91
- {% if _item.active %}
92
- {% set _item_classes = _item_classes|merge(['active']) %}
93
- {% endif %}
94
- {% if _item.attributes is empty %}
95
- {% set _item = _item|merge({
96
- attributes: create_attribute()
97
- }) %}
98
- {% endif %}
99
- {% set _item = _item|merge({
100
- attributes: _item.attributes.addClass(_item_classes),
101
- clean_class: true}) %}
102
- {% if not _nav %}
103
- <li
104
- class="{{ _nav_class }}"
105
- {% if _tabs %}
106
- role="presentation"
107
- {% endif %}
108
- >
109
- {% endif %}
110
- {% if _item.dropdown is defined %}
111
- {% include '@oe-bcl/bcl-dropdown/dropdown.html.twig' with _item only %}
112
- {% elseif _item.button is defined %}
113
- {% include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
114
- {% else %}
115
- {% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
116
- {% endif %}
117
- {% if not _nav %}
118
- </li>
119
- {% endif %}
120
- {% endfor %}
76
+ {% if _nav %}
77
+ <nav
78
+ {{ attributes }}
79
+ >
80
+ {% else %}
81
+ <ul
82
+ {{ attributes }}
83
+ >
121
84
  {% endif %}
122
- {% if _nav %}
123
- </nav>
124
- {% else %}
125
- </ul>
126
- {% endif %}
127
- {% if _tabs_content %}
128
- <div class="tab-content">
129
- {%- block contents -%}
130
85
  {% if _items is not empty and _items is iterable %}
131
- {% for _item in _items %}
132
- {% if _item.content is not empty %}
133
- {% set _content_class = 'tab-pane fade' %}
134
- {% if _item.active %}
135
- {% set _content_class = _content_class ~ ' show active' %}
86
+ {% for _item in items %}
87
+ {% set _nav_class = 'nav-item' %}
88
+ {% if _item.dropdown %}
89
+ {% set _nav_class = _nav_class ~ ' dropdown' %}
90
+ {% set _item = _item|merge({remove_wrapper: true}) %}
91
+ {% endif %}
92
+ {% if _item.dropdown %}
93
+ {% set _item_classes = [] %}
94
+ {% else %}
95
+ {% set _item_classes = ['nav-link'] %}
96
+ {% endif %}
97
+ {% if _item.active %}
98
+ {% set _item_classes = _item_classes|merge(['active']) %}
99
+ {% endif %}
100
+ {% if _item.attributes is empty %}
101
+ {% set _item = _item|merge({
102
+ attributes: create_attribute()
103
+ }) %}
104
+ {% endif %}
105
+ {% set _item = _item|merge({
106
+ attributes: _item.attributes.addClass(_item_classes),
107
+ clean_class: true}) %}
108
+ {% if not _nav %}
109
+ <li
110
+ class="{{ _nav_class }}"
111
+ {% if _tabs %}
112
+ role="tab"
136
113
  {% endif %}
137
- <div class="{{ _content_class }}" id="{{ _item.target }}" role="tabpanel" aria-labelledby="{{ _item.id }}">
138
- {{- _item.content -}}
139
- </div>
114
+ >
115
+ {% elseif _tabs %}
116
+ {% set _item = _item|merge({
117
+ attributes: _item.attributes.setAttribute("role", "tab"),
118
+ })
119
+ %}
120
+ {% endif %}
121
+ {% if _item.dropdown is defined %}
122
+ {% include '@oe-bcl/bcl-dropdown/dropdown.html.twig' with _item only %}
123
+ {% elseif _item.button is defined %}
124
+ {% include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
125
+ {% else %}
126
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
127
+ {% endif %}
128
+ {% if _item.navigation is defined and _item.navigation.items is not empty and _item.navigation.items is iterable %}
129
+ {{ navigation.render(
130
+ _item.navigation.items,
131
+ _item.navigation.pills,
132
+ _item.navigation.tabs,
133
+ _item.navigation.tabs_content,
134
+ _item.navigation.vertical,
135
+ _item.navigation.full_width,
136
+ _item.navigation.alignment,
137
+ _item.navigation.id,
138
+ _item.navigation.nav,
139
+ _item.navigation.navbar,
140
+ _item.navigation.attributes
141
+ ) }}
142
+ {% endif %}
143
+ {% if not _nav %}
144
+ </li>
140
145
  {% endif %}
141
146
  {% endfor %}
142
147
  {% endif %}
143
- {%- endblock -%}
144
- </div>
145
- {% endif %}
148
+ {% if _nav %}
149
+ </nav>
150
+ {% else %}
151
+ </ul>
152
+ {% endif %}
153
+ {% if _tabs_content %}
154
+ <div class="tab-content">
155
+ {%- block contents -%}
156
+ {% if _items is not empty and _items is iterable %}
157
+ {% for _item in _items %}
158
+ {% if _item.content is not empty %}
159
+ {% set _content_class = 'tab-pane fade' %}
160
+ {% if _item.active %}
161
+ {% set _content_class = _content_class ~ ' show active' %}
162
+ {% endif %}
163
+ <div class="{{ _content_class }}" id="{{ _item.target }}" role="tabpanel" aria-labelledby="{{ _item.id }}">
164
+ {{- _item.content -}}
165
+ </div>
166
+ {% endif %}
167
+ {% endfor %}
168
+ {% endif %}
169
+ {%- endblock -%}
170
+ </div>
171
+ {% endif %}
172
+ {% endspaceless %}
173
+ {% endmacro %}
174
+
175
+ {{ navigation.render(items, pills, tabs, tabs_content, vertical, full_width, alignment, id, nav, navbar, attributes) }}
146
176
 
147
177
  {% endspaceless %}
@@ -41,6 +41,10 @@
41
41
  {% set _aria_labelled = _title.id|default('') %}
42
42
  {% endif %}
43
43
 
44
+ {% if attributes is empty %}
45
+ {% set attributes = create_attribute() %}
46
+ {% endif %}
47
+
44
48
  {% if _aria_labelled is defined and _aria_labelled is not empty %}
45
49
  {% set attributes = attributes.setAttribute('aria-labelledby', _aria_labelled) %}
46
50
  {% endif %}
@@ -0,0 +1,64 @@
1
+ {% extends '@oe-bcl/bcl-base-templates/content-type.html.twig' %}
2
+
3
+ {% block sidebar %}
4
+ {% include '@oe-bcl/bcl-inpage-navigation/inpage-navigation.html.twig' with sidebar only %}
5
+ {% endblock %}
6
+
7
+ {% block content %}
8
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
9
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
10
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
11
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
12
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
13
+ </p>
14
+ <h3 id="item-1" class="fw-bold my-4">Section 1</h3>
15
+ {% if featured_item %}
16
+ {% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with featured_item only %}
17
+ {% endif %}
18
+
19
+ {% if page_banner %}
20
+ {% include '@oe-bcl/bcl-banner/banner.html.twig' with page_banner only %}
21
+ {% endif %}
22
+
23
+ {% if listing %}
24
+ {% include '@oe-bcl/bcl-listing/listing.html.twig' with listing only %}
25
+ {% endif %}
26
+
27
+ <h3 id="item-2" class="fw-bold my-4">Section 2</h3>
28
+
29
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
30
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
31
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
32
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
33
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
34
+ </p>
35
+
36
+ {% if blockquote %}
37
+ {% include '@oe-bcl/bcl-blockquote/blockquote.html.twig' with blockquote only %}
38
+ {% endif %}
39
+ {% if accordion %}
40
+ {% include '@oe-bcl/bcl-accordion/accordion.html.twig' with accordion only %}
41
+ {% endif %}
42
+ {% if timeline %}
43
+ {% include '@oe-bcl/bcl-timeline/timeline.html.twig' with timeline only %}
44
+ {% endif %}
45
+
46
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
47
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
48
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
49
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
50
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
51
+ </p>
52
+
53
+ <h3 id="item-3" class="fw-bold my-4">Section 3</h3>
54
+
55
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sit amet eleifend tortor. In facilisis eros vitae turpis ullamcorper,
56
+ a euismod dolor lacinia. Nam facilisis ipsum et sollicitudin imperdiet. Curabitur a efficitur ante. Phasellus non felis laoreet,
57
+ posuere ante ut, rhoncus tortor. Proin sed erat vel nisl luctus vulputate. Nunc tristique ultricies turpis, eu dictum enim ultrices vel.
58
+ Sed posuere at leo sit amet placerat. Sed dapibus viverra urna ac pretium. Praesent et laoreet erat, eget volutpat metus. Duis ac augue
59
+ sed tortor elementum dignissim in sit amet velit. Nullam nec viverra mi.
60
+ </p>
61
+
62
+ {% include '@oe-bcl/bcl-file/file.html.twig' with files[0] only %}
63
+ {% include '@oe-bcl/bcl-file/file.html.twig' with files[1] only %}
64
+ {% endblock %}
@@ -12,6 +12,7 @@
12
12
  - path (string)
13
13
  - label (string)
14
14
  - disabled (boolean)
15
+ - aria_label (string)
15
16
  - icon (Icon component)
16
17
  }
17
18
  - next (object)
@@ -19,6 +20,7 @@
19
20
  - path (string)
20
21
  - label (string)
21
22
  - disabled (boolean)
23
+ - aria_label (string)
22
24
  - icon (Icon component)
23
25
  }
24
26
  - items (array of objects)
@@ -47,11 +49,15 @@
47
49
  {% set _classes = _classes ~ ' justify-content-' ~ _alignment %}
48
50
  {% endif %}
49
51
 
52
+ {% if attributes is empty %}
53
+ {% set attributes = create_attribute() %}
54
+ {% endif %}
55
+
50
56
  {% if _aria_label is not empty %}
51
57
  {% set attributes = attributes.setAttribute('aria-label', aria_label) %}
52
58
  {% endif %}
53
59
  {% if _extra_classes is not empty %}
54
- {% set _class = _class ~ ' ' ~ _extra_classes %}
60
+ {% set _class = _class ~ ' ' ~ _extra_classes %}
55
61
  {% endif %}
56
62
 
57
63
  <nav
@@ -71,6 +77,9 @@
71
77
  tabindex="-1"
72
78
  aria-disabled="true"
73
79
  {% endif %}
80
+ {%- if _prev.aria_label -%}
81
+ aria-label="{{ _prev.aria_label }}"
82
+ {%- endif -%}
74
83
  >
75
84
  {%- if _enable_icon -%}
76
85
  {%- if _prev.icon is not empty -%}
@@ -123,6 +132,9 @@
123
132
  tabindex="-1"
124
133
  aria-disabled="true"
125
134
  {% endif %}
135
+ {%- if _next.aria_label -%}
136
+ aria-label="{{ _next.aria_label }}"
137
+ {%- endif -%}
126
138
  >
127
139
  {%- if _enable_icon -%}
128
140
  {%- if _next.icon is not empty -%}
@@ -0,0 +1,43 @@
1
+ {% spaceless %}
2
+
3
+ {# Parameters:
4
+ - width (int) (default: 0) - between 0-100
5
+ - variant (string) (default: '')
6
+ - options : ["primary", "secondary", "success", "danger", "warning", "info", "light", "dark"]
7
+ - size (string) (default: '')
8
+ - options : ["xs", "lg"]
9
+ - animation (string) (default: '')
10
+ - options : ["glow", "wave"]
11
+ #}
12
+
13
+ {% set _width = width|default(0) %}
14
+ {% set _variant = variant|default('') %}
15
+ {% set _size = size|default('') %}
16
+ {% set _animation = animation|default('') %}
17
+ {% set _classes = ['placeholder'] %}
18
+
19
+ {% if _size is not empty %}
20
+ {% set _classes = _classes|merge(['placeholder-' ~ _size]) %}
21
+ {% endif %}
22
+
23
+ {% if _variant is not empty %}
24
+ {% set _classes = _classes|merge(['bg-' ~ _variant]) %}
25
+ {% endif %}
26
+
27
+ {% if attributes is empty %}
28
+ {% set attributes = create_attribute() %}
29
+ {% endif %}
30
+
31
+ {% set attributes = attributes.addClass(_classes) %}
32
+ {% set attributes = attributes.setAttribute('style', 'width: ' ~ _width ~ '%;') %}
33
+
34
+ {% if _animation is not empty %}
35
+ <p class="placeholder-{{ _animation }}">
36
+ {% endif %}
37
+ <span {{- attributes -}} >
38
+ </span>
39
+ {% if _animation is not empty %}
40
+ </p>
41
+ {% endif %}
42
+
43
+ {% endspaceless %}
@@ -32,6 +32,10 @@
32
32
  {% set _classes = _classes ~ ' bg-' ~ _variant %}
33
33
  {% endif %}
34
34
 
35
+ {% if attributes is empty %}
36
+ {% set attributes = create_attribute() %}
37
+ {% endif %}
38
+
35
39
  {% set attributes = attributes.addClass(['progress']) %}
36
40
 
37
41
  {% if _bar_label is empty %}
@@ -49,6 +53,7 @@
49
53
  role="progressbar"
50
54
  style="width: {{ _progress }}%"
51
55
  aria-valuenow="{{ _progress }}"
56
+ aria-label="{{ _progress }}"
52
57
  aria-valuemin="{{ _min }}"
53
58
  aria-valuemax="{{ _max }}"
54
59
  >
@@ -23,6 +23,10 @@
23
23
 
24
24
  {% set _activities = activities|default([]) %}
25
25
 
26
+ {% if attributes is empty %}
27
+ {% set attributes = create_attribute() %}
28
+ {% endif %}
29
+
26
30
  <div
27
31
  {{ attributes }}
28
32
  >