mirror of
https://github.com/searxng/searxng.git
synced 2025-02-17 02:40:03 +00:00
Merge pull request #2069 from llmII/feat-pagination-numbered
Feature: Support numbered pagination.
This commit is contained in:
commit
522ba9a14b
@ -166,4 +166,5 @@ features or generally made searx better:
|
||||
- Sam A. `<https://samsapti.dev>`_
|
||||
- @XavierHorwood
|
||||
- Ahmad Alkadri `<https://github.com/ahmad-alkadri>`_
|
||||
- Milad Laly @Milad-Laly
|
||||
- Milad Laly @Milad-Laly
|
||||
- @llmII
|
||||
|
Binary file not shown.
BIN
searx/static/themes/simple/css/searxng-rtl.min.css
vendored
BIN
searx/static/themes/simple/css/searxng-rtl.min.css
vendored
Binary file not shown.
Binary file not shown.
BIN
searx/static/themes/simple/css/searxng.min.css
vendored
BIN
searx/static/themes/simple/css/searxng.min.css
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -362,7 +362,7 @@ article[data-vim-selected].category-social {
|
||||
.category-files,
|
||||
.category-social {
|
||||
border: 1px solid var(--color-result-border);
|
||||
margin: 1rem @results-tablet-offset 0 @results-tablet-offset !important;
|
||||
margin: 0 @results-tablet-offset 1rem @results-tablet-offset !important;
|
||||
.rounded-corners;
|
||||
}
|
||||
|
||||
@ -734,6 +734,26 @@ article[data-vim-selected].category-social {
|
||||
}
|
||||
}
|
||||
|
||||
.numbered_pagination {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.page_number {
|
||||
background: transparent !important;
|
||||
color: var(--color-result-link-font) !important;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.page_number_current {
|
||||
background: transparent;
|
||||
color: var(--color-result-link-visited-font);
|
||||
border: none;
|
||||
}
|
||||
|
||||
#apis {
|
||||
margin-top: 8px;
|
||||
clear: both;
|
||||
@ -1009,6 +1029,10 @@ article[data-vim-selected].category-social {
|
||||
background-color: var(--color-sidebar-background);
|
||||
}
|
||||
|
||||
.numbered_pagination {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.result-paper {
|
||||
.attributes {
|
||||
display: block;
|
||||
|
@ -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 %}
|
||||
<input role="link" class="page_number_current" type="button" value="{{ x }}">
|
||||
{% else %}
|
||||
<input role="link" class="page_number" type="submit" value="{{ x }}">
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user