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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30533e04b4ccca19b10cc4c3dfd56b394a74e6c8
4
- data.tar.gz: c6c295cf7952b29922b439642c0801798e9b0c59
3
+ metadata.gz: e8f2d075d52f39b7f1f666f33431d77c37616924
4
+ data.tar.gz: 821108795e874faecccd52c61a1ac6a8f3d87e07
5
5
  SHA512:
6
- metadata.gz: fdced7d66c8d90d381abb25cb0c28a2724fe5b5c2db51642ad6b0d51e9e0ff9f77a2e301a401e2580bc055bbb8ecbd04d76326228e438ad5dcfac7f9768b5790
7
- data.tar.gz: 50484da325aa9639401321cc8c491fbff1c5a10562ec35b2a1b06287d22b9a56c1f02fa1d8a08364c40478184ade308fd15cb4dcb03284fbb9ce8e111d439fed
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: '%b %d, %Y'
34
- zh: '%Y年 %m月%d日'
35
- zh-Hans: '%Y年 %m月%d日'
36
- zh-Hant: '%Y年 %m月%d日'
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: '%b %d'
40
- zh: '%m月%d日'
41
- zh-Hans: '%m月%d日'
42
- zh-Hant: '%m月%d日'
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: '[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] 頁。
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
- {% if page %}
2
+ {%- if page -%}
3
3
  <meta itemprop="author" itemscope itemtype="https://schema.org/Person">
4
- {% if page.author %}
4
+ {%- if page.author -%}
5
5
  <meta itemprop="name" content="{{ page.author }}"/>
6
- {% elsif site.author.name %}
6
+ {%- elsif site.author.name -%}
7
7
  <meta itemprop="name" content="{{ site.author.name }}"/>
8
- {% endif %}
8
+ {%- endif -%}
9
9
  </meta>
10
- {% endif %}
10
+ {%- endif -%}
11
11
 
12
- {% if post %}
13
- {% assign cur_page = post %}
14
- {% elsif page %}
15
- {% assign cur_page = page %}
16
- {% endif %}
17
- {% if cur_page.tags[0] %}
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
- {% 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 %}
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
- {% endfor %}
31
+ {%- endfor -%}
32
32
  </ul>
33
- {% endif %}
33
+ {%- endif -%}
34
34
  <div class="other-wrapper">
35
- {% if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class %}
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
- {% endif %}
40
+ {%- endif -%}
41
41
  <div class="date-wrapper">
42
- {% assign __locale = site.data.locale.ARTICLE_DATE_FORMAT } %}
43
- {% include snippets/locale-to-string.html %}
44
- {% if post %}
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
- {% elsif page %}
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
- {% endif %}
50
+ {%- endif -%}
51
51
  </div>
52
52
  </div>
53
53
  </div>
@@ -1,6 +1,6 @@
1
1
  <div class="m-page-footer js-page-footer">
2
2
  <div class="main">
3
- <aside> {% include info/follow-me.html %} </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
@@ -1,51 +1,66 @@
1
1
  <header class="m-page-header main clearfix">
2
- {% if site.paths.home %}
3
- {% assign __path = site.paths.home %}
4
- {% else %}
5
- {% assign __path = '/' %}
6
- {% endif %}
7
- {% include snippets/prepend-baseurl.html %}
8
- {% if site.title %}
9
- <a class="site-title" title="{% if site.description %}{{ site.description }}{% endif %}" href="{{ __return }}">{{ site.title }}</a>
10
- {% endif %}
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
- {% include logo/logo.svg %}
18
+ {%- include logo/logo.svg -%}
13
19
  </div>
14
20
  <nav>
15
21
  <ul class="inline-list">
16
- {% assign __path = '/' %}
17
- {% include snippets/prepend-baseurl.html %}
18
- {% assign href = __return %}
19
- {% assign __locale = site.data.locale.NAV.HOME %}
20
- {% include snippets/locale-to-string.html %}
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
- {% if site.paths.all %}
23
- {% assign __path = site.paths.all %}
24
- {% else %}
25
- {% assign __path = '/all.html' %}
26
- {% endif %}
27
- {% include snippets/prepend-baseurl.html %}
28
- {% assign href = __return %}
29
- {% assign __locale = site.data.locale.NAV.ALL %}
30
- {% include snippets/locale-to-string.html %}
31
- <li><a href="{{ href | append: "?tag=" | replace: '//', '/'}}">{{ __return }}</a></li>
32
- {% for list in site.nav_lists %}
33
- {% assign __path = list.url %}
34
- {% include snippets/prepend-baseurl.html %}
35
- {% assign href = __return %}
36
- {% assign __locale = list.titles %}
37
- {% include snippets/locale-to-string.html %}
38
- <li><a href="{{ href }}">{% if list.title %}{{ list.title }}{% else %}{{ __return }}{% endif %}</a></li>
39
- {% endfor %}
40
- {% if site.paths.rss %}
41
- {% assign __path = site.paths.rss %}
42
- {% else %}
43
- {% assign __path = '/feed.xml' %}
44
- {% endif %}
45
- {% include snippets/prepend-baseurl.html %}
46
- {% assign href = __return %}
47
- {% assign __locale = site.data.locale.NAV.RSS %}
48
- {% include snippets/locale-to-string.html %}
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>
@@ -1,26 +1,26 @@
1
1
  <div class="m-license">
