fix visual problem about pagination

This commit is contained in:
thisLight 2022-02-12 23:19:50 +08:00
parent cba72a6238
commit 6b82f98b5d
3 changed files with 13 additions and 4 deletions

View file

@ -4,7 +4,7 @@ date: 2021-10-13 18:36:53
tags: tags:
- Hexo - Hexo
- RSS - RSS
categories: 博客功能更新 - 博客功能更新
--- ---
> RSS英文全称RDF Site Summary 或 Really Simple Syndication[2]),中文译作簡易資訊聚合[3],也称聚合内容[4],是一種消息來源格式規範,用以聚合多個網站更新的內容並自動通知網站訂閱者。使用 RSS 後,網站訂閱者便無需再手動查看網站是否有新的內容,同時 RSS 可將多個網站更新的內容進行整合,以摘要的形式呈現,有助於訂閱者快速獲取重要信息,並選擇性地點閱查看。 ———— [RSS - Wikipedia](https://zh.wikipedia.org/wiki/RSS) > RSS英文全称RDF Site Summary 或 Really Simple Syndication[2]),中文译作簡易資訊聚合[3],也称聚合内容[4],是一種消息來源格式規範,用以聚合多個網站更新的內容並自動通知網站訂閱者。使用 RSS 後,網站訂閱者便無需再手動查看網站是否有新的內容,同時 RSS 可將多個網站更新的內容進行整合,以摘要的形式呈現,有助於訂閱者快速獲取重要信息,並選擇性地點閱查看。 ———— [RSS - Wikipedia](https://zh.wikipedia.org/wiki/RSS)

View file

@ -7,7 +7,7 @@
</a> </a>
</li> </li>
{% endif %} {% endif %}
{% for n in range(1, page.total, 1) %} {% for n in range(1, page.total+1, 1) %}
<li class="{{ 'active' if page.current == n else 'waves-effect' }}"> <li class="{{ 'active' if page.current == n else 'waves-effect' }}">
<a href="{{ url_for('page/'+n+'/') }}">{{ n }}</a> <a href="{{ url_for('page/'+n+'/') }}">{{ n }}</a>
</li> </li>

View file

@ -1,8 +1,17 @@
{% extends 'includes/layout.njk' %} {% extends 'includes/layout.njk' %}
{% from "includes/paginator.njk" import Paginiation with context %}
{% from "includes/postlist.njk" import PostList with context %} {% from "includes/postlist.njk" import PostList with context %}
{% import "includes/cards.njk" as cards with context %} {% import "includes/cards.njk" as cards with context %}
{% macro HomePaginiation() %}
<ul class="pagination center">
{% for n in range(1, page.total+1, 1) %}
<li class="{{ 'active' if page.current == n else 'waves-effect' }}">
<a href="{{ url_for('page/'+n+'/') if n != 1 else url_for('') }}">{{ n }}</a>
</li>
{% endfor %}
</ul>
{% endmacro %}
{% macro TagPanel(tags) %} {% macro TagPanel(tags) %}
<div class="card-panel" style="padding-top: 12px; padding-bottom: 12px;"> <div class="card-panel" style="padding-top: 12px; padding-bottom: 12px;">
<span class="chip transparent">Tags</span> <span class="chip transparent">Tags</span>
@ -28,7 +37,7 @@
<span>No Posts Here...</span> <span>No Posts Here...</span>
{% endif %} {% endif %}
<div class="center"> <div class="center">
{{ Paginiation() }} {{ HomePaginiation() }}
</div> </div>
</div> </div>
<div class="col m4 l3 hide-on-small-only"> <div class="col m4 l3 hide-on-small-only">