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 Jan 6, 2025
1 parent efd5e9a commit 4a1e551
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
Expand Up @@ -4,20 +4,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>
Expand Down

0 comments on commit 4a1e551

Please sign in to comment.