style pagination
This commit is contained in:
@@ -917,4 +917,15 @@ img {
|
|||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-top: 5em;
|
margin-top: 5em;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
nav.pagination {
|
||||||
|
font-size: 0;
|
||||||
|
margin-top: 60px;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 20px;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
21
app/views/kaminari/_paginator.html.erb
Normal file
21
app/views/kaminari/_paginator.html.erb
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%# The container tag
|
||||||
|
- available local variables
|
||||||
|
current_page: a page object for the currently displayed page
|
||||||
|
total_pages: total number of pages
|
||||||
|
per_page: number of items to fetch per page
|
||||||
|
remote: data-remote
|
||||||
|
paginator: the paginator that renders the pagination tags inside
|
||||||
|
-%>
|
||||||
|
<%= paginator.render do -%>
|
||||||
|
<nav class="pagination">
|
||||||
|
<%= first_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 -%>
|
||||||
|
<%= last_page_tag unless current_page.last? %>
|
||||||
|
</nav>
|
||||||
|
<% end -%>
|
||||||
Reference in New Issue
Block a user