Skip to content

Commit

Permalink
Split pagination buttons into 3 groups
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Aug 29, 2024
1 parent de5a5f5 commit 1ae6775
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/views/shared/_pagination.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<nav>
<nav class="d-flex justify-content-between gap-2">
<ul class="pagination">
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => nil)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0", :count => 2 %>
<span class="d-none d-md-block"><%= t :newest, :scope => translation_scope %></span>
<% end %>
</ul>
<ul class="pagination">
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => newer_id)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0" %>
<span class="d-none d-sm-block"><%= t :newer, :scope => translation_scope %></span>
Expand All @@ -12,6 +14,8 @@
<span class="d-none d-sm-block"><%= t :older, :scope => translation_scope %></span>
<%= next_page_svg_tag :class => "flex-shrink-0" %>
<% end %>
</ul>
<ul class="pagination">
<%= pagination_item(older_id && @params.merge(:before => nil, :after => 0)) do %>
<span class="d-none d-md-block"><%= t :oldest, :scope => translation_scope %></span>
<%= next_page_svg_tag :class => "flex-shrink-0", :count => 2 %>
Expand Down

0 comments on commit 1ae6775

Please sign in to comment.