Skip to content

Commit

Permalink
Adjust secondary nav css for transition before/after js runs
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Dec 2, 2024
1 parent 8973383 commit 3bad6be
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 0 additions & 3 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ $(document).ready(function () {
});
moreItemWidth = $("#compact-secondary-nav").width();

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

updateHeader();

$(window).resize(updateHeader);
Expand Down
8 changes: 6 additions & 2 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ nav.primary {

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

> ul {
height: 1.5em;
}
}

Expand Down Expand Up @@ -224,7 +228,7 @@ body.small-nav {
flex-direction: column;

> ul {
justify-content: unset !important;
height: auto;
}

.user-menu, .login-menu {
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
</nav>
<nav class='secondary d-flex gap-2 flex-grow-1 align-items-center'>
<ul class='nav flex-grow-1 justify-content-end flex-nowrap'>
<ul class='nav flex-grow-1'>
<% if Settings.status != "database_offline" && can?(:index, Issue) %>
<li class="nav-item">
<%= link_to issues_path(:status => "open"), :class => header_nav_link_class(issues_path) do %>
Expand Down Expand Up @@ -61,7 +61,7 @@
<li class="nav-item">
<%= link_to t("layouts.about"), about_path, :class => header_nav_link_class(about_path) %>
</li>
<li id="compact-secondary-nav" class="dropdown nav-item">
<li id="compact-secondary-nav" class="dropdown nav-item ms-auto">
<button class="dropdown-toggle nav-link btn btn-outline-secondary border-0 bg-body text-secondary" type="button" data-bs-toggle="dropdown"><%= t "layouts.more" %></button>
<ul class="dropdown-menu">
</ul>
Expand Down

0 comments on commit 3bad6be

Please sign in to comment.