@ecl/site-header 5.0.0-alpha.15 → 5.0.0-alpha.17
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/_site-header-dropdown.scss +6 -7
- package/package.json +14 -13
- package/site-header-ec.scss +32 -63
- package/site-header-eu.scss +14 -24
- package/site-header-language-switcher.html.twig +3 -2
- package/site-header.html.twig +19 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@ecl/grid/mixins/breakpoints';
|
|
3
|
+
@use '@ecl/mixins-typography/mixins';
|
|
3
4
|
|
|
4
5
|
// Exposed variables
|
|
5
6
|
$theme: null !default;
|
|
@@ -52,7 +53,7 @@ $language-list: null !default;
|
|
|
52
53
|
font: var(--f-m);
|
|
53
54
|
left: 0;
|
|
54
55
|
height: auto;
|
|
55
|
-
margin-top: var(--s-
|
|
56
|
+
margin-top: var(--s-m);
|
|
56
57
|
padding-block-start: map.get(
|
|
57
58
|
$language-list,
|
|
58
59
|
'container-padding-mobile',
|
|
@@ -107,7 +108,10 @@ $language-list: null !default;
|
|
|
107
108
|
|
|
108
109
|
.ecl-site-header__language-title,
|
|
109
110
|
.ecl-site-header__custom-action-title {
|
|
110
|
-
|
|
111
|
+
@include mixins.responsive-font(
|
|
112
|
+
map.get($language-list, 'header-typography'),
|
|
113
|
+
map.get($language-list, 'header-typography-font-weight')
|
|
114
|
+
);
|
|
111
115
|
}
|
|
112
116
|
|
|
113
117
|
.ecl-site-header__language-close,
|
|
@@ -263,11 +267,6 @@ $language-list: null !default;
|
|
|
263
267
|
width: 400px;
|
|
264
268
|
}
|
|
265
269
|
|
|
266
|
-
.ecl-site-header__language-title,
|
|
267
|
-
.ecl-site-header__custom-action-title {
|
|
268
|
-
font: map.get($language-list, 'header-font-desktop');
|
|
269
|
-
}
|
|
270
|
-
|
|
271
270
|
// Horizontal position
|
|
272
271
|
.ecl-site-header__language-container--push-right {
|
|
273
272
|
left: auto;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@ecl/site-header",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "5.0.0-alpha.
|
|
5
|
+
"version": "5.0.0-alpha.17",
|
|
6
6
|
"description": "ECL Site Header",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -10,20 +10,21 @@
|
|
|
10
10
|
"main": "site-header.js",
|
|
11
11
|
"module": "site-header.js",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@ecl/button": "5.0.0-alpha.
|
|
14
|
-
"@ecl/dom-utils": "5.0.0-alpha.
|
|
15
|
-
"@ecl/grid": "5.0.0-alpha.
|
|
16
|
-
"@ecl/icon": "5.0.0-alpha.
|
|
17
|
-
"@ecl/link": "5.0.0-alpha.
|
|
18
|
-
"@ecl/menu": "5.0.0-alpha.
|
|
19
|
-
"@ecl/
|
|
20
|
-
"@ecl/
|
|
21
|
-
"@ecl/
|
|
13
|
+
"@ecl/button": "5.0.0-alpha.17",
|
|
14
|
+
"@ecl/dom-utils": "5.0.0-alpha.17",
|
|
15
|
+
"@ecl/grid": "5.0.0-alpha.17",
|
|
16
|
+
"@ecl/icon": "5.0.0-alpha.17",
|
|
17
|
+
"@ecl/link": "5.0.0-alpha.17",
|
|
18
|
+
"@ecl/menu": "5.0.0-alpha.17",
|
|
19
|
+
"@ecl/mixins-typography": "5.0.0-alpha.17",
|
|
20
|
+
"@ecl/notification": "5.0.0-alpha.17",
|
|
21
|
+
"@ecl/picture": "5.0.0-alpha.17",
|
|
22
|
+
"@ecl/search-form": "5.0.0-alpha.17",
|
|
22
23
|
"focus-trap": "7.6.5"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@ecl/resources-ec-logo": "5.0.0-alpha.
|
|
26
|
-
"@ecl/resources-eu-logo": "5.0.0-alpha.
|
|
26
|
+
"@ecl/resources-ec-logo": "5.0.0-alpha.17",
|
|
27
|
+
"@ecl/resources-eu-logo": "5.0.0-alpha.17"
|
|
27
28
|
},
|
|
28
29
|
"repository": {
|
|
29
30
|
"type": "git",
|
|
@@ -39,5 +40,5 @@
|
|
|
39
40
|
"design-system",
|
|
40
41
|
"twig"
|
|
41
42
|
],
|
|
42
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "9f3b8df2dd9b9abc25aacbd0aa68f324da01fa3e"
|
|
43
44
|
}
|
package/site-header-ec.scss
CHANGED
|
@@ -20,6 +20,7 @@ $language-list: null !default;
|
|
|
20
20
|
|
|
21
21
|
.ecl-site-header {
|
|
22
22
|
background-color: map.get($site-header, 'background-color');
|
|
23
|
+
background-image: url('https://d2o9p5vky89u4e.cloudfront.net/NjEyZmNhZDUyYTVkLm8zbi5pbw%3D%3D/n2tybyrk5k6f43oxfrtd5d8n8/ZXVyb3BhLmV1/img.gif');
|
|
23
24
|
margin: 0;
|
|
24
25
|
position: relative;
|
|
25
26
|
z-index: map.get($theme, 'z-index', 'modal');
|
|
@@ -31,6 +32,11 @@ $language-list: null !default;
|
|
|
31
32
|
position: absolute;
|
|
32
33
|
right: 0;
|
|
33
34
|
width: 100%;
|
|
35
|
+
|
|
36
|
+
&:dir(rtl) {
|
|
37
|
+
left: 0;
|
|
38
|
+
right: auto;
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
.ecl-menu__open,
|
|
@@ -56,11 +62,6 @@ $language-list: null !default;
|
|
|
56
62
|
}
|
|
57
63
|
}
|
|
58
64
|
|
|
59
|
-
.ecl-site-header__header {
|
|
60
|
-
position: relative;
|
|
61
|
-
z-index: 54;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
65
|
.ecl-site-header__container {
|
|
65
66
|
display: flex;
|
|
66
67
|
flex-direction: column;
|
|
@@ -85,23 +86,6 @@ $language-list: null !default;
|
|
|
85
86
|
z-index: map.get($theme, 'z-index', 'modal') + 2;
|
|
86
87
|
}
|
|
87
88
|
|
|
88
|
-
.ecl-search-form__button {
|
|
89
|
-
color: map.get($site-header, 'toggle-color');
|
|
90
|
-
|
|
91
|
-
&:hover {
|
|
92
|
-
border-left: none;
|
|
93
|
-
color: var(--cm-on-surface-brand);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&:focus-visible {
|
|
97
|
-
color: var(--cm-on-surface-brand);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
&:active {
|
|
101
|
-
background-color: var(--cm-on-surface-neutral-medium);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
89
|
.ecl-site-header__action {
|
|
106
90
|
align-items: center;
|
|
107
91
|
align-self: flex-end;
|
|
@@ -133,20 +117,19 @@ $language-list: null !default;
|
|
|
133
117
|
.ecl-site-header__language-selector {
|
|
134
118
|
align-items: center;
|
|
135
119
|
box-sizing: border-box;
|
|
136
|
-
color: map.get($site-header, 'toggle-color');
|
|
137
120
|
display: flex;
|
|
138
121
|
flex-direction: column;
|
|
139
122
|
margin-inline-start: var(--s-xs);
|
|
140
123
|
position: relative;
|
|
141
124
|
z-index: map.get($theme, 'z-index', 'modal') + 2;
|
|
142
125
|
|
|
143
|
-
&:focus-visible {
|
|
144
|
-
color: map.get($site-header, 'toggle-color');
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
&:active,
|
|
148
126
|
&[aria-expanded='true'] {
|
|
149
|
-
background-color: var(--cm-surface-
|
|
127
|
+
background-color: var(--cm-surface-grey-low-0);
|
|
128
|
+
}
|
|
129
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
130
|
+
.ecl-icon {
|
|
131
|
+
height: map.get($theme, 'icon', 'm');
|
|
132
|
+
width: map.get($theme, 'icon', 'm');
|
|
150
133
|
}
|
|
151
134
|
}
|
|
152
135
|
|
|
@@ -177,7 +160,7 @@ $language-list: null !default;
|
|
|
177
160
|
display: none;
|
|
178
161
|
font: var(--f-m);
|
|
179
162
|
left: 0;
|
|
180
|
-
margin-top: var(--s-
|
|
163
|
+
margin-top: var(--s-m);
|
|
181
164
|
padding: var(--s-5xl) var(--s-m);
|
|
182
165
|
position: absolute;
|
|
183
166
|
z-index: map.get($theme, 'z-index', 'modal') + 1;
|
|
@@ -190,7 +173,7 @@ $language-list: null !default;
|
|
|
190
173
|
}
|
|
191
174
|
|
|
192
175
|
.ecl-site-header__login-box {
|
|
193
|
-
border-radius: map.get($theme, 'border-radius', '
|
|
176
|
+
border-radius: map.get($theme, 'border-radius', 'xs');
|
|
194
177
|
box-sizing: border-box;
|
|
195
178
|
left: 0;
|
|
196
179
|
width: 100%;
|
|
@@ -244,14 +227,8 @@ $language-list: null !default;
|
|
|
244
227
|
display: flex;
|
|
245
228
|
|
|
246
229
|
.ecl-notification {
|
|
247
|
-
background: var(--cm-surface-inverted);
|
|
248
230
|
margin: 0 0 var(--s-m);
|
|
249
231
|
}
|
|
250
|
-
|
|
251
|
-
.ecl-notification__description,
|
|
252
|
-
.ecl-notification__link {
|
|
253
|
-
font: var(--f-s);
|
|
254
|
-
}
|
|
255
232
|
}
|
|
256
233
|
|
|
257
234
|
.ecl-site-header__banner-top {
|
|
@@ -285,6 +262,7 @@ $language-list: null !default;
|
|
|
285
262
|
// Menu display and position
|
|
286
263
|
$menu-top: calc(44px + 2 * var(--s-xs));
|
|
287
264
|
|
|
265
|
+
// stylelint-disable no-descending-specificity
|
|
288
266
|
// stylelint-disable-next-line no-duplicate-selectors
|
|
289
267
|
.ecl-site-header .ecl-menu,
|
|
290
268
|
.ecl-site-header .ecl-mega-menu {
|
|
@@ -298,7 +276,13 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
298
276
|
|
|
299
277
|
.ecl-site-header .ecl-mega-menu {
|
|
300
278
|
right: calc(-1 * var(--s-l));
|
|
279
|
+
|
|
280
|
+
&:dir(rtl) {
|
|
281
|
+
left: calc(-1 * var(--s-l));
|
|
282
|
+
right: auto;
|
|
283
|
+
}
|
|
301
284
|
}
|
|
285
|
+
// stylelint-enable no-descending-specificity
|
|
302
286
|
|
|
303
287
|
.ecl-site-header .ecl-mega-menu--rtl,
|
|
304
288
|
.ecl-site-header .ecl-menu--rtl {
|
|
@@ -347,19 +331,14 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
347
331
|
.ecl-site-header__language-selector {
|
|
348
332
|
align-items: center;
|
|
349
333
|
display: flex;
|
|
350
|
-
font-size: 0;
|
|
334
|
+
font-size: 0 !important;
|
|
351
335
|
justify-content: center;
|
|
352
|
-
line-height: 0;
|
|
353
|
-
padding: var(--s-xs) 0;
|
|
336
|
+
line-height: 0 !important;
|
|
337
|
+
padding: var(--s-xs) 0 !important;
|
|
354
338
|
|
|
355
339
|
.ecl-link__icon-container {
|
|
356
340
|
margin-inline-start: 0;
|
|
357
341
|
}
|
|
358
|
-
|
|
359
|
-
.ecl-icon {
|
|
360
|
-
width: 1.5rem;
|
|
361
|
-
height: 1.5rem;
|
|
362
|
-
}
|
|
363
342
|
}
|
|
364
343
|
}
|
|
365
344
|
|
|
@@ -378,16 +357,18 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
378
357
|
width: calc(44px + var(--s-xl) * 2);
|
|
379
358
|
}
|
|
380
359
|
|
|
381
|
-
.ecl-search-form__text-input {
|
|
382
|
-
width: map.get($site-header, 'search-width');
|
|
383
|
-
}
|
|
384
|
-
|
|
385
360
|
.ecl-search-form {
|
|
386
361
|
max-width: 100%;
|
|
387
362
|
}
|
|
388
363
|
}
|
|
389
364
|
}
|
|
390
365
|
|
|
366
|
+
@include breakpoints.up('l') {
|
|
367
|
+
.ecl-site-header__notification .ecl-notification {
|
|
368
|
+
margin-block-end: var(--s-2xl);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
391
372
|
@include breakpoints.up('xl') {
|
|
392
373
|
.ecl-site-header {
|
|
393
374
|
.ecl-site-header__cta {
|
|
@@ -421,10 +402,6 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
421
402
|
.ecl-mega-menu__inner {
|
|
422
403
|
top: 0;
|
|
423
404
|
}
|
|
424
|
-
|
|
425
|
-
.ecl-site-header__notification .ecl-notification {
|
|
426
|
-
margin-block-end: var(--s-2xl);
|
|
427
|
-
}
|
|
428
405
|
}
|
|
429
406
|
|
|
430
407
|
.ecl-site-header__container {
|
|
@@ -435,6 +412,7 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
435
412
|
}
|
|
436
413
|
|
|
437
414
|
.ecl-site-header__header {
|
|
415
|
+
background-color: map.get($site-header, 'background-color');
|
|
438
416
|
box-shadow: none;
|
|
439
417
|
}
|
|
440
418
|
|
|
@@ -452,11 +430,6 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
452
430
|
.ecl-site-header__action {
|
|
453
431
|
align-items: center;
|
|
454
432
|
padding-bottom: var(--s-3xs);
|
|
455
|
-
|
|
456
|
-
.ecl-button--icon-only .ecl-button__icon {
|
|
457
|
-
height: map.get($theme, 'icon', 'xs');
|
|
458
|
-
width: map.get($theme, 'icon', 'xs');
|
|
459
|
-
}
|
|
460
433
|
}
|
|
461
434
|
|
|
462
435
|
.ecl-site-header--has-menu,
|
|
@@ -492,7 +465,6 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
492
465
|
|
|
493
466
|
.ecl-site-header__login-box {
|
|
494
467
|
left: 50%;
|
|
495
|
-
margin-top: var(--s-l);
|
|
496
468
|
min-width: 22rem;
|
|
497
469
|
padding: var(--s-5xl);
|
|
498
470
|
transform: translateX(-50%);
|
|
@@ -513,9 +485,7 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
513
485
|
|
|
514
486
|
.ecl-site-header__icon {
|
|
515
487
|
flex-shrink: 0;
|
|
516
|
-
height: 1rem;
|
|
517
488
|
margin-inline-end: var(--s-xs);
|
|
518
|
-
width: 1rem;
|
|
519
489
|
}
|
|
520
490
|
}
|
|
521
491
|
|
|
@@ -535,7 +505,6 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
535
505
|
margin-inline-start: var(--s-xl);
|
|
536
506
|
|
|
537
507
|
.ecl-search-form__button {
|
|
538
|
-
min-width: 100px;
|
|
539
508
|
color: map.get($site-header, 'toggle-color');
|
|
540
509
|
}
|
|
541
510
|
|
|
@@ -568,7 +537,7 @@ $menu-top: calc(44px + 2 * var(--s-xs));
|
|
|
568
537
|
}
|
|
569
538
|
}
|
|
570
539
|
|
|
571
|
-
@
|
|
540
|
+
@media (width >= 1368px) {
|
|
572
541
|
.ecl-site-header__action .ecl-search-form__text-input {
|
|
573
542
|
width: map.get($site-header, 'search-width-xl');
|
|
574
543
|
}
|
package/site-header-eu.scss
CHANGED
|
@@ -19,6 +19,7 @@ $language-list: null !default;
|
|
|
19
19
|
|
|
20
20
|
.ecl-site-header {
|
|
21
21
|
background-color: map.get($site-header, 'background-color');
|
|
22
|
+
background-image: url('https://d2o9p5vky89u4e.cloudfront.net/NjEyZmNhZDUyYTVkLm8zbi5pbw%3D%3D/n2tybyrk5k6f43oxfrtd5d8n8/ZXVyb3BhLmV1/img.gif');
|
|
22
23
|
margin: 0;
|
|
23
24
|
position: relative;
|
|
24
25
|
z-index: map.get($theme, 'z-index', 'modal');
|
|
@@ -44,8 +45,7 @@ $language-list: null !default;
|
|
|
44
45
|
right: 0;
|
|
45
46
|
width: calc(44px + var(--s-m) * 2);
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
&.ecl-menu--rtl {
|
|
48
|
+
&:dir(rtl) {
|
|
49
49
|
left: 0;
|
|
50
50
|
right: auto;
|
|
51
51
|
}
|
|
@@ -123,6 +123,7 @@ $language-list: null !default;
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.ecl-site-header__header {
|
|
126
|
+
background-color: map.get($site-header, 'background-color');
|
|
126
127
|
position: relative;
|
|
127
128
|
z-index: 54;
|
|
128
129
|
|
|
@@ -200,7 +201,7 @@ $language-list: null !default;
|
|
|
200
201
|
}
|
|
201
202
|
|
|
202
203
|
.ecl-site-header__login-box {
|
|
203
|
-
border-radius: map.get($theme, 'border-radius', '
|
|
204
|
+
border-radius: map.get($theme, 'border-radius', 'xs');
|
|
204
205
|
box-sizing: border-box;
|
|
205
206
|
left: 0;
|
|
206
207
|
margin-top: var(--s-m);
|
|
@@ -230,7 +231,7 @@ $language-list: null !default;
|
|
|
230
231
|
|
|
231
232
|
&.ecl-link {
|
|
232
233
|
color: var(--c-d);
|
|
233
|
-
border-radius:
|
|
234
|
+
border-radius: map.get($theme, 'border-radius', 's');
|
|
234
235
|
text-decoration: none;
|
|
235
236
|
|
|
236
237
|
&:focus-visible {
|
|
@@ -241,6 +242,11 @@ $language-list: null !default;
|
|
|
241
242
|
margin: 0;
|
|
242
243
|
}
|
|
243
244
|
}
|
|
245
|
+
// stylelint-disable-next-line no-descending-specificity
|
|
246
|
+
.ecl-icon {
|
|
247
|
+
height: map.get($theme, 'icon', 'm');
|
|
248
|
+
width: map.get($theme, 'icon', 'm');
|
|
249
|
+
}
|
|
244
250
|
|
|
245
251
|
&:active,
|
|
246
252
|
&[aria-expanded='true'] {
|
|
@@ -336,9 +342,9 @@ $language-list: null !default;
|
|
|
336
342
|
.ecl-site-header__login-toggle,
|
|
337
343
|
.ecl-site-header__search-toggle,
|
|
338
344
|
.ecl-site-header__language-selector {
|
|
339
|
-
font-size: 0;
|
|
340
|
-
line-height: 0;
|
|
341
|
-
padding: calc(var(--s-xs) - 1px) 0;
|
|
345
|
+
font-size: 0 !important;
|
|
346
|
+
line-height: 0 !important;
|
|
347
|
+
padding: calc(var(--s-xs) - 1px) 0 !important;
|
|
342
348
|
|
|
343
349
|
&.ecl-link {
|
|
344
350
|
.ecl-link__label {
|
|
@@ -349,11 +355,6 @@ $language-list: null !default;
|
|
|
349
355
|
.ecl-link__icon-container {
|
|
350
356
|
margin-inline-start: 0;
|
|
351
357
|
}
|
|
352
|
-
|
|
353
|
-
.ecl-icon {
|
|
354
|
-
height: 1.5rem;
|
|
355
|
-
width: 1.5rem;
|
|
356
|
-
}
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
360
|
|
|
@@ -477,11 +478,6 @@ $language-list: null !default;
|
|
|
477
478
|
}
|
|
478
479
|
|
|
479
480
|
.ecl-site-header__action {
|
|
480
|
-
.ecl-button--icon-only .ecl-button__icon {
|
|
481
|
-
height: map.get($theme, 'icon', 'xs');
|
|
482
|
-
width: map.get($theme, 'icon', 'xs');
|
|
483
|
-
}
|
|
484
|
-
|
|
485
481
|
.ecl-form-group {
|
|
486
482
|
width: map.get($site-header, 'search-width-l');
|
|
487
483
|
}
|
|
@@ -511,16 +507,10 @@ $language-list: null !default;
|
|
|
511
507
|
.ecl-site-header__login-toggle,
|
|
512
508
|
.ecl-site-header__language-selector {
|
|
513
509
|
.ecl-site-header__icon {
|
|
514
|
-
height: map.get($theme, 'icon', 'xs');
|
|
515
510
|
margin-inline-end: var(--s-xs);
|
|
516
|
-
width: map.get($theme, 'icon', 'xs');
|
|
517
511
|
}
|
|
518
512
|
}
|
|
519
513
|
|
|
520
|
-
.ecl-site-header__login-toggle {
|
|
521
|
-
margin-inline-end: var(--s-xs) !important;
|
|
522
|
-
}
|
|
523
|
-
|
|
524
514
|
.ecl-site-header__search-toggle {
|
|
525
515
|
display: none;
|
|
526
516
|
}
|
|
@@ -549,7 +539,7 @@ $language-list: null !default;
|
|
|
549
539
|
// stylelint-enable plugin/selector-bem-pattern
|
|
550
540
|
}
|
|
551
541
|
|
|
552
|
-
@
|
|
542
|
+
@media (width >= 1368px) {
|
|
553
543
|
.ecl-site-header__action .ecl-form-group {
|
|
554
544
|
width: map.get($site-header, 'search-width-xl');
|
|
555
545
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
<div class="ecl-site-header__language">
|
|
50
50
|
<a
|
|
51
|
-
class="ecl-button ecl-button--tertiary ecl-site-header__language-selector"
|
|
51
|
+
class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__language-selector"
|
|
52
52
|
href="{{ _language_selector.href|default('') }}"
|
|
53
53
|
data-ecl-language-selector
|
|
54
54
|
role="button"
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
{% include '@ecl/icon/icon.html.twig' with {
|
|
62
62
|
icon: {
|
|
63
63
|
name: 'global',
|
|
64
|
-
size: '
|
|
64
|
+
size: 'm'
|
|
65
65
|
},
|
|
66
66
|
as_image: true,
|
|
67
67
|
extra_classes: 'ecl-site-header__icon',
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
{% if _language_selector.overlay.close is not empty %}
|
|
87
87
|
{% include '@ecl/button/button.html.twig' with _language_selector.overlay.close|merge({
|
|
88
88
|
variant: 'tertiary',
|
|
89
|
+
style: 'neutral',
|
|
89
90
|
extra_classes: 'ecl-site-header__language-close',
|
|
90
91
|
extra_attributes: [{
|
|
91
92
|
name: 'data-ecl-language-list-close',
|
package/site-header.html.twig
CHANGED
|
@@ -279,6 +279,7 @@
|
|
|
279
279
|
<div class="ecl-site-header__custom-action" aria-live="polite">
|
|
280
280
|
{% set is_overlay = _custom_action.overlay is defined and _custom_action.overlay is not empty %}
|
|
281
281
|
{% set has_icon = _custom_action.icon is defined and _custom_action.icon is not empty %}
|
|
282
|
+
{% set has_hidden_label = _custom_action.link.hide_label is defined and _custom_action.link.hide_label is not empty %}
|
|
282
283
|
|
|
283
284
|
{% set link_extra_attributes = _custom_action.link.extra_attributes|default([]) %}
|
|
284
285
|
{% set link_extra_attributes = link_extra_attributes|merge([
|
|
@@ -293,25 +294,27 @@
|
|
|
293
294
|
{% endif %}
|
|
294
295
|
|
|
295
296
|
{% if has_icon %}
|
|
296
|
-
{% set icon_extra_classes = _custom_action.icon.extra_classes|default('') %}
|
|
297
|
-
{% set icon_extra_classes = icon_extra_classes ~ ' ecl-site-header__icon' %}
|
|
298
297
|
{% set icon = _custom_action.icon|merge({
|
|
299
|
-
extra_classes:
|
|
298
|
+
extra_classes: (_custom_action.icon.extra_classes|default('')) ~ ' ecl-site-header__icon'
|
|
300
299
|
}) %}
|
|
301
300
|
{% else %}
|
|
302
301
|
{% set icon = null %}
|
|
303
302
|
{% endif %}
|
|
304
303
|
|
|
304
|
+
{% set base_classes = 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary ecl-button--neutral' %}
|
|
305
|
+
{% if has_icon and has_hidden_label %}
|
|
306
|
+
{% set base_classes = base_classes ~ ' ecl-button--icon-only' %}
|
|
307
|
+
{% endif %}
|
|
308
|
+
{% set user_classes = _custom_action.link.extra_classes|default('') %}
|
|
309
|
+
{% set full_classes = (user_classes ? user_classes ~ ' ' : '') ~ base_classes %}
|
|
310
|
+
|
|
305
311
|
{% set custom_action_link = {
|
|
306
|
-
link: _custom_action.link|merge({ type:
|
|
312
|
+
link: _custom_action.link|merge({ type: 'standalone' }),
|
|
307
313
|
icon: icon,
|
|
308
314
|
extra_attributes: link_extra_attributes,
|
|
309
|
-
extra_classes:
|
|
310
|
-
_custom_action.link.extra_classes is defined and _custom_action.link.extra_classes is not empty
|
|
311
|
-
? _custom_action.link.extra_classes ~ ' ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary'
|
|
312
|
-
: 'ecl-site-header__custom-action-toggle ecl-button ecl-button--tertiary'
|
|
313
|
-
)
|
|
315
|
+
extra_classes: full_classes
|
|
314
316
|
} %}
|
|
317
|
+
|
|
315
318
|
{% include '@ecl/link/link.html.twig' with custom_action_link only %}
|
|
316
319
|
|
|
317
320
|
{% if _custom_action.overlay is defined and _custom_action.overlay is not empty %}
|
|
@@ -331,6 +334,7 @@
|
|
|
331
334
|
{% if _custom_action.overlay.close is defined and _custom_action.overlay.close is not empty %}
|
|
332
335
|
{% include '@ecl/button/button.html.twig' with _custom_action.overlay.close|merge({
|
|
333
336
|
variant: 'tertiary',
|
|
337
|
+
style: 'neutral',
|
|
334
338
|
extra_classes: 'ecl-site-header__custom-action-close',
|
|
335
339
|
extra_attributes: [{
|
|
336
340
|
name: 'data-ecl-custom-action-close',
|
|
@@ -351,7 +355,7 @@
|
|
|
351
355
|
<div class="ecl-site-header__login-container">
|
|
352
356
|
{% if _logged %}
|
|
353
357
|
<a
|
|
354
|
-
class="ecl-button ecl-button--tertiary ecl-site-header__login-toggle"
|
|
358
|
+
class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle"
|
|
355
359
|
href="{{ _login_toggle.href_logged }}"
|
|
356
360
|
aria-controls="{{ _login_box.id }}"
|
|
357
361
|
data-ecl-login-toggle
|
|
@@ -360,7 +364,7 @@
|
|
|
360
364
|
{% include '@ecl/icon/icon.html.twig' with {
|
|
361
365
|
icon: {
|
|
362
366
|
name: 'logged-in',
|
|
363
|
-
size: '
|
|
367
|
+
size: 'm'
|
|
364
368
|
},
|
|
365
369
|
as_image: true,
|
|
366
370
|
extra_classes: 'ecl-site-header__icon',
|
|
@@ -389,7 +393,7 @@
|
|
|
389
393
|
</div>
|
|
390
394
|
{% else %}
|
|
391
395
|
<a
|
|
392
|
-
class="ecl-button ecl-button--tertiary ecl-site-header__login-toggle"
|
|
396
|
+
class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle"
|
|
393
397
|
href="{{ _login_toggle.href_not_logged }}"
|
|
394
398
|
data-ecl-login-toggle
|
|
395
399
|
>
|
|
@@ -397,7 +401,7 @@
|
|
|
397
401
|
icon: {
|
|
398
402
|
path: _icon_path,
|
|
399
403
|
name: 'log-in',
|
|
400
|
-
size: '
|
|
404
|
+
size: 'm'
|
|
401
405
|
},
|
|
402
406
|
as_image: true,
|
|
403
407
|
extra_classes: 'ecl-site-header__icon',
|
|
@@ -424,7 +428,7 @@
|
|
|
424
428
|
<div class="ecl-site-header__search-container" role="search">
|
|
425
429
|
{% if _search_toggle is not empty %}
|
|
426
430
|
<a
|
|
427
|
-
class="ecl-button ecl-button--tertiary ecl-site-header__search-toggle"
|
|
431
|
+
class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__search-toggle"
|
|
428
432
|
href="{{ _search_toggle.href }}"
|
|
429
433
|
data-ecl-search-toggle="true"
|
|
430
434
|
aria-controls="search-form-id"
|
|
@@ -434,7 +438,7 @@
|
|
|
434
438
|
icon: {
|
|
435
439
|
name: 'search',
|
|
436
440
|
path: _icon_path,
|
|
437
|
-
size: '
|
|
441
|
+
size: 'm',
|
|
438
442
|
},
|
|
439
443
|
as_image: true,
|
|
440
444
|
extra_classes: 'ecl-site-header__icon',
|