From: Anton Khorev Date: Mon, 16 Oct 2023 17:27:38 +0000 (+0300) Subject: Switch to flex header container X-Git-Tag: live~961^2~2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/693fe3b587c6051bfb68a7853b7b032d7a4c9f5a Switch to flex header container --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 1f5d0398e..883f80c6c 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -109,7 +109,9 @@ time[title] { #menu-icon { display: none; - float: right; + position: absolute; + top: 0; + right: 0; background: image-url("menu-icon.png") no-repeat; background-size: 30px 30px; width: 30px; @@ -133,10 +135,6 @@ header { padding: $lineheight * 0.5; } - h1, nav.primary { - float: left; - } - img.logo { margin-top: -2px; } @@ -150,8 +148,11 @@ header { .btn { font-size: 14px; } -} + nav.primary { + margin-right: auto; + } +} nav.primary { & > .btn-group .btn-outline-primary { @@ -186,9 +187,6 @@ nav.primary { } nav.secondary { - position: absolute; - right: 0; - .nav-link { padding: 0.2rem; color: $darkgrey; @@ -230,15 +228,8 @@ body.small-nav { display: block; } - nav.primary, - nav.secondary { - float: none !important; - position: relative; - display: block; - clear: both; - } - header { + flex-direction: column; height: auto; min-height: $headerHeight; background: #fff; @@ -259,6 +250,7 @@ body.small-nav { } nav.primary { + margin-right: 0; padding: 0; ul, li { diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb index fb5c01839..e272834be 100644 --- a/app/views/layouts/_header.html.erb +++ b/app/views/layouts/_header.html.erb @@ -1,4 +1,4 @@ -
+

<%= image_tag "osm_logo.png", :srcset => image_path("osm_logo.svg"), :alt => t("layouts.logo.alt_text"), :width => 30, :height => 30, :class => "logo" %> @@ -80,7 +80,7 @@ <% if current_user && current_user.id %> -