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 Apr 17, 2024
1 parent 434dd87 commit e9a90ce
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/views/shared/_pagination.html.erb
@@ -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 e9a90ce

Please sign in to comment.