@openeuropa/bcl-twig-templates 0.3727.202505141200 → 0.3732.202601071600
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/package.json +67 -65
- package/templates/bcl-accordion/accordion.html.twig +3 -3
- package/templates/bcl-base-templates/listing-page.html.twig +17 -19
- package/templates/bcl-blockquote/blockquote.html.twig +2 -2
- package/templates/bcl-button/button.html.twig +3 -2
- package/templates/bcl-card/card.html.twig +8 -8
- package/templates/bcl-carousel/carousel.html.twig +1 -1
- package/templates/bcl-contact-form/contact-form.html.twig +3 -3
- package/templates/bcl-content-banner/content-banner.html.twig +3 -0
- package/templates/bcl-date-block/date-block.html.twig +31 -15
- package/templates/bcl-description-list/description-list.html.twig +1 -1
- package/templates/bcl-dropdown/dropdown.html.twig +12 -7
- package/templates/bcl-event/event.html.twig +5 -5
- package/templates/bcl-file/file.html.twig +1 -1
- package/templates/bcl-footer/footer.html.twig +1 -1
- package/templates/bcl-form-input/form-input.html.twig +1 -1
- package/templates/bcl-gallery/gallery-item.html.twig +1 -1
- package/templates/bcl-glossary/glossary-detail.html.twig +12 -13
- package/templates/bcl-glossary/glossary-listing.html.twig +5 -5
- package/templates/bcl-group/group-landing.html.twig +7 -7
- package/templates/bcl-group/group.html.twig +3 -3
- package/templates/bcl-header/header.html.twig +66 -42
- package/templates/bcl-heading/heading.html.twig +2 -2
- package/templates/bcl-inpage-navigation/inpage-navigation.html.twig +18 -9
- package/templates/bcl-landing-page/landing-page.html.twig +7 -10
- package/templates/bcl-language-list/language-list-modal.html.twig +58 -5
- package/templates/bcl-links-block/links-block.html.twig +2 -2
- package/templates/bcl-listing/listing.html.twig +3 -3
- package/templates/bcl-mega-menu/mega-menu-items.html.twig +35 -0
- package/templates/bcl-mega-menu/mega-menu-submenu.html.twig +68 -0
- package/templates/bcl-mega-menu/mega-menu.html.twig +115 -0
- package/templates/bcl-modal/modal.html.twig +20 -7
- package/templates/bcl-navbar/navbar.html.twig +2 -2
- package/templates/bcl-navigation/navigation.html.twig +12 -2
- package/templates/bcl-offcanvas/offcanvas.html.twig +9 -6
- package/templates/bcl-page/page.html.twig +5 -5
- package/templates/bcl-pagination-v2/pagination-item.html.twig +90 -0
- package/templates/bcl-pagination-v2/pagination.html.twig +213 -0
- package/templates/bcl-person/person.html.twig +6 -6
- package/templates/bcl-progress/progress.html.twig +1 -1
- package/templates/bcl-project/project.html.twig +8 -8
- package/templates/bcl-project-status/project-contributions.html.twig +3 -3
- package/templates/bcl-recent-activities/recent-activities.html.twig +1 -1
- package/templates/bcl-search/search.html.twig +3 -3
- package/templates/bcl-subscription/subscription.html.twig +5 -5
- package/templates/{bcl-toast → bcl-toasts}/toasts.html.twig +18 -9
- package/templates/bcl-user/user-compact.html.twig +1 -1
- package/templates/bcl-user/user-terms.html.twig +3 -3
- package/templates/bcl-user/user.html.twig +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{% extends "@oe-bcl/bcl-base-templates/content-type.html.twig"
|
|
1
|
+
{% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" -%}
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{%- block banner %}
|
|
4
4
|
<div class="container">
|
|
5
5
|
{% if banner is not empty %}
|
|
6
6
|
<div class="mt-4 mt-md-5">
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
</div>
|
|
71
71
|
{% endif %}
|
|
72
72
|
</div>
|
|
73
|
-
{
|
|
73
|
+
{%- endblock -%}
|
|
74
74
|
|
|
75
|
-
{
|
|
75
|
+
{%- block content %}
|
|
76
76
|
{% if recent is not empty and members is not empty %}
|
|
77
77
|
<div class="row mt-3">
|
|
78
78
|
<div class="col-md-8">
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
{% include '@oe-bcl/bcl-recent-activities/recent-activities.html.twig' with recent.block_data only %}
|
|
81
81
|
</div>
|
|
82
82
|
<div class="col-md-4">
|
|
83
|
-
<h2 class="mt-4 mt-md-0 mb-4 pb-2">{{ members.title}}</h2>
|
|
83
|
+
<h2 class="mt-4 mt-md-0 mb-4 pb-2">{{ members.title }}</h2>
|
|
84
84
|
{% if members.profiles is not empty and members.profiles is iterable %}
|
|
85
85
|
{% for _profile in members.profiles %}
|
|
86
86
|
{% include '@oe-bcl/bcl-user/user-compact.html.twig' with _profile only %}
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
{% endif %}
|
|
95
95
|
{% if contributions is not empty %}
|
|
96
|
-
<h2 class="my-4 pt-3 pb-2">{{ contributions.title}}</h2>
|
|
96
|
+
<h2 class="my-4 pt-3 pb-2">{{ contributions.title }}</h2>
|
|
97
97
|
{% if contributions.listing is not empty %}
|
|
98
98
|
{% include '@oe-bcl/bcl-listing/listing.html.twig' with contributions.listing only %}
|
|
99
99
|
{% endif %}
|
|
100
100
|
{% endif %}
|
|
101
|
-
{
|
|
101
|
+
{%- endblock -%}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{% extends "@oe-bcl/bcl-base-templates/listing-page.html.twig"
|
|
1
|
+
{% extends "@oe-bcl/bcl-base-templates/listing-page.html.twig" -%}
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{%- block banner %}
|
|
4
4
|
<div class="container mt-4 mt-md-5">
|
|
5
5
|
<div class="col-xxl-11">
|
|
6
6
|
<div class="p-md-3-5 pt-3 bg-lighter d-md-flex n-mx-container">
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
{% endif %}
|
|
25
25
|
</div>
|
|
26
26
|
</div>
|
|
27
|
-
{
|
|
27
|
+
{%- endblock -%}
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
- language_modal (object) (default: {})
|
|
18
18
|
- light (boolean) (default: false)
|
|
19
19
|
- modals (modal[]) (default: [])
|
|
20
|
+
- toggler_attributes (drupal attrs)
|
|
21
|
+
- icon_path (string) (default: '')
|
|
20
22
|
- attributes (drupal attrs)
|
|
21
23
|
#}
|
|
22
24
|
|
|
@@ -25,10 +27,13 @@
|
|
|
25
27
|
{% set _project_logo = project_logo|default({}) %}
|
|
26
28
|
{% set _site_name = site_name|default('') %}
|
|
27
29
|
{% set _project_link = project_link|default('') %}
|
|
30
|
+
{% set _navbar_id = navbar_id|default('header-navbar-' ~ random(100)) %}
|
|
28
31
|
{% set _head = head|default({}) %}
|
|
29
32
|
{% set _breadcrumbs = breadcrumbs|default({}) %}
|
|
30
33
|
{% set _language_modal = language_modal|default({}) %}
|
|
31
34
|
{% set _light = light ?? false %}
|
|
35
|
+
{% set _toggler_attributes = toggler_attributes ?: create_attribute() %}
|
|
36
|
+
{% set _icon_path = icon_path|default('') %}
|
|
32
37
|
{% set _modals = modals|default([]) %}
|
|
33
38
|
|
|
34
39
|
{% set _site_name_classes = 'bcl-header__site-name' %}
|
|
@@ -37,7 +42,7 @@
|
|
|
37
42
|
{% set attributes = create_attribute() %}
|
|
38
43
|
{% endif %}
|
|
39
44
|
|
|
40
|
-
{% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant]) %}
|
|
45
|
+
{% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant, 'shadow-sm']) %}
|
|
41
46
|
|
|
42
47
|
{% if site_name_classes is not empty %}
|
|
43
48
|
{% set _site_name_classes = _site_name_classes ~ ' ' ~ site_name_classes %}
|
|
@@ -48,62 +53,81 @@
|
|
|
48
53
|
{% set _project_classes = _project_classes ~ ' light' %}
|
|
49
54
|
{% endif %}
|
|
50
55
|
|
|
56
|
+
{% set toggler_attributes = _toggler_attributes.addClass(['bcl-navbar-toggler', 'd-lg-none'])
|
|
57
|
+
.setAttribute('type', 'button')
|
|
58
|
+
.setAttribute('data-bs-toggle', 'collapse')
|
|
59
|
+
.setAttribute('data-bs-target', '#' ~ navbar_id)
|
|
60
|
+
.setAttribute('aria-controls', navbar_id)
|
|
61
|
+
.setAttribute('aria-expanded', 'false')
|
|
62
|
+
%}
|
|
63
|
+
|
|
64
|
+
{% set navbar_toggle_button %}
|
|
65
|
+
<button
|
|
66
|
+
{{ toggler_attributes }}
|
|
67
|
+
>
|
|
68
|
+
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
69
|
+
name: 'list',
|
|
70
|
+
size: 'fluid',
|
|
71
|
+
path: _icon_path,
|
|
72
|
+
attributes: create_attribute().addClass(['default-icon']),
|
|
73
|
+
} only %}
|
|
74
|
+
{% include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
75
|
+
name: 'x',
|
|
76
|
+
size: 'fluid',
|
|
77
|
+
path: _icon_path,
|
|
78
|
+
attributes: create_attribute().addClass(['active-icon']),
|
|
79
|
+
} only %}
|
|
80
|
+
</button>
|
|
81
|
+
{% endset %}
|
|
82
|
+
|
|
51
83
|
<header
|
|
52
84
|
{{ attributes }}
|
|
53
85
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{% if _project_logo is not empty or _site_name is not empty %}
|
|
61
|
-
<div class="{{ _project_classes }}">
|
|
62
|
-
<div class="container">
|
|
63
|
-
{% if _project_link is not empty %}
|
|
64
|
-
<a
|
|
65
|
-
class="d-inline-block"
|
|
66
|
-
href="{{ _project_link }}"
|
|
67
|
-
>
|
|
68
|
-
{% endif %}
|
|
69
|
-
{% if _project_logo is not empty %}
|
|
86
|
+
<nav
|
|
87
|
+
{{ _head.attributes.addClass(['navbar', 'navbar-expand-lg', 'navbar-light']) }}>
|
|
88
|
+
<div class='container'>
|
|
89
|
+
{% if _head.brand is not empty %}
|
|
90
|
+
<a class='navbar-brand' href='{{ _head.brand.link }}'>
|
|
91
|
+
{% for logo in _head.brand.logos %}
|
|
70
92
|
<img
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
class="{{ _project_logo.classes }}"
|
|
79
|
-
{% endif %}
|
|
93
|
+
src='{{ logo.src }}'
|
|
94
|
+
{% if logo.alt is not empty %}
|
|
95
|
+
alt='{{ logo.alt }}'
|
|
96
|
+
{% endif %}
|
|
97
|
+
{% if logo.class is not empty %}
|
|
98
|
+
class='{{ logo.class }}'
|
|
99
|
+
{% endif %}
|
|
80
100
|
/>
|
|
81
|
-
{%
|
|
82
|
-
{% if _site_name is not empty %}
|
|
83
|
-
<span class="{{ _site_name_classes }}">
|
|
84
|
-
{{- _site_name -}}
|
|
85
|
-
</span>
|
|
86
|
-
{% endif %}
|
|
87
|
-
{% if _project_link is not empty %}
|
|
101
|
+
{% endfor %}
|
|
88
102
|
</a>
|
|
89
103
|
{% endif %}
|
|
104
|
+
{{ navbar_toggle_button }}
|
|
105
|
+
</div>
|
|
106
|
+
</nav>
|
|
107
|
+
|
|
108
|
+
<!-- site name -->
|
|
109
|
+
<div class="bcl-header__site-name" id="site-name-heading">
|
|
110
|
+
<div class="container">
|
|
111
|
+
<span class="h5 py-3-5 border-top-subtle mb-0 d-block">{{ _site_name }}</span>
|
|
90
112
|
</div>
|
|
91
113
|
</div>
|
|
92
|
-
{% endif %}
|
|
93
114
|
|
|
94
115
|
<!-- navbar -->
|
|
95
116
|
{% if _navbar is not empty %}
|
|
96
|
-
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
{% if _breadcrumbs is not empty %}
|
|
101
|
-
<div class="container">
|
|
102
|
-
{% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
|
|
103
|
-
</div>
|
|
117
|
+
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
|
|
118
|
+
disable_collapse: true,
|
|
119
|
+
attributes: create_attribute().addClass('bcl-header__navbar collapse navbar-collapse').setAttribute('id', _navbar_id).setAttribute('aria-label', 'Main Navigation'),
|
|
120
|
+
}) only %}
|
|
104
121
|
{% endif %}
|
|
105
122
|
</header>
|
|
106
123
|
|
|
124
|
+
<!-- breadcrumbs -->
|
|
125
|
+
{% if _breadcrumbs is not empty %}
|
|
126
|
+
<div class="container">
|
|
127
|
+
{% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
|
|
128
|
+
</div>
|
|
129
|
+
{% endif %}
|
|
130
|
+
|
|
107
131
|
{% for modal in _modals %}
|
|
108
132
|
{% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
|
|
109
133
|
{% endfor %}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
{% if attributes is empty %}
|
|
15
15
|
{% set attributes = create_attribute() %}
|
|
16
|
-
{%
|
|
16
|
+
{% endif %}
|
|
17
17
|
|
|
18
18
|
{% if attributes.class is empty %}
|
|
19
19
|
{% set attributes = attributes.addClass(['mb-4']) %}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
{% endif %}
|
|
27
27
|
|
|
28
28
|
{% if _title is not empty or _title_link is not empty %}
|
|
29
|
-
<{{ _title_tag }}
|
|
29
|
+
<{{ _title_tag }}
|
|
30
30
|
{{- attributes -}}
|
|
31
31
|
>
|
|
32
32
|
{%- if _title_link is not empty -%}
|
|
@@ -29,9 +29,14 @@ Parameters:
|
|
|
29
29
|
{% endif %}
|
|
30
30
|
|
|
31
31
|
{% set attributes = attributes.addClass(['bcl-inpage-navigation', 'position-sticky']).setAttribute('id', _id) %}
|
|
32
|
-
|
|
33
|
-
{%
|
|
34
|
-
{
|
|
32
|
+
|
|
33
|
+
{% if not attributes.hasAttribute('aria-label') and not attributes.hasAttribute('aria-labelledby') %}
|
|
34
|
+
{% set attributes = attributes.setAttribute('aria-labelledby', _dropdown_id) %}
|
|
35
|
+
{% endif %}
|
|
36
|
+
|
|
37
|
+
{% set title_attributes = _title_attributes.addClass(['mb-0', 'd-none', 'd-md-block']) %}
|
|
38
|
+
{% set _button_content %}
|
|
39
|
+
{{- _title }}
|
|
35
40
|
{%- include '@oe-bcl/bcl-icon/icon.html.twig' with {
|
|
36
41
|
name: 'chevron-down',
|
|
37
42
|
size: 's',
|
|
@@ -45,21 +50,25 @@ Parameters:
|
|
|
45
50
|
{% set _classes = _classes|merge(['dynamic-active']) %}
|
|
46
51
|
{% endif %}
|
|
47
52
|
|
|
48
|
-
<nav
|
|
53
|
+
<nav{{ attributes.addClass(_classes) }}>
|
|
49
54
|
{% set trigger_attributes = create_attribute()
|
|
50
55
|
.setAttribute('aria-expanded', 'false')
|
|
51
56
|
.setAttribute('type', 'button')
|
|
52
57
|
.setAttribute('id', _dropdown_id)
|
|
53
58
|
.setAttribute('data-bs-toggle', 'dropdown')
|
|
54
|
-
.addClass(['dropdown-toggle']) %}
|
|
59
|
+
.addClass(['dropdown-toggle', 'h2', 'd-md-none']) %}
|
|
60
|
+
{% include '@oe-bcl/bcl-button/button.html.twig' with {
|
|
61
|
+
label: _button_content,
|
|
62
|
+
clean_class: true,
|
|
63
|
+
attributes: trigger_attributes,
|
|
64
|
+
} only %}
|
|
55
65
|
{% include '@oe-bcl/bcl-heading/heading.html.twig' with {
|
|
56
|
-
title:
|
|
66
|
+
title: _title,
|
|
57
67
|
title_tag: _title_tag,
|
|
58
68
|
title_link: _title_link,
|
|
59
|
-
attributes: _title_attributes
|
|
60
|
-
.merge(trigger_attributes),
|
|
69
|
+
attributes: _title_attributes,
|
|
61
70
|
} only %}
|
|
62
|
-
<div class="dropdown-menu"
|
|
71
|
+
<div class="dropdown-menu">
|
|
63
72
|
{% include '@oe-bcl/bcl-navigation/navigation.html.twig' with {
|
|
64
73
|
'pills': true,
|
|
65
74
|
'vertical': true,
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
{% extends "@oe-bcl/bcl-base-templates/content-type.html.twig"
|
|
1
|
+
{% extends "@oe-bcl/bcl-base-templates/content-type.html.twig" -%}
|
|
2
2
|
|
|
3
|
-
{
|
|
3
|
+
{%- block banner %}
|
|
4
4
|
{% if banner is defined %}
|
|
5
5
|
{% include '@oe-bcl/bcl-banner/banner.html.twig' with banner only %}
|
|
6
6
|
{% endif %}
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
{% block content %}
|
|
10
|
-
|
|
7
|
+
{%- endblock -%}
|
|
8
|
+
{%- block content %}
|
|
11
9
|
<div class="container">
|
|
12
10
|
{% if featured_section is defined %}
|
|
13
11
|
<div class="my-4">
|
|
14
12
|
<h2 class="mb-4">{{ featured_section.title }}</h2>
|
|
15
13
|
<div class="row">
|
|
16
14
|
<div class="col-12 col-md-6">
|
|
17
|
-
{{ featured_section.content }}
|
|
15
|
+
{{- featured_section.content -}}
|
|
18
16
|
</div>
|
|
19
17
|
<div class="col-12 col-md-6">
|
|
20
18
|
{% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with featured_section.featured_media only %}
|
|
@@ -40,7 +38,7 @@
|
|
|
40
38
|
<h2 class="mb-4">{{ activity_featured.title }}</h2>
|
|
41
39
|
<div class="row">
|
|
42
40
|
<div class="col-12 col-md-6">
|
|
43
|
-
{{ activity_featured.content }}
|
|
41
|
+
{{- activity_featured.content -}}
|
|
44
42
|
</div>
|
|
45
43
|
<div class="col-12 col-md-6">
|
|
46
44
|
{% include '@oe-bcl/bcl-featured-media/featured-media.html.twig' with activity_featured.featured_media only %}
|
|
@@ -55,5 +53,4 @@
|
|
|
55
53
|
</div>
|
|
56
54
|
{% endif %}
|
|
57
55
|
</div>
|
|
58
|
-
|
|
59
|
-
{% endblock %}
|
|
56
|
+
{%- endblock -%}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{% block header %}
|
|
20
20
|
{% if size == 'fullscreen' %}
|
|
21
21
|
<div class="container">
|
|
22
|
-
{% if
|
|
22
|
+
{% if _variant == 'eu' or _variant == 'ec' %}
|
|
23
23
|
<div class="border-bottom mx-n3 px-3 px-md-0 pt-md-4-5">
|
|
24
24
|
<div class="py-3-5 px-3 px-sm-0 px-md-3">
|
|
25
25
|
{% endif %}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
></button>
|
|
44
44
|
{% if size == 'fullscreen' %}
|
|
45
45
|
</div>
|
|
46
|
-
{% if
|
|
46
|
+
{% if _variant == 'eu' or _variant == 'ec' %}
|
|
47
47
|
</div>
|
|
48
48
|
</div>
|
|
49
49
|
{% endif %}
|
|
@@ -52,7 +52,60 @@
|
|
|
52
52
|
{% endblock %}
|
|
53
53
|
|
|
54
54
|
{% block body %}
|
|
55
|
-
{%
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
{% set attributes = create_attribute().addClass(['bcl-language-list', 'bcl-language-list--' ~ _variant]) %}
|
|
56
|
+
<div
|
|
57
|
+
{{ attributes }}
|
|
58
|
+
>
|
|
59
|
+
{% if _logo is not empty %}
|
|
60
|
+
<div class="container">
|
|
61
|
+
{% if _title is empty %}
|
|
62
|
+
<div class="text-center">
|
|
63
|
+
{% endif %}
|
|
64
|
+
<div class="d-inline-flex align-items-center">
|
|
65
|
+
<img
|
|
66
|
+
{% if _logo.path is not empty %}
|
|
67
|
+
src="{{ _logo.path }}"
|
|
68
|
+
{% endif %}
|
|
69
|
+
{% if _logo.alt is not empty %}
|
|
70
|
+
alt="{{ _logo.alt }}"
|
|
71
|
+
{% endif %}
|
|
72
|
+
{% if _logo.class is not empty %}
|
|
73
|
+
class="{{ _logo.class }}"
|
|
74
|
+
{% endif %}
|
|
75
|
+
/>
|
|
76
|
+
{% if _title is not empty %}
|
|
77
|
+
<h5 class="h5 ms-4">{{ _title }}</h5>
|
|
78
|
+
{% endif %}
|
|
79
|
+
</div>
|
|
80
|
+
{% if _title is empty %}
|
|
81
|
+
</div>
|
|
82
|
+
{% endif %}
|
|
83
|
+
</div>
|
|
84
|
+
{% endif %}
|
|
85
|
+
|
|
86
|
+
{% if _items is not empty or _non_eu_items is not empty %}
|
|
87
|
+
<div class="main pt-4">
|
|
88
|
+
{% if not (_variant == 'neutral' and _inside_container) %}
|
|
89
|
+
<div class="container">
|
|
90
|
+
{% endif %}
|
|
91
|
+
{% if _items is not empty and _items is iterable %}
|
|
92
|
+
{% include '@oe-bcl/bcl-language-list/language-list-grid.html.twig' with {
|
|
93
|
+
items: _items,
|
|
94
|
+
icon_path: _icon_path,
|
|
95
|
+
category: eu_category,
|
|
96
|
+
} only %}
|
|
97
|
+
{% endif %}
|
|
98
|
+
{% if _non_eu_items is not empty and _non_eu_items is iterable %}
|
|
99
|
+
{% include '@oe-bcl/bcl-language-list/language-list-grid.html.twig' with {
|
|
100
|
+
items: _non_eu_items,
|
|
101
|
+
icon_path: _icon_path,
|
|
102
|
+
category: non_eu_category,
|
|
103
|
+
} only %}
|
|
104
|
+
{% endif %}
|
|
105
|
+
{% if not (_variant == 'neutral' and _inside_container) %}
|
|
106
|
+
</div>
|
|
107
|
+
{% endif %}
|
|
108
|
+
</div>
|
|
109
|
+
{% endif %}
|
|
110
|
+
</div>
|
|
58
111
|
{% endblock %}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{% set _title_attributes = title_attributes ?: create_attribute() %}
|
|
20
20
|
{% set _background = background|default('gray') %}
|
|
21
21
|
{% set _variant = variant|default('vertical') %}
|
|
22
|
-
{% set _links = links|default([])%}
|
|
22
|
+
{% set _links = links|default([]) %}
|
|
23
23
|
|
|
24
24
|
{% set _classes = ['bcl-links-block'] %}
|
|
25
25
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
{% endif %}
|
|
57
57
|
{% set _link = _link|merge({
|
|
58
58
|
clean_class: true,
|
|
59
|
-
attributes: _link.attributes.addClass(['
|
|
59
|
+
attributes: _link.attributes.addClass(['mb-3', 'd-inline-block', 'standalone'])
|
|
60
60
|
}) %}
|
|
61
61
|
{% set _list_item_classes = 'list-unstyled' %}
|
|
62
62
|
{% if _variant == 'horizontal' %}
|
|
@@ -71,10 +71,10 @@
|
|
|
71
71
|
{% set _card_attributes = card.attributes ? card.attributes : create_attribute() %}
|
|
72
72
|
{% set _card_title_attributes = card.title_attributes ? card.title_attributes : create_attribute() %}
|
|
73
73
|
{% set _card = _card|merge({
|
|
74
|
-
title_attributes: _card_title_attributes.addClass(['
|
|
74
|
+
title_attributes: _card_title_attributes.addClass(['h5'])
|
|
75
75
|
}) %}
|
|
76
76
|
|
|
77
|
-
{% if _variant == 'default-1-col' or _variant == 'default-2-col' or _variant == 'default-3-col'
|
|
77
|
+
{% if _variant == 'default-1-col' or _variant == 'default-2-col' or _variant == 'default-3-col' %}
|
|
78
78
|
{% set _card_classes = [
|
|
79
79
|
'listing-item',
|
|
80
80
|
'border-bottom',
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
right_col_classes: _end_col_classes ~ _alignment_class,
|
|
92
92
|
}
|
|
93
93
|
}) %}
|
|
94
|
-
|
|
94
|
+
|
|
95
95
|
{% if _variant == 'default-2-col' %}
|
|
96
96
|
{% set _card_layout = _card_layout|merge({
|
|
97
97
|
responsive_columns: 2,
|
|
@@ -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,68 @@
|
|
|
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
|
+
{% set _see_all_link = null %}
|
|
25
|
+
{# Prepare an optional "See all" link rendered outside the list. #}
|
|
26
|
+
{% if _see_all is not empty %}
|
|
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_link = _see_all|merge({
|
|
32
|
+
label: _see_all_label,
|
|
33
|
+
icon: {
|
|
34
|
+
size: 'xs',
|
|
35
|
+
name: 'arrow-right',
|
|
36
|
+
path: _icon_path,
|
|
37
|
+
},
|
|
38
|
+
attributes: _see_all_attr
|
|
39
|
+
.addClass(['see-all-button'])
|
|
40
|
+
.setAttribute('aria-label', 'See all items in ‘' ~ _trigger.label ~ '’')
|
|
41
|
+
}) %}
|
|
42
|
+
{% endif %}
|
|
43
|
+
{% set submenu_attributes = create_attribute()
|
|
44
|
+
.setAttribute('id', _panel_id)
|
|
45
|
+
.setAttribute('hidden', true)
|
|
46
|
+
.setAttribute('role', 'group')
|
|
47
|
+
.setAttribute('aria-labelledby', _trigger_id)
|
|
48
|
+
.addClass('bcl-mega-menu__submenu', '__level-' ~ _level)
|
|
49
|
+
%}
|
|
50
|
+
<div{{ submenu_attributes }}>
|
|
51
|
+
{% if _trigger %}
|
|
52
|
+
<div class="__header">
|
|
53
|
+
<p class="__label">{{ _trigger.label }}</p>
|
|
54
|
+
</div>
|
|
55
|
+
{% endif %}
|
|
56
|
+
{% include '@oe-bcl/bcl-mega-menu/mega-menu-items.html.twig' with {
|
|
57
|
+
items: _items,
|
|
58
|
+
icon_path: _icon_path,
|
|
59
|
+
level: _level,
|
|
60
|
+
} only %}
|
|
61
|
+
{% if _see_all_link %}
|
|
62
|
+
<div class="__see_all">
|
|
63
|
+
{% include '@oe-bcl/bcl-link/link.html.twig' with _see_all_link only %}
|
|
64
|
+
</div>
|
|
65
|
+
{% endif %}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
{% 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 %}
|