summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authormayx <mayx@outlook.com>2022-01-26 14:44:00 +0100
committermayx <mayx@outlook.com>2022-01-26 14:44:00 +0100
commit10d98e3eef282964dffe61d953b87024fdb9fe8b (patch)
tree07c6c882d4c19a939fb02191877a1e07e6f10e52 /index.html
parent69ea19f73d3641235ca0442c4613163b48aaa391 (diff)
Update index.html
Diffstat (limited to 'index.html')
-rw-r--r--index.html17
1 files changed, 13 insertions, 4 deletions
diff --git a/index.html b/index.html
index 0c2330e..aaec710 100644
--- a/index.html
+++ b/index.html
@@ -23,6 +23,15 @@ title: 首页 - 我的文章
{% endfor %}
</table>
{% if paginator.total_pages > 1 %}
+<script>
+ function switchPage(sobj){
+ if (sobj.value == 1){
+ window.location = "{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}";
+ } else {
+ window.location = "{{ '/page' | prepend: site.baseurl | replace: '//', '/' }}" + sobj.value + "/";
+ }
+ }
+</script>
<div class="pagination">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
@@ -34,15 +43,15 @@ title: 首页 - 我的文章
<span>&laquo; Prev</span>
{% endif %}
+<select onchange="switchPage(this)">
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
- <em>{{ page }}</em>
- {% elsif page == 1 %}
- <a href="{{ '/index.html' | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
+ <option value="{{ page }}" selected>{{ page }}</option>
{% else %}
- <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}/">{{ page }}</a>
+ <option value="{{ page }}">{{ page }}</option>
{% endif %}
{% endfor %}
+</select>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}/">Next &raquo;</a>