Skip to content

Commit

Permalink
Merge pull request #779 from sul-dlss/hamburger-menu
Browse files Browse the repository at this point in the history
Move collections and repositories link into the hamburger menu
  • Loading branch information
corylown authored Aug 27, 2024
2 parents fa0995f + 2558c1a commit 86c6dab
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
7 changes: 5 additions & 2 deletions app/assets/stylesheets/sulBase.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ a,
box-shadow: 0 0 0 0.25rem rgba($link-dark-color, 0.25);
}

.bg-dark a {
color: $link-light-color;
.bg-dark {
--bs-dropdown-divider-bg: white;
a {
color: $link-light-color;
}
}

.warning-icon svg {
Expand Down
2 changes: 1 addition & 1 deletion app/components/arclight/masthead_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="col-md-8 d-flex justify-content-center justify-content-md-start">
<span class="h1 my-3"><%= heading %></span>
</div>
<div class="col-md-4">
<div class="col-md-4 d-none d-md-block">
<nav class="navbar navbar-expand d-flex justify-content-md-end justify-content-center" aria-label="browse">
<ul class="navbar-nav">
<%= render 'shared/main_menu_links' %>
Expand Down
7 changes: 7 additions & 0 deletions app/components/user_util_links_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
<li class="nav-item"><%= render 'blacklight/nav/bookmark' %></li>
<li class="nav-item"><%= render 'blacklight/nav/search_history' %></li>
<li class="nav-item"><a href="#feedback" class="nav-link" data-bs-toggle="collapse" data-bs-target="#feedback">Feedback</a></li>
<li class="nav-item d-md-none"><hr class="dropdown-divider"></li>
<li class="nav-item d-md-none <%= repositories_active_class %>">
<%= link_to t('arclight.routes.repositories'), helpers.arclight_engine.repositories_path, class: 'nav-link' %>
</li>
<li class="nav-item d-md-none <%= helpers.collection_active_class %>">
<%= link_to t('arclight.routes.collections'), helpers.arclight_engine.collections_path, class: 'nav-link' %>
</li>
</ul>
4 changes: 3 additions & 1 deletion spec/features/navbar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
end

it "renders the 'Bookmark' and 'Search History' navigation items" do
expect(page).to have_css('#user-util-collapse .nav-item', count: 3)
expect(page).to have_css('#user-util-collapse .nav-item', count: 6)
expect(page).to have_css('#user-util-collapse .nav-item a', text: 'Bookmarks')
expect(page).to have_css('#user-util-collapse .nav-item a', text: 'History')
expect(page).to have_css('#user-util-collapse .nav-item.d-md-none a', text: 'Repositories')
expect(page).to have_css('#user-util-collapse .nav-item.d-md-none a', text: 'Collections')
end

it "always renders the 'Feedback' navigation item" do
Expand Down

0 comments on commit 86c6dab

Please sign in to comment.