diff --git a/src/compositions/bcl-contact-form/__snapshots__/contact-form.test.js.snap b/src/compositions/bcl-contact-form/__snapshots__/contact-form.test.js.snap
index d4dd62340..3bf948d05 100644
--- a/src/compositions/bcl-contact-form/__snapshots__/contact-form.test.js.snap
+++ b/src/compositions/bcl-contact-form/__snapshots__/contact-form.test.js.snap
@@ -42,7 +42,6 @@ exports[`OE - Contact-form contact-form error page renders correctly 1`] = `
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
`;
diff --git a/src/compositions/bcl-header/header.html.twig b/src/compositions/bcl-header/header.html.twig
index edb7dfaf4..cea9aa5ab 100644
--- a/src/compositions/bcl-header/header.html.twig
+++ b/src/compositions/bcl-header/header.html.twig
@@ -84,41 +84,6 @@
-
-
- {% if _project_logo is not empty or _site_name is not empty %}
-
- {% endif %}
-
{% if _navbar is not empty %}
{% include '@oe-bcl/bcl-navbar/navbar.html.twig' with _navbar|merge({
@@ -126,15 +91,15 @@
attributes: create_attribute().addClass('bcl-header__navbar collapse navbar-collapse').setAttribute('id', _navbar_id).setAttribute('aria-label', 'Main Navigation'),
}) only %}
{% endif %}
-
-
- {% if _breadcrumbs is not empty %}
-
- {% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
-
- {% endif %}
+
+{% if _breadcrumbs is not empty %}
+
+ {% include '@oe-bcl/bcl-breadcrumb/breadcrumb.html.twig' with _breadcrumbs only %}
+
+{% endif %}
+
{% for modal in _modals %}
{% include '@oe-bcl/bcl-modal/modal.html.twig' with modal only %}
{% endfor %}
diff --git a/src/compositions/bcl-landing-page/__snapshots__/landing-page.test.js.snap b/src/compositions/bcl-landing-page/__snapshots__/landing-page.test.js.snap
index fb2116062..0d7742a63 100644
--- a/src/compositions/bcl-landing-page/__snapshots__/landing-page.test.js.snap
+++ b/src/compositions/bcl-landing-page/__snapshots__/landing-page.test.js.snap
@@ -42,7 +42,6 @@ exports[`OE - Landing page renders correctly 1`] = `
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
+
{{- _see_all.label -}}
{% endset %}
{% set _see_all_attr = (_see_all.attributes is defined ? _see_all.attributes : create_attribute()) %}
- {% set _see_all = _see_all|merge({
+ {% set _see_all_link = _see_all|merge({
label: _see_all_label,
icon: {
+ size: 'xs',
name: 'arrow-right',
path: _icon_path,
},
- li_attributes: create_attribute()
- .addClass('__see_all'),
attributes: _see_all_attr
.addClass(['see-all-button'])
.setAttribute('aria-label', 'See all items in ‘' ~ _trigger.label ~ '’')
}) %}
- {% set _items = _items|merge([_see_all]) %}
{% endif %}
{% set submenu_attributes = create_attribute()
.setAttribute('id', _panel_id)
@@ -60,6 +58,11 @@
icon_path: _icon_path,
level: _level,
} only %}
+ {% if _see_all_link %}
+
+ {% include '@oe-bcl/bcl-link/link.html.twig' with _see_all_link only %}
+
+ {% endif %}
{% endapply %}
diff --git a/src/compositions/bcl-news/__snapshots__/news.test.js.snap b/src/compositions/bcl-news/__snapshots__/news.test.js.snap
index deb10fee8..0b44da9fa 100644
--- a/src/compositions/bcl-news/__snapshots__/news.test.js.snap
+++ b/src/compositions/bcl-news/__snapshots__/news.test.js.snap
@@ -42,7 +42,6 @@ exports[`OE - News full page renders correctly 1`] = `
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
-
-
+
-
-
+
+
-
+
+
+ About the European Union
+
+
+
+ News
+
+
+
+
div:has(.breadcrumb) {
display: none;
@@ -127,6 +126,7 @@ $header-link-active-background: #003776 !default;
z-index: 1030;
width: 100%;
align-items: flex-start;
+ overflow: auto;
.navbar-nav {
width: 100%;
margin-top: 1rem;
diff --git a/src/themes/default/src/scss/_mega-menu.scss b/src/themes/default/src/scss/_mega-menu.scss
index c03217668..85e8356cf 100644
--- a/src/themes/default/src/scss/_mega-menu.scss
+++ b/src/themes/default/src/scss/_mega-menu.scss
@@ -275,34 +275,6 @@ ul.bcl-mega-menu__items {
}
}
}
-
- // The see-all link is at the bottom of the list.
- &:has(> a.see-all-button) {
- position: sticky;
- inset-block-start: 100%;
- }
- > a.see-all-button {
- border-top: none;
- &:after {
- background: $neutral-border-color;
- content: "";
- block-size: 1px;
- inset-inline-start: 0;
- position: absolute;
- inset-block-start: 0;
- // Replicate horizontal padding of parent element.
- inset-inline: $mm-gutter-x;
- }
- > svg {
- inline-size: 0.8rem;
- }
- > span {
- text-overflow: ellipsis;
- overflow: hidden;
- display: block;
- white-space: nowrap;
- }
- }
}
}
@@ -314,6 +286,21 @@ ul.bcl-mega-menu__items {
// Avoid a space between the parent menu and the submenu.
@include padding-right(0);
}
+ @include media-breakpoint-down(lg) {
+ > .bcl-mega-menu__items {
+ &:has(.bcl-mega-menu__submenu:not([hidden])) {
+ > .__leaf,
+ > .__parent {
+ display: none;
+ }
+ }
+ > .__parent {
+ &:has(.bcl-mega-menu__submenu:not([hidden])) {
+ display: block;
+ }
+ }
+ }
+ }
}
// Nested submenu.
@@ -372,40 +359,42 @@ ul.bcl-mega-menu__items {
}
}
}
-}
-
-// Second level items column.
-.bcl-mega-menu__second-submenu {
- > .tab-content > .tab-pane {
- // In desktop, the entire second-level list has a light blue background.
- @include media-breakpoint-up(lg) {
- background: $primary-bg-subtle;
- }
- // Hide other parts of the mega menu in mobile, when a sub-submenu is open.
- @include media-breakpoint-down(lg) {
- .bcl-mega-menu__container:has(&.active) {
- .bcl-mega-menu__info,
- .bcl-mega-menu__first-submenu {
- display: none;
- }
+ @include media-breakpoint-up(lg) {
+ > .bcl-mega-menu__items {
+ flex: 1 1 0;
+ overflow-y: auto;
+ > li > :is(span, a, button) {
+ @include mm-item-padding($px: map-get($spacers, "4-25"));
}
}
- // The panel title only shows in mobile.
- > .panel-title {
- @include mm-item-padding(map-get($spacers, 3));
- margin: 0;
- color: $dark;
- background: $primary-bg-subtle;
- display: block;
- font-size: 20px;
+ }
+ > .__see_all {
+ border-top: 1px solid $neutral-border-color;
+ @include media-breakpoint-up(lg) {
+ border-top: 1px solid $primary-border-subtle;
+ margin: 0 map-get($spacers, "4-25");
+ }
+ > .see-all-button {
+ @include mm-item-padding();
+ // Use flex for icon spacing.
+ display: flex;
+ align-items: center;
+ color: $link-color;
@include media-breakpoint-up(lg) {
- display: none;
+ padding: $mm-gutter-y map-get($spacers, "4-25");
+ margin: 0 -1.75rem;
}
- }
- // Items get a bit more space to the sides in xl viewport.
- @include media-breakpoint-up(xl) {
- > ul > li > * {
- margin: 0 map-get($spacers, "2-5");
+ &:hover {
+ background: $primary-bg-subtle;
+ }
+ > svg {
+ flex-shrink: 0;
+ }
+ > span {
+ text-overflow: ellipsis;
+ overflow: hidden;
+ display: block;
+ white-space: nowrap;
}
}
}
diff --git a/src/themes/default/storybook/.storybook/environment.js b/src/themes/default/storybook/.storybook/environment.js
index d3a84e502..aa0c8efe9 100644
--- a/src/themes/default/storybook/.storybook/environment.js
+++ b/src/themes/default/storybook/.storybook/environment.js
@@ -6,17 +6,7 @@ const {
createFilesystemLoader,
createFunction,
} = require("twing");
-const storybookAttributePath = path.resolve(
- __dirname,
- "..",
- "..",
- "..",
- "..",
- "..",
- ".storybook",
- "drupal-attribute",
-);
-const { StorybookDrupalAttribute } = require(storybookAttributePath);
+const { StorybookDrupalAttribute } = require("../../../../../.storybook/drupal-attribute");
const componentsPath = path.resolve(__dirname, "../../../components");
const compositionsPath = path.resolve(__dirname, "../../../compositions");