@openeuropa/bcl-theme-default 1.10.5 → 1.10.7
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.
- package/bcl-builder.config.js +3 -0
- package/css/oe-bcl-ckeditor5.min.css +1 -1
- package/css/oe-bcl-ckeditor5.min.css.map +1 -1
- package/css/oe-bcl-default.css +581 -91
- package/css/oe-bcl-default.css.map +1 -1
- package/css/oe-bcl-default.min.css +1 -1
- package/css/oe-bcl-default.min.css.map +1 -1
- package/js/oe-bcl-default.bundle.js +187 -0
- package/js/oe-bcl-default.bundle.js.map +1 -1
- package/js/oe-bcl-default.bundle.min.js +1 -1
- package/js/oe-bcl-default.bundle.min.js.map +1 -1
- package/js/oe-bcl-default.esm.js +186 -1
- package/js/oe-bcl-default.esm.js.map +1 -1
- package/js/oe-bcl-default.esm.min.js +1 -1
- package/js/oe-bcl-default.esm.min.js.map +1 -1
- package/js/oe-bcl-default.umd.js +187 -0
- package/js/oe-bcl-default.umd.js.map +1 -1
- package/js/oe-bcl-default.umd.min.js +1 -1
- package/js/oe-bcl-default.umd.min.js.map +1 -1
- package/js/slim-select-2/slimselect.min.js +1 -1
- package/package.json +6 -6
- package/src/js/index.esm.js +4 -0
- package/src/js/index.umd.js +4 -0
- package/src/js/main-navigation/main-navigation.js +42 -0
- package/src/js/mega-menu/mega-menu.js +177 -0
- package/src/scss/_header.scss +212 -111
- package/src/scss/_mega-menu.scss +432 -0
- package/src/scss/base/_colors.scss +3 -0
- package/src/scss/oe-bcl-default.scss +1 -0
- package/templates/bcl-button/button.html.twig +3 -2
- package/templates/bcl-header/header.html.twig +37 -6
- package/templates/bcl-mega-menu/mega-menu-items.html.twig +35 -0
- package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +65 -0
- package/templates/bcl-mega-menu/mega-menu.html.twig +115 -0
- package/templates/bcl-navigation/navigation.html.twig +3 -1
- package/templates/bcl-offcanvas/offcanvas.html.twig +9 -6
package/src/scss/_header.scss
CHANGED
|
@@ -4,12 +4,7 @@ $header-background-start: #039 !default;
|
|
|
4
4
|
$header-background-end: #1b4ac3 !default;
|
|
5
5
|
$header-link-active-background: #003776 !default;
|
|
6
6
|
|
|
7
|
-
.bcl-
|
|
8
|
-
position: relative;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.bcl-header__project,
|
|
12
|
-
.bcl-header__navbar {
|
|
7
|
+
.bcl-header__project {
|
|
13
8
|
background: linear-gradient(
|
|
14
9
|
90deg,
|
|
15
10
|
$header-background-start 0%,
|
|
@@ -17,71 +12,15 @@ $header-link-active-background: #003776 !default;
|
|
|
17
12
|
);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
|
-
.bcl-header__top-navbar {
|
|
21
|
-
.navbar-collapse {
|
|
22
|
-
justify-content: end;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.navbar-toggler {
|
|
26
|
-
border: none;
|
|
27
|
-
color: $light;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.navbar-toggler-icon {
|
|
31
|
-
background: url("data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMjU2Ij48cmVjdCB3aWR0aD0iMjU2IiBoZWlnaHQ9IjI1NiIgZmlsbD0ibm9uZSIvPjxjaXJjbGUgY3g9IjEyOCIgY3k9IjY0IiByPSIxNiIvPjxjaXJjbGUgY3g9IjEyOCIgY3k9IjEyOCIgcj0iMTYiLz48Y2lyY2xlIGN4PSIxMjgiIGN5PSIxOTIiIHI9IjE2Ii8+PC9zdmc+");
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
15
|
.bcl-header .nav-link {
|
|
36
16
|
color: $eu-blue;
|
|
37
17
|
display: flex;
|
|
38
18
|
align-items: center;
|
|
39
|
-
padding: map-get($spacers, 2);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.bcl-header__navbar {
|
|
43
|
-
.navbar-collapse {
|
|
44
|
-
padding-bottom: map-get($spacers, 3);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.navbar-nav {
|
|
48
|
-
.nav-link {
|
|
49
|
-
color: $gray-100;
|
|
50
|
-
|
|
51
|
-
&:focus,
|
|
52
|
-
&:hover,
|
|
53
|
-
&.active {
|
|
54
|
-
color: #fff;
|
|
55
|
-
}
|
|
56
|
-
&:focus-visible {
|
|
57
|
-
outline: 2px solid $white;
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
outline-offset: 0;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.navbar-toggler {
|
|
65
|
-
position: absolute;
|
|
66
|
-
top: -43px;
|
|
67
|
-
left: map-get($spacers, "2-5");
|
|
68
|
-
border-color: $white;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.navbar-toggler-icon {
|
|
72
|
-
background: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
input:active,
|
|
76
|
-
input:focus {
|
|
77
|
-
box-shadow: 0 0 0 0.25rem hsl(210deg 2% 83% / 50%);
|
|
78
|
-
}
|
|
79
19
|
}
|
|
80
20
|
|
|
81
21
|
.bcl-header--ec,
|
|
82
22
|
.ec__header {
|
|
83
|
-
.bcl-header__project
|
|
84
|
-
.bcl-header__navbar {
|
|
23
|
+
.bcl-header__project {
|
|
85
24
|
background: $header-background;
|
|
86
25
|
}
|
|
87
26
|
/* stylelint-disable-next-line no-descending-specificity */
|
|
@@ -95,8 +34,7 @@ $header-link-active-background: #003776 !default;
|
|
|
95
34
|
}
|
|
96
35
|
|
|
97
36
|
.bcl-header--neutral {
|
|
98
|
-
.bcl-header__project
|
|
99
|
-
.bcl-header__navbar {
|
|
37
|
+
.bcl-header__project {
|
|
100
38
|
background: $gray-700;
|
|
101
39
|
}
|
|
102
40
|
}
|
|
@@ -136,15 +74,22 @@ $header-link-active-background: #003776 !default;
|
|
|
136
74
|
max-width: 80%;
|
|
137
75
|
}
|
|
138
76
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
77
|
+
.bcl-header__navbar.navbar {
|
|
78
|
+
padding: 0;
|
|
79
|
+
.dropdown-toggle,
|
|
80
|
+
.nav-link {
|
|
81
|
+
padding: map-get($spacers, "2-5") map-get($spacers, 3);
|
|
82
|
+
border: none;
|
|
83
|
+
background: transparent;
|
|
84
|
+
}
|
|
85
|
+
&.collapsing {
|
|
86
|
+
transition: none;
|
|
142
87
|
}
|
|
143
88
|
}
|
|
144
89
|
|
|
145
|
-
@
|
|
146
|
-
.bcl-header .
|
|
147
|
-
|
|
90
|
+
@media only screen and (max-width: 400px) {
|
|
91
|
+
.bcl-header--neutral .bcl-header__project-logo {
|
|
92
|
+
display: none;
|
|
148
93
|
}
|
|
149
94
|
}
|
|
150
95
|
|
|
@@ -158,34 +103,44 @@ $header-link-active-background: #003776 !default;
|
|
|
158
103
|
}
|
|
159
104
|
|
|
160
105
|
@include media-breakpoint-down(lg) {
|
|
161
|
-
.bcl-
|
|
162
|
-
|
|
106
|
+
body:has(.bcl-header__navbar #main-navbar.collapsing),
|
|
107
|
+
body:has(.bcl-header__navbar #main-navbar.show),
|
|
108
|
+
body:has(.bcl-header__navbar.collapsing),
|
|
109
|
+
body:has(.bcl-header__navbar.show) {
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
header:has(.bcl-header__navbar #main-navbar.collapsing),
|
|
114
|
+
header:has(.bcl-header__navbar #main-navbar.show),
|
|
115
|
+
header:has(.bcl-header__navbar.collapsing),
|
|
116
|
+
header:has(.bcl-header__navbar.show) {
|
|
117
|
+
height: 100vh;
|
|
118
|
+
display: flex;
|
|
119
|
+
flex-flow: column;
|
|
120
|
+
overflow: auto;
|
|
121
|
+
|
|
122
|
+
> div:has(.breadcrumb) {
|
|
123
|
+
display: none;
|
|
124
|
+
}
|
|
163
125
|
}
|
|
164
126
|
|
|
165
|
-
.bcl-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
right: map-get($spacers, "2-5");
|
|
169
|
-
top: 100%;
|
|
170
|
-
background: white;
|
|
171
|
-
border: 1px solid $gray-300;
|
|
172
|
-
border-radius: 4px;
|
|
173
|
-
|
|
174
|
-
.nav {
|
|
175
|
-
align-items: flex-start;
|
|
176
|
-
flex-direction: column;
|
|
177
|
-
min-width: 16rem;
|
|
178
|
-
padding: map-get($spacers, 3);
|
|
127
|
+
.bcl-header__project {
|
|
128
|
+
padding: map-get($spacers, 3) 0;
|
|
129
|
+
}
|
|
179
130
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
131
|
+
.bcl-header {
|
|
132
|
+
.bcl-header__project {
|
|
133
|
+
z-index: 1040; // Make sure project bar is above the mega menu
|
|
134
|
+
position: relative;
|
|
135
|
+
box-shadow: var(--bs-box-shadow);
|
|
136
|
+
flex-shrink: 0;
|
|
183
137
|
}
|
|
184
138
|
}
|
|
185
139
|
|
|
186
|
-
.bcl-header__project {
|
|
187
|
-
|
|
188
|
-
|
|
140
|
+
.bcl-header:not(:has(.bcl-header__project)) {
|
|
141
|
+
> .navbar:first-child {
|
|
142
|
+
box-shadow: var(--bs-box-shadow);
|
|
143
|
+
}
|
|
189
144
|
}
|
|
190
145
|
|
|
191
146
|
.bcl-header nav + nav {
|
|
@@ -195,21 +150,76 @@ $header-link-active-background: #003776 !default;
|
|
|
195
150
|
position: static;
|
|
196
151
|
}
|
|
197
152
|
}
|
|
153
|
+
.bcl-header__top-navbar {
|
|
154
|
+
z-index: 1040;
|
|
155
|
+
}
|
|
198
156
|
|
|
199
|
-
.bcl-header__navbar {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
157
|
+
.bcl-header__navbar.navbar {
|
|
158
|
+
background: $white;
|
|
159
|
+
padding-top: 0;
|
|
160
|
+
z-index: 1030;
|
|
161
|
+
width: 100%;
|
|
162
|
+
align-items: flex-start;
|
|
163
|
+
.navbar-nav {
|
|
164
|
+
width: 100%;
|
|
165
|
+
margin-top: 1rem;
|
|
166
|
+
&:has(.bcl-mega-menu__container.show) {
|
|
167
|
+
.nav-item {
|
|
168
|
+
display: none;
|
|
169
|
+
}
|
|
170
|
+
.nav-item:has(.bcl-mega-menu__container.show) {
|
|
171
|
+
display: block;
|
|
211
172
|
}
|
|
212
173
|
}
|
|
174
|
+
.dropdown-toggle,
|
|
175
|
+
.nav-link {
|
|
176
|
+
color: $dark;
|
|
177
|
+
width: 100%;
|
|
178
|
+
// Use flex for icon spacing.
|
|
179
|
+
display: flex;
|
|
180
|
+
gap: 1rem;
|
|
181
|
+
justify-content: space-between;
|
|
182
|
+
position: relative;
|
|
183
|
+
padding: 1rem;
|
|
184
|
+
border-bottom: 1px solid $primary-bg-subtle;
|
|
185
|
+
text-align: left;
|
|
186
|
+
// Unset border-radius for buttons.
|
|
187
|
+
border-radius: 0;
|
|
188
|
+
// Allow text wrapping in buttons.
|
|
189
|
+
white-space: normal;
|
|
190
|
+
&.active {
|
|
191
|
+
color: $dark;
|
|
192
|
+
}
|
|
193
|
+
&:focus-visible {
|
|
194
|
+
outline: 2px solid $primary;
|
|
195
|
+
// Don't let the outline overlap other elements.
|
|
196
|
+
outline-offset: -2px;
|
|
197
|
+
// Remove the shadow from bootstrap style.
|
|
198
|
+
box-shadow: none;
|
|
199
|
+
}
|
|
200
|
+
// Whenever ::after is used for an icon, it must not shrink.
|
|
201
|
+
// This also applies to .dropdown-toggle, which gets the icon from Bootstrap.
|
|
202
|
+
&::after {
|
|
203
|
+
flex-shrink: 0;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
// The mega menu trigger gets a different type of icon.
|
|
207
|
+
.bcl-mega-menu > .dropdown-toggle {
|
|
208
|
+
&:after {
|
|
209
|
+
background: url("data:image/svg+xml,%3Csvg%20width%3D%2216%22%20height%3D%2215%22%20viewBox%3D%220%200%2016%2015%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M7.57488%2013.25L8.46238%2014.125L15.1374%207.45L8.43738%200.75L7.56238%201.625L12.7276%206.81247H0.5V8.06247H12.7512L7.57488%2013.25Z%22%20fill%3D%22%23212529%22%2F%3E%3C%2Fsvg%3E");
|
|
210
|
+
align-self: center;
|
|
211
|
+
content: "";
|
|
212
|
+
// Unset border from bootstrap style.
|
|
213
|
+
border: none;
|
|
214
|
+
width: 20px;
|
|
215
|
+
height: 20px;
|
|
216
|
+
background-size: cover;
|
|
217
|
+
background-position: center;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
.dropdown-item {
|
|
221
|
+
white-space: normal;
|
|
222
|
+
}
|
|
213
223
|
}
|
|
214
224
|
}
|
|
215
225
|
}
|
|
@@ -221,6 +231,31 @@ $header-link-active-background: #003776 !default;
|
|
|
221
231
|
background: $white;
|
|
222
232
|
}
|
|
223
233
|
|
|
234
|
+
.bcl-header__navbar {
|
|
235
|
+
background: linear-gradient(
|
|
236
|
+
90deg,
|
|
237
|
+
$header-background-start 0%,
|
|
238
|
+
$header-background-end 100%
|
|
239
|
+
);
|
|
240
|
+
.dropdown-toggle,
|
|
241
|
+
.nav-link {
|
|
242
|
+
color: $white;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.bcl-header--ec,
|
|
247
|
+
.ec__header {
|
|
248
|
+
.bcl-header__navbar {
|
|
249
|
+
background: $header-background;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.bcl-header--neutral {
|
|
254
|
+
.bcl-header__navbar {
|
|
255
|
+
background: $gray-700;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
224
259
|
.bcl-header__site-name {
|
|
225
260
|
margin-left: map-get($spacers, 4);
|
|
226
261
|
font-weight: 500;
|
|
@@ -240,24 +275,90 @@ $header-link-active-background: #003776 !default;
|
|
|
240
275
|
width: auto;
|
|
241
276
|
}
|
|
242
277
|
|
|
243
|
-
.bcl-header__navbar .
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.bcl-header__navbar .dropdown-menu {
|
|
248
|
-
z-index: 1050; // Make sure dropdown overlaps the search offcanvas
|
|
278
|
+
.bcl-header__navbar .bcl-mega-menu {
|
|
279
|
+
--bcl-mega-menu-zindex: 1050; // Make sure dropdown overlaps the search offcanvas
|
|
249
280
|
}
|
|
250
281
|
|
|
251
282
|
.bcl-header:not(.bcl-header--neutral) .bcl-header__project {
|
|
252
283
|
padding-bottom: map-get($spacers, 3);
|
|
253
284
|
}
|
|
254
285
|
|
|
286
|
+
.bcl-header__navbar.collapse {
|
|
287
|
+
display: block;
|
|
288
|
+
}
|
|
289
|
+
|
|
255
290
|
.bcl-header--ec,
|
|
256
291
|
.ec__header {
|
|
257
292
|
.navbar-brand img {
|
|
258
293
|
width: 285px;
|
|
259
294
|
}
|
|
260
295
|
}
|
|
296
|
+
|
|
297
|
+
.bcl-header__navbar.navbar {
|
|
298
|
+
.dropdown-toggle,
|
|
299
|
+
.nav-link {
|
|
300
|
+
border-radius: 0;
|
|
301
|
+
&:hover {
|
|
302
|
+
background: $primary-bg-subtle;
|
|
303
|
+
color: $dark;
|
|
304
|
+
&:focus-visible {
|
|
305
|
+
outline-color: $primary;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
&.active,
|
|
309
|
+
&.show {
|
|
310
|
+
background: $white;
|
|
311
|
+
color: $dark;
|
|
312
|
+
&:focus-visible {
|
|
313
|
+
outline-color: $primary;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
&:focus-visible {
|
|
317
|
+
box-shadow: none;
|
|
318
|
+
border: none;
|
|
319
|
+
outline: 2px solid $white;
|
|
320
|
+
outline-offset: -8px;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
.dropdown-toggle {
|
|
324
|
+
&:after {
|
|
325
|
+
background-color: $white;
|
|
326
|
+
-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0.625 0.725L1.19375 0.1375L4.99375 3.9625L8.80625 0.125L9.375 0.7125L4.99375 5.125L0.625 0.725Z' fill='black'/%3E%3C/svg%3E");
|
|
327
|
+
-webkit-mask-repeat: no-repeat;
|
|
328
|
+
-webkit-mask-size: contain;
|
|
329
|
+
mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0.625 0.725L1.19375 0.1375L4.99375 3.9625L8.80625 0.125L9.375 0.7125L4.99375 5.125L0.625 0.725Z' fill='black'/%3E%3C/svg%3E");
|
|
330
|
+
mask-repeat: no-repeat;
|
|
331
|
+
mask-position: center;
|
|
332
|
+
mask-size: contain;
|
|
333
|
+
display: inline-block;
|
|
334
|
+
width: 10px;
|
|
335
|
+
height: 10px;
|
|
336
|
+
border: none;
|
|
337
|
+
margin-top: 4px;
|
|
338
|
+
}
|
|
339
|
+
&:hover {
|
|
340
|
+
&:after {
|
|
341
|
+
background-color: $dark;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
&.active {
|
|
345
|
+
&:after {
|
|
346
|
+
background-color: $primary;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
&.show {
|
|
350
|
+
&:after {
|
|
351
|
+
background-color: $primary;
|
|
352
|
+
transform: rotate(180deg);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
&.no-chevron {
|
|
356
|
+
&:after {
|
|
357
|
+
display: none;
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
261
362
|
}
|
|
262
363
|
|
|
263
364
|
.bcl-language-list-modal {
|