替换博客模板

This commit is contained in:
linlongchen
2019-11-18 11:59:59 +08:00
parent ea3f7ab3c3
commit 012c31d730
168 changed files with 3520 additions and 20536 deletions

View File

@@ -1,60 +1,96 @@
---
layout: default
---
<link rel="stylesheet" type="text/css" href="{{ '/static/css/article-list.css' | prepend: site.baseurl | prepend: site.url}}" />
<script src="https://unpkg.com/feather-icons"></script>
<div class="row index">
<div class="col-sm-10 col-sm-offset-1 col-lg-9 col-lg-offset-1_5">
<div>
<section class="category-slice" post-cate="All">
{% for post in paginator.posts %}
<article>
<header>
<a href="{{ site.baseurl | prepend: site.url }}/archive/#{{ post.date | date: '%Y-%m-%d' }}"><span class="octicon octicon-calendar"></span>&nbsp;<span>{{ post.date | date: "%Y-%m-%d" }}</span></a>
</header>
<div class="module">
<a class="title" href="{{ post.url | prepend: site.baseurl | prepend: site.url }}">
{{ post.title }}
</a>
<p>{% if post.excerpt.size > 32 %}{{ post.excerpt }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 160 }}{% endif %}</p>
<a class="readmore" href="{{ post.url | prepend: site.baseurl | prepend: site.url }}">Read More</a>
<footer>
{% for tag in post.tags %}
<a class="word-keep" href="{{ site.baseurl | prepend: site.url }}/tags/#{{ tag }}"><span class="octicon octicon-tag"></span>&nbsp;{{ tag }}</a>
{% endfor %}
<span class="word-keep pull-right">
<a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}#post-comment"><span class="octicon octicon-comment"></span>&nbsp;Comment</a>
<a href="{{ post.url | prepend: site.baseurl | prepend: site.url }}#post-share"><span class="octicon octicon-file-symlink-file"></span>&nbsp;Share</a>
</span>
</footer>
</div>
</article>
{% if site.posts.size == 0 %}
<h2>No post found</h2>
{% endif %}
<div class="posts">
{% for post in paginator.posts %}
{% if post.pinned==true %}
<article class="post pinned">
<h1>
<span title="pinned"><i data-feather="anchor"></i></span><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h1>
<div clsss="meta">
<span class="date">
{{ post.date | date: "%Y-%m-%d" }}
</span>
<ul class="tag">
{% for tag in post.tags %}
<li>
<a href="{{ site.url }}{{ site.baseurl }}/tags#{{ tag }}">
{{ tag }}
</a>
</li>
{% endfor %}
</section>
</ul>
<div class="pad-mid"></div>
<nav class="text-center">
<ul class="pagination">
{% if paginator.total_pages > 1 %}
{% if paginator.previous_page %}
<li><a href="{{ paginator.previous_page_path | prepend: site.baseurl | prepend: site.url }}" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li class="active"><span>{{ page }}</span></li>
{% elsif page == 1 %}
<li><a href="{{ '/' | prepend: site.baseurl | prepend: site.url }}">{{ page }}</a></li>
{% else %}
<li><a href="{{ page | prepend: '/page/' | prepend: site.baseurl | prepend: site.url }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li><a href="{{ paginator.next_page_path | prepend: site.baseurl | prepend: site.url }}" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
{% endif %}
{% endif %}
</ul>
</nav>
<script>
feather.replace()
</script>
</div>
</div>
</div>
<div class="entry">
{{ post.excerpt | truncate: 200 }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endif %}
{% endfor %}
{% for post in paginator.posts %}
{% unless post.pinned %}
<article class="post">
<h1>
<a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
</h1>
<div clsss="meta">
<span class="date">
{{ post.date | date: "%Y-%m-%d" }}
</span>
<ul class="tag">
{% for tag in post.tags %}
<li>
<a href="{{ site.url }}{{ site.baseurl }}/tags#{{ tag }}">
{{ tag }}
</a>
</li>
{% endfor %}
</ul>
</div>
<div class="entry">
{{ post.excerpt | truncate: 200 }}
</div>
<a href="{{ site.baseurl }}{{ post.url }}" class="read-more">Read More</a>
</article>
{% endunless %}
{% endfor %}
</div>
<div class="pagination">
{% if paginator.previous_page %}
<span class="prev">
<a href="{{ site.baseurl }}{{ paginator.previous_page_path }}" class="prev">
← 上一页
</a>
</span>
{% endif %}
{% if paginator.next_page %}
<span class="next">
<a href="{{ site.baseurl}}{{ paginator.next_page_path }}" class="next">
下一页 →
</a>
</span>
{% endif %}
</div>