diff options
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/simple/results.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index b05841bbb..b7a6cb9ed 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -187,6 +187,35 @@ <button role="link" type="submit">{{ _('Next page') }} {{ icon_small('chevron-right') }}</button> </div> </form> + {% set pstart = 1 %} + {% set pend = 11 %} + {% if pageno > 5 %} + {% set pstart = pageno - 4 %} + {% set pend = pageno + 6 %} + {% endif %} + + <div class="numbered_pagination"> + {% for x in range(pstart, pend) %} + <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="page_number"> + <input type="hidden" name="q" value="{{ q|e }}" > + {% for category in selected_categories %} + <input type="hidden" name="category_{{ category }}" value="1" > + {% endfor %} + <input type="hidden" name="pageno" value="{{ x }}" > + <input type="hidden" name="language" value="{{ current_language }}" > + <input type="hidden" name="time_range" value="{{ time_range }}" > + <input type="hidden" name="safesearch" value="{{ safesearch }}" > + <input type="hidden" name="theme" value="{{ theme }}" > + {% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" >{% endif %} + {{- engine_data_form(engine_data) -}} + {% if pageno == x %} + <button role="link" class="page_number_current" type="button">{{ x }}</button> + {% else %} + <button role="link" class="page_number" type="submit">{{ x }}</button> + {% endif %} + </form> + {% endfor %} + </div> </nav> {% endif %} </div> |