Skip to content
Open
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
20 changes: 15 additions & 5 deletions app/assets/stylesheets/partials/_results.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@
// --------------------------------------

.result.use, .result.primo {
padding: 32px 0 32px;
padding: 28px 0 28px;
margin: 0;
border-bottom: 1px solid $color-gray-200;
border-top: none;
border-bottom: 1px solid $color-gray-200;

@media (max-width: $bp-screen-sm2) { padding: 24px 0 24px; }

a:link, a:visited {
color: $color-text-primary;
Expand All @@ -178,6 +180,12 @@
background-color: transparent;
}

// Trim bottom margin on last div to ensure consistent visual spacing between results
.result-content > div:last-child,
.result-metadata > div:last-child {
margin-bottom: 0;
}

.eyebrow {
color: $color-text-secondary;
font-size: 1.3rem;
Expand Down Expand Up @@ -415,8 +423,11 @@
padding-top: 12px;
padding-bottom: 44px;

@media (max-width: $bp-screen-sm2) { padding-top: 0; }


.results-header {
margin-bottom: 40px;
margin-bottom: 20px;
}

.results-context {
Expand All @@ -426,7 +437,7 @@
}

#results-section {
padding: 16px 0 0 0;
padding: 8px 0 0 0;
}

#results-layout-wrapper {
Expand Down Expand Up @@ -580,7 +591,6 @@

// RESULTS LIST NLS ALERT
aside.nls-alert {
margin-bottom: 40px;
display: flex;
gap: 6px;

Expand Down
16 changes: 9 additions & 7 deletions app/views/search/_highlights.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<% highlights = trim_highlights(result) %>
<% return unless highlights&.any? %>

<h4 class="inner-heading">Search term found in:</h4>
<ul class="list-unbulleted truncate-list">
<% highlights.each do |h| %>
<% h['matchedPhrases'].each do |phrase| %>
<li><strong><%= format_highlight_label(h['matchedField']) %>:</strong> <%= sanitize(phrase, tags: ['span']) %></li>
<div class="result-highlights use">
<h4 class="inner-heading">Search term found in:</h4>
<ul class="list-unbulleted truncate-list">
<% highlights.each do |h| %>
<% h['matchedPhrases'].each do |phrase| %>
<li><strong><%= format_highlight_label(h['matchedField']) %>:</strong> <%= sanitize(phrase, tags: ['span']) %></li>
<% end %>
<% end %>
<% end %>
</ul>
</ul>
</div>
4 changes: 1 addition & 3 deletions app/views/search/_result.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@
<% end %>
</div>

<div class="result-highlights use">
<%= render partial: 'search/highlights', locals: { result: result } %>
</div>
<%= render partial: 'search/highlights', locals: { result: result } %>

<% if Feature.enabled?(:record_link) %>
<div class="result-get">
Expand Down
Loading