From 5e570d08f399d72db49fe3db725b2d42cb787542 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 23 May 2025 12:26:22 +0530 Subject: [PATCH] feat: better search UX on the page --- .../api/v1/portals/search/index.html.erb | 89 ++++++++++++++++--- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/app/views/public/api/v1/portals/search/index.html.erb b/app/views/public/api/v1/portals/search/index.html.erb index e14024b8c..27482dc6e 100644 --- a/app/views/public/api/v1/portals/search/index.html.erb +++ b/app/views/public/api/v1/portals/search/index.html.erb @@ -18,13 +18,25 @@ <%= I18n.t('public_portal.search.results') %> - +

<%= I18n.t('public_portal.search.results_for', query: @query) %>

- + -
+
+ + + +
@@ -42,16 +54,73 @@ <%= I18n.t('public_portal.search.results') %> - +

<%= I18n.t('public_portal.search.results_for', query: @query) %>

- + -
+
+ + + +
<% end %> + +
<% if @articles.empty? %> @@ -62,7 +131,7 @@

<%= I18n.t('public_portal.search.found_results', count: @articles.size) %>

- + <% @articles.each do |article| %> <% end %> - + <% if @articles.respond_to?(:total_pages) && @articles.total_pages > 1 %> -
\ No newline at end of file +