Skip to content

Commit e6c33b3

Browse files
committed
update facet drawer height, add offcanvas header
1 parent b756ba8 commit e6c33b3

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

app/assets/stylesheets/searchworks4/facets.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,7 @@ label[for="facet_option_stanford_only"] > a {
170170
.blacklight-catalog:not(:has(.constraints .constraint)) #facet-pub_year_tisim .chart-wrapper {
171171
display: none !important; /* important needed to override the inline style that chartjs inserts */
172172
}
173+
174+
#offcanvas-facets {
175+
--bs-offcanvas-height: 80%;
176+
}

app/views/catalog/_new_search.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
</button>
1010

1111
<div id="offcanvas-facets" class="offcanvas-md offcanvas-bottom offcanvas-sm-start">
12-
<div class="offcanvas-body flex-column">
12+
<div class="offcanvas-header">
13+
<button type="button" class="btn-close" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-facets" aria-label="Close"></button>
14+
</div>
15+
<div class="offcanvas-body pt-0 flex-column">
1316
<%= render 'facet_header' %>
1417
<%= render Facets::GroupComponent.new(id: 'top-filters', title: 'Top filters',
1518
container_classes: 'facets top-filters sidenav mb-md-4',

app/views/catalog/_search_results.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@
5151
</button>
5252

5353
<div id="offcanvas-facets" class="offcanvas-md offcanvas-bottom offcanvas-sm-start">
54-
<div class="offcanvas-body flex-column">
54+
<div class="offcanvas-header">
55+
<button type="button" class="btn-close" data-bs-toggle="offcanvas" data-bs-target="#offcanvas-facets" aria-label="Close"></button>
56+
</div>
57+
<div class="offcanvas-body pt-0 flex-column">
5558
<%= render 'facet_header' %>
5659
<%= render Facets::GroupComponent.new(id: 'top-filters', title: 'Top filters',
5760
container_classes: 'facets top-filters sidenav mb-md-4',

0 commit comments

Comments
 (0)