From 357f9293edd419d110db4829779404164fabf953 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Fri, 14 Nov 2025 12:54:30 -0500 Subject: [PATCH 01/13] Restructuring of results markup and partials for sidebar and callouts --- app/views/search/_results_callouts.html.erb | 1 + app/views/search/_sidebar.html.erb | 18 ++++++++++++++++++ app/views/search/results.html.erb | 6 ++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 app/views/search/_results_callouts.html.erb create mode 100644 app/views/search/_sidebar.html.erb diff --git a/app/views/search/_results_callouts.html.erb b/app/views/search/_results_callouts.html.erb new file mode 100644 index 00000000..f281e7bc --- /dev/null +++ b/app/views/search/_results_callouts.html.erb @@ -0,0 +1 @@ +PLACEHOLDER FOR CALLOUTS \ No newline at end of file diff --git a/app/views/search/_sidebar.html.erb b/app/views/search/_sidebar.html.erb new file mode 100644 index 00000000..c40d160b --- /dev/null +++ b/app/views/search/_sidebar.html.erb @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/app/views/search/results.html.erb b/app/views/search/results.html.erb index a2da6c4d..371f69fc 100644 --- a/app/views/search/results.html.erb +++ b/app/views/search/results.html.erb @@ -11,12 +11,12 @@ <%= turbo_frame_tag "search-results", data: { turbo_action: "advance" } do %>
-
<% if @show_primo_continuation %> <%= render partial: 'search/primo_continuation' %> <% elsif @results.present? && @errors.blank? %>

<%= results_summary(@pagination[:hits]) %>

-

From all MIT Libraries sources

+

From all MIT Libraries sources

+
    <% case @active_tab %> <% when 'primo' %> @@ -33,12 +33,14 @@ <% end %> <% end %>
+ <%= render partial: "results_callouts" %> <% elsif @errors.blank? %>

No results found for your search

<% end %>
+ <%= render partial: "sidebar" %>
<% if @results.present? %> From c90fb640a3d357eecb57228176c47595a3616351 Mon Sep 17 00:00:00 2001 From: djanelle-mit Date: Fri, 14 Nov 2025 13:04:06 -0500 Subject: [PATCH 02/13] Styled pagination and moved inside results container --- .../stylesheets/partials/_pagination.scss | 62 ++++++++++++++----- .../stylesheets/partials/_variables.scss | 4 ++ app/views/search/_pagination.html.erb | 10 +-- app/views/search/results.html.erb | 6 +- 4 files changed, 61 insertions(+), 21 deletions(-) diff --git a/app/assets/stylesheets/partials/_pagination.scss b/app/assets/stylesheets/partials/_pagination.scss index e7b8c423..7d9a9752 100644 --- a/app/assets/stylesheets/partials/_pagination.scss +++ b/app/assets/stylesheets/partials/_pagination.scss @@ -3,23 +3,57 @@ display: flex; flex-flow: row nowrap; justify-content: center; - margin-top: 3em; + padding-top: 1em; + border-top: 1px solid $color-border-default; + gap: 24px; - .first { - border-right: 1px solid black; - margin-right: 0.5em; - padding-right: 0.5em; + .center-elements { + display: flex; + flex-grow: 1; + gap: 24px; + justify-content: center; } - .previous { - border-right: 1px solid black; - margin-right: 0.5em; - padding-right: 0.5em; + span { + display: inline-block; + padding: 6px 12px; + border: 1px solid $color-border-default; + color: $color-text-disabled; } - .next { - border-left: 1px solid black; - margin-left: 0.5em; - padding-left: 0.5em; + div.current span { + border: none; + padding: 6px 0; + color: $color-text-primary; } -} + + a { + border: 1px solid $color-blue-500; + border-radius: 0; + display: inline-block; + padding: 6px 12px; + text-decoration: none; + font-size: 1.6rem; + font-weight: $fw-medium; + + &:hover { + background-color: $color-blue-25; + } + } + + .first a, .first span { + border: none; + text-decoration: underline; + text-decoration-color: $color-blue-500; + text-underline-offset: 0.5rem; + padding: 6px 0; + + &:hover { + background-color: $color-white; + } + } + + .first span { + text-decoration-color: $color-border-default; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/partials/_variables.scss b/app/assets/stylesheets/partials/_variables.scss index 00a95e82..74b9b844 100644 --- a/app/assets/stylesheets/partials/_variables.scss +++ b/app/assets/stylesheets/partials/_variables.scss @@ -26,6 +26,7 @@ $color-cyan-500: #00C8FF; $color-cyan-700: #00A0CC; // BLUE +$color-blue-25: #F0F0FF; $color-blue-500: #0000FF; // PURPLE @@ -45,6 +46,9 @@ $color-text-placeholder: $color-gray-500; $color-text-disabled: $color-gray-400; $color-text-oncolor: $color-white; +// BORDERS +$color-border-default: $color-gray-400; + // FOCUS $color-focus: $color-cyan-700; $color-focus-dark: $color-cyan-500; diff --git a/app/views/search/_pagination.html.erb b/app/views/search/_pagination.html.erb index 0b6d8878..04700172 100644 --- a/app/views/search/_pagination.html.erb +++ b/app/views/search/_pagination.html.erb @@ -1,13 +1,15 @@ <% return if @pagination.nil? %>