% layout 'main', schematype => 'SearchResultsPage';
% my $numf = sub { return loc('numf', number => $_[0]) };

<div id="pagination"
     class="button-group button-panel"
     data-page="<%= stash('start_page') %>"
     data-total="<%= stash('total_pages') %>"
     data-count="<%= stash('items_per_page') %>"
     ><%= pagination(stash('start_page'), stash('total_pages'), url_with->query({'p' => '{page}'}), { num_format => $numf }) =%></div>

<div id="resultinfo" <% if (stash('results')->size) { %> class="found"<%} %>>
% my $found = stash('total_results') // 0;
  <p class="found">\
% if ($found != -1) {
%   my $found_text = loc('numf', number => $found);
%   if (stash('time_exceeded')) {
%     $found_text = '> ' . $found_text;
%   };
<span id="total-results"><%= $found_text %></span> <%= loc('matchCount', found => $found) %>\
%# <% if (stash('benchmark')) { %> (~ <%= stash('benchmark') %>)<% } %>
% } elsif (stash('start_index') == 0 && stash('results')->size == 0) {
<span id="total-results">0</span> <%= loc('matchCount', found => $found) %>\
% };
</p>
</div>

<div id="search">
% if (stash('results')->size && stash('total_results') != 0) {
  <ol class="align-left">
%=  search_results begin
%=    include 'match', match => $_
%   end
  </ol>
% } elsif (stash('results')->size == 0) {
<p class="no-results"><%= loc 'noMatches', q => stash('q'), ql => stash('ql') %></p>
% }
%= content_for 'after_search_results'
</div>
