@openeuropa/bcl-theme-joinup 1.10.4 → 1.10.6
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/css/oe-bcl-joinup.css +581 -91
- package/css/oe-bcl-joinup.css.map +1 -1
- package/css/oe-bcl-joinup.min.css +1 -1
- package/css/oe-bcl-joinup.min.css.map +1 -1
- package/js/oe-bcl-joinup.bundle.js +187 -0
- package/js/oe-bcl-joinup.bundle.js.map +1 -1
- package/js/oe-bcl-joinup.bundle.min.js +1 -1
- package/js/oe-bcl-joinup.bundle.min.js.map +1 -1
- package/js/oe-bcl-joinup.esm.js +186 -1
- package/js/oe-bcl-joinup.esm.js.map +1 -1
- package/js/oe-bcl-joinup.esm.min.js +1 -1
- package/js/oe-bcl-joinup.esm.min.js.map +1 -1
- package/js/oe-bcl-joinup.umd.js +187 -0
- package/js/oe-bcl-joinup.umd.js.map +1 -1
- package/js/oe-bcl-joinup.umd.min.js +1 -1
- package/js/oe-bcl-joinup.umd.min.js.map +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/scss/oe-bcl-joinup.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/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@openeuropa/bcl-theme-joinup",
|
|
3
3
|
"author": "European Commission",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
|
-
"version": "1.10.
|
|
5
|
+
"version": "1.10.6",
|
|
6
6
|
"description": "OE - BCL theme joinup",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"align-templates": "lerna --scope \"@openeuropa/bcl-twig-templates\" run prepublish",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@ecl/resources-eu-logo": "3.7.1",
|
|
29
29
|
"@ecl/resources-flag-icons": "3.7.1",
|
|
30
30
|
"@fontsource/roboto": "5.1.1",
|
|
31
|
-
"@openeuropa/bcl-bootstrap": "^1.10.
|
|
32
|
-
"@openeuropa/bcl-builder": "^1.10.
|
|
33
|
-
"@openeuropa/bcl-theme-default": "^1.10.
|
|
34
|
-
"@openeuropa/bcl-twig-templates": "^1.10.
|
|
31
|
+
"@openeuropa/bcl-bootstrap": "^1.10.6",
|
|
32
|
+
"@openeuropa/bcl-builder": "^1.10.6",
|
|
33
|
+
"@openeuropa/bcl-theme-default": "^1.10.6",
|
|
34
|
+
"@openeuropa/bcl-twig-templates": "^1.10.6",
|
|
35
35
|
"@rollup/plugin-replace": "6.0.2",
|
|
36
36
|
"copyfiles": "2.4.1",
|
|
37
37
|
"cross-env": "7.0.3",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"design-system",
|
|
58
58
|
"twig"
|
|
59
59
|
],
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "f2c1911b328b12531079c209ecada73a505713c2"
|
|
61
61
|
}
|
package/src/js/index.esm.js
CHANGED
|
@@ -14,6 +14,8 @@ import Gallery from "@openeuropa/bcl-theme-default/src/js/gallery/gallery";
|
|
|
14
14
|
import Modal from "@openeuropa/bcl-bootstrap/js/src/modal";
|
|
15
15
|
import AccessibleToggle from "@openeuropa/bcl-theme-default/src/js/accessible-toggle/accessible-toggle";
|
|
16
16
|
import AccordionToggle from "@openeuropa/bcl-theme-default/src/js/accordion-toggle/accordion-toggle";
|
|
17
|
+
import MainNavigation from "@openeuropa/bcl-theme-default/src/js/main-navigation/main-navigation";
|
|
18
|
+
import MegaMenu from "@openeuropa/bcl-theme-default/src/js/mega-menu/mega-menu";
|
|
17
19
|
import Offcanvas from "@openeuropa/bcl-bootstrap/js/src/offcanvas";
|
|
18
20
|
import Popover from "@openeuropa/bcl-bootstrap/js/src/popover";
|
|
19
21
|
import ScrollSpyV2 from "@openeuropa/bcl-bootstrap/js/src/scrollspy";
|
|
@@ -30,6 +32,8 @@ export {
|
|
|
30
32
|
Dropdown,
|
|
31
33
|
Gallery,
|
|
32
34
|
Modal,
|
|
35
|
+
MainNavigation,
|
|
36
|
+
MegaMenu,
|
|
33
37
|
AccessibleToggle,
|
|
34
38
|
AccordionToggle,
|
|
35
39
|
Offcanvas,
|
package/src/js/index.umd.js
CHANGED
|
@@ -14,6 +14,8 @@ import Gallery from "@openeuropa/bcl-theme-default/src/js/gallery/gallery";
|
|
|
14
14
|
import Modal from "@openeuropa/bcl-bootstrap/js/src/modal";
|
|
15
15
|
import AccessibleToggle from "@openeuropa/bcl-theme-default/src/js/accessible-toggle/accessible-toggle";
|
|
16
16
|
import AccordionToggle from "@openeuropa/bcl-theme-default/src/js/accordion-toggle/accordion-toggle";
|
|
17
|
+
import MainNavigation from "@openeuropa/bcl-theme-default/src/js/main-navigation/main-navigation";
|
|
18
|
+
import MegaMenu from "@openeuropa/bcl-theme-default/src/js/mega-menu/mega-menu";
|
|
17
19
|
import Offcanvas from "@openeuropa/bcl-bootstrap/js/src/offcanvas";
|
|
18
20
|
import Popover from "@openeuropa/bcl-bootstrap/js/src/popover";
|
|
19
21
|
import ScrollSpyV2 from "@openeuropa/bcl-bootstrap/js/src/scrollspy";
|
|
@@ -30,6 +32,8 @@ export default {
|
|
|
30
32
|
Dropdown,
|
|
31
33
|
Gallery,
|
|
32
34
|
Modal,
|
|
35
|
+
MainNavigation,
|
|
36
|
+
MegaMenu,
|
|
33
37
|
AccessibleToggle,
|
|
34
38
|
AccordionToggle,
|
|
35
39
|
Offcanvas,
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
@import "@openeuropa/bcl-theme-default/src/scss/badge";
|
|
83
83
|
@import "@openeuropa/bcl-theme-default/src/scss/multiselect";
|
|
84
84
|
@import "@openeuropa/bcl-theme-default/src/scss/multiselect-2";
|
|
85
|
+
@import "@openeuropa/bcl-theme-default/src/scss/mega-menu";
|
|
85
86
|
@import "@openeuropa/bcl-theme-default/src/scss/breadcrumb";
|
|
86
87
|
@import "@openeuropa/bcl-theme-default/src/scss/banners";
|
|
87
88
|
@import "@openeuropa/bcl-theme-default/src/scss/timeline";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{% apply spaceless %}
|
|
2
2
|
|
|
3
|
-
{#
|
|
3
|
+
{#
|
|
4
4
|
Parameters:
|
|
5
5
|
- label (string) (default: '')
|
|
6
6
|
- variant (string) (default: 'primary')
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
{% set _spinner = spinner|default({}) %}
|
|
39
39
|
{% set _show_spinner = show_spinner ?? false %}
|
|
40
40
|
{% set _clean_class = clean_class ?? false %}
|
|
41
|
+
{% set _remove_icon_spacers = remove_icon_spacers ?? false %}
|
|
41
42
|
|
|
42
43
|
{% set _classes = [] %}
|
|
43
44
|
{% if _clean_class == false %}
|
|
@@ -68,7 +69,7 @@
|
|
|
68
69
|
size: "fluid",
|
|
69
70
|
})
|
|
70
71
|
%}
|
|
71
|
-
{% if _label is not empty %}
|
|
72
|
+
{% if _label is not empty and not _remove_icon_spacers %}
|
|
72
73
|
{% if _icon.attributes is empty %}
|
|
73
74
|
{% set _icon = _icon|merge({
|
|
74
75
|
attributes: create_attribute()
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
{% set _project_logo = project_logo|default({}) %}
|
|
26
26
|
{% set _site_name = site_name|default('') %}
|
|
27
27
|
{% set _project_link = project_link|default('') %}
|
|
28
|
+
{% set _navbar_id = navbar_id|default('header-navbar-' ~ random(100)) %}
|
|
28
29
|
{% set _head = head|default({}) %}
|
|
29
30
|
{% set _breadcrumbs = breadcrumbs|default({}) %}
|
|
30
31
|
{% set _language_modal = language_modal|default({}) %}
|
|
@@ -51,10 +52,38 @@
|
|
|
51
52
|
<header
|
|
52
53
|
{{ attributes }}
|
|
53
54
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
<nav
|
|
56
|
+
{{ _head.attributes.addClass(['navbar', 'navbar-expand-lg', 'navbar-light']) }}>
|
|
57
|
+
<div class='container'>
|
|
58
|
+
{% if _head.brand is not empty %}
|
|
59
|
+
<a class='navbar-brand' href='{{ _head.brand.link }}'>
|
|
60
|
+
{% for logo in _head.brand.logos %}
|
|
61
|
+
<img
|
|
62
|
+
src='{{ logo.src }}'
|
|
63
|
+
{% if logo.alt is not empty %}
|
|
64
|
+
alt='{{ logo.alt }}'
|
|
65
|
+
{% endif %}
|
|
66
|
+
{% if logo.class is not empty %}
|
|
67
|
+
class='{{ logo.class }}'
|
|
68
|
+
{% endif %}
|
|
69
|
+
/>
|
|
70
|
+
{% endfor %}
|
|
71
|
+
</a>
|
|
72
|
+
{% endif %}
|
|
73
|
+
<button
|
|
74
|
+
class="navbar-toggler bcl-navbar-toggler"
|
|
75
|
+
type="button"
|
|
76
|
+
data-bs-toggle="collapse"
|
|
77
|
+
data-bs-target='#{{ _navbar_id }}'
|
|
78
|
+
aria-controls='{{ _navbar_id }}'
|
|
79
|
+
aria-expanded="false"
|
|
80
|
+
aria-label="Toggle navigation"
|
|
81
|
+
>
|
|
82
|
+
<span class="navbar-toggler-icon"></span>
|
|
83
|
+
</button>
|
|
84
|
+
</div>
|
|
85
|
+
</nav>
|
|
86
|
+
|
|
58
87
|
|
|
59
88
|
<!-- project name -->
|
|
60
89
|
{% if _project_logo is not empty or _site_name is not empty %}
|
|
@@ -62,7 +91,6 @@
|
|
|
62
91
|
<div class="container">
|
|
63
92
|
{% if _project_link is not empty %}
|
|
64
93
|
<a
|
|
65
|
-
class="d-inline-block"
|
|
66
94
|
href="{{ _project_link }}"
|
|
67
95
|
>
|
|
68
96
|
{% endif %}
|
|
@@ -93,7 +121,10 @@
|
|
|
93
121
|
|
|
94
122
|
<!-- navbar -->
|
|
95
123
|
{% if _navbar is not empty %}
|
|
96
|
-
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar
|
|
124
|
+
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
|
|
125
|
+
disable_collapse: true,
|
|
126
|
+
attributes: create_attribute().addClass('bcl-header__navbar collapse navbar-collapse').setAttribute('id', _navbar_id).setAttribute('aria-label', 'Main Navigation'),
|
|
127
|
+
}) only %}
|
|
97
128
|
{% endif %}
|
|
98
129
|
|
|
99
130
|
<!-- breadcrumbs -->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{% apply spaceless %}
|
|
2
|
+
|
|
3
|
+
{% set _label = label ?? null %}
|
|
4
|
+
{% set _items = items ?? [] %}
|
|
5
|
+
{% set _icon_path = icon_path ?? '' %}
|
|
6
|
+
{% set _level = level ?? 1 %}
|
|
7
|
+
{% set _see_all = see_all ?? null %}
|
|
8
|
+
|
|
9
|
+
<ul class="bcl-mega-menu__items __level-{{ _level }}">
|
|
10
|
+
{% for _item in _items %}
|
|
11
|
+
{% set _li_attributes = _item.li_attributes ?? create_attribute() %}
|
|
12
|
+
{% if _item.items is defined and _item.items is not empty %}
|
|
13
|
+
{# This is a parent item. #}
|
|
14
|
+
<li{{ _li_attributes.addClass('__parent') }}>
|
|
15
|
+
{% include '@oe-bcl/bcl-mega-menu/mega-menu-submenu.html.twig' with _item|merge({
|
|
16
|
+
icon_path: _icon_path,
|
|
17
|
+
level: _level + 1,
|
|
18
|
+
}) only %}
|
|
19
|
+
</li>
|
|
20
|
+
{% else %}
|
|
21
|
+
{# This is a leaf item. #}
|
|
22
|
+
<li{{ _li_attributes.addClass('__leaf') }}>
|
|
23
|
+
{% if _item.path is empty %}
|
|
24
|
+
{# This is a nolink item. #}
|
|
25
|
+
<span{{ _item.attributes ?? '' }}>{{ _item.label }}</span>
|
|
26
|
+
{% else %}
|
|
27
|
+
{# This is a link. #}
|
|
28
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
|
|
29
|
+
{% endif %}
|
|
30
|
+
</li>
|
|
31
|
+
{% endif %}
|
|
32
|
+
{% endfor %}
|
|
33
|
+
</ul>
|
|
34
|
+
|
|
35
|
+
{% endapply %}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{% apply spaceless %}
|
|
2
|
+
|
|
3
|
+
{% set _items = items ?? [] %}
|
|
4
|
+
{% set _trigger = trigger ?? null %}
|
|
5
|
+
{% set _icon_path = icon_path ?? '' %}
|
|
6
|
+
{% set _level = level ?? 2 %}
|
|
7
|
+
{% set _see_all = see_all ?? null %}
|
|
8
|
+
|
|
9
|
+
{% set _trigger_id = _trigger.id|default('mm-trigger-' ~ random(10000)) %}
|
|
10
|
+
{% set _panel_id = 'mm-panel-' ~ _trigger_id %}
|
|
11
|
+
|
|
12
|
+
{% set _trigger_attributes = _trigger.attributes ?? create_attribute() %}
|
|
13
|
+
{% set _trigger = _trigger|merge({
|
|
14
|
+
attributes: _trigger_attributes
|
|
15
|
+
.setAttribute('id', _trigger_id)
|
|
16
|
+
.setAttribute('aria-controls', _panel_id)
|
|
17
|
+
.setAttribute('aria-expanded', 'false')
|
|
18
|
+
.setAttribute('aria-haspopup', 'menu'),
|
|
19
|
+
remove_icon_spacers: true,
|
|
20
|
+
clean_class: true,
|
|
21
|
+
}) %}
|
|
22
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with _trigger only %}
|
|
23
|
+
|
|
24
|
+
{# Add an optional "See all" link as last item. #}
|
|
25
|
+
{% if _see_all is not empty %}
|
|
26
|
+
{# Wrap the label for an ellipsis. #}
|
|
27
|
+
{% set _see_all_label %}
|
|
28
|
+
<span>{{- _see_all.label -}}</span>
|
|
29
|
+
{% endset %}
|
|
30
|
+
{% set _see_all_attr = (_see_all.attributes is defined ? _see_all.attributes : create_attribute()) %}
|
|
31
|
+
{% set _see_all = _see_all|merge({
|
|
32
|
+
label: _see_all_label,
|
|
33
|
+
icon: {
|
|
34
|
+
name: 'arrow-right',
|
|
35
|
+
path: _icon_path,
|
|
36
|
+
},
|
|
37
|
+
li_attributes: create_attribute()
|
|
38
|
+
.addClass('__see_all'),
|
|
39
|
+
attributes: _see_all_attr
|
|
40
|
+
.addClass(['see-all-button'])
|
|
41
|
+
.setAttribute('aria-label', 'See all items in ‘' ~ _trigger.label ~ '’')
|
|
42
|
+
}) %}
|
|
43
|
+
{% set _items = _items|merge([_see_all]) %}
|
|
44
|
+
{% endif %}
|
|
45
|
+
{% set submenu_attributes = create_attribute()
|
|
46
|
+
.setAttribute('id', _panel_id)
|
|
47
|
+
.setAttribute('hidden', '')
|
|
48
|
+
.setAttribute('role', 'group')
|
|
49
|
+
.setAttribute('aria-labelledby', _trigger_id)
|
|
50
|
+
.addClass('bcl-mega-menu__submenu', '__level-' ~ _level)
|
|
51
|
+
%}
|
|
52
|
+
<div{{ submenu_attributes }}>
|
|
53
|
+
{% if _trigger %}
|
|
54
|
+
<div class="__header">
|
|
55
|
+
<p class="__label">{{ _trigger.label }}</p>
|
|
56
|
+
</div>
|
|
57
|
+
{% endif %}
|
|
58
|
+
{% include '@oe-bcl/bcl-mega-menu/mega-menu-items.html.twig' with {
|
|
59
|
+
items: _items,
|
|
60
|
+
icon_path: _icon_path,
|
|
61
|
+
level: _level,
|
|
62
|
+
} only %}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{% endapply %}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{% apply spaceless %}
|
|
2
|
+
|
|
3
|
+
{# Parameters:
|
|
4
|
+
- id (string) (default: dropdown-random(1000))
|
|
5
|
+
- link (boolean) (default: false) - sets trigger to link, default is button
|
|
6
|
+
- trigger (link or button)
|
|
7
|
+
- content_block (block) (default: '')
|
|
8
|
+
- content_link (link)
|
|
9
|
+
- icon_path (string) (default: '')
|
|
10
|
+
- min_height (string) (default: '300px')
|
|
11
|
+
! set min-height of mega-menu
|
|
12
|
+
- items (object[])
|
|
13
|
+
format: [
|
|
14
|
+
{
|
|
15
|
+
- link or dropdown
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
- back_button_label (string) (default: 'Back')
|
|
19
|
+
- icon_path (string) (default: '')
|
|
20
|
+
#}
|
|
21
|
+
|
|
22
|
+
{% set _id = id|default('dropdown-' ~ random(1000)) %}
|
|
23
|
+
{% set _link = link ?? false %}
|
|
24
|
+
{% set _trigger = trigger|default({}) %}
|
|
25
|
+
{% set _content_block = content_block|default('') %}
|
|
26
|
+
{% set _content_link = content_link|default({}) %}
|
|
27
|
+
{% set _icon_path = icon_path|default('') %}
|
|
28
|
+
{% set _items = items|default([]) %}
|
|
29
|
+
{% set _back_button_label = back_button_label|default('Back') %}
|
|
30
|
+
{% set _icon_path = icon_path|default('') %}
|
|
31
|
+
{% set _menu_id = 'mega-menu-' ~ _id %}
|
|
32
|
+
|
|
33
|
+
{% if attributes is empty %}
|
|
34
|
+
{% set attributes = create_attribute() %}
|
|
35
|
+
{% endif %}
|
|
36
|
+
|
|
37
|
+
{% set _classes = ['bcl-mega-menu'] %}
|
|
38
|
+
|
|
39
|
+
{% set attributes = attributes.addClass(_classes) %}
|
|
40
|
+
|
|
41
|
+
{% if _trigger.attributes is empty %}
|
|
42
|
+
{% set _trigger = _trigger|merge({
|
|
43
|
+
attributes: create_attribute()
|
|
44
|
+
}) %}
|
|
45
|
+
{% endif %}
|
|
46
|
+
{% set _trigger = _trigger|merge({
|
|
47
|
+
attributes: _trigger.attributes.addClass(['dropdown-toggle', 'nav-link'])
|
|
48
|
+
.setAttribute('aria-expanded', 'false')
|
|
49
|
+
.setAttribute('aria-haspopup', 'menu')
|
|
50
|
+
.setAttribute('aria-controls', _menu_id)
|
|
51
|
+
.setAttribute('data-bs-toggle', 'dropdown')
|
|
52
|
+
.setAttribute('data-bs-auto-close', 'outside')
|
|
53
|
+
.setAttribute('id', _id)
|
|
54
|
+
}) %}
|
|
55
|
+
|
|
56
|
+
<div {{ attributes }}>
|
|
57
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with _trigger|merge({
|
|
58
|
+
variant: 'link',
|
|
59
|
+
clean_class: true,
|
|
60
|
+
}) only %}
|
|
61
|
+
{# Mega menu panel. #}
|
|
62
|
+
<nav id="{{ _menu_id }}" class="bcl-mega-menu__container dropdown-menu" aria-labelledby="{{ _id }}" aria-label="Main mega menu">
|
|
63
|
+
<div class="container">
|
|
64
|
+
{# Mobile back button. #}
|
|
65
|
+
<div class="container d-lg-none bcl-mega-menu__back-button-block">
|
|
66
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with {
|
|
67
|
+
label: _back_button_label,
|
|
68
|
+
icon_position: "before",
|
|
69
|
+
variant: 'link',
|
|
70
|
+
icon: {
|
|
71
|
+
path: _icon_path,
|
|
72
|
+
name: "arrow-left",
|
|
73
|
+
},
|
|
74
|
+
attributes: create_attribute().addClass(['back-button']).setAttribute('aria-label', 'Back to main menu')
|
|
75
|
+
} only %}
|
|
76
|
+
</div>
|
|
77
|
+
{# Info/summary and submenu columns. #}
|
|
78
|
+
<div class="position-relative">
|
|
79
|
+
<div class="row">
|
|
80
|
+
{# Content / summary column. #}
|
|
81
|
+
{% if content_block is defined %}
|
|
82
|
+
<div class="col-md-12 col-xl-3 position-relative bcl-mega-menu__info">
|
|
83
|
+
<div class="content-block">
|
|
84
|
+
{%- block content_block -%}
|
|
85
|
+
{{ _content_block }}
|
|
86
|
+
{%- endblock -%}
|
|
87
|
+
{% if _content_link.path is not empty %}
|
|
88
|
+
{% set _content_link = _content_link|merge({
|
|
89
|
+
icon: _content_link.icon|default({})|merge({
|
|
90
|
+
path: _icon_path
|
|
91
|
+
}),
|
|
92
|
+
attributes: (_content_link.attributes is defined
|
|
93
|
+
? _content_link.attributes
|
|
94
|
+
: create_attribute()
|
|
95
|
+
).addClass('content-link')
|
|
96
|
+
}) %}
|
|
97
|
+
<p class="m-0">{% include '@oe-bcl/bcl-link/link.html.twig' with _content_link only %}</p>
|
|
98
|
+
{% endif %}
|
|
99
|
+
</div>
|
|
100
|
+
<div class="shadow-container">
|
|
101
|
+
<span class="shadow-bg"></span>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
{% endif %}
|
|
105
|
+
{# Submenu column. #}
|
|
106
|
+
<div class="col-md-12 col-lg-4 col-xl-3 bcl-mega-menu__menu">
|
|
107
|
+
{% include '@oe-bcl/bcl-mega-menu/mega-menu-items.html.twig' %}
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</nav>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{% endapply %}
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
{% set _nav_class = _nav_class ~ ' dropdown' %}
|
|
92
92
|
{% set _item = _item|merge({remove_wrapper: true}) %}
|
|
93
93
|
{% endif %}
|
|
94
|
-
{% if _item.dropdown %}
|
|
94
|
+
{% if _item.dropdown or _item.mega_menu %}
|
|
95
95
|
{% set _item_classes = [] %}
|
|
96
96
|
{% else %}
|
|
97
97
|
{% set _item_classes = ['nav-link'] %}
|
|
@@ -124,6 +124,8 @@
|
|
|
124
124
|
{% include '@oe-bcl/bcl-dropdown/dropdown.html.twig' with _item only %}
|
|
125
125
|
{% elseif _item.button is defined %}
|
|
126
126
|
{% include '@oe-bcl/bcl-button/button.html.twig' with _item only %}
|
|
127
|
+
{% elseif _item.mega_menu is defined %}
|
|
128
|
+
{% include '@oe-bcl/bcl-mega-menu/mega-menu.html.twig' with _item only %}
|
|
127
129
|
{% else %}
|
|
128
130
|
{% include '@oe-bcl/bcl-link/link.html.twig' with _item only %}
|
|
129
131
|
{% endif %}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
{% set _title_link = title_link|default({}) %}
|
|
26
26
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
27
27
|
{% set _placement = placement|default('') %}
|
|
28
|
-
{% set _id = id|default('') %}
|
|
28
|
+
{% set _id = id|default('bcl-offcanvas-' ~ random(10000)) %}
|
|
29
29
|
{% set _body = body|default('') %}
|
|
30
30
|
{% set _with_body_scroll = with_body_scroll ?? false %}
|
|
31
31
|
{% set _with_backdrop = with_backdrop ?? true %}
|
|
@@ -57,14 +57,12 @@
|
|
|
57
57
|
{% set attributes = create_attribute() %}
|
|
58
58
|
{% endif %}
|
|
59
59
|
|
|
60
|
+
{% set attributes = attributes.setAttribute('id', _id) %}
|
|
61
|
+
|
|
60
62
|
{% if _aria_labelled is defined and _aria_labelled is not empty %}
|
|
61
63
|
{% set attributes = attributes.setAttribute('aria-labelledby', _aria_labelled) %}
|
|
62
64
|
{% endif %}
|
|
63
65
|
|
|
64
|
-
{% if _id is not empty %}
|
|
65
|
-
{% set attributes = attributes.setAttribute('id', _id) %}
|
|
66
|
-
{% endif %}
|
|
67
|
-
|
|
68
66
|
{% if _with_body_scroll %}
|
|
69
67
|
{% set attributes = attributes.setAttribute('data-bs-scroll', 'true') %}
|
|
70
68
|
{% endif %}
|
|
@@ -73,6 +71,10 @@
|
|
|
73
71
|
{% set attributes = attributes.setAttribute('data-bs-backdrop', 'false') %}
|
|
74
72
|
{% endif %}
|
|
75
73
|
|
|
74
|
+
{% if _title is not empty %}
|
|
75
|
+
{% set attributes = attributes.setAttribute('aria-labelledby', _id ~ '-title') %}
|
|
76
|
+
{% endif %}
|
|
77
|
+
|
|
76
78
|
{% set attributes = attributes.setAttribute('tabindex', '-1').addClass(_classes) %}
|
|
77
79
|
|
|
78
80
|
<div
|
|
@@ -85,7 +87,7 @@
|
|
|
85
87
|
title: _title,
|
|
86
88
|
title_tag: _title_tag,
|
|
87
89
|
title_link: _title_link,
|
|
88
|
-
attributes: _title_attributes.addClass(['offcanvas-title']),
|
|
90
|
+
attributes: _title_attributes.setAttribute('id', _id ~ '-title').addClass(['offcanvas-title']),
|
|
89
91
|
} only %}
|
|
90
92
|
{% endif %}
|
|
91
93
|
{% if _with_close %}
|
|
@@ -94,6 +96,7 @@
|
|
|
94
96
|
.setAttribute('data-bs-dismiss', 'offcanvas')
|
|
95
97
|
.setAttribute('data-bs-target', '#' ~ _id)
|
|
96
98
|
.setAttribute('aria-label', _close_aria_label)
|
|
99
|
+
.setAttribute('aria-controls', _id)
|
|
97
100
|
%}
|
|
98
101
|
{% if _extra_classes_close is not empty %}
|
|
99
102
|
{% set button_attributes = button_attributes.addClass(_extra_classes_close) %}
|