@openeuropa/bcl-theme-default 0.4185.202511191330 → 0.4185.202512021245

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@openeuropa/bcl-theme-default",
3
3
  "author": "European Commission",
4
4
  "license": "EUPL-1.2",
5
- "version": "0.4185.202511191330",
5
+ "version": "0.4185.202512021245",
6
6
  "description": "OE - BCL theme default",
7
7
  "scripts": {
8
8
  "align-templates": "lerna --scope \"@openeuropa/bcl-twig-templates\" run prepublish",
@@ -22,9 +22,9 @@
22
22
  "@ecl/resources-ec-logo": "3.7.1",
23
23
  "@ecl/resources-eu-logo": "3.7.1",
24
24
  "@ecl/resources-flag-icons": "3.7.1",
25
- "@openeuropa/bcl-bootstrap": "^0.4185.202511191330",
26
- "@openeuropa/bcl-builder": "^0.4185.202511191330",
27
- "@openeuropa/bcl-twig-templates": "^0.4185.202511191330",
25
+ "@openeuropa/bcl-bootstrap": "^0.4185.202512021245",
26
+ "@openeuropa/bcl-builder": "^0.4185.202512021245",
27
+ "@openeuropa/bcl-twig-templates": "^0.4185.202512021245",
28
28
  "@rollup/plugin-replace": "6.0.2",
29
29
  "copyfiles": "2.4.1",
30
30
  "cross-env": "10.1.0",
@@ -51,5 +51,5 @@
51
51
  "design-system",
52
52
  "twig"
53
53
  ],
54
- "gitHead": "de7fc20600e88ea3b38e74c2ec1c6ffbb0b2a1b0"
54
+ "gitHead": "795ad40621a91b0fbd8095b9ceed5f6ff30bb127"
55
55
  }
@@ -0,0 +1,91 @@
1
+ import EventHandler from "@openeuropa/bcl-bootstrap/js/src/dom/event-handler";
2
+ import SelectorEngine from "@openeuropa/bcl-bootstrap/js/src/dom/selector-engine";
3
+
4
+ const HEADER_SELECTOR = ".bcl-header";
5
+ const TOGGLER_SELECTOR = ".bcl-navbar-toggler";
6
+ const OFFSET_VARIABLE = "--oel-mega-menu-offset-top";
7
+
8
+ class Header {
9
+ scheduleUpdate = () => {
10
+ if (this.frameRequest) {
11
+ return;
12
+ }
13
+
14
+ this.frameRequest = window.requestAnimationFrame(() => {
15
+ this.frameRequest = null;
16
+ this.updateOffset();
17
+ });
18
+ };
19
+
20
+ constructor(element) {
21
+ this.element = element;
22
+ this.frameRequest = null;
23
+ this.resizeObserver = null;
24
+
25
+ this.init();
26
+ }
27
+
28
+ init() {
29
+ this.updateOffset();
30
+
31
+ EventHandler.on(window, "resize", this.scheduleUpdate);
32
+ EventHandler.on(window, "orientationchange", this.scheduleUpdate);
33
+
34
+ const togglers = SelectorEngine.find(TOGGLER_SELECTOR, this.element);
35
+ togglers.forEach((toggler) => {
36
+ // Some layouts move the header when the nav toggler expands; keep offset in sync.
37
+ EventHandler.on(toggler, "click", this.scheduleUpdate);
38
+ });
39
+ }
40
+
41
+ updateOffset() {
42
+ if (!this.element) {
43
+ return;
44
+ }
45
+
46
+ const rect = this.element.getBoundingClientRect();
47
+ const offset = Math.max(0, rect.top);
48
+ const value = `${offset}px`;
49
+
50
+ if (this.element.style.getPropertyValue(OFFSET_VARIABLE) === value) {
51
+ return;
52
+ }
53
+
54
+ this.element.style.setProperty(OFFSET_VARIABLE, value);
55
+ }
56
+
57
+ static init(root) {
58
+ if (typeof document === "undefined" || typeof window === "undefined") {
59
+ return;
60
+ }
61
+
62
+ const resolvedRoot = root || document;
63
+ const context =
64
+ resolvedRoot instanceof Element
65
+ ? resolvedRoot
66
+ : resolvedRoot.documentElement || document.documentElement;
67
+
68
+ const headers = SelectorEngine.find(HEADER_SELECTOR, context);
69
+
70
+ headers.forEach((headerElement) => {
71
+ if (headerElement.dataset.headerOffsetInitialized === "true") {
72
+ return;
73
+ }
74
+
75
+ headerElement.dataset.headerOffsetInitialized = "true";
76
+ new Header(headerElement);
77
+ });
78
+ }
79
+ }
80
+
81
+ if (typeof document !== "undefined") {
82
+ const initializeHeaderOffset = () => Header.init();
83
+
84
+ if (document.readyState === "loading") {
85
+ document.addEventListener("DOMContentLoaded", initializeHeaderOffset);
86
+ } else {
87
+ initializeHeaderOffset();
88
+ }
89
+ }
90
+
91
+ export default Header;
@@ -23,6 +23,7 @@ import Tooltip from "@openeuropa/bcl-bootstrap/js/src/tooltip";
23
23
  import Gallery from "@openeuropa/bcl-theme-default/src/js/gallery/gallery";
