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

Move collections and repositories link into the hamburger menu #779

Merged
merged 1 commit into from
Aug 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
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