-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
164 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "../../ksio/pages/doc"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "../../ksio/pages/post"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "../../ksio/pages/posts"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>孩子,迷路了吧?来让蜀黍<a href="{{ '/' | prepend: site.baseurl | prepend: site.url }}">送你回家</a>。</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{% assign banner_url = "ksio/banners/blog" | asset_path %} | ||
<div class="Page-banner is-translucent hidden-xs" style="background-image: url('{{ banner_url }}');"> | ||
<figure class="sr-only"> | ||
<img src="{{ banner_url }}" alt="博客文章"> | ||
<figcaption>博客文章</figcaption> | ||
</figure> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{% assign posts = site.posts %} | ||
{% if posts.size > 0 %} | ||
{% assign first_post = posts.first %} | ||
<!-- 最新文章 --> | ||
<p>最近的一篇文章发表于 <time datetime="{{ first_post.date | date_to_xmlschema }}" class="u-bold">{{ first_post.date | date: "%Y 年 %-m 月 %-d 日" }}</time>——</p> | ||
<blockquote> | ||
<p>{{ first_post.content | markdownify | strip_html | strip_newlines | escape_once | truncate: 100, "..." }}</p> | ||
<footer>{{ first_post.author.name }}</footer> | ||
</blockquote> | ||
<p>想看完整内容?快戳《<a href="{{ first_post.url }}">{{ first_post.title }}</a>》!(((o(*゚▽゚*)o)))</p> | ||
<!-- 主打分类 --> | ||
<p>本站主打三类文章,以下为快速通道:</p> | ||
<nav class="MainCategories LightBox"> | ||
<ul> | ||
{% for cat in site.categories limit: 3 %} | ||
{% assign c = cat[0] %} | ||
{% assign c_d = site.data.taxonomy.categories[c] %} | ||
|
||
<li> | ||
<a href="/categories/{{ c }}/" style="background-image: url('{{ c_d.thumbnail | asset_path }}')"> | ||
<h3 data-toc-skip="true">{{ c_d.name }}</h3> | ||
<p>{{ c_d.description }}</p> | ||
</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</nav> | ||
<!-- 文章列表 --> | ||
<div class="ArticleList"> | ||
{% assign prev_post = null %} | ||
{% assign first_post_year = posts.last.date | date: "%Y" %} | ||
{% assign last_post_year = first_post.date | date: "%Y" %} | ||
|
||
{% assign current_year = site.time | date: "%Y" %} | ||
{% assign year_duration = 10 %} | ||
|
||
<div class="ArticleList-summary"> | ||
<p><span class="u-bold">{{ last_post_year | minus: first_post_year | plus: 1 }}</span> 年间共写了 <span class="u-bold">{{ posts.size }}</span> 篇文章。本页只显示最近十年({{ current_year | minus: year_duration | plus: 1 }} 年~{{ current_year }} 年)的文章,其他年份的文章请访问下面的年份归档页面:</p> | ||
<ul class="ArticleList-archives"> | ||
{% for post in posts %} | ||
{% assign prev_year = prev_post.date | date: "%Y" %} | ||
{% assign year = post.date | date: "%Y" %} | ||
{% assign diff = current_year | minus: year %} | ||
|
||
{% if prev_post == null or year != prev_year %} | ||
{% assign first_item = true %} | ||
{% else %} | ||
{% assign first_item = false %} | ||
{% endif %} | ||
|
||
{% if diff >= year_duration %} | ||
{% if first_item == true %} | ||
{% assign year_posts = 0 %} | ||
|
||
{% for p in site.posts %} | ||
{% assign y = p.date | date: "%Y" %} | ||
|
||
{% if y == year %} | ||
{% assign year_posts = year_posts | plus: 1 %} | ||
{% endif %} | ||
{% endfor %} | ||
|
||
<li class="col-xs-6 col-sm-4"><a href="/archives/{{ year }}/">{{ year }}<span><i class="fa fa-pencil"></i>共 {{ year_posts }} 篇</span></a></li> | ||
{% else %} | ||
{% continue %} | ||
{% endif %} | ||
{% endif %} | ||
|
||
{% assign prev_post = post %} | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
|
||
{% for post in posts %} | ||
{% assign prev_year = prev_post.date | date: "%Y" %} | ||
{% assign year = post.date | date: "%Y" %} | ||
{% assign diff = current_year | minus: year %} | ||
|
||
{% if prev_post == null or year != prev_year %} | ||
{% assign first_item = true %} | ||
{% else %} | ||
{% assign first_item = false %} | ||
{% endif %} | ||
|
||
{% if diff < year_duration %} | ||
{% if first_item == true %} | ||
<h2 class="ArticleList-heading" title="共 {{ site.data.blog.posts.years[year] }} 篇">{{ year }}</h2> | ||
{% endif %} | ||
|
||
<div class="ArticleList-item"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%F" }}</time><i class="fa fa-pencil"></i><a href="{{ post.url }}">{{ post.title }}</a>{% if post.album %}<i class="fa fa-camera"></i>{% endif %}{% if post.tags contains 'vlog' %}<i class="fa fa-video-camera"></i>{% endif %}</div> | ||
{% endif %} | ||
|
||
{% assign prev_post = post %} | ||
{% endfor %} | ||
</div> | ||
{% else %} | ||
<p>暂无文章</p> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% if site.posts.size > 0 %} | ||
<aside class="Widget Widget--hotCategories"> | ||
<div class="Widget-body"> | ||
{% assign categories = site.data.taxonomy.categories %} | ||
{% assign cats = site.categories %} | ||
{% assign cat = cats.first %} | ||
{% assign c = cat[0] %} | ||
<p>文章类别<a href="/categories/{{ c }}/">{{ categories[c].name }}</a>下有<span>{{ cat[1].size }}</span>篇文章,其他热门类别有</p> | ||
<ul> | ||
{% for cat in cats limit: 5 offset: 1 %} | ||
{% assign c = cat[0] %} | ||
<li><a href="/categories/{{ c }}/">{{ categories[c].name }} ({{ cat[1].size }})</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</aside> | ||
{% endif %} | ||
{% include ksio/widgets/share.html %} | ||
{% include ksio/widgets/toc.html %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{% if page.ksio_slot_content %}{% include "{{ page.ksio_slot_content | replace: '.html', '' }}.html" %}{% else %}{{ content }}{% endif %} | ||
{% if page.ksio_slot_content %}{% include {{ page.ksio_slot_content | replace: ".html", "" | append: ".html" }} %}{% else %}{{ content }}{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
layout: ksio/default | ||
--- | ||
|
||
{% include {{ site.ksio.header.partial | default: "ksio/partials/header.html" }} %} | ||
<main class="Page-content" style="height: 100%;"> | ||
<div style="height: calc(100% - 271px); display: flex; align-items: center; justify-content: center; text-align: center;"> | ||
<div> | ||
<h1 style="margin-top: 0; margin-bottom: .3em; font-size: 10rem; font-weight: 700;">{{ site.title }}</h1> | ||
<p style="margin-bottom: 0; font-size: 2.5rem;">{{ site.tagline | default: site.description }}</p> | ||
</div> | ||
</div> | ||
</main> | ||
{% include {{ site.ksio.footer.partial | default: "ksio/partials/footer.html" }} %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.