Skip to content

Commit e40ef67

Browse files
committed
Mobile display improvements
1 parent 7161457 commit e40ef67

5 files changed

Lines changed: 29 additions & 4 deletions

File tree

app/assets/stylesheets/custom.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,29 @@ nav.navbar-dark {
145145
.navbar-lemma {
146146
background: #ffffff50;
147147
}
148+
@include media-breakpoint-down(md) {
149+
background: theme-color-level(primary, 5);
150+
text-align: center;
151+
margin: 0;
152+
padding: 0.5em 0;
153+
.nav-text {
154+
border-top: 1px solid white;
155+
height: 1px;
156+
overflow: hidden;
157+
margin: 0.5em 3em;
158+
}
159+
}
160+
}
161+
}
162+
163+
@include media-breakpoint-down(sm) {
164+
.crumbs {
165+
& > span {
166+
display: none;
167+
}
168+
& > a {
169+
color: white !important;
170+
}
148171
}
149172
}
150173

app/controllers/registers_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def show
9191
@count = @names.count
9292
@names &&= @names.where(rank: params[:rank]) if params[:rank].present?
9393
@names &&= @names.paginate(page: params[:page], per_page: 30)
94-
@crumbs = [['Lists', registers_url], @register.acc_url]
94+
@crumbs = [['Lists', registers_url], @register.accession]
9595
end
9696

9797
# GET /registers/new

app/views/layouts/_header.html.erb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@
3333
</div>
3434
</nav>
3535
<% if @crumbs %>
36-
<nav class="navbar small sticky-top navbar-expand navbar-dark bg-dark-ce justify-content-between">
36+
<nav class="navbar small sticky-top navbar-expand navbar-dark bg-dark-ce
37+
justify-content-between overflow-hidden">
3738
<div class="navbar-nav">
38-
<div class="collapse navbar-collapse">
39+
<div class="collapse navbar-collapse crumbs">
3940
<%= link_to(root_url,
4041
class: 'nav-item nav-link only-stuck', title: 'Home') do %>
4142
<%= fa_icon('university') %>

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'jquery-ui.min.css'
2424
) %>
2525
<%= tag(:meta,
26-
name: 'viewport', content: 'width=device-width, initial-scale=1') %>
26+
name: 'viewport', content: 'width=device-width, initial-scale=0.8') %>
2727

2828
<!-- Plausible -->
2929
<% if Rails.configuration.try(:plausible_server).present? %>

app/views/shared/_user_links.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<% if user_signed_in? %>
1818
<li class="nav-item">
1919
<%= link_to(notifications_path, title: 'Alerts') do %>
20+
<span class="d-lg-none">Notifications</span>
2021
<% if current_user.unseen_notifications.any? %>
2122
<span
2223
class="nav-item-text badge badge-pill badge-info py-1 px-2 mr-1">

0 commit comments

Comments
 (0)