2
- {% assign locale = site.data.locale %}
2
+ {%- assign locale = site.data.locale -%}
3
3
  <div class="clearfix">
4
- {% if site.repository and site.repository_tree %}
5
- {% assign __path = '/assets/images/octocat.jpg' %}
6
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __locale = locale.POST_ON_GITHUB %}
11
- {% include snippets/locale-to-string.html %}
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
- {% endif %}
14
- {% assign __locale = locale.LICENSE_ANNOUNCE %}
15
- {% include snippets/locale-to-string.html %}
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
- {% assign __path = '/assets/images/license-cc4.png' %}
18
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __locale = locale.LICENSE_INTRO %}
23
- {% include snippets/locale-to-string.html %}
22
+ {%- assign __locale = locale.LICENSE_INTRO -%}
23
+ {%- include snippets/locale-to-string.html -%}
24
24
  <p>{{ __return }}</p>
25
25
  </div>
26
26
  </div>
@@ -1,20 +1,20 @@
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 %}
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
- {% 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 %}
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
- {% endfor %}
51
+ {%- endfor -%}
52
52
  </ul>
53
53
  </div>
@@ -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
- {% 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 %}
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
- {% assign __path = '/assets/images/logo/icon-180x180.png' %}
3
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-167x167.png' %}
6
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-152x152.png' %}
9
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-120x120.png' %}
12
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-120x120.png' %}
15
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-192x192.png' %}
20
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __path = '/assets/images/logo/icon-144x144.png' %}
24
- {% include snippets/prepend-baseurl.html %}
23
+ {%- assign __path = '/assets/images/logo/icon-144x144.png' -%}
24
+ {%- include snippets/prepend-baseurl.html -%}
25
25
  <meta name="msapplication-TileImage" content="{{ __return }}">
26
- {% assign __path = '/assets/images/logo/icon-310x310.png' %}
27
- {% include snippets/prepend-baseurl.html %}
26
+ {%- assign __path = '/assets/images/logo/icon-310x310.png' -%}
27
+ {%- include snippets/prepend-baseurl.html -%}
28
28
  <meta name="msapplication-square310x310logo" content="{{ __return }}">
29
- {% assign __path = '/assets/images/logo/icon-310x150.png' %}
30
- {% include snippets/prepend-baseurl.html %}
29
+ {%- assign __path = '/assets/images/logo/icon-310x150.png' -%}
30
+ {%- include snippets/prepend-baseurl.html -%}
31
31
  <meta name="msapplication-wide310x150logo" content="{{ __return }}">
32
- {% assign __path = '/assets/images/logo/icon-150x150.png' %}
33
- {% include snippets/prepend-baseurl.html %}
32
+ {%- assign __path = '/assets/images/logo/icon-150x150.png' -%}
33
+ {%- include snippets/prepend-baseurl.html -%}
34
34
  <meta name="msapplication-square150x150logo" content="{{ __return }}">
35
- {% assign __path = '/assets/images/logo/icon-70x70.png' %}
36
- {% include snippets/prepend-baseurl.html %}
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
- {% assign __locale = site.data.locale.FOLLOW_ME %}
3
- {% include snippets/locale-to-string.html %}
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
- {% if site.author.weibo %}
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">{% include icon/social/weibo.svg %}</div>
11
+ <div class="icon">{%- include icon/social/weibo.svg -%}</div>
12
12
  </a>
13
13
  </div>
14
14
  </li>
15
- {% endif %}
16
- {% if site.author.facebook %}
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">{% include icon/social/facebook.svg %}</div>
20
+ <div class="icon">{%- include icon/social/facebook.svg -%}</div>
21
21
  </a>
22
22
  </div>
23
23
  </li>
24
- {% endif %}
25
- {% if site.author.twitter %}
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">{% include icon/social/twitter.svg %}</div>
29
+ <div class="icon">{%- include icon/social/twitter.svg -%}</div>
30
30
  </a>
