From 52123336fdeee879034c29f95fd641505d8c6380 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 24 May 2024 19:41:55 +0300 Subject: [PATCH 1/3] Use Bootstrap .nav in secondary header navigation --- app/assets/javascripts/application.js | 1 + app/assets/stylesheets/common.scss | 8 +++----- app/views/layouts/_header.html.erb | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 20976d15a5..0547421264 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -106,6 +106,7 @@ $(document).ready(function () { $("body").removeClass("compact-nav"); $("header").removeClass("text-nowrap"); + $("header nav.secondary > ul").removeClass("flex-nowrap"); updateHeader(); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 0edb3b0fc3..1da1030427 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -98,10 +98,6 @@ header { position: relative; font-size: 14px; - h1, nav, nav > ul, nav > ul > li { - display: inline-block; - } - > * { height: 100%; padding: $lineheight * 0.5; @@ -191,7 +187,7 @@ body.small-nav { min-height: $headerHeight; &.closed nav { - display: none; + display: none !important; } .search_forms { @@ -216,6 +212,8 @@ body.small-nav { } nav.secondary { + flex-direction: column; + .user-menu, .login-menu { width: 100%; } diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index 7f2880a1c9..db534ef83b 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -31,8 +31,8 @@ <%= link_to t("layouts.export"), export_path, :class => "btn btn-outline-primary geolink", :id => "export_tab" %> -