jekyll-text-theme-fork 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (224) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +235 -0
  3. data/LICENSE +21 -0
  4. data/README.md +89 -0
  5. data/_data/authors.yml +0 -0
  6. data/_data/licenses.yml +16 -0
  7. data/_data/locale.yml +169 -0
  8. data/_data/navigation.yml +52 -0
  9. data/_data/variables.yml +64 -0
  10. data/_includes/analytics-providers/custom.html +3 -0
  11. data/_includes/analytics-providers/google.html +14 -0
  12. data/_includes/analytics.html +7 -0
  13. data/_includes/article/footer/author-profile.html +47 -0
  14. data/_includes/article/footer/custom.html +3 -0
  15. data/_includes/article/footer/license.html +14 -0
  16. data/_includes/article/footer/subscribe.html +6 -0
  17. data/_includes/article/top/custom.html +3 -0
  18. data/_includes/article-footer.html +55 -0
  19. data/_includes/article-header.html +49 -0
  20. data/_includes/article-info.html +96 -0
  21. data/_includes/article-list.html +144 -0
  22. data/_includes/article-section-navigator.html +54 -0
  23. data/_includes/aside/toc.html +1 -0
  24. data/_includes/author-links.html +120 -0
  25. data/_includes/comments-providers/custom.html +3 -0
  26. data/_includes/comments-providers/disqus.html +22 -0
  27. data/_includes/comments-providers/gitalk.html +39 -0
  28. data/_includes/comments-providers/valine.html +46 -0
  29. data/_includes/comments.html +11 -0
  30. data/_includes/extensions/bilibili.html +5 -0
  31. data/_includes/extensions/codepen.html +4 -0
  32. data/_includes/extensions/netease-cloud-music.html +4 -0
  33. data/_includes/extensions/slideshare.html +6 -0
  34. data/_includes/extensions/soundcloud.html +4 -0
  35. data/_includes/extensions/ted.html +5 -0
  36. data/_includes/extensions/youtube.html +4 -0
  37. data/_includes/footer.html +37 -0
  38. data/_includes/head/custom.html +3 -0
  39. data/_includes/head/favicon.html +26 -0
  40. data/_includes/head.html +24 -0
  41. data/_includes/header.html +44 -0
  42. data/_includes/main/bottom/custom.html +3 -0
  43. data/_includes/main/top/custom.html +3 -0
  44. data/_includes/markdown-enhancements/chart.html +15 -0
  45. data/_includes/markdown-enhancements/mathjax.html +17 -0
  46. data/_includes/markdown-enhancements/mermaid.html +10 -0
  47. data/_includes/markdown-enhancements.html +17 -0
  48. data/_includes/pageview-providers/custom/home.html +3 -0
  49. data/_includes/pageview-providers/custom/post.html +3 -0
  50. data/_includes/pageview-providers/leancloud/home.html +35 -0
  51. data/_includes/pageview-providers/leancloud/leancloud.js +72 -0
  52. data/_includes/pageview-providers/leancloud/post.html +31 -0
  53. data/_includes/pageview.html +29 -0
  54. data/_includes/paginator.html +98 -0
  55. data/_includes/scripts/archieve.js +135 -0
  56. data/_includes/scripts/article.js +24 -0
  57. data/_includes/scripts/aside/affix.js +26 -0
  58. data/_includes/scripts/aside/toc.js +35 -0
  59. data/_includes/scripts/common.js +7 -0
  60. data/_includes/scripts/components/lightbox.js +49 -0
  61. data/_includes/scripts/components/search.js +86 -0
  62. data/_includes/scripts/components/sidebar.js +30 -0
  63. data/_includes/scripts/home.js +3 -0
  64. data/_includes/scripts/lib/affix.js +111 -0
  65. data/_includes/scripts/lib/gallery.js +192 -0
  66. data/_includes/scripts/lib/lazyload.js +143 -0
  67. data/_includes/scripts/lib/modal.js +64 -0
  68. data/_includes/scripts/lib/scroll-to.js +13 -0
  69. data/_includes/scripts/lib/swiper.js +203 -0
  70. data/_includes/scripts/lib/throttle.js +28 -0
  71. data/_includes/scripts/lib/toc.js +107 -0
  72. data/_includes/scripts/page.js +3 -0
  73. data/_includes/scripts/utils/imagesLoad.js +28 -0
  74. data/_includes/scripts/utils/utils.js +39 -0
  75. data/_includes/scripts/variables.html +35 -0
  76. data/_includes/search-providers/custom/search.html +3 -0
  77. data/_includes/search-providers/default/search-data.js +14 -0
  78. data/_includes/search-providers/default/search.html +18 -0
  79. data/_includes/search-providers/default/search.js +112 -0
  80. data/_includes/search-providers/google-custom-search-engine/search.html +21 -0
  81. data/_includes/search-providers/google-custom-search-engine/search.js +33 -0
  82. data/_includes/search.html +20 -0
  83. data/_includes/sharing-providers/addthis.html +9 -0
  84. data/_includes/sharing-providers/addtoany.html +10 -0
  85. data/_includes/sharing-providers/custom.html +3 -0
  86. data/_includes/sharing.html +7 -0
  87. data/_includes/sidebar/toc.html +25 -0
  88. data/_includes/snippets/assign.html +9 -0
  89. data/_includes/snippets/get-article-title.html +11 -0
  90. data/_includes/snippets/get-lang.html +6 -0
  91. data/_includes/snippets/get-locale-string.html +12 -0
  92. data/_includes/snippets/get-nav-url.html +8 -0
  93. data/_includes/snippets/get-sources.html +2 -0
  94. data/_includes/snippets/get-string-from-locale-config.html +7 -0
  95. data/_includes/snippets/is_collection.html +6 -0
  96. data/_includes/snippets/page-url.html +2 -0
  97. data/_includes/snippets/prepend-baseurl.html +4 -0
  98. data/_includes/snippets/prepend-path.html +1 -0
  99. data/_includes/svg/icon/social/behance.svg +3 -0
  100. data/_includes/svg/icon/social/douban.svg +5 -0
  101. data/_includes/svg/icon/social/facebook.svg +3 -0
  102. data/_includes/svg/icon/social/flicker.svg +5 -0
  103. data/_includes/svg/icon/social/github.svg +3 -0
  104. data/_includes/svg/icon/social/googleplus.svg +3 -0
  105. data/_includes/svg/icon/social/linkedin.svg +3 -0
  106. data/_includes/svg/icon/social/mail.svg +6 -0
  107. data/_includes/svg/icon/social/medium.svg +3 -0
  108. data/_includes/svg/icon/social/npm.svg +9 -0
  109. data/_includes/svg/icon/social/pinterest.svg +3 -0
  110. data/_includes/svg/icon/social/qq.svg +3 -0
  111. data/_includes/svg/icon/social/telegram.svg +4 -0
  112. data/_includes/svg/icon/social/twitter.svg +3 -0
  113. data/_includes/svg/icon/social/weibo.svg +6 -0
  114. data/_includes/svg/icon/social/weixin.svg +3 -0
  115. data/_includes/svg/icon/social/zhihu.svg +3 -0
  116. data/_includes/svg/logo.svg +8 -0
  117. data/_includes/tags.html +52 -0
  118. data/_layouts/404.html +13 -0
  119. data/_layouts/archive.html +40 -0
  120. data/_layouts/article.html +29 -0
  121. data/_layouts/articles.html +89 -0
  122. data/_layouts/base.html +25 -0
  123. data/_layouts/home.html +43 -0
  124. data/_layouts/landing.html +178 -0
  125. data/_layouts/none.html +1 -0
  126. data/_layouts/page.html +270 -0
  127. data/_sass/additional/_alert.scss +29 -0
  128. data/_sass/additional/_photo-frame.scss +17 -0
  129. data/_sass/additional/_tag.scss +21 -0
  130. data/_sass/animate/_fade-in-down.scss +10 -0
  131. data/_sass/animate/_fade-in-up.scss +10 -0
  132. data/_sass/animate/_fade-in.scss +8 -0
  133. data/_sass/common/_classes.scss +24 -0
  134. data/_sass/common/_function.scss +15 -0
  135. data/_sass/common/_print.scss +20 -0
  136. data/_sass/common/_reset.scss +174 -0
  137. data/_sass/common/_variables.scss +150 -0
  138. data/_sass/common/classes/_animation.scss +13 -0
  139. data/_sass/common/classes/_clearfix.scss +19 -0
  140. data/_sass/common/classes/_clickable.scss +159 -0
  141. data/_sass/common/classes/_display.scss +13 -0
  142. data/_sass/common/classes/_flex.scss +394 -0
  143. data/_sass/common/classes/_grid.scss +80 -0
  144. data/_sass/common/classes/_horizontal-rules.scss +14 -0
  145. data/_sass/common/classes/_link.scss +12 -0
  146. data/_sass/common/classes/_media.scss +17 -0
  147. data/_sass/common/classes/_overflow.scss +26 -0
  148. data/_sass/common/classes/_pseudo.scss +33 -0
  149. data/_sass/common/classes/_shadow.scss +22 -0
  150. data/_sass/common/classes/_spacing.scss +81 -0
  151. data/_sass/common/classes/_split-line.scss +24 -0
  152. data/_sass/common/classes/_text.scss +37 -0
  153. data/_sass/common/classes/_transform.scss +4 -0
  154. data/_sass/common/classes/_transition.scss +4 -0
  155. data/_sass/common/classes/_user-select.scss +6 -0
  156. data/_sass/common/components/_button.scss +163 -0
  157. data/_sass/common/components/_card.scss +103 -0
  158. data/_sass/common/components/_gallery.scss +21 -0
  159. data/_sass/common/components/_hero.scss +70 -0
  160. data/_sass/common/components/_image.scss +19 -0
  161. data/_sass/common/components/_item.scss +100 -0
  162. data/_sass/common/components/_menu.scss +67 -0
  163. data/_sass/common/components/_modal.scss +39 -0
  164. data/_sass/common/components/_swiper.scss +48 -0
  165. data/_sass/common/components/_toc.scss +124 -0
  166. data/_sass/components/_article-content.scss +221 -0
  167. data/_sass/components/_article-footer.scss +17 -0
  168. data/_sass/components/_article-header.scss +50 -0
  169. data/_sass/components/_article-info.scss +25 -0
  170. data/_sass/components/_article-list.scss +18 -0
  171. data/_sass/components/_author-links.scss +43 -0
  172. data/_sass/components/_author-profile.scss +26 -0
  173. data/_sass/components/_extensions.scss +35 -0
  174. data/_sass/components/_footer.scss +33 -0
  175. data/_sass/components/_header.scss +123 -0
  176. data/_sass/components/_lightbox.scss +7 -0
  177. data/_sass/components/_main.scss +28 -0
  178. data/_sass/components/_search.scss +186 -0
  179. data/_sass/components/_tags.scss +24 -0
  180. data/_sass/custom.scss +3 -0
  181. data/_sass/layout/_404.scss +14 -0
  182. data/_sass/layout/_archive.scss +5 -0
  183. data/_sass/layout/_article.scss +29 -0
  184. data/_sass/layout/_articles.scss +17 -0
  185. data/_sass/layout/_base.scss +6 -0
  186. data/_sass/layout/_home.scss +15 -0
  187. data/_sass/layout/_landing.scss +23 -0
  188. data/_sass/layout/_page.scss +165 -0
  189. data/_sass/skins/_chocolate.scss +74 -0
  190. data/_sass/skins/_dark.scss +74 -0
  191. data/_sass/skins/_default.scss +74 -0
  192. data/_sass/skins/_forest.scss +74 -0
  193. data/_sass/skins/_ocean.scss +74 -0
  194. data/_sass/skins/_orange.scss +74 -0
  195. data/_sass/skins/highlight/_default.scss +0 -0
  196. data/_sass/skins/highlight/_tomorrow-night-blue.scss +2 -0
  197. data/_sass/skins/highlight/_tomorrow-night-bright.scss +2 -0
  198. data/_sass/skins/highlight/_tomorrow-night-eighties.scss +2 -0
  199. data/_sass/skins/highlight/_tomorrow-night.scss +2 -0
  200. data/_sass/skins/highlight/_tomorrow.scss +2 -0
  201. data/_sass/skins/highlight/tomorrow/_default.scss +10 -0
  202. data/_sass/skins/highlight/tomorrow/_highlight.scss +74 -0
  203. data/_sass/skins/highlight/tomorrow/_night-blue.scss +10 -0
  204. data/_sass/skins/highlight/tomorrow/_night-bright.scss +10 -0
  205. data/_sass/skins/highlight/tomorrow/_night-eighties.scss +10 -0
  206. data/_sass/skins/highlight/tomorrow/_night.scss +10 -0
  207. data/assets/android-chrome-192x192.png +0 -0
  208. data/assets/android-chrome-512x512.png +0 -0
  209. data/assets/apple-touch-icon.png +0 -0
  210. data/assets/browserconfig.xml +9 -0
  211. data/assets/css/main.scss +74 -0
  212. data/assets/favicon-16x16.png +0 -0
  213. data/assets/favicon-32x32.png +0 -0
  214. data/assets/favicon.ico +0 -0
  215. data/assets/images/logo/logo.svg +8 -0
  216. data/assets/mstile-144x144.png +0 -0
  217. data/assets/mstile-150x150.png +0 -0
  218. data/assets/mstile-310x150.png +0 -0
  219. data/assets/mstile-310x310.png +0 -0
  220. data/assets/mstile-70x70.png +0 -0
  221. data/assets/safari-pinned-tab.svg +38 -0
  222. data/assets/search.js +3 -0
  223. data/assets/site.webmanifest +19 -0
  224. metadata +371 -0
