@ecl/site-header 5.0.0-RC1

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.
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Site Header print
3
+ * @define site-header
4
+ */
5
+
6
+ @use 'sass:map';
7
+
8
+ // Exposed variables
9
+ $theme: null !default;
10
+ $site-header: null !default;
11
+
12
+ .ecl-site-header .ecl-site-header__background {
13
+ background-image: none;
14
+ }
15
+
16
+ .ecl-site-header__top {
17
+ display: flex;
18
+ justify-content: center;
19
+ }
20
+
21
+ .ecl-site-header__logo-image {
22
+ height: auto;
23
+ margin-bottom: map.get($theme, 'spacing-print', 's');
24
+ margin-top: map.get($theme, 'spacing-print', 'm');
25
+ width: 6.65cm;
26
+ }
27
+
28
+ .ecl-site-header__action {
29
+ display: none;
30
+ }
31
+
32
+ .ecl-site-header__banner {
33
+ display: none !important;
34
+ }
35
+
36
+ .ecl-site-header__banner-top {
37
+ display: none;
38
+ }
39
+
40
+ .ecl-site-header__logo-link::after {
41
+ display: none;
42
+ }
43
+
44
+ .ecl-site-header__logo-image-mobile {
45
+ display: none;
46
+ }
47
+
48
+ .ecl-site-header__notification .ecl-notification {
49
+ width: 100%;
50
+ }
@@ -0,0 +1,528 @@
1
+ {% apply spaceless %}
2
+
3
+ {#
4
+ Parameters:
5
+ - "banner_top" (object): Object of type link (link : { label, path })
6
+ - "logged" (boolean): Whether the user is logged in or not
7
+ - "menu" (associative array): Menu content, if any. Uses ECL Menu structure
8
+ - "mega_menu" (associative array): Menu content, if any. Uses ECL Mega Menu structure
9
+ - "site_name" (string) Site name
10
+ - "site_name_mobile_only" (boolean): Whether the site name should be hidden on desktop or not
11
+ - "cta_link": (optional) (default: {}): Call to action link compatible with ECL Link component structure
12
+ - "logo" (associative array) (default: predefined structure): Logo image settings. format:
13
+ {
14
+ "title": (string) (default: ''): Logo title attribute.
15
+ "alt": (string) (default: ''): Logo alt attribute.
16
+ "breakpoint": (string) (default: 'xs', 415px) Breakpoint where to switch the logo displayed. Expected value in EU is "l"
17
+ "href": (string) (default: ''): Logo URL.
18
+ "src_desktop": (string) (default: ''): Desktop logo image file path
19
+ "src_mobile": (string) (default: ''): Mobile logo image file path for EU only
20
+ "size": (string) (default: 'l'): Three sizes in desktop (s, m, l)
21
+ },
22
+ - "language_selector" (associative array) (default: predefined structure): Language switcher settings. format:
23
+ {
24
+ "href": (string) (default: ''): URL for switcher
25
+ "label": (string) (default: ''): Switcher language label, eg. 'English', 'Français', etc.
26
+ "aria_label": (string) (default: ''): Switcher language aria label
27
+ "code": (string) (default: ''): Switcher language code, eg. 'en', 'fr', etc.
28
+ "eu_category": (string) (default: ''): Label for EU languages
29
+ "non_eu_category": (string) (default: ''): Label for non-EU languages
30
+ "overlay" (associative array) (default: predefined structure): Overlay language switcher settings. format:
31
+ {
32
+ "close_label": (string) (default: ''): Close button label eg. 'Close'.
33
+ "title": (string) (default: ''): Overlay title, eg. 'Select your language'.
34
+ "items": (array) (default: []): (array) (default: []): format: [
35
+ {
36
+ "lang" (string) (default: '') Item language code, eg. 'en', 'fr', etc.
37
+ "label" (string) (default: '') Item language label, eg. 'English', 'Français', etc.
38
+ "path" (string) (default: '') Item language URL eg. '/example#language_en'.
39
+ "active" (boolean) (default: false) define if item is the active language.
40
+ },
41
+ ],
42
+ "non_eu_items": (array) (default: []): (array) (default: []): format: [
43
+ {
44
+ "lang" (string) (default: '') Item language code, eg. 'en', 'fr', etc.
45
+ "label" (string) (default: '') Item language label, eg. 'English', 'Français', etc.
46
+ "path" (string) (default: '') Item language URL eg. '/example#language_en'.
47
+ "active" (boolean) (default: false) define if item is the active language.
48
+ },
49
+ ],
50
+ },
51
+ },
52
+ - "custom_action" (associative array) (default: {}): optional custom link with optional popover, e.g.:
53
+ {
54
+ "link": (object) (default: predefined structure) predefined structure for the Link component
55
+ "icon" (associative array) OR (array) of associative arrays : format
56
+ {
57
+ name: (string) (default: ''),
58
+ extra_classes: (string) (default: 'ecl-link__icon'),
59
+ ...
60
+ }
61
+ "overlay": (object) – if defined, we display a popover; otherwise it’s a simple link
62
+ {
63
+ "title": (string) (default: '')
64
+ "close_label": (string) (default: '')
65
+ "content": (string)
66
+ }
67
+ }
68
+ - "search_toggle" (associate array) (default: {}) format:
69
+ {
70
+ "label": (string) Label of the element
71
+ "path": (string) Link of the element
72
+ }
73
+ - "login_box" (associate array) (default: {}) format:
74
+ {
75
+ "id": (string): Id of the box
76
+ "description": (string) default('Logged in as <last name>, <first name>')
77
+ "label": (string): Log out label
78
+ "href": (string): Url of the link
79
+ }
80
+ - "login_toggle" (associate array) (default: {}) format:
81
+ {
82
+ "label_not_logged": (string) Label for the anonymous users
83
+ "href_not_logged": (string) Link to the login form
84
+ "label_logged": (string) Label for the logged in users
85
+ "href_logged": (string) Link to the logout form
86
+ }
87
+ - "search_form" (associative array) (default: predefined structure): ECL Search Form component structure
88
+ - "notification" (object) (default: {}): Optional notification compatible with ECL Notification component structure
89
+ - "extra_classes" (string) (default: '')
90
+ - "extra_attributes" (array) (default: data-ecl-auto-init="SiteHeaderStandardised"): format: [
91
+ {
92
+ "name" (string) (default: ''),
93
+ "value" (optional) (string)
94
+ ...
95
+ ],
96
+ #}
97
+
98
+ {# Default variables #}
99
+
100
+ {% set _logo = logo|default({}) %}
101
+ {% set _language_selector = language_selector|default({}) %}
102
+ {% set _custom_action = custom_action|default({}) %}
103
+ {% set _logged = logged|default(false) %}
104
+ {% set _login_box = login_box|default({}) %}
105
+ {% set _login_toggle = login_toggle|default({}) %}
106
+ {% set _search_toggle = search_toggle|default({}) %}
107
+ {% set _menu = menu|default(false) %}
108
+ {% set _mega_menu = mega_menu|default(false) %}
109
+ {% set _site_name = site_name|default('') %}
110
+ {% set _site_name_mobile_only = site_name_mobile_only|default(false) %}
111
+ {% set _cta_link = cta_link|default({}) %}
112
+ {% set _notification = notification|default({}) %}
113
+ {% set _extra_attributes = '' %}
114
+ {% set _css_class = 'ecl-site-header' %}
115
+ {% set _search_form_extra_attributes = [{ name: 'data-ecl-search-form' }] %}
116
+ {% set _search_input_extra_classes = 'ecl-search-form__text-input' %}
117
+ {% set _search_form_extra_classes = 'ecl-site-header__search' %}
118
+ {% set _search_input_extra_attributes = [] %}
119
+ {% set _search_button_extra_attributes = [] %}
120
+ {% set _search_button_label = '' %}
121
+
122
+ {# Merge options #}
123
+
124
+ {% set extra_attributes = [
125
+ { name: 'data-ecl-auto-init', value: 'SiteHeader' }
126
+ ]|merge(extra_attributes|default([]))
127
+ %}
128
+
129
+ {% if logo is defined and logo is not empty %}
130
+ {% set _logo = _logo|merge(logo) %}
131
+ {% endif %}
132
+
133
+ {% if login_toggle is defined and login_toggle is not empty %}
134
+ {% set _login_toggle = _login_toggle|merge(login_toggle) %}
135
+ {% endif %}
136
+
137
+ {% if login_box is defined and login_box is not empty %}
138
+ {% set _login_box = _login_box|merge(login_box) %}
139
+ {% endif %}
140
+
141
+ {% if language_selector is defined and language_selector is not empty %}
142
+ {% set _language_selector = _language_selector|merge(language_selector) %}
143
+ {% endif %}
144
+
145
+ {% if search_toggle is defined and search_toggle is not empty %}
146
+ {% set _search_toggle = _search_toggle|merge(search_toggle) %}
147
+ {% endif %}
148
+
149
+ {% if search_form is defined and search_form is not empty %}
150
+ {% if search_form.extra_attributes is defined and search_form.extra_attributes is not empty %}
151
+ {% set _search_form_extra_attributes = _search_form_extra_attributes|merge(search_form.extra_attributes) %}
152
+ {% endif %}
153
+ {% if search_form.extra_classes is defined and search_form.extra_classes is not empty %}
154
+ {% set _search_form_extra_classes = _search_form_extra_classes ~ ' ' ~ search_form.extra_classes %}
155
+ {% endif %}
156
+
157
+ {% if search_form.text_input is defined and search_form.text_input is not empty %}
158
+ {% if search_form.text_input.extra_classes is defined and search_form.text_input.extra_classes is not empty %}
159
+ {% set _search_input_extra_classes = _search_input_extra_classes ~ ' ' ~ _search_form.text_input.extra_classes %}
160
+ {% endif %}
161
+ {% if search_form.text_input.extra_attributes is defined and search_form.text_input.extra_attributes is not empty %}
162
+ {% set _search_input_extra_attributes = _search_input_extra_attributes|merge(search_form.text_input.extra_attributes) %}
163
+ {% endif %}
164
+ {% endif %}
165
+
166
+ {% if search_form.button is defined and search_form.button is not empty %}
167
+ {% if search_form.button.extra_classes is defined and search_form.button.extra_classes is not empty %}
168
+ {% set _search_button_extra_classes = _search_button_extra_classes ~ ' ' ~ search_form.button.extra_classes %}
169
+ {% endif %}
170
+ {% if search_form.button.extra_attributes is defined and search_form.button.extra_attributes is not empty %}
171
+ {% set _search_button_extra_attributes = _search_button_extra_attributes|merge(search_form.button.extra_attributes) %}
172
+ {% endif %}
173
+ {% if search_form.button.label is defined and search_form.button.label is not empty %}
174
+ {% set _search_button_label = search_form.button.label %}
175
+ {% endif %}
176
+ {% endif %}
177
+
178
+ {% set _search_form = {
179
+ label: search_form.label,
180
+ text_input: search_form.text_input|default({})|merge({
181
+ extra_input_classes: _search_input_extra_classes,
182
+ extra_attributes: _search_input_extra_attributes,
183
+ }),
184
+ button: search_form.button|default({})|merge({
185
+ label: _search_button_label,
186
+ icon: {
187
+ name: 'search',
188
+ size: 'fluid',
189
+ },
190
+ icon_position: 'before',
191
+ extra_classes: _button_extra_classes,
192
+ extra_attributes: _search_button_extra_attributes,
193
+ }),
194
+ extra_attributes: _search_form_extra_attributes,
195
+ extra_classes: _search_form_extra_classes
196
+ }
197
+ %}
198
+ {% endif %}
199
+
200
+ {# Internal logic - Process properties #}
201
+
202
+ {% if _menu is not empty %}
203
+ {% set extra_classes = _css_class ~ '--has-menu ' ~ extra_classes %}
204
+ {% endif %}
205
+
206
+ {% if _mega_menu is not empty %}
207
+ {% set extra_classes = _css_class ~ '--has-mega-menu ' ~ extra_classes %}
208
+ {% endif %}
209
+
210
+ {% set _css_class = _css_class ~ ' ecl-site-header-with-logo-' ~ _logo.size|default('l') %}
211
+
212
+ {% if extra_classes is defined and extra_classes is not empty %}
213
+ {% set _css_class = _css_class ~ ' ' ~ extra_classes %}
214
+ {% endif %}
215
+
216
+ {% if extra_attributes is defined and extra_attributes is not empty and extra_attributes is iterable %}
217
+ {% for attr in extra_attributes %}
218
+ {% if attr.value is defined %}
219
+ {% set _extra_attributes = _extra_attributes ~ ' ' ~ attr.name|e('html_attr') ~ '="' ~ attr.value|e('html_attr') ~ '"' %}
220
+ {% else %}
221
+ {% set _extra_attributes = _extra_attributes ~ ' ' ~ attr.name|e('html_attr') %}
222
+ {% endif %}
223
+ {% endfor %}
224
+ {% endif %}
225
+
226
+ {# Print the result #}
227
+
228
+ <header
229
+ class="{{ _css_class }}"
230
+ {{ _extra_attributes|raw }}
231
+ >
232
+ <div class="ecl-site-header__inner">
233
+ <div class="ecl-site-header__header">
234
+ <div class="ecl-site-header__container ecl-container">
235
+ <div class="ecl-site-header__top" data-ecl-site-header-top>
236
+ {# Logo #}
237
+ {% if _logo is not empty and _logo.src_desktop is not empty %}
238
+ {% set _label %}
239
+ {% set _picture = { sources: [{ src: _logo.src_desktop, media: _logo.breakpoint|default('xs') }] } %}
240
+ {% if _logo.src_mobile is defined and _logo.src_mobile is not empty %}
241
+ {% set _picture = _picture|merge({
242
+ img: {
243
+ src: _logo.src_mobile,
244
+ alt: _logo.alt,
245
+ },
246
+ }) %}
247
+ {% else %}
248
+ {% set _picture = _picture|merge({
249
+ img: {
250
+ src: _logo.src_desktop,
251
+ alt: _logo.alt,
252
+ },
253
+ }) %}
254
+ {% endif %}
255
+ {% set image_classes = 'ecl-site-header__logo-image' %}
256
+ {% set image_classes = image_classes ~ ' ecl-site-header__logo-image--' ~ _logo.size|default('l') %}
257
+ {% include '@ecl/picture/picture.html.twig' with {
258
+ picture: _picture,
259
+ extra_classes: "ecl-site-header__picture",
260
+ extra_image_classes: image_classes,
261
+ extra_attributes: _logo.title is not empty ? [{ name: 'title', value: _logo.title }] : [],
262
+ } only %}
263
+ {% endset %}
264
+ {% include '@ecl/link/link.html.twig' with {
265
+ link: {
266
+ path: _logo.path,
267
+ label: _label,
268
+ type: 'standalone'
269
+ },
270
+ extra_classes: 'ecl-site-header__logo-link'
271
+ } only %}
272
+ {% endif %}
273
+
274
+ {# Header actions #}
275
+ <div class="ecl-site-header__action">
276
+
277
+ {# Custom action #}
278
+ {% if _custom_action is not empty %}
279
+ <div class="ecl-site-header__custom-action" aria-live="polite">
280
+ {% set is_overlay = _custom_action.overlay is defined and _custom_action.overlay is not empty %}
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 %}
283
+
284
+ {% set link_extra_attributes = _custom_action.link.extra_attributes|default([]) %}
285
+ {% set link_extra_attributes = link_extra_attributes|merge([
286
+ { name: 'role', value: 'button' },
287
+ { name: 'data-ecl-custom-action', value: '' }
288
+ ]) %}
289
+ {% if is_overlay %}
290
+ {% set link_extra_attributes = link_extra_attributes|merge([
291
+ { name: 'aria-controls', value: 'custom-action-overlay' },
292
+ { name: 'aria-expanded', value: 'false' }
293
+ ]) %}
294
+ {% endif %}
295
+
296
+ {% if has_icon %}
297
+ {% set icon = _custom_action.icon|merge({
298
+ extra_classes: (_custom_action.icon.extra_classes|default('')) ~ ' ecl-site-header__icon'
299
+ }) %}
300
+ {% else %}
301
+ {% set icon = null %}
302
+ {% endif %}
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
+
311
+ {% set custom_action_link = {
312
+ link: _custom_action.link|merge({ type: 'standalone' }),
313
+ icon: icon,
314
+ extra_attributes: link_extra_attributes,
315
+ extra_classes: full_classes
316
+ } %}
317
+
318
+ {% include '@ecl/link/link.html.twig' with custom_action_link only %}
319
+
320
+ {% if _custom_action.overlay is defined and _custom_action.overlay is not empty %}
321
+ <div
322
+ class="ecl-site-header__custom-action-overlay"
323
+ id="custom-action-overlay"
324
+ hidden
325
+ data-ecl-custom-action-overlay
326
+ role="dialog"
327
+ aria-labelledby="custom-action-overlay-title"
328
+ >
329
+ <div class="ecl-site-header__custom-action-header">
330
+ <div class="ecl-site-header__custom-action-title" id="custom-action-overlay-title">
331
+ {{ _custom_action.overlay.title|default('') }}
332
+ </div>
333
+
334
+ {% if _custom_action.overlay.close is defined and _custom_action.overlay.close is not empty %}
335
+ {% include '@ecl/button/button.html.twig' with _custom_action.overlay.close|merge({
336
+ variant: 'tertiary',
337
+ style: 'neutral',
338
+ extra_classes: 'ecl-site-header__custom-action-close',
339
+ extra_attributes: [{
340
+ name: 'data-ecl-custom-action-close',
341
+ }],
342
+ }) %}
343
+ {% endif %}
344
+ </div>
345
+ <div class="ecl-site-header__custom-action-content">
346
+ {{ _custom_action.overlay.content|default('')|raw }}
347
+ </div>
348
+ </div>
349
+ {% endif %}
350
+ </div>
351
+ {% endif %}
352
+
353
+ {# Login #}
354
+ {% if _login_toggle is not empty and _login_box is not empty %}
355
+ <div class="ecl-site-header__login-container">
356
+ {% if _logged %}
357
+ <a
358
+ class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle"
359
+ href="{{ _login_toggle.href_logged }}"
360
+ aria-controls="{{ _login_box.id }}"
361
+ data-ecl-login-toggle
362
+ aria-expanded="false"
363
+ >
364
+ {% include '@ecl/icon/icon.html.twig' with {
365
+ icon: {
366
+ name: 'logged-in',
367
+ size: 'm'
368
+ },
369
+ as_image: true,
370
+ extra_classes: 'ecl-site-header__icon',
371
+ extra_accessibility: {
372
+ title: login_toggle.label_logged,
373
+ },
374
+ } only %}
375
+ {{- login_toggle.label_logged -}}
376
+ </a>
377
+ <div
378
+ id="{{ _login_box.id }}"
379
+ class="ecl-site-header__login-box"
380
+ data-ecl-login-box
381
+ >
382
+ <p class="ecl-site-header__login-description">
383
+ {{- _login_box.description -}}
384
+ </p>
385
+ <hr class="ecl-site-header__login-separator">
386
+ {% include '@ecl/link/link.html.twig' with {
387
+ link: {
388
+ label: _login_box.label,
389
+ path: _login_box.href,
390
+ type: 'standalone',
391
+ }
392
+ } only %}
393
+ </div>
394
+ {% else %}
395
+ <a
396
+ class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__login-toggle"
397
+ href="{{ _login_toggle.href_not_logged }}"
398
+ data-ecl-login-toggle
399
+ >
400
+ {% include '@ecl/icon/icon.html.twig' with {
401
+ icon: {
402
+ path: _icon_path,
403
+ name: 'log-in',
404
+ size: 'm'
405
+ },
406
+ as_image: true,
407
+ extra_classes: 'ecl-site-header__icon',
408
+ extra_accessibility: {
409
+ title: login_toggle.label_not_logged,
410
+ },
411
+ } only %}
412
+ {{- login_toggle.label_not_logged -}}
413
+ </a>
414
+ {% endif %}
415
+ </div>
416
+ {% endif %}
417
+
418
+ {# Language selector #}
419
+ {% if _language_selector is not empty %}
420
+ {% include '@ecl/site-header/site-header-language-switcher.html.twig' with {
421
+ language_selector: _language_selector,
422
+ icon_path: _icon_path,
423
+ } only %}
424
+ {% endif %}
425
+
426
+ {# Search form #}
427
+ {% if _search_form is defined %}
428
+ <div class="ecl-site-header__search-container" role="search">
429
+ {% if _search_toggle is not empty %}
430
+ <a
431
+ class="ecl-button ecl-button--tertiary ecl-button--neutral ecl-site-header__search-toggle"
432
+ href="{{ _search_toggle.href }}"
433
+ data-ecl-search-toggle="true"
434
+ aria-controls="search-form-id"
435
+ aria-expanded="false"
436
+ >
437
+ {%- include '@ecl/icon/icon.html.twig' with {
438
+ icon: {
439
+ name: 'search',
440
+ path: _icon_path,
441
+ size: 'm',
442
+ },
443
+ as_image: true,
444
+ extra_classes: 'ecl-site-header__icon',
445
+ extra_accessibility: {
446
+ title: _search_toggle.label,
447
+ },
448
+ } only -%}
449
+ {{- _search_toggle.label -}}
450
+ </a>
451
+ {% endif %}
452
+ {% include '@ecl/search-form/search-form.html.twig' with _search_form only %}
453
+ </div>
454
+ {% endif %}
455
+ </div>
456
+ </div>
457
+ </div>
458
+ </div>
459
+
460
+ {# Notification #}
461
+ {% if _notification is defined and _notification is not empty %}
462
+ <div class="ecl-site-header__notification">
463
+ <div class="ecl-container">
464
+ {% include '@ecl/notification/notification.html.twig' with _notification|merge({
465
+ extra_attributes: _notification.extra_attributes|default([])|merge([{
466
+ name: 'data-ecl-site-header-notification',
467
+ }]),
468
+ }) only %}
469
+ </div>
470
+ </div>
471
+ {% endif %}
472
+
473
+ {# Banner top #}
474
+ {% if banner_top is defined and banner_top is not empty %}
475
+ <div class="ecl-container">
476
+ <div class="ecl-site-header__banner-top">
477
+ {%- if banner_top.link is defined and banner_top.link is not empty %}
478
+ {% include '@ecl/link/link.html.twig' with banner_top|merge({
479
+ link: banner_top.link|merge({ type: 'standalone' }),
480
+ }) only %}
481
+ {% else %}
482
+ {{ banner_top }}
483
+ {% endif -%}
484
+ </div>
485
+ </div>
486
+ {% endif %}
487
+
488
+ {# Site name and call to action (banner) #}
489
+ {% if _site_name is not empty or _cta_link is not empty %}
490
+ {% set _banner_class = 'ecl-site-header__banner' %}
491
+ {% if _site_name_mobile_only %}
492
+ {% set _banner_class = _banner_class ~ ' ecl-site-header__site-name--mobile-only' %}
493
+ {% endif %}
494
+ <div class="{{ _banner_class }}">
495
+ <div class="ecl-container">
496
+ {% if _site_name is not empty %}
497
+ {% set _site_name_class = 'ecl-site-header__site-name' %}
498
+ <div class="{{ _site_name_class }}">
499
+ {{- _site_name -}}
500
+ </div>
501
+ {% endif %}
502
+ {% if _cta_link is not empty and _cta_link.link is not empty %}
503
+ {% include '@ecl/link/link.html.twig' with _cta_link|merge({
504
+ link: _cta_link.link|merge({
505
+ type: 'primary-highlight',
506
+ }),
507
+ extra_classes: 'ecl-site-header__cta',
508
+ }) only %}
509
+ {% endif %}
510
+ </div>
511
+ </div>
512
+ {% endif %}
513
+ </div>
514
+
515
+ {# Menu #}
516
+ {% if _menu is defined and _menu is not empty %}
517
+ {% include '@ecl/menu/menu.html.twig' with _menu|merge({
518
+ site_name: _site_name,
519
+ }) only %}
520
+ {% endif %}
521
+ {% if _mega_menu is defined and _mega_menu is not empty %}
522
+ {% include '@ecl/mega-menu/mega-menu.html.twig' with _mega_menu|merge({
523
+ site_name: _site_name,
524
+ }) only %}
525
+ {% endif %}
526
+ </header>
527
+
528
+ {% endapply %}