Skip to content

Commit

Permalink
Resolve mobile limits/facet toggle alignment
Browse files Browse the repository at this point in the history
Fixes #656

Reflow #facets children for Bootstrap 4's .navbar expectactions. Make the .topbar's .navbar-brand selector more specific to prevent logo from repeating on additional page .navbars.
  • Loading branch information
Eric Larson committed Jul 30, 2018
1 parent 24bb9bf commit 6bccb7a
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
37 changes: 37 additions & 0 deletions app/assets/stylesheets/geoblacklight/_blacklight_overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,40 @@
padding-top:0.5rem;
}
// End - Addresses GBL issue #639

// Begin - Addresses GBL issue #656
.navbar-brand {
background: transparent;
padding-top: 0.5rem;
padding-bottom: 0;
margin-right: 0;
font-size: 1.25rem;
line-height: inherit;
text-indent:0%;
height:auto;
}

$logo-image: image_url('blacklight/logo.png') !default;

.topbar .navbar-brand { /* The main logo image for the Blacklight instance */
@if $logo-image {
background: transparent $logo-image no-repeat top left;
}

@if $logo_image {
// deprecated
background: transparent image_url($logo_image) no-repeat top left;
}

display: inline-block;
flex: 0 0 150px;
height: 50px;
margin-right:20px;
margin-top: -0.4rem;
overflow: hidden;
padding-left: 0;
padding-right: 0;
text-indent: 100%;
white-space: nowrap;
width: 150px;
}
19 changes: 19 additions & 0 deletions app/views/catalog/_facets.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<% # main container for facets/limits menu -%>
<% if has_facet_values? %>
<div id="facets" class="facets sidenav facets-toggleable-sm">
<div class="navbar">
<h2 class="facets-heading navbar-brand">
<%= t('blacklight.search.facets.title') %>
</h2>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#facet-panel-collapse" aria-controls="facet-panel-collapse" aria-expanded="false" aria-label="Toggle facets">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div id="facet-panel-collapse" class="facets-collapse collapse">
<%= render_facet_partials %>
</div>
</div>
<% end %>

0 comments on commit 6bccb7a

Please sign in to comment.