31
31
  </div>
32
32
  </li>
33
- {% endif %}
34
- {% if site.author.googleplus %}
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">{% include icon/social/googleplus.svg %}</div>
38
+ <div class="icon">{%- include icon/social/googleplus.svg -%}</div>
39
39
  </a>
40
40
  </div>
41
41
  </li>
42
- {% endif %}
43
- {% if site.author.github %}
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">{% include icon/social/github.svg %}</div>
47
+ <div class="icon">{%- include icon/social/github.svg -%}</div>
48
48
  </a>
49
49
  </div>
50
50
  </li>
51
- {% endif %}
52
- {% if site.author.linkedin %}
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">{% include icon/social/linkedin.svg %}</div>
56
+ <div class="icon">{%- include icon/social/linkedin.svg -%}</div>
57
57
  </a>
58
58
  </div>
59
59
  </li>
60
- {% endif %}
61
- {% if site.author.douban %}
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">{% include icon/social/douban.svg %}</div>
65
+ <div class="icon">{%- include icon/social/douban.svg -%}</div>
66
66
  </a>
67
67
  </div>
68
68
  </li>
69
- {% endif %}
69
+ {%- endif -%}
70
70
  </ul>
71
- {% if site.author.email %}
72
- {% assign __locale = site.data.locale.EMAIL_ME %}
73
- {% include snippets/locale-to-string.html %}
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
- {% endif %}
77
+ {%- endif -%}
78
78
  </div>
