@openeuropa/bcl-header 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.
Files changed (2) hide show
  1. package/header.html.twig +37 -6
  2. package/package.json +6 -6
package/header.html.twig CHANGED
@@ -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
- <!-- navbar_settings -->
55
- {% if _head is not empty %}
56
- {% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _head only %}
57
- {% endif %}
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 only %}
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 -->
package/package.json CHANGED
@@ -2,16 +2,16 @@
2
2
  "name": "@openeuropa/bcl-header",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "1.10.4",
5
+ "version": "1.10.6",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "description": "OE - BCL header",
10
10
  "dependencies": {
11
- "@openeuropa/bcl-breadcrumb": "^1.10.4",
12
- "@openeuropa/bcl-language-list": "^1.10.4",
13
- "@openeuropa/bcl-modal": "^1.10.4",
14
- "@openeuropa/bcl-navbar": "^1.10.4"
11
+ "@openeuropa/bcl-breadcrumb": "^1.10.6",
12
+ "@openeuropa/bcl-language-list": "^1.10.6",
13
+ "@openeuropa/bcl-modal": "^1.10.6",
14
+ "@openeuropa/bcl-navbar": "^1.10.6"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",
@@ -27,5 +27,5 @@
27
27
  "design-system",
28
28
  "twig"
29
29
  ],
30
- "gitHead": "52247384e1ce1f63ac2fba5ac0965af9924130fa"
30
+ "gitHead": "f2c1911b328b12531079c209ecada73a505713c2"
31
31
  }