sample_rails_tailwind/app/views/kaminari/_paginator.html.erb
songtianlun 0335ef4ed6 refactor: replace list items with buttons in pagination
- Changed pagination elements from <li> to <button> for better accessibility.
- Updated the paginator structure to use a <div> instead of <ul>.
- Ensured that all pagination links are now buttons, improving the user experience.

These changes enhance the semantic structure of the pagination, making it more intuitive and accessible for users, especially those using assistive technologies.
2025-01-17 15:22:13 +08:00

16 lines
508 B
Plaintext

<%= paginator.render do -%>
<div class="join">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</div>
<% end -%>