<commit_before>--- layout: page title: just do it! ---
<!-- 分页功能实现 -->
{% if paginator.total_pages > 1 %}
<!-- 开启分页换页功能 -->
<ul class="posts">
    {% for post in paginator.posts %}
    <li class="post">
        <small>{{ post.date | date_to_string }}</small>
        <small><a style="color:grey" href="{{ BASE_PATH }}{{ post.url }}#disqus_thread"></a></small>
        <br>
        <a class="nice-title" href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>
        <p class="nice-text">{{ post.desc }} ...
            <!-- <a href="{{ BASE_PATH }}{{ post.url }}">...</a> -->
        </p>
    </li>
    {% endfor %}
</ul>
{% endif %}

<!-- 分页功能代码 -->
<div style="text-align:center;">
    {% if paginator.page == 1 %}
    <span style="margin-right:15px;"><b>首页</b></span>
    {% endif %} {% if paginator.total_pages >1 %} {% if paginator.previous_page %}
    <a href="/" title="首页">首页</a>
    <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="上一页">
        <span class="fa fa-backward" style="padding:10px;"></span></a>
    {% endif %} {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %}
    <select onChange="location.replace(this.options[this.selectedIndex].value)">
        <option>
            第 {{ paginator.page }} / {{ paginator.total_pages }} 页
        </option>
        {% assign page_num = 1 %}
        <option value="/">跳至:首页</option>
        {% for page in (1..paginator.total_pages) %} {% assign page_num = page_num | plus: 1 %} {% if page_num
        < paginator.total_pages
            %} <option value="/page{{ page_num }}/">跳至:第 {{ page_num }} 页
            </option>
            {% endif %} {% endfor %}
            <option value="/page{{ paginator.total_pages }}">跳至:尾页</option>
    </select>
    {% elsif page == 1 %} {% else %} {% endif %} {% endfor %} {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="下一页">
        <i class="fa fa-forward" style="padding:10px;"></i></a>
    <a href="/page{{ paginator.total_pages }}/" title="尾页">尾页</a>
    {% endif %} {% if paginator.page == paginator.total_pages %}
    <span style="margin-left:15px;"><b>已达尾页</b></span>
    {% endif %} {% endif %}
</div>

<!-- 多说评论功能 -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = 'wangxin1248';
<commit_msg>分页功能实现<commit_after>--- layout: page title: just do it! ---
<!-- 分页功能实现 -->
{% if paginator.total_pages > 1 %}
<!-- 开启分页换页功能 -->
<ul class="posts">
    {% for post in paginator.posts %}
    <li class="post">
        <small>{{ post.date | date_to_string }}</small>
        <small><a style="color:grey" href="{{ BASE_PATH }}{{ post.url }}#disqus_thread"></a></small>
        <br>
        <a class="nice-title" href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>
        <p class="nice-text">{{ post.desc }} ...
            <!-- <a href="{{ BASE_PATH }}{{ post.url }}">...</a> -->
        </p>
    </li>
    {% endfor %}
</ul>
{% endif %}


<!-- 底部分页显示-->
<div style="text-align:center;">
    {% if paginator.page == 1 %}
    <span style="margin-right:15px;"><b>首页</b></span>
    {% endif %} {% if paginator.total_pages >1 %} {% if paginator.previous_page %}
    <a href="/" title="首页">首页</a>
    <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="上一页">
        <span class="fa fa-backward" style="padding:10px;"></span></a>
    {% endif %} {% for page in (1..paginator.total_pages) %} {% if page == paginator.page %}
    <select onChange="location.replace(this.options[this.selectedIndex].value)">
        <option>
            第 {{ paginator.page }} / {{ paginator.total_pages }} 页
        </option>
        {% assign page_num = 1 %}
        <option value="/">跳至:首页</option>
        {% for page in (1..paginator.total_pages) %} {% assign page_num = page_num | plus: 1 %} {% if page_num
        < paginator.total_pages
            %} <option value="/page{{ page_num }}/">跳至:第 {{ page_num }} 页
            </option>
            {% endif %} {% endfor %}
            <option value="/page{{ paginator.total_pages }}">跳至:尾页</option>
    </select>
    {% elsif page == 1 %} {% else %} {% endif %} {% endfor %} {% if paginator.next_page %}
    <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" title="下一页">
        <i class="fa fa-forward" style="padding:10px;"></i></a>
    <a href="/page{{ paginator.total_pages }}/" title="尾页">尾页</a>
    {% endif %} {% if paginator.page == paginator.total_pages %}
    <span style="margin-left:15px;"><b>已达尾页</b></span>
    {% endif %} {% endif %}
</div>

<!-- <ul class="posts">
    
    {% for post in site.posts %}
    <li class="post">
        <small>{{ post.date | date_to_string }}</small>
        <small><a style="color:grey" href="{{ BASE_PATH }}{{ post.url }}#disqus_thread"></a></small>
        <br>
        <a class="nice-title" href="{{ BASE_PATH }}{{ post.url }}">{{ post.title }}</a>
        <p class="nice-text">{{ post.content | strip_html | truncatewords: 50 }} <a href="{{ BASE_PATH }}{{ post.url }}">Read more!</a></p>
    </li>
    {% endfor %}
</ul> -->

<!-- 多说评论功能 -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = 'wangxin1248';

{'fraction_non_alphanumeric': 0.2342021376336021, 'fraction_numerical': 0.007875492218263641, 'mean_word_length': 2.7067407922168174, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 135, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '441230', 'n_tokens_mistral': 2026, 'n_tokens_neox': 1945, 'n_words': 373}