From b2b6034509db41773068be017fd16654a342b60a Mon Sep 17 00:00:00 2001 From: Mathieu Ducrot Date: Mon, 24 Jun 2024 19:10:03 +0200 Subject: [PATCH] Fix fix content shift on sonata_page_content_header for the navbar is fixed on top --- assets/styles/_skin.scss | 10 ++++++++++ templates/standard_layout.html.twig | 7 +++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/assets/styles/_skin.scss b/assets/styles/_skin.scss index 6e094df..03c6a01 100644 --- a/assets/styles/_skin.scss +++ b/assets/styles/_skin.scss @@ -4,6 +4,16 @@ padding-top: 79px; } } + .content-header:has(.content-header-under-banner) { + margin-top: 29px; + } + .content-header-under-banner { + .sticky-wrapper { + .navbar.navbar-default.stuck { + margin-top: 29px; + } + } + } .main-sidebar { hr { margin-bottom: 0; diff --git a/templates/standard_layout.html.twig b/templates/standard_layout.html.twig index 318eaa7..ab8834d 100644 --- a/templates/standard_layout.html.twig +++ b/templates/standard_layout.html.twig @@ -30,9 +30,12 @@ {% block sonata_page_content_header %} {# MDT fix content shift due to env_banner #} {% if display_smart_env_banner %} -
+
+ {{ parent() }} +
+ {% else %} + {{ parent() }} {% endif %} - {{ parent() }} {% endblock %} {% block side_bar_before_nav %}