Loading core/modules/navigation/css/components/admin-toolbar.css +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ body { } .admin-toolbar__logo img { display: block; max-width: var(--admin-toolbar-space-40); } /** * Scroll wrapper for Mobile. Loading core/modules/navigation/css/components/admin-toolbar.pcss.css +1 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,7 @@ body { & img { display: block; max-width: var(--admin-toolbar-space-40); } } Loading core/modules/navigation/layouts/navigation.html.twig +8 −10 Original line number Diff line number Diff line Loading @@ -6,14 +6,13 @@ * Available variables: * - content: The content for this layout. * - attributes: HTML attributes for the layout <div>. * - hide_logo: Whether to hide the logo. * - logo_path: The path to the logo image if logo_managed in * navigation.settings configuration has been set. * - logo_width: The width of the logo image. Available if * - content.settings.hide_logo: Whether to hide the logo. * - content.settings.logo_path: The path to the logo image if logo_managed * in navigation.settings configuration has been set. * - content.settings.logo_width: The width of the logo image. Available if * logo_path points to a valid image file. * - logo_height: The height of the logo image. Available if * - content.settings.logo_height: The height of the logo image. Available if * logo_path points to a valid image file. * * @ingroup themeable */ #} Loading @@ -38,16 +37,15 @@ <div class="admin-toolbar__scroll-wrapper"> {% set title_menu = 'admin-toolbar-title'|clean_unique_id %} {# @todo - We should get rid of this ID below. #} <nav {{ region_attributes.content.setAttribute('id', 'menu-builder').addClass('admin-toolbar__content').setAttribute('aria-labelledby', title_menu) }}> <h3 id="{{ title_menu }}" class="visually-hidden">{{ 'Administrative toolbar content'|t }}</h3> {# @todo - Needs to be placed here so we can have the header footer on mobile. #} <div class="admin-toolbar__header"> {% if not hide_logo %} {% if not content.settings.hide_logo %} <a class="admin-toolbar__logo" href="{{ path('<front>') }}"> {% if logo_path %} <img alt="{{ 'Navigation logo'|t }}" src="{{ file_url(logo_path) }}" loading="eager" width="{{ logo_width|default(40) }}" height="{{ logo_height|default(40) }}"> {% if content.settings.logo_path is not null %} <img alt="{{ 'Navigation logo'|t }}" src="{{ content.settings.logo_path }}" loading="eager" width="{{ content.settings.logo_width|default(40) }}" height="{{ content.settings.logo_height|default(40) }}"> {% else %} {% include '@navigation/logo.svg.twig' with { label: 'Navigation logo'|t Loading core/modules/navigation/navigation.module +0 −7 Original line number Diff line number Diff line Loading @@ -207,13 +207,6 @@ function navigation_block_alter(&$definitions): void { } } /** * Implements hook_preprocess_HOOK(). */ function template_preprocess_navigation(array &$variables): void { $variables['hide_logo'] = $variables['content']['#hide_logo'] ?? TRUE; } /** * Implements hook_element_info_alter(). */ Loading core/modules/navigation/src/NavigationRenderer.php +4 −4 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public function buildNavigation(array &$page_top): void { $asset_url = $module_path . '/assets/fonts/inter-var.woff2'; $defaults = [ '#hide_logo' => $logo_provider === self::LOGO_PROVIDER_HIDE, 'settings' => ['hide_logo' => $logo_provider === self::LOGO_PROVIDER_HIDE], '#attached' => [ 'html_head_link' => [ [ Loading @@ -149,11 +149,11 @@ public function buildNavigation(array &$page_top): void { if ($logo_managed instanceof File) { $logo_managed_uri = $logo_managed->getFileUri(); $logo_managed_url = $this->fileUrlGenerator->generateAbsoluteString($logo_managed_uri); $page_top['navigation']['#logo_path'] = $logo_managed_url; $page_top['navigation'][0]['settings']['logo_path'] = $logo_managed_url; $image = $this->imageFactory->get($logo_managed_uri); if ($image->isValid()) { $page_top['navigation']['#logo_width'] = $image->getWidth(); $page_top['navigation']['#logo_height'] = $image->getHeight(); $page_top['navigation'][0]['settings']['logo_width'] = $image->getWidth(); $page_top['navigation'][0]['settings']['logo_height'] = $image->getHeight(); } } } Loading Loading
core/modules/navigation/css/components/admin-toolbar.css +1 −0 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ body { } .admin-toolbar__logo img { display: block; max-width: var(--admin-toolbar-space-40); } /** * Scroll wrapper for Mobile. Loading
core/modules/navigation/css/components/admin-toolbar.pcss.css +1 −0 Original line number Diff line number Diff line Loading @@ -244,6 +244,7 @@ body { & img { display: block; max-width: var(--admin-toolbar-space-40); } } Loading
core/modules/navigation/layouts/navigation.html.twig +8 −10 Original line number Diff line number Diff line Loading @@ -6,14 +6,13 @@ * Available variables: * - content: The content for this layout. * - attributes: HTML attributes for the layout <div>. * - hide_logo: Whether to hide the logo. * - logo_path: The path to the logo image if logo_managed in * navigation.settings configuration has been set. * - logo_width: The width of the logo image. Available if * - content.settings.hide_logo: Whether to hide the logo. * - content.settings.logo_path: The path to the logo image if logo_managed * in navigation.settings configuration has been set. * - content.settings.logo_width: The width of the logo image. Available if * logo_path points to a valid image file. * - logo_height: The height of the logo image. Available if * - content.settings.logo_height: The height of the logo image. Available if * logo_path points to a valid image file. * * @ingroup themeable */ #} Loading @@ -38,16 +37,15 @@ <div class="admin-toolbar__scroll-wrapper"> {% set title_menu = 'admin-toolbar-title'|clean_unique_id %} {# @todo - We should get rid of this ID below. #} <nav {{ region_attributes.content.setAttribute('id', 'menu-builder').addClass('admin-toolbar__content').setAttribute('aria-labelledby', title_menu) }}> <h3 id="{{ title_menu }}" class="visually-hidden">{{ 'Administrative toolbar content'|t }}</h3> {# @todo - Needs to be placed here so we can have the header footer on mobile. #} <div class="admin-toolbar__header"> {% if not hide_logo %} {% if not content.settings.hide_logo %} <a class="admin-toolbar__logo" href="{{ path('<front>') }}"> {% if logo_path %} <img alt="{{ 'Navigation logo'|t }}" src="{{ file_url(logo_path) }}" loading="eager" width="{{ logo_width|default(40) }}" height="{{ logo_height|default(40) }}"> {% if content.settings.logo_path is not null %} <img alt="{{ 'Navigation logo'|t }}" src="{{ content.settings.logo_path }}" loading="eager" width="{{ content.settings.logo_width|default(40) }}" height="{{ content.settings.logo_height|default(40) }}"> {% else %} {% include '@navigation/logo.svg.twig' with { label: 'Navigation logo'|t Loading
core/modules/navigation/navigation.module +0 −7 Original line number Diff line number Diff line Loading @@ -207,13 +207,6 @@ function navigation_block_alter(&$definitions): void { } } /** * Implements hook_preprocess_HOOK(). */ function template_preprocess_navigation(array &$variables): void { $variables['hide_logo'] = $variables['content']['#hide_logo'] ?? TRUE; } /** * Implements hook_element_info_alter(). */ Loading
core/modules/navigation/src/NavigationRenderer.php +4 −4 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public function buildNavigation(array &$page_top): void { $asset_url = $module_path . '/assets/fonts/inter-var.woff2'; $defaults = [ '#hide_logo' => $logo_provider === self::LOGO_PROVIDER_HIDE, 'settings' => ['hide_logo' => $logo_provider === self::LOGO_PROVIDER_HIDE], '#attached' => [ 'html_head_link' => [ [ Loading @@ -149,11 +149,11 @@ public function buildNavigation(array &$page_top): void { if ($logo_managed instanceof File) { $logo_managed_uri = $logo_managed->getFileUri(); $logo_managed_url = $this->fileUrlGenerator->generateAbsoluteString($logo_managed_uri); $page_top['navigation']['#logo_path'] = $logo_managed_url; $page_top['navigation'][0]['settings']['logo_path'] = $logo_managed_url; $image = $this->imageFactory->get($logo_managed_uri); if ($image->isValid()) { $page_top['navigation']['#logo_width'] = $image->getWidth(); $page_top['navigation']['#logo_height'] = $image->getHeight(); $page_top['navigation'][0]['settings']['logo_width'] = $image->getWidth(); $page_top['navigation'][0]['settings']['logo_height'] = $image->getHeight(); } } } Loading