Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust vertical alignment of secondary header navigation #4828

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ $(document).ready(function () {
$("body").removeClass("compact-nav");

$("header").removeClass("text-nowrap");
$("header nav.secondary > ul").removeClass("flex-nowrap");

updateHeader();

Expand Down
10 changes: 4 additions & 6 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -154,7 +150,7 @@ nav.primary {

nav.secondary {
.nav-link {
padding: 0.2rem;
padding: 0.3rem;
}
}

Expand Down Expand Up @@ -191,7 +187,7 @@ body.small-nav {
min-height: $headerHeight;

&.closed nav {
AntonKhorev marked this conversation as resolved.
Show resolved Hide resolved
display: none;
display: none !important;
}

.search_forms {
Expand All @@ -216,6 +212,8 @@ body.small-nav {
}

nav.secondary {
flex-direction: column;

.user-menu, .login-menu {
width: 100%;
}
Expand Down
8 changes: 4 additions & 4 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<%= link_to t("layouts.export"), export_path, :class => "btn btn-outline-primary geolink", :id => "export_tab" %>
</div>
</nav>
<nav class='secondary'>
<ul class='mx-1 px-0'>
<nav class='secondary d-flex gap-2 align-items-center'>
<ul class='nav flex-nowrap'>
<% if Settings.status != "database_offline" && can?(:index, Issue) %>
<li class="compact-hide nav-item">
<%= link_to issues_path(:status => "open"), :class => header_nav_link_class(issues_path) do %>
Expand Down Expand Up @@ -84,9 +84,9 @@
<button class='dropdown-toggle btn btn-outline-secondary border-secondary-subtle bg-body text-secondary px-2 py-1 flex-grow-1' type='button' data-bs-toggle='dropdown'>
<%= user_thumbnail_tiny(current_user, :width => 25, :height => 25, :class => "user_thumbnail_tiny rounded-1 bg-body") %>
<% if current_user.new_messages.size > 0 %>
<span class="badge count-number m-1"><%= current_user.new_messages.size %></span>
<span class="badge count-number position-static m-1"><%= current_user.new_messages.size %></span>
<% end %>
<span class='username'>
<span class='username align-middle'>
<%= current_user.display_name %>
</span>
</button>
Expand Down