@@ -0,0 +1,47 @@
1
+ {%- assign _author = include.author -%}
2
+
3
+ {%- if _author.type == 'organization' -%}
4
+ {%- assign _author_itemtype = 'http://schema.org/Organization' -%}
5
+ {%- else -%}
6
+ {%- assign _author_itemtype = 'http://schema.org/Person' -%}
7
+ {%- endif -%}
8
+
9
+ <div itemscope itemtype="{{ _author_itemtype }}" class="author-profile card card--flat item">
10
+ {%- if _author.avatar -%}
11
+ {%- if _author.url -%}
12
+ <a href="{{ _author.url }}" class="item__image">
13
+ {%- endif -%}
14
+ {%- include snippets/get-nav-url.html path=_author.avatar -%}
15
+ {%- assign _author_avatar = __return -%}
16
+ <img class="author-profile__avatar" itemprop="image" src="{{ _author_avatar }}" />
17
+ {%- if _author.url -%}
18
+ </a>
19
+ {%- endif -%}
20
+ {%- endif -%}
21
+
22
+
23
+ <div class="item__content">
24
+
25
+ {%- if _author.name -%}
26
+ <meta itemprop="name" content="{{ _author.name }}">
27
+ <p class="author-profile__name">
28
+ {%- if _author.url -%}
29
+ <meta itemprop="url" content="{{ _author.url }}">
30
+ <a href="{{ _author.url }}">
31
+ {%- endif -%}
32
+ {{ _author.name }}
33
+ {%- if _author.url -%}
34
+ </a>
35
+ {%- endif -%}
36
+ </p>
37
+ {%- endif -%}
38
+
39
+ {%- if _author.bio -%}
40
+ <p itemprop="description">{{ _author.bio }}</p>
41
+ {%- endif -%}
42
+ <div class="author-profile__links">
43
+ {%- include author-links.html author=_author -%}
44
+ </div>
45
+
46
+ </div>
47
+ </div>
@@ -0,0 +1,3 @@
1
+ <!-- start custom article footer snippet -->
2
+
3
+ <!-- end custom article footer snippet -->
@@ -0,0 +1,14 @@
1
+ {%- include snippets/get-locale-string.html key='LICENSE_ANNOUNCE' -%}
2
+ {%- assign _license_announce = __return -%}
3
+
4
+ {%- if include.license -%}
5
+
6
+ {%-assign _license_name = '<a itemprop="license" rel="license" href="[URL]">[NAME]</a>' | replace: "[URL]", include.license.url | replace: "[NAME]", include.license.name -%}
7
+ <div class="license">
8
+ <p>{{ _license_announce | replace: "[LICENSE]", _license_name }}
9
+ <a rel="license" href="{{ include.license.url }}">
10
+ <img alt="{{ include.license.name }}" src="{{ include.license.image }}" />
11
+ </a>
12
+ </p>
13
+ </div>
14
+ {%- endif -%}
@@ -0,0 +1,6 @@
1
+ {%- assign _paths_rss = site.paths.rss | default: site.data.variables.default.paths.rss -%}
2
+ {%- include snippets/get-nav-url.html path=_paths_rss -%}
3
+ {%- assign _paths_rss = __return -%}
4
+ {%- include snippets/get-locale-string.html key='SUBSCRIBE' -%}
5
+ {%- assign _locale_nav_subscribe = __return -%}
6
+ <div class="subscribe"><i class="fas fa-rss"></i> <a type="application/rss+xml" href="{{ _paths_rss }}">{{ _locale_nav_subscribe }}</a></div>
@@ -0,0 +1,3 @@
1
+ <!-- start custom article top snippet -->
2
+
3
+ <!-- end custom article top snippet -->
@@ -0,0 +1,55 @@
1
+ {%- include snippets/assign.html
2
+ target=site.data.variables.default.page.show_author_profile
3
+ source0=layout.show_author_profile source1=page.show_author_profile -%}
4
+ {%- assign _show_author_profile = __return -%}
5
+
6
+ {%- include snippets/assign.html
7
+ target=site.data.variables.default.page.show_subscribe
8
+ source0=layout.show_subscribe source1=page.show_subscribe -%}
9
+ {%- assign _show_subscribe = __return -%}
10
+
11
+ {%- include snippets/assign.html
12
+ target=site.data.variables.default.page.license
13
+ source0=layout.license source1=page.license -%}
14
+ {%- assign _license = __return -%}
15
+
16
+ <footer class="article__footer">
17
+ {%- if page.modify_date -%}
18
+ {%- include snippets/get-locale-string.html key='ARTICLE_DATE_FORMAT' -%}
19
+ {%- assign _locale_date_format = __return -%}
20
+
21
+ {%- include snippets/get-locale-string.html key='LAST_UPDATED' -%}
22
+ {%- assign _locale_last_update = __return -%}
23
+ <span>{{ _locale_last_update }}
24
+ <time itemprop="dateModified" datetime="{{ page.modify_date | date_to_xmlschema }}">{{ page.modify_date | date: _locale_date_format }}</time>
25
+ </span>
26
+ {%- elsif page.date -%}
27
+ <meta itemprop="dateModified" content="{{ page.date | date_to_xmlschema }}">
28
+ {%- endif -%}
29
+
30
+ {%- include article/footer/custom.html -%}
31
+
32
+ {%- if _show_author_profile -%}
33
+ {%- if page.author -%}
34
+ {%- assign _author = site.data.authors[page.author] -%}
35
+ {%- else -%}
36
+ {%- assign _author = site.author -%}
37
+ {%- endif -%}
38
+ {%- include article/footer/author-profile.html author=_author -%}
39
+ {%- endif -%}
40
+
41
+ {%- if _show_subscribe -%}
42
+ <div class="article__subscribe">{%- include article/footer/subscribe.html -%}</div>
43
+ {%- endif -%}
44
+
45
+ {%- if _license != false -%}
46
+ {%- assign _data_license = site.data.licenses-%}
47
+ {%- if site.license -%}
48
+ {%- assign _license_data = _data_license[site.license] -%}
49
+ {%- endif -%}
50
+ {%- if _license != true -%}
51
+ {%- assign _license_data = _data_license[_license] -%}
52
+ {%- endif -%}
53
+ <div class="article__license">{%- include article/footer/license.html license=_license_data -%}</div>
54
+ {%- endif -%}
55
+ </footer>
@@ -0,0 +1,49 @@
1
+ {%- include snippets/get-article-title.html article=include.article-%}
2
+ {%- assign _article_title = __return -%}
3
+
4
+ {%- if include.html != false -%}
5
+
6
+ {%- include snippets/assign.html
7
+ target=site.data.variables.default.page.show_title
8
+ source0=layout.show_title source1=include.article.show_title -%}
9
+ {%- assign _show_title = __return -%}
10
+
11
+ {%- include snippets/assign.html
12
+ target=site.data.variables.default.page.show_edit_on_github
13
+ source0=layout.show_edit_on_github source1=include.article.show_edit_on_github -%}
14
+ {%- assign _show_edit_on_github = __return -%}
15
+
16
+ {%- if _show_title or _show_edit_on_github -%}
17
+ <div class="article__header">
18
+ {%- if _show_title -%}
19
+ <header><h1>{{ _article_title }}</h1></header>
20
+ {%- endif -%}
21
+ {%- if _show_edit_on_github -%}
22
+ {%- if site.repository and site.repository_tree -%}
23
+ {%- include snippets/is_collection.html page=include.article -%}
24
+ {%- assign _is_article_collection = __return -%}
25
+ {%- include snippets/get-locale-string.html key='POST_ON_GITHUB' -%}
26
+ {%- assign _locale_post_on_github = __return -%}
27
+ {%- if _is_article_collection -%}
28
+ {%- include snippets/prepend-path.html path=include.article.path prepend_path=site.collections_dir -%}
29
+ {%- assign _article_path = __return -%}
30
+ {%- else -%}
31
+ {%- assign _article_path = include.article.path -%}
32
+ {%- endif -%}
33
+ {%- assign _github_path = site.repository | append: '/tree/' | append: site.repository_tree | append: '/' | append: _article_path | replace:'//','/' -%}
34
+ <span class="split-space">&nbsp;</span>
35
+ <a class="edit-on-github"
36
+ title="{{ _locale_post_on_github }}"
37
+ href="https://github.com/{{ _github_path }}">
38
+ <i class="far fa-edit"></i></a>
39
+ {%- endif -%}
40
+ {%- endif -%}
41
+ </div>
42
+ {%- else -%}
43
+ <header style="display:none;"><h1>{{ _article_title }}</h1></header>
44
+ {%- endif -%}
45
+ {%- endif -%}
46
+
47
+ {%- if include.semantic != false -%}
48
+ <meta itemprop="headline" content="{{ _article_title }}">
49
+ {%- endif -%}
@@ -0,0 +1,96 @@
1
+ {%- assign _author = site.data.authors[include.article.author] | default: site.author -%}
2
+
3
+ {%- if include.html != false -%}
4
+
5
+ {%- include snippets/assign.html
6
+ target=site.data.variables.default.page.show_date
7
+ source0=layout.show_date source1=include.article.show_date -%}
8
+ {%- assign _show_date = __return -%}
9
+ {%- if _show_date and include.article.date -%}
10
+ {%- assign _show_date = true -%}
11
+ {%- else -%}
12
+ {%- assign _show_date = false -%}
13
+ {%- endif -%}
14
+
15
+ {%- include snippets/assign.html
16
+ target=site.data.variables.default.page.show_tags
17
+ source0=layout.show_tags source1=include.article.show_tags -%}
18
+ {%- assign _show_tags = __return -%}
19
+ {%- if _show_tags and include.article.tags[0] -%}
20
+ {%- assign _show_tags = true -%}
21
+ {%- else -%}
22
+ {%- assign _show_tags = false -%}
23
+ {%- endif -%}
24
+
25
+ {%- assign _show_author = include.article.author -%}
26
+
27
+ {%- include snippets/assign.html target=site.data.variables.default.page.pageview
28
+ source0=layout.pageview source1=page.pageview -%}
29
+ {%- assign _pageview = __return -%}
30
+ {%- if _pageview or include.show_pageview -%}
31
+ {%- assign _pageview = true -%}
32
+ {%- else -%}
33
+ {%- assign _pageview = false -%}
34
+ {%- endif -%}
35
+
36
+ {%- assign _paths_archive = site.paths.archive | default: site.data.variables.default.paths.archive -%}
37
+
38
+ {%- if _show_tags or _show_author or _show_date or _pageview -%}
39
+ <div class="article__info clearfix">
40
+ {%- if _show_tags -%}
41
+
42
+ <ul class="left-col menu">
43
+ {%- assign _tag_path = _paths_archive | append: '?tag=' -%}
44
+ {%- include snippets/prepend-baseurl.html path=_tag_path -%}
45
+
46
+ {%- for _tag in include.article.tags -%}
47
+ {%- assign _tag_path = __return -%}
48
+ {%- assign _tag_encode = _tag | strip | url_encode } -%}
49
+ <li>
50
+ <a class="button button--secondary button--pill button--sm"
51
+ href="{{ _tag_path | append: _tag_encode | replace: '//', '/' }}">{{ _tag }}</a>
52
+ </li>
53
+ {%- endfor -%}
54
+ </ul>
55
+ {%- endif -%}
56
+
57
+ {%- if _show_author or _show_date or _pageview -%}
58
+ <ul class="right-col menu">
59
+ {%- if _show_author -%}
60
+ <li><i class="fas fa-user"></i> <span>{{ _author.name }}</span></li>
61
+ {%- endif -%}
62
+
63
+ {%- if _show_date -%}
64
+ <li>
65
+ {%- include snippets/get-locale-string.html key='ARTICLE_DATE_FORMAT' -%}
66
+ <i class="far fa-calendar-alt"></i> <span>{{ include.article.date | date: __return }}</span>
67
+ </li>
68
+ {%- endif -%}
69
+
70
+ {%- if _pageview -%}
71
+ {%- if site.pageview.provider -%}
72
+ {%- include snippets/get-locale-string.html key='VIEWS' -%}
73
+ {%- assign _locale_views = __return -%}
74
+ <li><i class="far fa-eye"></i> <span class="js-pageview" data-page-key="{{ include.article.key }}">0</span> {{ _locale_views }}</li>
75
+ {%- endif -%}
76
+ {%- endif -%}
77
+ </ul>
78
+ {%- endif -%}
79
+
80
+ </div>
81
+ {%- endif -%}
82
+ {%- endif -%}
83
+
84
+
85
+ {%- if include.semantic != false -%}
86
+ {%- if _author -%}
87
+ <meta itemprop="author" content="{{ _author.name }}"/>
88
+ {%- endif -%}
89
+ {%- if include.article.date -%}
90
+ <meta itemprop="datePublished" content="{{ include.article.date | date_to_xmlschema }}">
91
+ {%- endif -%}
92
+ {%- if include.article.tags[0] -%}
93
+ {%- assign _keywords = include.article.tags | join: ',' %}
94
+ <meta itemprop="keywords" content="{{ _keywords }}">
95
+ {%- endif -%}
96
+ {%- endif -%}
@@ -0,0 +1,144 @@
1
+ {%- assign _excerpt_truncate = include.excerpt_truncate | default: 350 -%}
2
+
3
+ {%- assign _excerpt_type = include.excerpt_type -%}
4
+
5
+ {%- include snippets/get-locale-string.html key='READMORE' -%}
6
+ {%- assign _locale_readmore = __return -%}
7
+
8
+ {%- assign _sorted_list = include.articles -%}
9
+ {%- if include.group_by == 'year' -%}
10
+ {%- assign _sorted_list = _sorted_list | sort: 'date' -%}
11
+ {%- endif -%}
12
+ {%- if include.reverse -%}
13
+ {%- assign _sorted_list = _sorted_list | reverse -%}
14
+ {%- endif -%}
15
+
16
+ {%- if include.type == 'item' -%}
17
+ <div class="article-list items items--divided">
18
+ {%- elsif include.type == 'brief' -%}
19
+ <div class="article-list items">
20
+ {%- elsif include.type == 'grid' -%}
21
+ {%- if include.size == 'sm' -%}
22
+ <div class="article-list grid grid--sm grid--p-3">
23
+ {%- else -%}
24
+ <div class="article-list grid grid--p-3">
25
+ {%- endif -%}
26
+ {%- endif -%}
27
+
28
+ {%- for _article in _sorted_list -%}
29
+
30
+ {%- include snippets/prepend-baseurl.html path=_article.url -%}
31
+ {%- assign _article_url = __return -%}
32
+
33
+ {%- if _article.cover -%}
34
+ {%- include snippets/get-nav-url.html path=_article.cover -%}
35
+ {%- assign _article_cover = __return -%}
36
+ {%- endif -%}
37
+
38
+ {%- if include.type == 'item' -%}
39
+ {%- if include.article_type == 'BlogPosting' -%}
40
+ <article class="item" itemscope itemtype="http://schema.org/BlogPosting">
41
+ {%- else -%}
42
+ <article class="item">
43
+ {%- endif -%}
44
+ {%- if _article.cover and include.show_cover-%}
45
+ {%- include snippets/get-nav-url.html path=_article.cover -%}
46
+ {%- assign _article_cover = __return -%}
47
+ <div class="item__image">
48
+ {%- if include.cover_size == 'lg' -%}
49
+ <img class="image image--lg" src="{{ _article_cover }}" />
50
+ {%- elsif include.cover_size == 'sm' -%}
51
+ <img class="image image--sm" src="{{ _article_cover }}" />
52
+ {%- else -%}
53
+ <img class="image" src="{{ _article_cover }}" />
54
+ {%- endif -%}
55
+ </div>
56
+ {%- endif -%}
57
+ <div class="item__content">
58
+ <header><a href="{{ _article_url }}"><h2 itemprop="headline" class="item__header">{{ _article.title }}</h2></a></header>
59
+ <div class="item__description">
60
+ {%- if _article.excerpt and include.show_excerpt -%}
61
+ <div class="article__content" itemprop="description articleBody">
62
+ {%- if _excerpt_type == 'html' -%}
63
+ {{ _article.excerpt }}
64
+ {%- else -%}
65
+ {{ _article.excerpt | strip_html | strip | truncate: _excerpt_truncate }}
66
+ {%- endif -%}
67
+ </div>
68
+ {%- endif -%}
69
+ {%- if include.show_readmore -%}
70
+ <p><a href="{{ _article_url }}">{{ _locale_readmore }}</a></p>
71
+ {%- endif -%}
72
+ </div>
73
+ {%- if include.show_info -%}
74
+ {%- include snippets/assign.html target=site.data.variables.default.page.pageview
75
+ source0=_article.pageview -%}
76
+ {%- assign _show_pageview = __return -%}
77
+ {%- include article-info.html article=_article show_pageview=_show_pageview -%}
78
+ {%- endif -%}
79
+ </div>
80
+ </article>
81
+
82
+
83
+ {%- elsif include.type == 'brief' -%}
84
+ {%- assign _tags = '' -%}
85
+ {%- for _tag in _article.tags -%}
86
+ {%- assign _tag_encode = _tag | strip | url_encode -%}
87
+ {%- if forloop.last -%}
88
+ {%- assign _tags = _tags | append: _tag_encode -%}
89
+ {%- else -%}
90
+ {%- assign _tags = _tags | append: _tag_encode | append: ',' -%}
91
+ {%- endif -%}
92
+ {%- endfor -%}
93
+ {%- if include.group_by == 'year' -%}
94
+ {%- assign _currentdate = _article.date | date: '%Y' -%}
95
+ {%- if _currentdate != _date -%}
96
+ {%- unless forloop.first -%}</ul></section>{%- endunless -%}
97
+ <section><h2 class="article-list__group-header">{{ _currentdate }}</h2><ul class="items">
98
+ {%- assign _date = _currentdate -%}
99
+ {%- endif -%}
100
+ {%- endif -%}
101
+ {%- include snippets/get-locale-string.html key='ARTICLE_LIST_DATE_FORMAT' -%}
102
+ <li class="item" itemscope itemtype="http://schema.org/BlogPosting" data-tags="{{ _tags }}">
103
+ <div class="item__content">
104
+ {%- if include.show_info -%}
105
+ <span class="item__meta">{{ _article.date | date: __return }}</span>
106
+ {%- endif -%}
107
+ <a itemprop="headline" class="item__header" href="{{ _article_url }}">{{ _article.title }}</a></div>
108
+ </li>
109
+
110
+ {%- elsif include.type == 'grid' -%}
111
+ {%- if include.size == 'sm' -%}
112
+ <div class="cell cell--12 cell--md-4 cell--lg-3">
113
+ <div class="card card--flat">
114
+ {%- if _article.cover -%}
115
+ <div class="card__image">
116
+ <img class="image" src="{{ _article_cover }}" />
117
+ <div class="overlay overlay--bottom">
118
+ <header>
119
+ <a href="{{ _article_url }}"><h2 class="card__header">{{ _article.title }}</h2></a>
120
+ </header>
121
+ </div>
122
+ </div>
123
+ {%- endif -%}
124
+ </div>
125
+ </div>
126
+ {%- else -%}
127
+
128
+ <div class="cell cell--12 cell--md-6 cell--lg-4">
129
+ <div class="card card--flat">
130
+ {%- if _article.cover -%}
131
+ <div class="card__image"><img src="{{ _article_cover }}" /></div>
132
+ {%- endif -%}
133
+ <div class="card__content">
134
+ <header>
135
+ <a href="{{ _article_url }}"><h2 class="card__header">{{ _article.title }}</h2></a>
136
+ </header>
137
+ </div>
138
+ </div>
139
+ </div>
140
+ {%- endif -%}
141
+ {%- endif -%}
142
+ {%- endfor -%}
143
+
144
+ </div>
@@ -0,0 +1,54 @@
1
+ {%- if page.sidebar.nav -%}
2
+ {%- assign _sidebar_nav = site.data.navigation[page.sidebar.nav] -%}
3
+ {%- if _sidebar_nav -%}
4
+ {%- assign _find_cur = false -%}
5
+ {%- assign _find_next = false -%}
6
+
7
+ {%- for _item in _sidebar_nav -%}
8
+ {%- if _find_next -%} {%- break -%} {%- endif -%}
9
+ {%- if _item.children -%}
10
+
11
+ {%- for _child in _item.children -%}
12
+ {%- include snippets/get-nav-url.html path=_child.url -%}
13
+ {%- assign _nav_url = __return -%}
14
+ {%- include snippets/get-nav-url.html path=page.url -%}
15
+ {%- assign _page_url = __return -%}
16
+
17
+ {%- if _nav_url == _page_url -%}
18
+ {%- assign _find_cur = true -%}
19
+ {%- elsif _find_cur and _find_next != true -%}
20
+ {%- assign _find_next = true -%}
21
+ {%- assign _next = _child -%}
22
+ {%- break -%}
23
+ {%- else -%}
24
+ {%- assign _previous = _child -%}
25
+ {%- endif -%}
26
+ {%- endfor -%}
27
+
28
+ {%- endif -%}
29
+ {%- endfor -%}
30
+ {%- endif -%}
31
+
32
+ {%- else -%}
33
+ {%- assign _previous = page.previous -%}
34
+ {%- assign _next = page.next -%}
35
+ {%- endif -%}
36
+
37
+ {%- if _next or _previous -%}
38
+ <div class="article__section-navigator clearfix">
39
+ {%- if _previous -%}
40
+ {%- include snippets/prepend-baseurl.html path=_previous.url -%}
41
+ {%- assign _href = __return -%}
42
+ {%- include snippets/get-locale-string.html key='PREVIOUS' -%}
43
+ {%- assign _locale_previous = __return -%}
44
+ <div class="previous"><span>{{ _locale_previous }}</span><a href="{{ _href }}">{{ _previous.title }}</a></div>
45
+ {%- endif -%}
46
+ {%- if _next -%}
47
+ {%- include snippets/prepend-baseurl.html path=_next.url -%}
48
+ {%- assign _href = __return -%}
49
+ {%- include snippets/get-locale-string.html key='NEXT' -%}
50
+ {%- assign _locale_next = __return -%}
51
+ <div class="next"><span>{{ _locale_next }}</span><a href="{{ _href }}">{{ _next.title }}</a></div>
52
+ {%- endif -%}
53
+ </div>
54
+ {%- endif -%}
@@ -0,0 +1 @@
1
+ <div class="toc-aside js-toc-root"></div>
@@ -0,0 +1,120 @@
1
+ {%- assign _author = include.author -%}
2
+
3
+ <div class="author-links">
4
+ <ul class="menu menu--nowrap menu--inline">
5
+
6
+ {%- if _author.url -%}
7
+ <link itemprop="url" href="{{ _author.url }}">
8
+ {%- endif -%}
9
+
10
+ {%- if _author.type == 'organization' -%}
11
+ {%- include snippets/get-locale-string.html key='EMAIL_US' -%}
12
+ {%- assign _locale_string_email = __return -%}
13
+ {%- include snippets/get-locale-string.html key='FOLLOW_US' -%}
14
+ {%- assign _locale_string_follow = __return -%}
15
+ {%- else -%}
16
+ {%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
17
+ {%- assign _locale_string_email = __return -%}
18
+ {%- include snippets/get-locale-string.html key='FOLLOW_ME' -%}
19
+ {%- assign _locale_string_follow = __return -%}
20
+ {%- endif -%}
21
+
22
+ {%- include snippets/get-locale-string.html key='EMAIL_ME' -%}
23
+ {%- if _author.email -%}
24
+ <li title="{{ _locale_string_email }}">
25
+ <a class="button button--circle mail-button" itemprop="email" href="mailto:{{ _author.email }}" target="_blank">
26
+ <i class="fas fa-envelope"></i>
27
+ </a>
28
+ {%- endif -%}
29
+
30
+
31
+ {%- if _author.facebook -%}
32
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Facebook' }}">
33
+ <a class="button button--circle facebook-button" itemprop="sameAs" href="https://www.facebook.com/{{ _author.facebook }}" target="_blank">
34
+ <div class="icon">{%- include svg/icon/social/facebook.svg -%}</div>
35
+ </a>
36
+ </li>
37
+ {%- endif -%}
38
+
39
+ {%- if _author.twitter -%}
40
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Twitter' }}">
41
+ <a class="button button--circle twitter-button" itemprop="sameAs" href="https://twitter.com/{{ _author.twitter }}" target="_blank">
42
+ <div class="icon">{%- include svg/icon/social/twitter.svg -%}</div>
43
+ </a>
44
+ </li>
45
+ {%- endif -%}
46
+
47
+ {%- if _author.weibo -%}
48
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Weibo' }}">
49
+ <a class="button button--circle weibo-button" itemprop="sameAs" href="https://weibo.com/{{ _author.weibo }}" target="_blank">
50
+ <div class="icon">{%- include svg/icon/social/weibo.svg -%}</div>
51
+ </a>
52
+ </li>
53
+ {%- endif -%}
54
+
55
+ {%- if _author.googleplus -%}
56
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Google+' }}">
57
+ <a class="button button--circle googlepluse-button" itemprop="sameAs" href="https://plus.google.com/u/0/{{ _author.googleplus }}" target="_blank">
58
+ <div class="icon">{%- include svg/icon/social/googleplus.svg -%}</div>
59
+ </a>
60
+ </li>
61
+ {%- endif -%}
62
+
63
+ {%- if _author.telegram -%}
64
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Telegram' }}">
65
+ <a class="button button--circle telegram-button" itemprop="sameAs" href="https://t.me/{{ _author.telegram }}" target="_blank">
66
+ <div class="icon">{%- include svg/icon/social/telegram.svg -%}</div>
67
+ </a>
68
+ </li>
69
+ {%- endif -%}
70
+
71
+ {%- if _author.medium -%}
72
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Medium' }}">
73
+ <a class="button button--circle medium-button" itemprop="sameAs" href="https://medium.com/{{ _author.medium }}" target="_blank">
74
+ <div class="icon">{%- include svg/icon/social/medium.svg -%}</div>
75
+ </a>
76
+ </li>
77
+ {%- endif -%}
78
+
79
+ {%- if _author.zhihu -%}
80
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Zhihu' }}">
81
+ <a class="button button--circle zhihu-button" itemprop="sameAs" href="https://www.zhihu.com/people/{{ _author.zhihu }}" target="_blank">
82
+ <div class="icon">{%- include svg/icon/social/zhihu.svg -%}</div>
83
+ </a>
84
+ </li>
85
+ {%- endif -%}
86
+
87
+ {%- if _author.douban -%}
88
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Douban' }}">
89
+ <a class="button button--circle douban-button" itemprop="sameAs" href="https://www.douban.com/people/{{ _author.douban }}" target="_blank">
90
+ <div class="icon">{%- include svg/icon/social/douban.svg -%}</div>
91
+ </a>
92
+ </li>
93
+ {%- endif -%}
94
+
95
+ {%- if _author.linkedin -%}
96
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Linkedin' }}">
97
+ <a class="button button--circle linkedin-button" itemprop="sameAs" href="https://www.linkedin.com/in/{{ _author.linkedin }}" target="_blank">
98
+ <div class="icon">{%- include svg/icon/social/linkedin.svg -%}</div>
99
+ </a>
100
+ </li>
101
+ {%- endif -%}
102
+
103
+ {%- if _author.github -%}
104
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'Github' }}">
105
+ <a class="button button--circle github-button" itemprop="sameAs" href="https://github.com/{{ _author.github }}" target="_blank">
106
+ <div class="icon">{%- include svg/icon/social/github.svg -%}</div>
107
+ </a>
108
+ </li>
109
+ {%- endif -%}
110
+
111
+ {%- if _author.npm -%}
112
+ <li title="{{ _locale_string_follow | replace: '[NAME]', 'npm' }}">
113
+ <a class="button button--circle npm-button" itemprop="sameAs" href="https://www.npmjs.com/~{{ _author.npm }}" target="_blank">
114
+ <div class="icon">{%- include svg/icon/social/npm.svg -%}</div>
115
+ </a>
116
+ </li>
117
+ {%- endif -%}
118
+
119
+ </ul>
120
+ </div>
@@ -0,0 +1,3 @@
1
+ <!-- start custom comments snippet -->
2
+
3
+ <!-- end custom comments snippet -->
@@ -0,0 +1,22 @@
1
+ {%- if page.key and
2
+ site.comments.disqus.shortname -%}
3
+
4
+ <div id="disqus_thread"></div>
5
+ <script>
6
+ /**
7
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
8
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
9
+ var disqus_config = function () {
10
+ this.page.url = '{%- include snippets/page-url.html -%}';
11
+ this.page.identifier = '{{ page.key }}';
12
+ };
13
+ (function() { // DON'T EDIT BELOW THIS LINE
14
+ var d = document, s = d.createElement('script');
15
+ s.src = 'https://{{ site.comments.disqus.shortname }}.disqus.com/embed.js';
16
+ s.setAttribute('data-timestamp', +new Date());
17
+ (d.head || d.body).appendChild(s);
18
+ })();
19
+ </script>
20
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
21
+
22
+ {%- endif -%}