@@ -1,6 +1,6 @@
1
- {% assign __return = '' %}
2
- {% if page.lang %}
3
- {% assign __return = page.lang %}
4
- {% else %}
5
- {% assign __return = site.lang %}
6
- {% endif %}
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
- {% 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
+ {%- 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
- {% 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
+ {%- 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
- {% assign __return = __path | replace:'index.html','' | prepend: site.baseurl | replace:'//','/' %}
1
+ {%- assign __return = __path | replace:'index.html','' | prepend: site.baseurl | replace:'//','/' -%}
@@ -1,4 +1,4 @@
1
- {% if site.disqus.shortname and page.key %}
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 = '{% include snippets/page-url.html %}';
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
- {% endif %}
22
+ {%- endif -%}
@@ -1,4 +1,4 @@
1
- {% if site.ga_tracking_id %}
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
- {% endif %}
13
+ {%- endif -%}
@@ -1,5 +1,5 @@
1
- {% if site.mathjax == true or page.mathjax == true %}
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
- {% endif %}
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
- {% include snippets/page-title.html %}
11
+ {%- include snippets/page-title.html -%}
12
12
  <h1 class="js-page-heading">{{ __return }}</h1>
13
- {% include blog/tags.html %}
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
- {% for post in site.posts %}
17
- {% assign currentdate = post.date | date: '%Y' %}
18
- {% if currentdate != date %}
19
- {% unless forloop.first %}</ul></section>{% endunless %}
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
- {% 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 %}
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
- {% if forloop.last %}</ul></section>{% endif %}
42
- {% endfor %}
41
+ {%- if forloop.last -%}</ul></section>{%- endif -%}
42
+ {%- endfor -%}
43
43
  </section>
44
44
  </div>
45
45
  </div>
46
- {% include snippets/page-title.html %}
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
@@ -1,25 +1,25 @@
1
1
  <!DOCTYPE html>
2
- {% include snippets/get-lang.html %}
2
+ {%- include snippets/get-lang.html -%}
3
3
  <html lang="{{ __return }}">
4
4
  <head>
5
- {% include common-head.html %}
6
- {% include head-icons-rel.html %}
7
- {% assign __path = '/assets/css/blog.css' %}
8
- {% include snippets/prepend-baseurl.html %}
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
- {% if page.picture_frame == 'shadow' %}
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
- {% endif %}
15
+ {%- endif -%}
16
16
  </style>
17
17
  <script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
18
- {% include utils/mathjax.html %}
18
+ {%- include utils/mathjax.html -%}
19
19
  </head>
20
20
  <body>
21
21
  <div class="m-page-stage js-page-stage">{{ content }}</div>
22
- {% include blog/footer.html %}
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
- {% if ga_tracking_id and site.isdebug == false %}
32
- {% include utils/google-analytics.html %}
33
- {% endif %}
31
+ {%- if ga_tracking_id and site.isdebug == false -%}
32
+ {%- include utils/google-analytics.html -%}
33
+ {%- endif -%}
34
34
  </body>
35
35
  </html>
@@ -2,6 +2,6 @@
2
2
  layout: blog-base
3
3
  ---
4
4
  <div class="m-page-content">
5
- {% include blog/header.html %}
5
+ {%- include blog/header.html -%}
6
6
  <div class="m-page-main">{{ content }}</div>
7
7
  </div>
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
- {% for post in paginator.posts %}
12
+ {%- for post in paginator.posts -%}
13
13
  <article>
14
- {% assign __path = post.url %}
15
- {% include snippets/prepend-baseurl.html %}
16
- {% assign href = __return %}
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
- {% if site.excerpt_type == 'html' %}
19
+ {%- if site.excerpt_type == 'html' -%}
20
20
  {{ post.excerpt }}
21
- {% else %}
21
+ {%- else -%}
22
22
  {{ post.excerpt | strip_html | truncate: 350 }}
23
- {% endif %}
23
+ {%- endif -%}
24
24
  </div>
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 %}
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
- {% include blog/article-data.html %}
30
+ {%- include blog/article-data.html -%}
31
31
  </article>
32
- {% endfor %}
32
+ {%- endfor -%}
33
33
  </div>
34
- {% if paginator.total_pages > 1 %}
34
+ {%- if paginator.total_pages > 1 -%}
35
35
  <nav class="m-pagination">
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 %}
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
- {% if paginator.previous_page %}
43
- {% assign __path = paginator.previous_page_path %}
44
- {% include snippets/prepend-baseurl.html %}
45
- {% assign href = __return %}
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">{% include icon/previous.svg %}</div></a>
47
+ <div class="icon icon--previous">{%- include icon/previous.svg -%}</div></a>
48
48
  </li>
49
- {% else %}
49
+ {%- else -%}
50
50
  <li><div class="round-button inactive">
51
- <div class="icon icon--prrevious">{% include icon/previous.svg %}</div></div>
51
+ <div class="icon icon--prrevious">{%- include icon/previous.svg -%}</div></div>
52
52
  </li>
53
- {% endif %}
54
- {% for page in (1..paginator.total_pages) %}
55
- {% if page == paginator.page %}
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
- {% 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 %}
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
- {% else %}
71
- {% assign __path = site.paginate_path %}
72
- {% include snippets/prepend-baseurl.html %}
73
- {% assign href = __return %}
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
- {% 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 %}
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">{% include icon/next.svg %}</div>
85
+ <div class="icon icon--next">{%- include icon/next.svg -%}</div>
86
86
  </a>
87
87
  </li>
88
- {% else %}
88
+ {%- else -%}
89
89
  <li><div class="round-button inactive">
90
- <div class="icon icon--next">{% include icon/next.svg %}</div>
90
+ <div class="icon icon--next">{%- include icon/next.svg -%}</div>
91
91
  </div></li>
92
- {% endif %}
92
+ {%- endif -%}
93
93
  </ul>
94
94
  </nav>
95
- {% endif %}
95
+ {%- endif -%}
96
96
  </div>
97
97
  </div>
98
- {% if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false %}
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
- {% endif %}
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
- {% include snippets/page-title.html %}
6
+ {%- include snippets/page-title.html -%}
7
7
  <h1>{{ __return }}</h1>
8
8
  <div class="m-article-content" itemprop="articleBody">{{ content }}</div>
9
- {% if page.comment != false %}
10
- <section>{% include utils/comment-disqus.html %}</section>
11
- {% endif %}
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
- {% include snippets/page-title.html %}
10
+ {%- include snippets/page-title.html -%}
11
11
  <h1 itemprop="headline" itemprop="name headline">{{ __return }}</h1>
12
- {% include blog/article-data.html %}
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
- {% 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 %}
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
- {% else %}
25
+ {%- else -%}
26
26
  <meta itemprop="dateModified" content="{{ page.date | date_to_xmlschema }}">
27
- {% endif %}
27
+ {%- endif -%}
28
28
  <div class="article-license">
29
- {% include blog/license.html %}
29
+ {%- include blog/license.html -%}
30
30
  </div>
31
31
  </footer>
32
- {% if page.comment != false %}
33
- <section>{% include utils/comment-disqus.html %}</section>
34
- {% endif %}
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
- {% if page.key and site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false %}
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
- {% endif %}
198
+ {%- endif -%}
@@ -20,6 +20,10 @@
20
20
  display: inline-block;
21
21
  list-style-type: none;
22
22
  vertical-align: bottom;
23
- margin: $content-gap / 6 0;
23
+ margin-top: $content-gap / 6;
24
+ margin-bottom: $content-gap / 6;
25
+ &:not(:last-child) {
26
+ margin-right: $spacing-unit / 8;
27
+ }
24
28
  }
25
29
  }
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.1
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-05 00:00:00.000000000 Z
11
+ date: 2017-12-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll