jekyll-text-theme 1.4.1 → 1.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/_data/locale.yml +52 -52
- data/_includes/blog/article-data.html +29 -29
- data/_includes/blog/footer.html +1 -1
- data/_includes/blog/header.html +57 -42
- data/_includes/blog/license.html +13 -13
- data/_includes/blog/tags.html +39 -39
- data/_includes/common-head.html +6 -6
- data/_includes/head-icons-rel.html +22 -22
- data/_includes/info/follow-me.html +27 -27
- data/_includes/snippets/get-lang.html +6 -6
- data/_includes/snippets/locale-to-string.html +7 -7
- data/_includes/snippets/page-title.html +8 -8
- data/_includes/snippets/prepend-baseurl.html +1 -1
- data/_includes/utils/comment-disqus.html +3 -3
- data/_includes/utils/google-analytics.html +2 -2
- data/_includes/utils/mathjax.html +2 -2
- data/_layouts/all.html +23 -23
- data/_layouts/blog-base.html +12 -12
- data/_layouts/blog-default.html +1 -1
- data/_layouts/home.html +53 -53
- data/_layouts/page.html +4 -4
- data/_layouts/post.html +16 -16
- data/_sass/components/_wrapper.scss +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f2d075d52f39b7f1f666f33431d77c37616924
|
4
|
+
data.tar.gz: 821108795e874faecccd52c61a1ac6a8f3d87e07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cec66f49278e3556e830715cfc7a08a7913744ba3b9517d2c28fc286bc0a27ae190ea9181f49d9d6f92849bb3509d406978b371938aaed61bc7be617cde0c9a2
|
7
|
+
data.tar.gz: 4125d29ba1794a15734b7da0b977f273d0cb8cf606149f7be7047add338668028f7d6c3d8e0ee15db08bc331eda1838fa737d238b2d0a5d6ce348e56418e8118
|
data/README.md
CHANGED
@@ -102,7 +102,7 @@ bundle exec jekyll serve -H 0.0.0.0
|
|
102
102
|
|
103
103
|
### 多语言
|
104
104
|
|
105
|
-
该主题支持 English、简体中文和繁體中文,只需在 ./\_config.yml 中设置对应 `lang` 项即可。设置后整个网站的主题文字(导航,阅读更多,文章数统计,日期格式,文章协议等等)会变为设置的语言,多语言的配置文件为 ./_data/locale.yml
|
105
|
+
该主题支持 English、简体中文和繁體中文,只需在 ./\_config.yml 中设置对应 `lang` 项即可。设置后整个网站的主题文字(导航,阅读更多,文章数统计,日期格式,文章协议等等)会变为设置的语言,多语言的配置文件为 ./_data/locale.yml,你可以自由的修改和增加语言。
|
106
106
|
|
107
107
|
另外,该主题也支持对某篇文章(页面)单独设置语言,只需在 Markdown 或页面 HTML 文件的头信息中设置 `lang` 项,其优先级高于 ./\_config.yml 中设置的值。设置后该文章(页面)的主题文字会变为头信息中设置的语言。
|
108
108
|
|
data/_data/locale.yml
CHANGED
@@ -1,78 +1,78 @@
|
|
1
1
|
NAV:
|
2
2
|
HOME:
|
3
|
-
en: Home
|
4
|
-
zh: 主页
|
5
|
-
zh-Hans: 主页
|
6
|
-
zh-Hant: 主頁
|
3
|
+
en: "Home"
|
4
|
+
zh: "主页"
|
5
|
+
zh-Hans: "主页"
|
6
|
+
zh-Hant: "主頁"
|
7
7
|
ALL:
|
8
|
-
en: All
|
9
|
-
zh: 归档
|
10
|
-
zh-Hans: 归档
|
11
|
-
zh-Hant: 歸檔
|
8
|
+
en: "All"
|
9
|
+
zh: "归档"
|
10
|
+
zh-Hans: "归档"
|
11
|
+
zh-Hant: "歸檔"
|
12
12
|
RSS:
|
13
|
-
en: RSS
|
14
|
-
zh: RSS
|
15
|
-
zh-Hans: RSS
|
16
|
-
zh-Hant: RSS
|
13
|
+
en: "RSS"
|
14
|
+
zh: "RSS"
|
15
|
+
zh-Hans: "RSS"
|
16
|
+
zh-Hant: "RSS"
|
17
17
|
|
18
18
|
READMORE:
|
19
|
-
en: Click to read more ...
|
20
|
-
zh: 点我阅读更多...
|
21
|
-
zh-Hans: 点我阅读更多...
|
22
|
-
zh-Hant: 「點我閱讀更多」
|
19
|
+
en: "Click to read more ..."
|
20
|
+
zh: "点我阅读更多..."
|
21
|
+
zh-Hans: "点我阅读更多..."
|
22
|
+
zh-Hant: "「點我閱讀更多」"
|
23
23
|
|
24
|
-
COPYRIGHT_DATES: 2015 - 2017
|
24
|
+
COPYRIGHT_DATES: "2015 - 2017"
|
25
25
|
|
26
26
|
LAST_UPDATED:
|
27
|
-
en: Last updated
|
28
|
-
zh: 更新于
|
29
|
-
zh-Hans: 更新于
|
30
|
-
zh-Hant: 更新於
|
27
|
+
en: "Last updated"
|
28
|
+
zh: "更新于"
|
29
|
+
zh-Hans: "更新于"
|
30
|
+
zh-Hant: "更新於"
|
31
31
|
|
32
32
|
ARTICLE_DATE_FORMAT:
|
33
|
-
en:
|
34
|
-
zh:
|
35
|
-
zh-Hans:
|
36
|
-
zh-Hant:
|
33
|
+
en: "%b %d, %Y"
|
34
|
+
zh: "%Y年 %m月%d日"
|
35
|
+
zh-Hans: "%Y年 %m月%d日"
|
36
|
+
zh-Hant: "%Y年 %m月%d日"
|
37
37
|
|
38
38
|
ARTICLE_LIST_DATE_FORMAT:
|
39
|
-
en:
|
40
|
-
zh:
|
41
|
-
zh-Hans:
|
42
|
-
zh-Hant:
|
39
|
+
en: "%b %d"
|
40
|
+
zh: "%m月%d日"
|
41
|
+
zh-Hans: "%m月%d日"
|
42
|
+
zh-Hant: "%m月%d日"
|
43
43
|
|
44
44
|
STATISTICS:
|
45
|
-
en:
|
46
|
-
zh: 共计 [POST_COUNT] 篇文章, [PAGE_COUNT] 页。
|
47
|
-
zh-Hans: 共计 [POST_COUNT] 篇文章, [PAGE_COUNT] 页。
|
48
|
-
zh-Hant: 共計 [POST_COUNT] 篇文章, [PAGE_COUNT] 頁。
|
45
|
+
en: "[POST_COUNT] post articles, [PAGE_COUNT] pages."
|
46
|
+
zh: "共计 [POST_COUNT] 篇文章, [PAGE_COUNT] 页。"
|
47
|
+
zh-Hans: "共计 [POST_COUNT] 篇文章, [PAGE_COUNT] 页。"
|
48
|
+
zh-Hant: "共計 [POST_COUNT] 篇文章, [PAGE_COUNT] 頁。"
|
49
49
|
|
50
50
|
LICENSE_ANNOUNCE:
|
51
|
-
en: This work is licensed under a [LICENSE] license.
|
52
|
-
zh: 本文遵守 [LICENSE] 许可协议。
|
53
|
-
zh-Hans: 本文遵守 [LICENSE] 许可协议。
|
54
|
-
zh-Hant: 本文遵守 [LICENSE] 許可協議。
|
51
|
+
en: "This work is licensed under a [LICENSE] license."
|
52
|
+
zh: "本文遵守 [LICENSE] 许可协议。"
|
53
|
+
zh-Hans: "本文遵守 [LICENSE] 许可协议。"
|
54
|
+
zh-Hant: "本文遵守 [LICENSE] 許可協議。"
|
55
55
|
|
56
56
|
LICENSE_INTRO:
|
57
57
|
en:
|
58
|
-
zh: 欢迎转载,转载需注明出处,且禁止用于商业目的。
|
59
|
-
zh-Hans: 欢迎转载,转载需注明出处,且禁止用于商业目的。
|
60
|
-
zh-Hant: 歡迎轉載,轉載需註明出處,且禁止用於商業目的。
|
58
|
+
zh: "欢迎转载,转载需注明出处,且禁止用于商业目的。"
|
59
|
+
zh-Hans: "欢迎转载,转载需注明出处,且禁止用于商业目的。"
|
60
|
+
zh-Hant: "歡迎轉載,轉載需註明出處,且禁止用於商業目的。"
|
61
61
|
|
62
62
|
POST_ON_GITHUB:
|
63
|
-
en: View this POST on Github.
|
64
|
-
zh: 在 Github 上查阅此文。
|
65
|
-
zh-Hans: 在 Github 上查阅此文。
|
66
|
-
zh-Hant: 在 Github 上查閱此文。
|
63
|
+
en: "View this POST on Github."
|
64
|
+
zh: "在 Github 上查阅此文。"
|
65
|
+
zh-Hans: "在 Github 上查阅此文。"
|
66
|
+
zh-Hant: "在 Github 上查閱此文。"
|
67
67
|
|
68
68
|
FOLLOW_ME:
|
69
|
-
en: Follow me on [NAME].
|
70
|
-
zh: 在 [NAME] 上关注我。
|
71
|
-
zh-Hans: 在 [NAME] 上关注我。
|
72
|
-
zh-Hant: 在 [NAME] 上關注我。
|
69
|
+
en: "Follow me on [NAME]."
|
70
|
+
zh: "在 [NAME] 上关注我。"
|
71
|
+
zh-Hans: "在 [NAME] 上关注我。"
|
72
|
+
zh-Hant: "在 [NAME] 上關注我。"
|
73
73
|
|
74
74
|
EMAIL_ME:
|
75
|
-
en: Send me Email.
|
76
|
-
zh: 给我发邮件。
|
77
|
-
zh-Hans: 给我发邮件。
|
78
|
-
zh-Hant: 給我發郵件。
|
75
|
+
en: "Send me Email."
|
76
|
+
zh: "给我发邮件。"
|
77
|
+
zh-Hans: "给我发邮件。"
|
78
|
+
zh-Hant: "給我發郵件。"
|
@@ -1,53 +1,53 @@
|
|
1
1
|
<div class="m-article-data clearfix">
|
2
|
-
{
|
2
|
+
{%- if page -%}
|
3
3
|
<meta itemprop="author" itemscope itemtype="https://schema.org/Person">
|
4
|
-
{
|
4
|
+
{%- if page.author -%}
|
5
5
|
<meta itemprop="name" content="{{ page.author }}"/>
|
6
|
-
{
|
6
|
+
{%- elsif site.author.name -%}
|
7
7
|
<meta itemprop="name" content="{{ site.author.name }}"/>
|
8
|
-
{
|
8
|
+
{%- endif -%}
|
9
9
|
</meta>
|
10
|
-
{
|
10
|
+
{%- endif -%}
|
11
11
|
|
12
|
-
{
|
13
|
-
{
|
14
|
-
{
|
15
|
-
{
|
16
|
-
{
|
17
|
-
{
|
12
|
+
{%- if post -%}
|
13
|
+
{%- assign cur_page = post -%}
|
14
|
+
{%- elsif page -%}
|
15
|
+
{%- assign cur_page = page -%}
|
16
|
+
{%- endif -%}
|
17
|
+
{%- if cur_page.tags[0] -%}
|
18
18
|
<ul class="inline-list tag-wrapper">
|
19
|
-
{
|
20
|
-
{
|
21
|
-
{
|
22
|
-
{
|
23
|
-
{
|
24
|
-
{
|
25
|
-
{
|
26
|
-
{
|
27
|
-
{
|
19
|
+
{%- if site.paths.all -%}
|
20
|
+
{%- assign all_path = site.paths.all -%}
|
21
|
+
{%- else -%}
|
22
|
+
{%- assign all_path = '/all.html' -%}
|
23
|
+
{%- endif -%}
|
24
|
+
{%- for tag in cur_page.tags -%}
|
25
|
+
{%- assign _tag = tag | strip | url_encode } -%}
|
26
|
+
{%- assign __path = all_path | append: '?tag=' -%}
|
27
|
+
{%- include snippets/prepend-baseurl.html -%}
|
28
28
|
<li>
|
29
29
|
<a class="round-rect-button" href="{{ __return | append: _tag | replace: '//', '/' }}">{{ tag }}</a>
|
30
30
|
</li>
|
31
|
-
{
|
31
|
+
{%- endfor -%}
|
32
32
|
</ul>
|
33
|
-
{
|
33
|
+
{%- endif -%}
|
34
34
|
<div class="other-wrapper">
|
35
|
-
{
|
35
|
+
{%- if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class -%}
|
36
36
|
<div class="view-wrapper">
|
37
37
|
<span class="article-view" id="post-key-{{ cur_page.key }}">0
|
38
38
|
</span> views
|
39
39
|
</div>
|
40
|
-
{
|
40
|
+
{%- endif -%}
|
41
41
|
<div class="date-wrapper">
|
42
|
-
{
|
43
|
-
{
|
44
|
-
{
|
42
|
+
{%- assign __locale = site.data.locale.ARTICLE_DATE_FORMAT } -%}
|
43
|
+
{%- include snippets/locale-to-string.html -%}
|
44
|
+
{%- if post -%}
|
45
45
|
<span class="article-meta">{{ post.date | date: __return }}</span>
|
46
|
-
{
|
46
|
+
{%- elsif page -%}
|
47
47
|
<time class="article-meta" datetime="{{ page.date | date_to_xmlschema }}"
|
48
48
|
itemprop="datePublished">{{ page.date | date: __return }}
|
49
49
|
</time>
|
50
|
-
{
|
50
|
+
{%- endif -%}
|
51
51
|
</div>
|
52
52
|
</div>
|
53
53
|
</div>
|
data/_includes/blog/footer.html
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="m-page-footer js-page-footer">
|
2
2
|
<div class="main">
|
3
|
-
<aside> {
|
3
|
+
<aside> {%- include info/follow-me.html -%} </aside>
|
4
4
|
<footer class="site-info">
|
5
5
|
<p>© {{ site.title }} {{ site.data.locale.COPYRIGHT_DATES }}</p>
|
6
6
|
<p>Powered by <a title="Jekyll is a simple, blog-aware, static site generator." href="http://jekyllrb.com/">Jekyll</a> & <a
|
data/_includes/blog/header.html
CHANGED
@@ -1,51 +1,66 @@
|
|
1
1
|
<header class="m-page-header main clearfix">
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
7
|
-
{
|
8
|
-
{
|
9
|
-
|
10
|
-
{
|
2
|
+
{%- if site.paths.base -%}
|
3
|
+
{%- assign __path = site.paths.base -%}
|
4
|
+
{%- else -%}
|
5
|
+
{%- assign __path = '/' -%}
|
6
|
+
{%- endif -%}
|
7
|
+
{%- assign pre7 = __path | slice: 0, 7 -%} {%- assign pre8 = __path | slice: 0, 8 -%}
|
8
|
+
{%- if pre7 == 'http://' or pre8 == 'https://' -%}
|
9
|
+
{%- assign href = __path -%}
|
10
|
+
{%- else -%}
|
11
|
+
{%- include snippets/prepend-baseurl.html -%}
|
12
|
+
{%- assign href = __return -%}
|
13
|
+
{%- endif -%}
|
14
|
+
{%- if site.title -%}
|
15
|
+
<a class="site-title" title="{%- if site.description -%}{{ site.description }}{%- endif -%}" href="{{ __return }}">{{ site.title }}</a>
|
16
|
+
{%- endif -%}
|
11
17
|
<div class="site-logo">
|
12
|
-
{
|
18
|
+
{%- include logo/logo.svg -%}
|
13
19
|
</div>
|
14
20
|
<nav>
|
15
21
|
<ul class="inline-list">
|
16
|
-
{
|
17
|
-
|
18
|
-
{
|
19
|
-
|
20
|
-
{
|
22
|
+
{%- if site.paths.home -%}
|
23
|
+
{%- assign __path = site.paths.home -%}
|
24
|
+
{%- else -%}
|
25
|
+
{%- assign __path = '/' -%}
|
26
|
+
{%- endif -%}
|
27
|
+
{%- assign pre7 = __path | slice: 0, 7 -%} {%- assign pre8 = __path | slice: 0, 8 -%}
|
28
|
+
{%- if pre7 == 'http://' or pre8 == 'https://' -%}
|
29
|
+
{%- assign href = __path -%}
|
30
|
+
{%- else -%}
|
31
|
+
{%- include snippets/prepend-baseurl.html -%}
|
32
|
+
{%- assign href = __return -%}
|
33
|
+
{%- endif -%}
|
34
|
+
{%- assign __locale = site.data.locale.NAV.HOME -%}
|
35
|
+
{%- include snippets/locale-to-string.html -%}
|
21
36
|
<li><a href="{{ href }}">{{ __return }}</a></li>
|
22
|
-
{
|
23
|
-
{
|
24
|
-
{
|
25
|
-
{
|
26
|
-
{
|
27
|
-
{
|
28
|
-
{
|
29
|
-
{
|
30
|
-
{
|
31
|
-
<li><a href="{{ href
|
32
|
-
{
|
33
|
-
{
|
34
|
-
{
|
35
|
-
{
|
36
|
-
{
|
37
|
-
{
|
38
|
-
<li><a href="{{ href }}">{
|
39
|
-
{
|
40
|
-
{
|
41
|
-
{
|
42
|
-
{
|
43
|
-
{
|
44
|
-
{
|
45
|
-
{
|
46
|
-
{
|
47
|
-
{
|
48
|
-
{
|
37
|
+
{%- if site.paths.all -%}
|
38
|
+
{%- assign __path = site.paths.all -%}
|
39
|
+
{%- else -%}
|
40
|
+
{%- assign __path = '/all.html' -%}
|
41
|
+
{%- endif -%}
|
42
|
+
{%- include snippets/prepend-baseurl.html -%}
|
43
|
+
{%- assign href = __return -%}
|
44
|
+
{%- assign __locale = site.data.locale.NAV.ALL -%}
|
45
|
+
{%- include snippets/locale-to-string.html -%}
|
46
|
+
<li><a href="{{ href }}">{{ __return }}</a></li>
|
47
|
+
{%- for list in site.nav_lists -%}
|
48
|
+
{%- assign __path = list.url -%}
|
49
|
+
{%- include snippets/prepend-baseurl.html -%}
|
50
|
+
{%- assign href = __return -%}
|
51
|
+
{%- assign __locale = list.titles -%}
|
52
|
+
{%- include snippets/locale-to-string.html -%}
|
53
|
+
<li><a href="{{ href }}">{%- if list.title -%}{{ list.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
|
54
|
+
{%- endfor -%}
|
55
|
+
{%- if site.paths.rss -%}
|
56
|
+
{%- assign __path = site.paths.rss -%}
|
57
|
+
{%- else -%}
|
58
|
+
{%- assign __path = '/feed.xml' -%}
|
59
|
+
{%- endif -%}
|
60
|
+
{%- include snippets/prepend-baseurl.html -%}
|
61
|
+
{%- assign href = __return -%}
|
62
|
+
{%- assign __locale = site.data.locale.NAV.RSS -%}
|
63
|
+
{%- include snippets/locale-to-string.html -%}
|
49
64
|
<li><a type="application/rss+xml" href="{{ href }}">{{ __return }}</a></li>
|
50
65
|
</ul>
|
51
66
|
</nav>
|
data/_includes/blog/license.html
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
<div class="m-license">
|
2
|
-
{
|
2
|
+
{%- assign locale = site.data.locale -%}
|
3
3
|
<div class="clearfix">
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
4
|
+
{%- if site.repository and site.repository_tree -%}
|
5
|
+
{%- assign __path = '/assets/images/octocat.jpg' -%}
|
6
|
+
{%- include snippets/prepend-baseurl.html -%}
|
7
7
|
<a class="octocat" href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">
|
8
8
|
<img alt="View on Github" src="{{ __return }}" />
|
9
9
|
</a>
|
10
|
-
{
|
11
|
-
{
|
10
|
+
{%- assign __locale = locale.POST_ON_GITHUB -%}
|
11
|
+
{%- include snippets/locale-to-string.html -%}
|
12
12
|
<p><a href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">{{ __return }}</a></p>
|
13
|
-
{
|
14
|
-
{
|
15
|
-
{
|
13
|
+
{%- endif -%}
|
14
|
+
{%- assign __locale = locale.LICENSE_ANNOUNCE -%}
|
15
|
+
{%- include snippets/locale-to-string.html -%}
|
16
16
|
<p>{{ __return | replace: "[LICENSE]", '<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">CC-BY-NC-4.0</a>' }}</p>
|
17
|
-
{
|
18
|
-
{
|
17
|
+
{%- assign __path = '/assets/images/license-cc4.png' -%}
|
18
|
+
{%- include snippets/prepend-baseurl.html -%}
|
19
19
|
<a class="license" rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
|
20
20
|
<img alt="Creative Commons License" src="{{ __return }}" />
|
21
21
|
</a>
|
22
|
-
{
|
23
|
-
{
|
22
|
+
{%- assign __locale = locale.LICENSE_INTRO -%}
|
23
|
+
{%- include snippets/locale-to-string.html -%}
|
24
24
|
<p>{{ __return }}</p>
|
25
25
|
</div>
|
26
26
|
</div>
|
data/_includes/blog/tags.html
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
7
|
-
{
|
8
|
-
{
|
9
|
-
{
|
10
|
-
{
|
11
|
-
{
|
12
|
-
{
|
13
|
-
{
|
14
|
-
{
|
15
|
-
{
|
16
|
-
{
|
17
|
-
{
|
1
|
+
{%- assign max_size = 1 -%}
|
2
|
+
{%- assign min_size = 1 -%}
|
3
|
+
{%- assign cur_size = 1 -%}
|
4
|
+
{%- assign _tags = site.tags | sort -%}
|
5
|
+
{%- for tag in _tags -%}
|
6
|
+
{%- assign cur_size = tag[1].size -%}
|
7
|
+
{%- if cur_size > max_size -%}
|
8
|
+
{%- assign max_size = cur_size -%}
|
9
|
+
{%- endif -%}
|
10
|
+
{%- if cur_size < min_size -%}
|
11
|
+
{%- assign min_size = cur_size -%}
|
12
|
+
{%- endif -%}
|
13
|
+
{%- endfor -%}
|
14
|
+
{%- assign gap_size = max_size | minus: min_size | plus: 1 | divided_by: 4 -%}
|
15
|
+
{%- if gap_size < 1 -%}
|
16
|
+
{%- assign gap_size = 1 -%}
|
17
|
+
{%- endif -%}
|
18
18
|
<div class="m-tags">
|
19
19
|
<ul class="inline-list">
|
20
20
|
<li>
|
@@ -22,32 +22,32 @@
|
|
22
22
|
<div class="tag-count">{{ site.posts | size }}</div>
|
23
23
|
</button>
|
24
24
|
</li>
|
25
|
-
{
|
26
|
-
{
|
27
|
-
{
|
28
|
-
{
|
29
|
-
{
|
30
|
-
{
|
31
|
-
{
|
32
|
-
{
|
33
|
-
{
|
34
|
-
{
|
35
|
-
{
|
36
|
-
{
|
37
|
-
{
|
38
|
-
{
|
39
|
-
{
|
40
|
-
{
|
41
|
-
{
|
42
|
-
{
|
43
|
-
{
|
44
|
-
{
|
45
|
-
{
|
25
|
+
{%- for tag in _tags -%}
|
26
|
+
{%- assign cur_size = tag[1].size -%}
|
27
|
+
{%- assign m1 = min_size -%}
|
28
|
+
{%- assign n1 = m1 | plus: gap_size -%}
|
29
|
+
{%- assign m2 = n1 -%}
|
30
|
+
{%- assign n2 = m2 | plus: gap_size -%}
|
31
|
+
{%- assign m3 = n2 -%}
|
32
|
+
{%- assign n3 = m3 | plus: gap_size -%}
|
33
|
+
{%- assign m4 = n3 -%}
|
34
|
+
{%- assign n4 = m4 | plus: gap_size -%}
|
35
|
+
{%- if cur_size >= m1 and cur_size < n1 -%}
|
36
|
+
{%- assign c_index = 1 -%}
|
37
|
+
{%- elsif cur_size >= m2 and cur_size < n2 -%}
|
38
|
+
{%- assign c_index = 2 -%}
|
39
|
+
{%- elsif cur_size >= m3 and cur_size < n3 -%}
|
40
|
+
{%- assign c_index = 3 -%}
|
41
|
+
{%- elsif cur_size >= m4 and cur_size < n4 -%}
|
42
|
+
{%- assign c_index = 4 -%}
|
43
|
+
{%- else -%}
|
44
|
+
{%- assign c_index = 4 -%}
|
45
|
+
{%- endif -%}
|
46
46
|
<li><button type="button" class="js-article-tag tag-{{ c_index }} round-rect-button"
|
47
47
|
data-tag="{{ tag[0] | strip | url_encode }}" onclick="tagSelect('{{ tag[0] | strip | url_encode }}')">
|
48
48
|
<span>{{ tag[0] | strip }}</span><div class="tag-count">{{ tag[1].size }}</div>
|
49
49
|
</button>
|
50
50
|
</li>
|
51
|
-
{
|
51
|
+
{%- endfor -%}
|
52
52
|
</ul>
|
53
53
|
</div>
|
data/_includes/common-head.html
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
<meta charset="utf-8">
|
2
2
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
3
3
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
4
|
-
{
|
5
|
-
<title>{
|
6
|
-
<meta name="description" content="{
|
7
|
-
<link rel="canonical" href="{
|
8
|
-
{
|
9
|
-
{
|
4
|
+
{%- include snippets/page-title.html -%}
|
5
|
+
<title>{%- if __return -%}{{ __return }} - {{ site.title }}{%- else -%}{{ site.title }}{%- endif -%}</title>
|
6
|
+
<meta name="description" content="{%- if page.excerpt -%}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{%- else -%}{{ site.description }}{%- endif -%}">
|
7
|
+
<link rel="canonical" href="{%- include snippets/page-url.html -%}">
|
8
|
+
{%- assign __path = '/feed.xml' -%}
|
9
|
+
{%- include snippets/prepend-baseurl.html -%}
|
10
10
|
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ __return | prepend: site.url }}">
|
@@ -1,38 +1,38 @@
|
|
1
1
|
<!-- for Safari on iOS https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/app-icon/ -->
|
2
|
-
{
|
3
|
-
{
|
2
|
+
{%- assign __path = '/assets/images/logo/icon-180x180.png' -%}
|
3
|
+
{%- include snippets/prepend-baseurl.html -%}
|
4
4
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ __return }}">
|
5
|
-
{
|
6
|
-
{
|
5
|
+
{%- assign __path = '/assets/images/logo/icon-167x167.png' -%}
|
6
|
+
{%- include snippets/prepend-baseurl.html -%}
|
7
7
|
<link rel="apple-touch-icon" sizes="167x167" href="{{ __return }}">
|
8
|
-
{
|
9
|
-
{
|
8
|
+
{%- assign __path = '/assets/images/logo/icon-152x152.png' -%}
|
9
|
+
{%- include snippets/prepend-baseurl.html -%}
|
10
10
|
<link rel="apple-touch-icon" sizes="152x152" href="{{ __return }}">
|
11
|
-
{
|
12
|
-
{
|
11
|
+
{%- assign __path = '/assets/images/logo/icon-120x120.png' -%}
|
12
|
+
{%- include snippets/prepend-baseurl.html -%}
|
13
13
|
<link rel="apple-touch-icon" sizes="120x120" href="{{ __return }}">
|
14
|
-
{
|
15
|
-
{
|
14
|
+
{%- assign __path = '/assets/images/logo/icon-120x120.png' -%}
|
15
|
+
{%- include snippets/prepend-baseurl.html -%}
|
16
16
|
<link rel="shortcut icon" href="{{ __return }}">
|
17
17
|
<!-- for Chrome on Android https://developer.chrome.com/multidevice/android/installtohomescreen -->
|
18
18
|
<meta name="mobile-web-app-capable" content="yes">
|
19
|
-
{
|
20
|
-
{
|
19
|
+
{%- assign __path = '/assets/images/logo/icon-192x192.png' -%}
|
20
|
+
{%- include snippets/prepend-baseurl.html -%}
|
21
21
|
<link rel="icon" sizes="192x192" href="{{ __return }}">
|
22
22
|
<!-- for Edge on Windows 10 https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx -->
|
23
|
-
{
|
24
|
-
{
|
23
|
+
{%- assign __path = '/assets/images/logo/icon-144x144.png' -%}
|
24
|
+
{%- include snippets/prepend-baseurl.html -%}
|
25
25
|
<meta name="msapplication-TileImage" content="{{ __return }}">
|
26
|
-
{
|
27
|
-
{
|
26
|
+
{%- assign __path = '/assets/images/logo/icon-310x310.png' -%}
|
27
|
+
{%- include snippets/prepend-baseurl.html -%}
|
28
28
|
<meta name="msapplication-square310x310logo" content="{{ __return }}">
|
29
|
-
{
|
30
|
-
{
|
29
|
+
{%- assign __path = '/assets/images/logo/icon-310x150.png' -%}
|
30
|
+
{%- include snippets/prepend-baseurl.html -%}
|
31
31
|
<meta name="msapplication-wide310x150logo" content="{{ __return }}">
|
32
|
-
{
|
33
|
-
{
|
32
|
+
{%- assign __path = '/assets/images/logo/icon-150x150.png' -%}
|
33
|
+
{%- include snippets/prepend-baseurl.html -%}
|
34
34
|
<meta name="msapplication-square150x150logo" content="{{ __return }}">
|
35
|
-
{
|
36
|
-
{
|
35
|
+
{%- assign __path = '/assets/images/logo/icon-70x70.png' -%}
|
36
|
+
{%- include snippets/prepend-baseurl.html -%}
|
37
37
|
<meta name="msapplication-square70x70logo" content="{{ __return }}">
|
38
38
|
<meta name="msapplication-TileColor" content="#eeeeee">
|
@@ -1,78 +1,78 @@
|
|
1
1
|
<div class="follow-me">
|
2
|
-
{
|
3
|
-
{
|
2
|
+
{%- assign __locale = site.data.locale.FOLLOW_ME -%}
|
3
|
+
{%- include snippets/locale-to-string.html -%}
|
4
4
|
<ul class="inline-list" itemscope itemtype="http://schema.org/Person">
|
5
5
|
<meta itemprop="name" content="{{ site.author.name }}">
|
6
6
|
<link itemprop="url" href="{{ '/' | prepend: site.url }}">
|
7
|
-
{
|
7
|
+
{%- if site.author.weibo -%}
|
8
8
|
<li title="{{ __return | replace: '[NAME]', 'Weibo' }}">
|
9
9
|
<div class="round-button weibo">
|
10
10
|
<a itemprop="sameAs" href="https://weibo.com/{{ site.author.weibo }}" target="_blank">
|
11
|
-
<div class="icon">{
|
11
|
+
<div class="icon">{%- include icon/social/weibo.svg -%}</div>
|
12
12
|
</a>
|
13
13
|
</div>
|
14
14
|
</li>
|
15
|
-
{
|
16
|
-
{
|
15
|
+
{%- endif -%}
|
16
|
+
{%- if site.author.facebook -%}
|
17
17
|
<li title="{{ __return | replace: '[NAME]', 'Facebook' }}">
|
18
18
|
<div class="round-button facebook">
|
19
19
|
<a itemprop="sameAs" href="https://www.facebook.com/{{ site.author.facebook }}" target="_blank">
|
20
|
-
<div class="icon">{
|
20
|
+
<div class="icon">{%- include icon/social/facebook.svg -%}</div>
|
21
21
|
</a>
|
22
22
|
</div>
|
23
23
|
</li>
|
24
|
-
{
|
25
|
-
{
|
24
|
+
{%- endif -%}
|
25
|
+
{%- if site.author.twitter -%}
|
26
26
|
<li title="{{ __return | replace: '[NAME]', 'Twitter' }}">
|
27
27
|
<div class="round-button twitter">
|
28
28
|
<a itemprop="sameAs" href="https://twitter.com/{{ site.author.twitter }}" target="_blank">
|
29
|
-
<div class="icon">{
|
29
|
+
<div class="icon">{%- include icon/social/twitter.svg -%}</div>
|
30
30
|
</a>
|
31
31
|
</div>
|
32
32
|
</li>
|
33
|
-
{
|
34
|
-
{
|
33
|
+
{%- endif -%}
|
34
|
+
{%- if site.author.googleplus -%}
|
35
35
|
<li title="{{ __return | replace: '[NAME]', 'Google+' }}">
|
36
36
|
<div class="round-button googlepluse">
|
37
37
|
<a itemprop="sameAs" href="https://plus.google.com/u/0/{{ site.author.googleplus }}" target="_blank">
|
38
|
-
<div class="icon">{
|
38
|
+
<div class="icon">{%- include icon/social/googleplus.svg -%}</div>
|
39
39
|
</a>
|
40
40
|
</div>
|
41
41
|
</li>
|
42
|
-
{
|
43
|
-
{
|
42
|
+
{%- endif -%}
|
43
|
+
{%- if site.author.github -%}
|
44
44
|
<li title="{{ __return | replace: '[NAME]', 'Github' }}">
|
45
45
|
<div class="round-button github">
|
46
46
|
<a itemprop="sameAs" href="https://github.com/{{ site.author.github }}" target="_blank">
|
47
|
-
<div class="icon">{
|
47
|
+
<div class="icon">{%- include icon/social/github.svg -%}</div>
|
48
48
|
</a>
|
49
49
|
</div>
|
50
50
|
</li>
|
51
|
-
{
|
52
|
-
{
|
51
|
+
{%- endif -%}
|
52
|
+
{%- if site.author.linkedin -%}
|
53
53
|
<li title="{{ __return | replace: '[NAME]', 'Linkedin' }}">
|
54
54
|
<div class="round-button linkedin">
|
55
55
|
<a itemprop="sameAs" href="https://www.linkedin.com/in/{{ site.author.linkedin }}" target="_blank">
|
56
|
-
<div class="icon">{
|
56
|
+
<div class="icon">{%- include icon/social/linkedin.svg -%}</div>
|
57
57
|
</a>
|
58
58
|
</div>
|
59
59
|
</li>
|
60
|
-
{
|
61
|
-
{
|
60
|
+
{%- endif -%}
|
61
|
+
{%- if site.author.douban -%}
|
62
62
|
<li title="{{ __return | replace: '[NAME]', 'Douban' }}">
|
63
63
|
<div class="round-button douban">
|
64
64
|
<a itemprop="sameAs" href="https://www.douban.com/people/{{ site.author.douban }}" target="_blank">
|
65
|
-
<div class="icon">{
|
65
|
+
<div class="icon">{%- include icon/social/douban.svg -%}</div>
|
66
66
|
</a>
|
67
67
|
</div>
|
68
68
|
</li>
|
69
|
-
{
|
69
|
+
{%- endif -%}
|
70
70
|
</ul>
|
71
|
-
{
|
72
|
-
{
|
73
|
-
{
|
71
|
+
{%- if site.author.email -%}
|
72
|
+
{%- assign __locale = site.data.locale.EMAIL_ME -%}
|
73
|
+
{%- include snippets/locale-to-string.html -%}
|
74
74
|
<p class="email">
|
75
75
|
<a title="{{ __return }}" href="mailto:{{ site.author.email }}" target="_self">{{ site.author.email }}</a>
|
76
76
|
</p>
|
77
|
-
{
|
77
|
+
{%- endif -%}
|
78
78
|
</div>
|
@@ -1,6 +1,6 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
1
|
+
{%- assign __return = '' -%}
|
2
|
+
{%- if page.lang -%}
|
3
|
+
{%- assign __return = page.lang -%}
|
4
|
+
{%- else -%}
|
5
|
+
{%- assign __return = site.lang -%}
|
6
|
+
{%- endif -%}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
7
|
-
{
|
1
|
+
{%- include snippets/get-lang.html -%}
|
2
|
+
{%- assign __lang = __return -%}
|
3
|
+
{%- if __locale[__lang] -%}
|
4
|
+
{%- assign __return = __locale[__lang] -%}
|
5
|
+
{%- else -%}
|
6
|
+
{%- assign __return = __locale.en -%}
|
7
|
+
{%- endif -%}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
{
|
2
|
-
{
|
3
|
-
{
|
4
|
-
{
|
5
|
-
{
|
6
|
-
{
|
7
|
-
{
|
8
|
-
{
|
1
|
+
{%- assign __locale = page.titles -%}
|
2
|
+
{%- include snippets/locale-to-string.html -%}
|
3
|
+
{%- assign __localeTitle = __return -%}
|
4
|
+
{%- if page.title -%}
|
5
|
+
{%- assign __return = page.title -%}
|
6
|
+
{%- else -%}
|
7
|
+
{%- assign __return = __localeTitle -%}
|
8
|
+
{%- endif -%}
|
@@ -1 +1 @@
|
|
1
|
-
{
|
1
|
+
{%- assign __return = __path | replace:'index.html','' | prepend: site.baseurl | replace:'//','/' -%}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{
|
1
|
+
{%- if site.disqus.shortname and page.key -%}
|
2
2
|
<div id="disqus_thread"></div>
|
3
3
|
<script>
|
4
4
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
|
8
8
|
|
9
9
|
var disqus_config = function () {
|
10
|
-
this.page.url = '{
|
10
|
+
this.page.url = '{%- include snippets/page-url.html -%}';
|
11
11
|
this.page.identifier = '{{ page.key }}';
|
12
12
|
};
|
13
13
|
|
@@ -19,4 +19,4 @@
|
|
19
19
|
})();
|
20
20
|
</script>
|
21
21
|
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
22
|
-
{
|
22
|
+
{%- endif -%}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
{
|
1
|
+
{%- if site.ga_tracking_id -%}
|
2
2
|
<!-- Google Analytics -->
|
3
3
|
<script>
|
4
4
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
@@ -10,4 +10,4 @@
|
|
10
10
|
ga('send', 'pageview');
|
11
11
|
</script>
|
12
12
|
<!-- End Google Analytics -->
|
13
|
-
{
|
13
|
+
{%- endif -%}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
{
|
1
|
+
{%- if site.mathjax == true or page.mathjax == true -%}
|
2
2
|
<script type="text/javascript" async
|
3
3
|
src="https://cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML">
|
4
4
|
</script>
|
5
|
-
{
|
5
|
+
{%- endif -%}
|
data/_layouts/all.html
CHANGED
@@ -8,42 +8,42 @@ titles:
|
|
8
8
|
---
|
9
9
|
<div class="m-all">
|
10
10
|
<div class="main">
|
11
|
-
{
|
11
|
+
{%- include snippets/page-title.html -%}
|
12
12
|
<h1 class="js-page-heading">{{ __return }}</h1>
|
13
|
-
{
|
13
|
+
{%- include blog/tags.html -%}
|
14
14
|
<!--group by year: http://stackoverflow.com/questions/19086284/jekyll-liquid-templating-how-to-group-blog-posts-by-year-->
|
15
15
|
<section class="js-year-wrapper">
|
16
|
-
{
|
17
|
-
{
|
18
|
-
{
|
19
|
-
{
|
16
|
+
{%- for post in site.posts -%}
|
17
|
+
{%- assign currentdate = post.date | date: '%Y' -%}
|
18
|
+
{%- if currentdate != date -%}
|
19
|
+
{%- unless forloop.first -%}</ul></section>{%- endunless -%}
|
20
20
|
<section id="{{ post.date | date: "%Y" }}">
|
21
21
|
<h2 class="year-title" id="year-{{ post.date | date: "%Y" }}">{{ currentdate }}</h2>
|
22
22
|
<ul class="year-list">
|
23
|
-
{
|
24
|
-
{
|
25
|
-
{
|
26
|
-
{
|
27
|
-
{
|
28
|
-
{
|
29
|
-
{
|
30
|
-
{
|
31
|
-
{
|
32
|
-
{
|
33
|
-
{
|
34
|
-
{
|
35
|
-
{
|
36
|
-
{
|
23
|
+
{%- assign date = currentdate -%}
|
24
|
+
{%- endif -%}
|
25
|
+
{%- assign _tags = '' -%}
|
26
|
+
{%- for tag in post.tags -%}
|
27
|
+
{%- assign _tag = tag | strip | url_encode -%}
|
28
|
+
{%- assign _tags = _tags | append: ',' | append: _tag -%}
|
29
|
+
{%- endfor -%}
|
30
|
+
{%- assign last = _tags | size | minus: 1 -%}
|
31
|
+
{%- assign _tags = _tags | slice: 1, last -%}
|
32
|
+
{%- assign __path = post.url -%}
|
33
|
+
{%- include snippets/prepend-baseurl.html -%}
|
34
|
+
{%- assign href = __return -%}
|
35
|
+
{%- assign __locale = site.data.locale.ARTICLE_LIST_DATE_FORMAT -%}
|
36
|
+
{%- include snippets/locale-to-string.html -%}
|
37
37
|
<li class="js-post-block" data-tag="{{ _tags }}">
|
38
38
|
<span class="post-date">{{ post.date | date: __return }}</span>
|
39
39
|
<a class="post-link" href="{{ href }}">{{ post.title }}</a>
|
40
40
|
</li>
|
41
|
-
{
|
42
|
-
{
|
41
|
+
{%- if forloop.last -%}</ul></section>{%- endif -%}
|
42
|
+
{%- endfor -%}
|
43
43
|
</section>
|
44
44
|
</div>
|
45
45
|
</div>
|
46
|
-
{
|
46
|
+
{%- include snippets/page-title.html -%}
|
47
47
|
<script type="text/javascript">
|
48
48
|
// function queryString is copied from
|
49
49
|
// http://stackoverflow.com/questions/979975/how-to-get-the-value-from-url-parameter#answer-979995
|
data/_layouts/blog-base.html
CHANGED
@@ -1,25 +1,25 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
{
|
2
|
+
{%- include snippets/get-lang.html -%}
|
3
3
|
<html lang="{{ __return }}">
|
4
4
|
<head>
|
5
|
-
{
|
6
|
-
{
|
7
|
-
{
|
8
|
-
{
|
5
|
+
{%- include common-head.html -%}
|
6
|
+
{%- include head-icons-rel.html -%}
|
7
|
+
{%- assign __path = '/assets/css/blog.css' -%}
|
8
|
+
{%- include snippets/prepend-baseurl.html -%}
|
9
9
|
<link rel="stylesheet" href="{{ __return }}">
|
10
10
|
<style>
|
11
|
-
{
|
11
|
+
{%- if page.picture_frame == 'shadow' -%}
|
12
12
|
.m-article-content img:not(.emoji) {
|
13
13
|
box-shadow: 0 0 5px rgba(0, 0, 0, .4);
|
14
14
|
}
|
15
|
-
{
|
15
|
+
{%- endif -%}
|
16
16
|
</style>
|
17
17
|
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
|
18
|
-
{
|
18
|
+
{%- include utils/mathjax.html -%}
|
19
19
|
</head>
|
20
20
|
<body>
|
21
21
|
<div class="m-page-stage js-page-stage">{{ content }}</div>
|
22
|
-
{
|
22
|
+
{%- include blog/footer.html -%}
|
23
23
|
<script>
|
24
24
|
$(function() {
|
25
25
|
// display coding language
|
@@ -28,8 +28,8 @@
|
|
28
28
|
});
|
29
29
|
});
|
30
30
|
</script>
|
31
|
-
{
|
32
|
-
{
|
33
|
-
{
|
31
|
+
{%- if ga_tracking_id and site.isdebug == false -%}
|
32
|
+
{%- include utils/google-analytics.html -%}
|
33
|
+
{%- endif -%}
|
34
34
|
</body>
|
35
35
|
</html>
|
data/_layouts/blog-default.html
CHANGED
data/_layouts/home.html
CHANGED
@@ -9,93 +9,93 @@ titles:
|
|
9
9
|
<div class="m-home">
|
10
10
|
<div class="main">
|
11
11
|
<div class="m-post-list">
|
12
|
-
{
|
12
|
+
{%- for post in paginator.posts -%}
|
13
13
|
<article>
|
14
|
-
{
|
15
|
-
{
|
16
|
-
{
|
14
|
+
{%- assign __path = post.url -%}
|
15
|
+
{%- include snippets/prepend-baseurl.html -%}
|
16
|
+
{%- assign href = __return -%}
|
17
17
|
<h1><a href="{{ href }}">{{ post.title }}</a></h1>
|
18
18
|
<div class="m-article-content">
|
19
|
-
{
|
19
|
+
{%- if site.excerpt_type == 'html' -%}
|
20
20
|
{{ post.excerpt }}
|
21
|
-
{
|
21
|
+
{%- else -%}
|
22
22
|
{{ post.excerpt | strip_html | truncate: 350 }}
|
23
|
-
{
|
23
|
+
{%- endif -%}
|
24
24
|
</div>
|
25
|
-
{
|
26
|
-
{
|
27
|
-
{
|
28
|
-
{
|
25
|
+
{%- assign __path = post.url -%}
|
26
|
+
{%- include snippets/prepend-baseurl.html -%}
|
27
|
+
{%- assign __locale = site.data.locale.READMORE -%}
|
28
|
+
{%- include snippets/locale-to-string.html -%}
|
29
29
|
<a href="{{ href }}">{{ __return }}</a>
|
30
|
-
{
|
30
|
+
{%- include blog/article-data.html -%}
|
31
31
|
</article>
|
32
|
-
{
|
32
|
+
{%- endfor -%}
|
33
33
|
</div>
|
34
|
-
{
|
34
|
+
{%- if paginator.total_pages > 1 -%}
|
35
35
|
<nav class="m-pagination">
|
36
|
-
{
|
37
|
-
{
|
38
|
-
{
|
39
|
-
{
|
36
|
+
{%- assign __locale = site.data.locale.STATISTICS -%}
|
37
|
+
{%- include snippets/locale-to-string.html -%}
|
38
|
+
{%- assign post_count = site.posts | size -%}
|
39
|
+
{%- assign page_count = paginator.total_pages -%}
|
40
40
|
<p>{{ __return | replace: '[POST_COUNT]', post_count | replace: '[PAGE_COUNT]', page_count }}</p>
|
41
41
|
<ul class="inline-list">
|
42
|
-
{
|
43
|
-
{
|
44
|
-
{
|
45
|
-
{
|
42
|
+
{%- if paginator.previous_page -%}
|
43
|
+
{%- assign __path = paginator.previous_page_path -%}
|
44
|
+
{%- include snippets/prepend-baseurl.html -%}
|
45
|
+
{%- assign href = __return -%}
|
46
46
|
<li><a class="round-button" href="{{ href }}">
|
47
|
-
<div class="icon icon--previous">{
|
47
|
+
<div class="icon icon--previous">{%- include icon/previous.svg -%}</div></a>
|
48
48
|
</li>
|
49
|
-
{
|
49
|
+
{%- else -%}
|
50
50
|
<li><div class="round-button inactive">
|
51
|
-
<div class="icon icon--prrevious">{
|
51
|
+
<div class="icon icon--prrevious">{%- include icon/previous.svg -%}</div></div>
|
52
52
|
</li>
|
53
|
-
{
|
54
|
-
{
|
55
|
-
{
|
53
|
+
{%- endif -%}
|
54
|
+
{%- for page in (1..paginator.total_pages) -%}
|
55
|
+
{%- if page == paginator.page -%}
|
56
56
|
<li>
|
57
57
|
<div class="round-button cur"><span>{{ page }}</span></div>
|
58
58
|
</li>
|
59
|
-
{
|
60
|
-
{
|
61
|
-
{
|
62
|
-
{
|
63
|
-
{
|
64
|
-
{
|
65
|
-
{
|
66
|
-
{
|
59
|
+
{%- elsif page == 1 -%}
|
60
|
+
{%- if site.paths.home -%}
|
61
|
+
{%- assign __path = site.paths.home -%}
|
62
|
+
{%- else -%}
|
63
|
+
{%- assign __path = '/' -%}
|
64
|
+
{%- endif -%}
|
65
|
+
{%- include snippets/prepend-baseurl.html -%}
|
66
|
+
{%- assign href = __return -%}
|
67
67
|
<li>
|
68
68
|
<a class="round-button" href="{{ href }}"><span>{{ page }}</span></a>
|
69
69
|
</li>
|
70
|
-
{
|
71
|
-
{
|
72
|
-
{
|
73
|
-
{
|
70
|
+
{%- else -%}
|
71
|
+
{%- assign __path = site.paginate_path -%}
|
72
|
+
{%- include snippets/prepend-baseurl.html -%}
|
73
|
+
{%- assign href = __return -%}
|
74
74
|
<li>
|
75
75
|
<a class="round-button" href="{{ href | replace: ':num', page }}"><span>{{ page }}</span></a>
|
76
76
|
</li>
|
77
|
-
{
|
78
|
-
{
|
79
|
-
{
|
80
|
-
{
|
81
|
-
{
|
82
|
-
{
|
77
|
+
{%- endif -%}
|
78
|
+
{%- endfor -%}
|
79
|
+
{%- if paginator.next_page -%}
|
80
|
+
{%- assign __path = paginator.next_page_path -%}
|
81
|
+
{%- include snippets/prepend-baseurl.html -%}
|
82
|
+
{%- assign href = __return -%}
|
83
83
|
<li>
|
84
84
|
<a class="round-button" href="{{ href }}">
|
85
|
-
<div class="icon icon--next">{
|
85
|
+
<div class="icon icon--next">{%- include icon/next.svg -%}</div>
|
86
86
|
</a>
|
87
87
|
</li>
|
88
|
-
{
|
88
|
+
{%- else -%}
|
89
89
|
<li><div class="round-button inactive">
|
90
|
-
<div class="icon icon--next">{
|
90
|
+
<div class="icon icon--next">{%- include icon/next.svg -%}</div>
|
91
91
|
</div></li>
|
92
|
-
{
|
92
|
+
{%- endif -%}
|
93
93
|
</ul>
|
94
94
|
</nav>
|
95
|
-
{
|
95
|
+
{%- endif -%}
|
96
96
|
</div>
|
97
97
|
</div>
|
98
|
-
{
|
98
|
+
{%- if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false -%}
|
99
99
|
<script src="https://cdn1.lncld.net/static/js/3.4.1/av-min.js"></script>
|
100
100
|
<script>
|
101
101
|
$(function() {
|
@@ -119,4 +119,4 @@ titles:
|
|
119
119
|
});
|
120
120
|
});
|
121
121
|
</script>
|
122
|
-
{
|
122
|
+
{%- endif -%}
|
data/_layouts/page.html
CHANGED
@@ -3,11 +3,11 @@ layout: blog-default
|
|
3
3
|
---
|
4
4
|
<div class="m-page">
|
5
5
|
<article class="main">
|
6
|
-
{
|
6
|
+
{%- include snippets/page-title.html -%}
|
7
7
|
<h1>{{ __return }}</h1>
|
8
8
|
<div class="m-article-content" itemprop="articleBody">{{ content }}</div>
|
9
|
-
{
|
10
|
-
<section>{
|
11
|
-
{
|
9
|
+
{%- if page.comment != false -%}
|
10
|
+
<section>{%- include utils/comment-disqus.html -%}</section>
|
11
|
+
{%- endif -%}
|
12
12
|
</article>
|
13
13
|
</div>
|
data/_layouts/post.html
CHANGED
@@ -7,31 +7,31 @@ layout: blog-default
|
|
7
7
|
<article itemscope itemtype="http://schema.org/BlogPosting">
|
8
8
|
<meta itemprop="mainEntityOfPage" itemscope itemType="https://schema.org/WebPage"/>
|
9
9
|
<header class="article-header">
|
10
|
-
{
|
10
|
+
{%- include snippets/page-title.html -%}
|
11
11
|
<h1 itemprop="headline" itemprop="name headline">{{ __return }}</h1>
|
12
|
-
{
|
12
|
+
{%- include blog/article-data.html -%}
|
13
13
|
</header>
|
14
14
|
<div class="m-article-content js-article-content" itemprop="articleBody">{{ content }}</div>
|
15
15
|
<footer>
|
16
|
-
{
|
17
|
-
{
|
18
|
-
{
|
19
|
-
{
|
20
|
-
{
|
21
|
-
{
|
16
|
+
{%- if page.modify_date -%}
|
17
|
+
{%- assign __locale = site.data.locale.ARTICLE_DATE_FORMAT -%}
|
18
|
+
{%- include snippets/locale-to-string.html -%}
|
19
|
+
{%- assign date_format = __return -%}
|
20
|
+
{%- assign __locale = site.data.locale.LAST_UPDATED -%}
|
21
|
+
{%- include snippets/locale-to-string.html -%}
|
22
22
|
<span>{{ __return }}
|
23
23
|
<time datetime="{{ page.modify_date | date_to_xmlschema }}" itemprop="dateModified">{{ page.modify_date | date: date_format }}</time>
|
24
24
|
</span>
|
25
|
-
{
|
25
|
+
{%- else -%}
|
26
26
|
<meta itemprop="dateModified" content="{{ page.date | date_to_xmlschema }}">
|
27
|
-
{
|
27
|
+
{%- endif -%}
|
28
28
|
<div class="article-license">
|
29
|
-
{
|
29
|
+
{%- include blog/license.html -%}
|
30
30
|
</div>
|
31
31
|
</footer>
|
32
|
-
{
|
33
|
-
<section>{
|
34
|
-
{
|
32
|
+
{%- if page.comment != false -%}
|
33
|
+
<section>{%- include utils/comment-disqus.html -%}</section>
|
34
|
+
{%- endif -%}
|
35
35
|
</article>
|
36
36
|
</div>
|
37
37
|
<div class="col-2">
|
@@ -146,7 +146,7 @@ layout: blog-default
|
|
146
146
|
});
|
147
147
|
});
|
148
148
|
</script>
|
149
|
-
{
|
149
|
+
{%- if page.key and site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false -%}
|
150
150
|
<script src="https://cdn1.lncld.net/static/js/3.4.1/av-min.js"></script>
|
151
151
|
<script type="text/javascript">
|
152
152
|
$(function() {
|
@@ -195,4 +195,4 @@ layout: blog-default
|
|
195
195
|
});
|
196
196
|
});
|
197
197
|
</script>
|
198
|
-
{
|
198
|
+
{%- endif -%}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-text-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kitian616
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|