Skip to content

Commit

Permalink
Show only pagination icons below medium/small screen sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Aug 29, 2024
1 parent f8bc7e3 commit de5a5f5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/views/shared/_pagination.html.erb
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<nav>
<ul class="pagination">
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => nil)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block", :count => 2 %>
<%= t :newest, :scope => translation_scope %>
<%= previous_page_svg_tag :class => "flex-shrink-0", :count => 2 %>
<span class="d-none d-md-block"><%= t :newest, :scope => translation_scope %></span>
<% end %>
<%= pagination_item(newer_id && @params.merge(:before => nil, :after => newer_id)) do %>
<%= previous_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
<%= t :newer, :scope => translation_scope %>
<%= previous_page_svg_tag :class => "flex-shrink-0" %>
<span class="d-none d-sm-block"><%= t :newer, :scope => translation_scope %></span>
<% end %>
<%= pagination_item(older_id && @params.merge(:before => older_id, :after => nil)) do %>
<%= t :older, :scope => translation_scope %>
<%= next_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block" %>
<span class="d-none d-sm-block"><%= t :older, :scope => translation_scope %></span>
<%= next_page_svg_tag :class => "flex-shrink-0" %>
<% end %>
<%= pagination_item(older_id && @params.merge(:before => nil, :after => 0)) do %>
<%= t :oldest, :scope => translation_scope %>
<%= next_page_svg_tag :class => "flex-shrink-0 d-none d-sm-block", :count => 2 %>
<span class="d-none d-md-block"><%= t :oldest, :scope => translation_scope %></span>
<%= next_page_svg_tag :class => "flex-shrink-0", :count => 2 %>
<% end %>
</ul>
</nav>

0 comments on commit de5a5f5

Please sign in to comment.