Initial import

This commit is contained in:
Lucas Gabriel Vuotto 2025-04-26 09:41:50 +00:00
commit dd492db92e
37 changed files with 1953 additions and 0 deletions

24
templates/_pager.html.ep Normal file
View file

@ -0,0 +1,24 @@
% if (my $pager = stash("pager")) {
% my @pages = extended_pager($pager);
<footer>
<nav class="text-center pager">
<%= link_to "<<" => url_with->query({page => $pager->{first_page}})
if $pager->{first_page} < $pages[0] %>
<%= link_to "<" => url_with->query({page => $pager->{previous_page}})
if defined($pager->{previous_page}) &&
$pager->{previous_page} > 3 %>
% for my $page (@pages) {
% if ($page == $pager->{current_page}) {
<span><%= $pager->{current_page} %></span>
% } else {
<%= link_to $page => url_with->query({page => $page}) %>
% }
% }
<%= link_to ">" => url_with->query({page => $pager->{next_page}})
if defined($pager->{next_page}) &&
$pager->{next_page} < $pager->{last_page} - 2 %>
<%= link_to ">>" => url_with->query({page => $pager->{last_page}})
if $pager->{last_page} > $pages[-1] %>
</nav>
</footer>
% }