Skip to content

Commit aeefa53

Browse files
authored
Merge pull request #398 from MITLibraries/spacing-fixes
Style updates to the NLS opt-in page and alert in tabs where it doesn't apply
2 parents 6682957 + b27a810 commit aeefa53

4 files changed

Lines changed: 38 additions & 10 deletions

File tree

app/assets/stylesheets/partials/_results.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
.no-results + .ask-us {
2525
margin-top: 0rem;
2626
}
27-
27+
2828
.results-context {
2929
margin-top: -15px;
3030
padding-left: 2.5rem;
@@ -409,10 +409,14 @@
409409
padding-top: 12px;
410410
padding-bottom: 44px;
411411

412+
.results-header {
413+
margin-bottom: 40px;
414+
}
415+
412416
.results-context {
413417
padding-left: 0;
414418
margin-top: 0;
415-
margin-bottom: 24px;
419+
margin-bottom: 8px;
416420
}
417421

418422
#results-section {
@@ -599,7 +603,6 @@ aside.nls-alert {
599603

600604
// RESULTS LIST NLS ALERT
601605
aside.nls-alert {
602-
margin-bottom: 40px;
603606
display: flex;
604607
gap: 6px;
605608

app/assets/stylesheets/partials/_search.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,30 @@
259259
}
260260
}
261261

262+
/* ABOUT NLS PAGE */
263+
.about-nls {
264+
padding-top: 32px;
265+
padding-bottom: 32px;
266+
max-width: 760px;
267+
268+
h2 {
269+
margin-bottom: 32px;
270+
}
271+
272+
h3 {
273+
margin-top: 32px;
274+
margin-bottom: 16px;
275+
}
276+
277+
p {line-height: $lh-xloose;}
278+
279+
a {
280+
@include underlinedLinks;
281+
font-weight: $fw-medium;
282+
}
283+
}
284+
285+
262286
.tab-link {
263287
color: #fff;
264288
}

app/views/search/results.html.erb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
<%= render partial: 'search/primo_continuation' %>
1717

1818
<% elsif @results.present? && @errors.blank? %>
19-
20-
<h2 class="results-context" data-matomo-seen="Search, Results Found, Tab: {{getActiveTabName}}"><%= results_summary(@pagination[:hits]) %></h2>
21-
<% if @show_nls_warning %>
22-
<%= render partial: 'search/nls_alert' %>
23-
<% end %>
19+
<div class="results-header">
20+
<h2 class="results-context" data-matomo-seen="Search, Results Found, Tab: {{getActiveTabName}}"><%= results_summary(@pagination[:hits]) %></h2>
21+
<% if @show_nls_warning %>
22+
<%= render partial: 'search/nls_alert' %>
23+
<% end %>
24+
</div>
2425
<div id="results-layout-wrapper">
2526
<main id="results">
2627
<ol class="results-list use" data-matomo-click="Results, Link Engaged, Link: {{getElementText}}; Tab: {{getActiveTabName}}" start="<%= @pagination[:start] %>">

app/views/static/about_natural_language_search.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<% content_for :title, "About Natural Language Search" %>
22

3-
<div class="container">
3+
<div class="container about-nls">
44
<h2>Opting in to Natural Language Search</h2>
55

66
<h3>What does turning on the Natural Language Search (NLS) do?</h3>
77

88
<p>By default, this search tool uses traditional keyword matching.</p>
9-
9+
1010
<p>If you enable the Natural Language Search (NLS) option, the search tries to understand the meaning and intent behind your search terms, not just matching exact keywords.</p>
1111

1212
<p>For example, if you search for "climate change impacts," the NLS can find results about "global warming effects" or "environmental shifts"&mdash;even if those exact words don't appear together or at all in the source.</p>

0 commit comments

Comments
 (0)