From 09b3f06ad423e12806378f5573fd609e86f234b6 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 1 Feb 2025 14:45:17 +0800 Subject: [PATCH] style: adjust pagination button sizes - Change button classes from `btn` to `btn btn-xs` for all pagination buttons - Ensure consistent styling across all pagination elements These changes standardize the button sizes in the pagination component, improving the visual uniformity. The adjustment enhances user experience by making the pagination buttons more appropriately sized within the interface, without affecting functionality. --- app/views/shared/_pagination.html.erb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/views/shared/_pagination.html.erb b/app/views/shared/_pagination.html.erb index 3850813..f9a5b7e 100644 --- a/app/views/shared/_pagination.html.erb +++ b/app/views/shared/_pagination.html.erb @@ -12,7 +12,7 @@
<%= link_to url_for(page: 1, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn #{collection.first_page? ? 'btn-disabled' : 'btn-ghost'}" do %> + class: "join-item btn btn-xs #{collection.first_page? ? 'btn-disabled' : 'btn-ghost'}" do %> @@ -20,7 +20,7 @@ <%= link_to url_for(page: collection.prev_page || 1, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn #{collection.first_page? ? 'btn-disabled' : 'btn-ghost'}" do %> + class: "join-item btn btn-xs #{collection.first_page? ? 'btn-disabled' : 'btn-ghost'}" do %> @@ -33,35 +33,35 @@ <% if start_page > 1 %> <%= link_to 1, url_for(page: 1, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn btn-ghost hover:bg-primary/5" %> + class: "join-item btn btn-xs btn-ghost hover:bg-primary/5" %> <% if start_page > 2 %> - + <% end %> <% end %> <% (start_page..end_page).each do |page| %> <% if page == collection.current_page %> - <% else %> <%= link_to page, url_for(page: page, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn btn-ghost hover:bg-primary/5" %> + class: "join-item btn btn-xs btn-ghost hover:bg-primary/5" %> <% end %> <% end %> <% if end_page < collection.total_pages %> <% if end_page < collection.total_pages - 1 %> - + <% end %> <%= link_to collection.total_pages, url_for(page: collection.total_pages, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn btn-ghost hover:bg-primary/5" %> + class: "join-item btn btn-xs btn-ghost hover:bg-primary/5" %> <% end %> <%= link_to url_for(page: collection.next_page || collection.total_pages, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn #{collection.last_page? ? 'btn-disabled' : 'btn-ghost'}" do %> + class: "join-item btn btn-xs #{collection.last_page? ? 'btn-disabled' : 'btn-ghost'}" do %> @@ -69,7 +69,7 @@ <%= link_to url_for(page: collection.total_pages, region: params[:region], country: params[:country], sort: params[:sort]), - class: "join-item btn #{collection.last_page? ? 'btn-disabled' : 'btn-ghost'}" do %> + class: "join-item btn btn-xs #{collection.last_page? ? 'btn-disabled' : 'btn-ghost'}" do %>