24
24
  import AccordionToggle from "@openeuropa/bcl-theme-default/src/js/accordion-toggle/accordion-toggle";
25
25
  import AccessibleToggle from "@openeuropa/bcl-theme-default/src/js/accessible-toggle/accessible-toggle";
26
+ import Header from "@openeuropa/bcl-theme-default/src/js/header/header";
26
27
 
27
28
  export {
28
29
  Alert,
@@ -43,4 +44,5 @@ export {
43
44
  Gallery,
44
45
  AccessibleToggle,
45
46
  AccordionToggle,
47
+ Header,
46
48
  };
@@ -23,6 +23,7 @@ import Tooltip from "@openeuropa/bcl-bootstrap/js/src/tooltip";
23
23
  import AccordionToggle from "@openeuropa/bcl-theme-default/src/js/accordion-toggle/accordion-toggle";
24
24
  import Gallery from "@openeuropa/bcl-theme-default/src/js/gallery/gallery";
25
25
  import AccessibleToggle from "@openeuropa/bcl-theme-default/src/js/accessible-toggle/accessible-toggle";
26
+ import Header from "@openeuropa/bcl-theme-default/src/js/header/header";
26
27
 
27
28
  export default {
28
29
  Alert,
@@ -43,4 +44,5 @@ export default {
43
44
  Gallery,
44
45
  AccessibleToggle,
45
46
  AccordionToggle,
47
+ Header,
46
48
  };
@@ -46,6 +46,7 @@ $header-link-active-background: #003776 !default;
46
46
  }
47
47
 
48
48
  .bcl-header {
49
+ --oel-mega-menu-offset-top: 0px;
49
50
  .notification {
50
51
  position: relative;
51
52
  padding-right: 0;
@@ -96,7 +97,7 @@ $header-link-active-background: #003776 !default;
96
97
  header:has(.bcl-header__navbar #main-navbar.show),
97
98
  header:has(.bcl-header__navbar.collapsing),
98
99
  header:has(.bcl-header__navbar.show) {
99
- height: 100vh;
100
+ height: calc(100vh - var(--oel-mega-menu-offset-top, 0px));
100
101
  display: flex;
101
102
  flex-flow: column;
102
103
 
@@ -1,15 +1,57 @@
1
1
  /* stylelint-disable no-duplicate-selectors, selector-no-qualifying-type, no-descending-specificity */
2
2
 
3
+ $default-border-color: $gray-600;
4
+
3
5
  .form-select {
4
6
  padding-top: $input-padding-y-lg;
5
7
  padding-bottom: $input-padding-y-lg;
6
8
  padding-left: $input-padding-x-lg;
7
9
  font-size: $form-font-size-lg;
10
+ border-color: $default-border-color;
11
+ &:focus-visible {
12
+ border-color: $default-border-color;
13
+ box-shadow: none;
14
+ @include form-focus-ring();
15
+ &.is-valid {
16
+ outline-color: $success;
17
+ &:focus {
18
+ box-shadow: none;
19
+ border-color: $default-border-color;
20
+ }
21
+ }
22
+ &.is-invalid {
23
+ outline-color: $danger;
24
+ &:focus {
25
+ box-shadow: none;
26
+ border-color: $default-border-color;
27
+ }
28
+ }
29
+ }
30
+ &:focus {
31
+ box-shadow: none;
32
+ border-color: $default-border-color;
33
+ }
34
+ &.is-valid,
35
+ &.is-invalid {
36
+ &:focus {
37
+ box-shadow: none;
38
+ }
39
+ }
40
+ }
41
+
42
+ .form-check-input {
43
+ border-color: $primary;
8
44
  &:focus-visible {
9
- outline: 2px solid $primary;
45
+ &[type="radio"] {
46
+ border-radius: 50%;
47
+ }
48
+ }
49
+ &:focus {
50
+ border-color: $primary;
10
51
  box-shadow: none;
11
- border-radius: 4px;
12
- outline-offset: -1px;
52
+ }
53
+ &:focus-visible {
54
+ @include form-focus-ring(1px);
13
55
  }
14
56
  }
15
57
 
@@ -18,16 +60,35 @@
18
60
  padding: $input-padding-y-lg $input-padding-x-lg;
19
61
  font-size: $form-font-size-lg;
20
62
  border-radius: 0.3rem;
63
+ border-color: $default-border-color;
21
64
  &::file-selector-button {
22
65
  padding: $input-padding-y-lg $input-padding-x-lg;
23
66
  margin: (-$input-padding-y-lg) $input-padding-x-lg (-$input-padding-y-lg)
24
67
  (-$input-padding-x-lg);
25
68
  }
26
- &:focus-visible {
27
- outline: 2px solid $primary;
28
- box-shadow: none;
29
- border-radius: 4px;
30
- outline-offset: -1px;
69
+ &:focus:focus-visible {
70
+ border-color: $default-border-color;
71
+ @include form-focus-ring();
72
+ }
73
+ &.is-valid,
74
+ &.is-invalid {
75
+ &:focus {
76
+ box-shadow: none;
77
+ }
78
+ }
79
+ &.is-valid {
80
+ &:focus:focus-visible {
81
+ transition: none;
82
+ border-color: $default-border-color;
83
+ @include form-focus-ring($outline-color: $success);
84
+ }
85
+ }
86
+ &.is-invalid {
87
+ &:focus:focus-visible {
88
+ transition: none;
89
+ border-color: $default-border-color;
90
+ @include form-focus-ring($outline-color: $danger);
91
+ }
31
92
  }
32
93
  }
33
94
  .form-check:not(.form-switch) {
@@ -41,20 +102,6 @@
41
102
  margin-top: 0.15rem;
42
103
  }
43
104
  }
44
- .form-check-input {
45
- &:focus-visible {
46
- outline: 4px solid $primary;
47
- box-shadow: none;
48
- border-radius: 4px;
49
- outline-offset: 0;
50
- &[type="radio"] {
51
- border-radius: 50%;
52
- }
53
- }
54
- &:checked:focus-visible {
55
- border-color: $white;
56
- }
57
- }
58
105
 
59
106
  @include media-breakpoint-up(md) {
60
107
  .form-check:not(.form-switch) {
@@ -90,24 +137,18 @@
90
137
  textarea.form-control,
91
138
  .form-control {
92
139
  &.is-invalid {
93
- background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 4C7.46459 4 7.04623 4.46229 7.0995 4.99504L7.45025 8.50248C7.47849 8.78492 7.71616 9 8 9C8.28384 9 8.52151 8.78492 8.54975 8.50248L8.9005 4.99504C8.95377 4.46228 8.53541 4 8 4ZM8.00154 10C7.44926 10 7.00154 10.4477 7.00154 11C7.00154 11.5523 7.44926 12 8.00154 12C8.55383 12 9.00154 11.5523 9.00154 11C9.00154 10.4477 8.55383 10 8.00154 10Z' fill='%23D72E3D'/%3E%3C/svg%3E%0A");
140
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 4C7.46459 4 7.04623 4.46229 7.0995 4.99504L7.45025 8.50248C7.47849 8.78492 7.71616 9 8 9C8.28384 9 8.52151 8.78492 8.54975 8.50248L8.9005 4.99504C8.95377 4.46228 8.53541 4 8 4ZM8.00154 10C7.44926 10 7.00154 10.4477 7.00154 11C7.00154 11.5523 7.44926 12 8.00154 12C8.55383 12 9.00154 11.5523 9.00154 11C9.00154 10.4477 8.55383 10 8.00154 10Z' fill='%23A51F2C'/%3E%3C/svg%3E%0A");
94
141
  }
95
142
  &.is-valid {
96
143
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM12.0303 4.96967C11.7374 4.67678 11.2626 4.67678 10.9697 4.96967C10.9626 4.97674 10.9559 4.98424 10.9498 4.9921L7.4774 9.41674L5.38388 7.32322C5.09098 7.03033 4.61611 7.03033 4.32322 7.32322C4.03032 7.61612 4.03032 8.09099 4.32322 8.38388L6.96966 11.0303C7.26256 11.3232 7.73743 11.3232 8.03032 11.0303C8.03685 11.0238 8.043 11.0169 8.04876 11.0097L12.041 6.01947C12.3232 5.72582 12.3196 5.25897 12.0303 4.96967Z' fill='%2328A745'/%3E%3C/svg%3E%0A");
97
144
  }
98
145
  }
99
146
 
100
- .form-select:not([multiple]):not([size]) {
101
- &:focus-visible {
102
- outline: 2px solid $primary;
103
- box-shadow: none;
104
- border-radius: 4px;
105
- outline-offset: -1px;
106
- }
147
+ select.form-select:not([multiple]):not([size]) {
107
148
  &.is-invalid {
108
149
  background-image:
109
150
  url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E"),
110
- url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 4C7.46459 4 7.04623 4.46229 7.0995 4.99504L7.45025 8.50248C7.47849 8.78492 7.71616 9 8 9C8.28384 9 8.52151 8.78492 8.54975 8.50248L8.9005 4.99504C8.95377 4.46228 8.53541 4 8 4ZM8.00154 10C7.44926 10 7.00154 10.4477 7.00154 11C7.00154 11.5523 7.44926 12 8.00154 12C8.55383 12 9.00154 11.5523 9.00154 11C9.00154 10.4477 8.55383 10 8.00154 10Z' fill='%23D72E3D'/%3E%3C/svg%3E%0A");
151
+ url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 4C7.46459 4 7.04623 4.46229 7.0995 4.99504L7.45025 8.50248C7.47849 8.78492 7.71616 9 8 9C8.28384 9 8.52151 8.78492 8.54975 8.50248L8.9005 4.99504C8.95377 4.46228 8.53541 4 8 4ZM8.00154 10C7.44926 10 7.00154 10.4477 7.00154 11C7.00154 11.5523 7.44926 12 8.00154 12C8.55383 12 9.00154 11.5523 9.00154 11C9.00154 10.4477 8.55383 10 8.00154 10Z' fill='%23A51F2C'/%3E%3C/svg%3E%0A");
111
152
  }
112
153
  &.is-valid {
113
154
  background-image:
@@ -11,7 +11,7 @@
11
11
  --ss-font-color: #4d4d4d;
12
12
  --ss-font-placeholder-color: #212529;
13
13
  --ss-disabled-color: #dcdee2;
14
- --ss-border-color: #dcdee2;
14
+ --ss-border-color: #6c757d;
15
15
  --ss-highlight-color: #fffb8c;
16
16
  --ss-success-color: #00b755;
17
17
  --ss-error-color: #dc3545;
@@ -77,8 +77,8 @@
77
77
  overflow: hidden;
78
78
  min-height: 38px;
79
79
 
80
- &:focus {
81
- box-shadow: 0 0 5px var(--ss-focus-color);
80
+ &:focus-visible {
81
+ @include form-focus-ring();
82
82
  }
83
83
 
84
84
  &.form-select {
@@ -330,7 +330,7 @@
330
330
  }
331
331
 
332
332
  &:focus {
333
- box-shadow: 0 0 5px var(--ss-focus-color);
333
+ @include form-focus-ring();
334
334
  }
335
335
  }
336
336
 
@@ -534,21 +534,31 @@
534
534
  }
535
535
  }
536
536
 
537
- .ss-main.multi-select.is-invalid,
538
- .was-validated .multi-select:invalid + .ss-main.multi-select {
537
+ .form-select.ss-main.multi-select.is-invalid,
538
+ .was-validated .multi-select:invalid + .form-select.ss-main.multi-select {
539
539
  border-color: $danger;
540
- background-position: right 1.5rem center;
540
+ background-position: right 2.5rem center;
541
541
  background-repeat: no-repeat;
542
+ padding-right: 0.5rem;
542
543
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
543
- background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM8 4C7.46459 4 7.04623 4.46229 7.0995 4.99504L7.45025 8.50248C7.47849 8.78492 7.71616 9 8 9C8.28384 9 8.52151 8.78492 8.54975 8.50248L8.9005 4.99504C8.95377 4.46228 8.53541 4 8 4ZM8.00154 10C7.44926 10 7.00154 10.4477 7.00154 11C7.00154 11.5523 7.44926 12 8.00154 12C8.55383 12 9.00154 11.5523 9.00154 11C9.00154 10.4477 8.55383 10 8.00154 10Z' fill='%23D72E3D'/%3E%3C/svg%3E%0A");
544
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath fill='%23a51f2c' d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4m.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2'/%3E%3C/svg%3E");
545
+ &:focus-visible {
546
+ border-color: $gray-600;
547
+ outline-color: $danger;
548
+ }
544
549
  }
545
- .ss-main.multi-select.is-valid,
546
- .was-validated .multi-select:valid + .ss-main.multi-select {
550
+ .form-select.ss-main.multi-select.is-valid,
551
+ .was-validated .multi-select:valid + .form-select.ss-main.multi-select {
547
552
  border-color: $success;
548
- background-position: right 1.5rem center;
553
+ background-position: right 2.5rem center;
549
554
  background-repeat: no-repeat;
555
+ padding-right: 0.5rem;
550
556
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
551
557
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8ZM12.0303 4.96967C11.7374 4.67678 11.2626 4.67678 10.9697 4.96967C10.9626 4.97674 10.9559 4.98424 10.9498 4.9921L7.4774 9.41674L5.38388 7.32322C5.09098 7.03033 4.61611 7.03033 4.32322 7.32322C4.03032 7.61612 4.03032 8.09099 4.32322 8.38388L6.96966 11.0303C7.26256 11.3232 7.73743 11.3232 8.03032 11.0303C8.03685 11.0238 8.043 11.0169 8.04876 11.0097L12.041 6.01947C12.3232 5.72582 12.3196 5.25897 12.0303 4.96967Z' fill='%2328A745'/%3E%3C/svg%3E%0A");
558
+ &:focus-visible {
559
+ border-color: $gray-600;
560
+ outline-color: $success;
561
+ }
552
562
  }
553
563
 
554
564
  .ss-sr-only {
@@ -39,6 +39,10 @@ $search-spacers: (
39
39
  padding-right: map-get($search-spacers, "submit-spacer-right");
40
40
  border-top-left-radius: 0;
41
41
  border-bottom-left-radius: 0;
42
+ &:focus-visible {
43
+ outline-offset: 2px;
44
+ outline-color: $primary;
45
+ }
42
46
  }
43
47
  .bcl-search-form__group {
44
48
  display: flex;
@@ -12,6 +12,18 @@
12
12
  }
13
13
  }
14
14
 
15
+ @mixin form-focus-ring(
16
+ $outline-offset: 2px,
17
+ $outline-width: 2px,
18
+ $radius: 4px,
19
+ $outline-color: $primary
20
+ ) {
21
+ outline: $outline-width solid $outline-color;
22
+ box-shadow: none;
23
+ border-radius: $radius;
24
+ outline-offset: $outline-offset;
25
+ }
26
+
15
27
  @mixin focused-item($width: 2px, $offset: 2px, $color: $primary) {
16
28
  &:focus,
17
29
  &:focus-visible {
@@ -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
 
@@ -30,6 +32,8 @@
30
32
  {% set _breadcrumbs = breadcrumbs|default({}) %}
31
33
  {% set _language_modal = language_modal|default({}) %}
32
34
  {% set _light = light ?? false %}
35
+ {% set _toggler_attributes = toggler_attributes ?: create_attribute() %}
36
+ {% set _icon_path = icon_path|default('') %}
33
37
  {% set _modals = modals|default([]) %}
34
38
 
35
39
  {% set _site_name_classes = 'bcl-header__site-name' %}
@@ -38,7 +42,7 @@
38
42
  {% set attributes = create_attribute() %}
39
43
  {% endif %}
40
44
 
41
- {% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant]) %}
45
+ {% set attributes = attributes.addClass(['bcl-header', 'bcl-header--' ~ _variant, 'shadow-sm']) %}
42
46
 
43
47
  {% if site_name_classes is not empty %}
44
48
  {% set _site_name_classes = _site_name_classes ~ ' ' ~ site_name_classes %}
@@ -49,6 +53,33 @@
49
53
  {% set _project_classes = _project_classes ~ ' light' %}
50
54
  {% endif %}
51
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
+
52
83
  <header
53
84
  {{ attributes }}
54
85
  >
@@ -70,20 +101,17 @@
70
101
  {% endfor %}
71
102
  </a>
72
103
  {% 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>
104
+ {{ navbar_toggle_button }}
84
105
  </div>
85
106
  </nav>
86
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>
112
+ </div>
113
+ </div>
114
+
87
115
  <!-- navbar -->
88
116
  {% if _navbar is not empty %}
89
117
  {% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
@@ -56,7 +56,7 @@
56
56
  {% endif %}
57
57
  {% set _link = _link|merge({
58
58
  clean_class: true,
59
- attributes: _link.attributes.addClass(['pb-3', 'd-inline-block', 'standalone'])
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' %}
@@ -7,7 +7,8 @@
7
7
  - fullscreen_responsive (string) (default: '')
8
8
  options: sm, md, lg, xl, xxl
9
9
  - static_backdrop (boolean) (default: false)
10
- - verticaly_centered (boolean) (default: false)
10
+ - vertically_centered (boolean) (default: false)
11
+ - verticaly_centered (boolean) (default: false) // deprecated typo
11
12
  - scrollable (boolean) (default: false)
12
13
  - header (block) (default: '')
13
14
  - messages (block) (default: '')
@@ -29,7 +30,7 @@
29
30
  {% set _id = id|default('modal-' ~ random(10000)) %}
30
31
  {% set _fullscreen_responsive = fullscreen_responsive|default('') %}
31
32
  {% set _static_backdrop = static_backdrop ?? false %}
32
- {% set _verticaly_centered = verticaly_centered ?? false %}
33
+ {% set _vertically_centered = vertically_centered ?? verticaly_centered ?? false %}
33
34
  {% set _scrollable = scrollable ?? false %}
34
35
  {% set _header = header|default('') %}
35
36
  {% set _header_attributes = header_attributes ?: create_attribute() %}
@@ -63,7 +64,7 @@
63
64
  <div class="modal-dialog
64
65
  {{- _size ? ' modal-' ~ size -}}
65
66
  {{- _fullscreen_responsive ? ' modal-fullscreen-' ~ _fullscreen_responsive ~ '-down' -}}
66
- {{- _verticaly_centered ? ' modal-dialog-centered' -}}
67
+ {{- _vertically_centered ? ' modal-dialog-centered' -}}
67
68
  {{- _scrollable ? ' modal-dialog-scrollable' -}}"
68
69
  >
69
70
  <div class="modal-content">