jekyll-text-theme 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -153
- data/_data/authors.yml +0 -0
- data/_data/licenses.yml +16 -0
- data/_data/locale.yml +4 -10
- data/_data/navigation.yml +13 -0
- data/_data/variables.yml +22 -6
- data/_includes/analytics-providers/custom.html +0 -0
- data/_includes/analytics-providers/google.html +16 -0
- data/_includes/analytics.html +7 -0
- data/_includes/article-footer/custom.html +1 -0
- data/_includes/article-footer/license.html +24 -0
- data/_includes/article-info.html +90 -0
- data/_includes/aside/toc.html +1 -0
- data/_includes/author-profile.html +50 -0
- data/_includes/comments-providers/custom.html +0 -0
- data/_includes/comments-providers/disqus.html +22 -0
- data/_includes/comments-providers/gitalk.html +32 -0
- data/_includes/comments.html +9 -0
- data/_includes/follow-me.html +84 -0
- data/_includes/footer.html +39 -0
- data/_includes/head.html +54 -0
- data/_includes/header.html +33 -0
- data/_includes/markdown-enhancements.html +32 -0
- data/_includes/{utils → markdown-enhancements}/chart.html +1 -3
- data/_includes/{utils → markdown-enhancements}/mathjax.html +11 -4
- data/_includes/{utils → markdown-enhancements}/mermaid.html +1 -3
- data/_includes/pageview-providers/custom.html +0 -0
- data/_includes/pageview-providers/custom/home.html +0 -0
- data/_includes/pageview-providers/custom/post.html +0 -0
- data/_includes/pageview-providers/leancloud/home.html +35 -0
- data/_includes/pageview-providers/leancloud/leancloud.js +71 -0
- data/_includes/pageview-providers/leancloud/post.html +31 -0
- data/_includes/pageview.html +31 -0
- data/_includes/scripts/archieve.js +238 -0
- data/_includes/scripts/article-list.html +27 -0
- data/_includes/scripts/article.js +24 -0
- data/_includes/scripts/aside/affix.js +26 -0
- data/_includes/scripts/aside/toc.js +37 -0
- data/_includes/scripts/common.js +3 -0
- data/_includes/scripts/home.js +3 -0
- data/_includes/scripts/lib/affix.js +103 -0
- data/_includes/scripts/{utils.html → lib/lazyload.js} +55 -92
- data/_includes/scripts/lib/scroll.js +13 -0
- data/_includes/scripts/lib/throttle.js +28 -0
- data/_includes/scripts/lib/toc.js +106 -0
- data/_includes/scripts/page.js +3 -0
- data/_includes/scripts/sidebar.js +14 -0
- data/_includes/scripts/utils.js +38 -0
- data/_includes/scripts/variables.html +27 -0
- data/_includes/sidebar/toc.html +27 -0
- data/_includes/snippets/assign.html +5 -0
- data/_includes/snippets/get-nav-url.html +3 -2
- data/_includes/snippets/page-title.html +11 -6
- data/_includes/snippets/page-url.html +3 -1
- data/_includes/snippets/to-boolean.html +7 -0
- data/_includes/{icon → svg/icon}/social/behance.svg +0 -0
- data/_includes/{icon → svg/icon}/social/douban.svg +0 -0
- data/_includes/{icon → svg/icon}/social/facebook.svg +0 -0
- data/_includes/{icon → svg/icon}/social/flicker.svg +0 -0
- data/_includes/{icon → svg/icon}/social/github.svg +0 -0
- data/_includes/{icon → svg/icon}/social/googleplus.svg +0 -0
- data/_includes/{icon → svg/icon}/social/linkedin.svg +0 -0
- data/_includes/{icon → svg/icon}/social/mail.svg +0 -0
- data/_includes/{icon → svg/icon}/social/pinterest.svg +0 -0
- data/_includes/{icon → svg/icon}/social/qq.svg +0 -0
- data/_includes/{icon → svg/icon}/social/twitter.svg +0 -0
- data/_includes/{icon → svg/icon}/social/weibo.svg +0 -0
- data/_includes/{icon → svg/icon}/social/weixin.svg +0 -0
- data/_includes/{icon → svg/icon}/social/zhihu.svg +0 -0
- data/_includes/{logo → svg}/logo.svg +1 -1
- data/_includes/tags.html +52 -0
- data/_layouts/404.html +12 -0
- data/_layouts/archive.html +25 -0
- data/_layouts/article.html +78 -0
- data/_layouts/base.html +13 -33
- data/_layouts/home.html +135 -121
- data/_layouts/landing.html +164 -0
- data/_layouts/page.html +157 -9
- data/_sass/additional/_alert.scss +25 -0
- data/_sass/additional/_photo-frame.scss +17 -0
- data/_sass/animate/_fade-in-down.scss +1 -1
- data/_sass/animate/_fade-in.scss +1 -1
- data/_sass/common/_classes.scss +5 -2
- data/_sass/common/_reset.scss +32 -22
- data/_sass/common/_variables.scss +87 -31
- data/_sass/common/classes/_animation.scss +9 -0
- data/_sass/common/classes/_clearfix.scss +8 -0
- data/_sass/common/classes/_grid.scss +48 -0
- data/_sass/common/classes/_horizontal-rules.scss +14 -0
- data/_sass/common/classes/_link.scss +18 -145
- data/_sass/common/classes/_media.scss +1 -2
- data/_sass/common/classes/_overflow.scss +8 -0
- data/_sass/common/classes/_pseudo.scss +26 -0
- data/_sass/common/classes/_shadow.scss +13 -5
- data/_sass/common/classes/_spacing.scss +52 -0
- data/_sass/common/components/_button.scss +179 -47
- data/_sass/common/components/_card.scss +18 -0
- data/_sass/common/components/_menu.scss +43 -0
- data/_sass/common/components/_toc.scss +125 -0
- data/_sass/components/_article.content.scss +37 -45
- data/_sass/components/_article.info.scss +25 -0
- data/_sass/components/_author-profile.scss +43 -0
- data/_sass/components/_follow-me.scss +16 -19
- data/_sass/components/_footer.scss +16 -6
- data/_sass/components/_header.scss +26 -18
- data/_sass/components/_license.scss +1 -25
- data/_sass/components/_main.scss +13 -11
- data/_sass/components/_tags.scss +17 -36
- data/_sass/layout/{_error-404.scss → _404.scss} +2 -2
- data/_sass/layout/_all.scss +72 -63
- data/_sass/layout/_article.scss +44 -0
- data/_sass/layout/_home.scss +61 -52
- data/_sass/layout/_landing.scss +104 -0
- data/_sass/layout/_page.scss +155 -0
- data/_sass/{colors → skins}/_chocolate.scss +17 -6
- data/_sass/skins/_dark.scss +56 -0
- data/_sass/{colors → skins}/_default.scss +16 -5
- data/_sass/{colors → skins}/_forest.scss +16 -5
- data/_sass/{colors → skins}/_ocean.scss +16 -5
- data/_sass/{colors → skins}/_orange.scss +20 -9
- data/assets/android-chrome-192x192.png +0 -0
- data/assets/android-chrome-512x512.png +0 -0
- data/assets/apple-touch-icon.png +0 -0
- data/assets/browserconfig.xml +9 -0
- data/assets/css/main.scss +46 -0
- data/assets/favicon-16x16.png +0 -0
- data/assets/favicon-32x32.png +0 -0
- data/assets/favicon.ico +0 -0
- data/assets/images/logo/logo.svg +1 -1
- data/assets/mstile-144x144.png +0 -0
- data/assets/mstile-150x150.png +0 -0
- data/assets/mstile-310x150.png +0 -0
- data/assets/mstile-310x310.png +0 -0
- data/assets/mstile-70x70.png +0 -0
- data/assets/safari-pinned-tab.svg +38 -0
- data/assets/site.webmanifest +19 -0
- metadata +108 -76
- data/_includes/common-head.html +0 -10
- data/_includes/components/article-data.html +0 -55
- data/_includes/components/follow-me.html +0 -78
- data/_includes/components/footer.html +0 -10
- data/_includes/components/header.html +0 -42
- data/_includes/components/license.html +0 -26
- data/_includes/components/tags.html +0 -52
- data/_includes/head-icons-rel.html +0 -38
- data/_includes/icon/clear.svg +0 -3
- data/_includes/icon/link.svg +0 -1
- data/_includes/icon/menu.svg +0 -3
- data/_includes/icon/next.svg +0 -3
- data/_includes/icon/omit.svg +0 -1
- data/_includes/icon/previous.svg +0 -3
- data/_includes/icon/search.svg +0 -3
- data/_includes/scripts/all.html +0 -244
- data/_includes/scripts/common.html +0 -30
- data/_includes/scripts/data.html +0 -27
- data/_includes/scripts/home.html +0 -26
- data/_includes/scripts/page-post.html +0 -32
- data/_includes/scripts/post.html +0 -183
- data/_includes/utils/comment-disqus.html +0 -19
- data/_includes/utils/comment-gitalk.html +0 -25
- data/_includes/utils/google-analytics.html +0 -11
- data/_layouts/all.html +0 -20
- data/_layouts/error-404.html +0 -9
- data/_layouts/post.html +0 -60
- data/_sass/colors/_dark.scss +0 -45
- data/_sass/common/classes/_shape.scss +0 -19
- data/_sass/common/classes/_space.scss +0 -40
- data/_sass/components/_article.content.extra.scss +0 -41
- data/_sass/components/_article.data.scss +0 -36
- data/_sass/components/_pagination.scss +0 -19
- data/_sass/components/_toc.scss +0 -72
- data/_sass/layout/_default.scss +0 -19
- data/_sass/layout/_post.scss +0 -80
- data/assets/css/blog.scss +0 -41
- data/assets/images/logo/icon-120x120.png +0 -0
- data/assets/images/logo/icon-128x128.png +0 -0
- data/assets/images/logo/icon-150x150.png +0 -0
- data/assets/images/logo/icon-152x152.png +0 -0
- data/assets/images/logo/icon-167x167.png +0 -0
- data/assets/images/logo/icon-16x16.png +0 -0
- data/assets/images/logo/icon-180x180.png +0 -0
- data/assets/images/logo/icon-192x192.png +0 -0
- data/assets/images/logo/icon-310x150.png +0 -0
- data/assets/images/logo/icon-310x310.png +0 -0
- data/assets/images/logo/icon-48x48.png +0 -0
- data/assets/images/logo/icon-70x70.png +0 -0
@@ -1,78 +0,0 @@
|
|
1
|
-
<div class="follow-me">
|
2
|
-
{%- assign __locale = site.data.locale.FOLLOW_ME -%}
|
3
|
-
{%- include snippets/locale-to-string.html -%}
|
4
|
-
<ul itemscope itemtype="http://schema.org/Person">
|
5
|
-
<meta itemprop="name" content="{{ site.author.name }}">
|
6
|
-
<link itemprop="url" href="{{ '/' | prepend: site.url }}">
|
7
|
-
{%- if site.author.weibo -%}
|
8
|
-
<li title="{{ __return | replace: '[NAME]', 'Weibo' }}">
|
9
|
-
<div class="floating-action-round-button weibo">
|
10
|
-
<a itemprop="sameAs" href="https://weibo.com/{{ site.author.weibo }}" target="_blank">
|
11
|
-
<div class="icon">{%- include icon/social/weibo.svg -%}</div>
|
12
|
-
</a>
|
13
|
-
</div>
|
14
|
-
</li>
|
15
|
-
{%- endif -%}
|
16
|
-
{%- if site.author.facebook -%}
|
17
|
-
<li title="{{ __return | replace: '[NAME]', 'Facebook' }}">
|
18
|
-
<div class="floating-action-round-button facebook">
|
19
|
-
<a itemprop="sameAs" href="https://www.facebook.com/{{ site.author.facebook }}" target="_blank">
|
20
|
-
<div class="icon">{%- include icon/social/facebook.svg -%}</div>
|
21
|
-
</a>
|
22
|
-
</div>
|
23
|
-
</li>
|
24
|
-
{%- endif -%}
|
25
|
-
{%- if site.author.twitter -%}
|
26
|
-
<li title="{{ __return | replace: '[NAME]', 'Twitter' }}">
|
27
|
-
<div class="floating-action-round-button twitter">
|
28
|
-
<a itemprop="sameAs" href="https://twitter.com/{{ site.author.twitter }}" target="_blank">
|
29
|
-
<div class="icon">{%- include icon/social/twitter.svg -%}</div>
|
30
|
-
</a>
|
31
|
-
</div>
|
32
|
-
</li>
|
33
|
-
{%- endif -%}
|
34
|
-
{%- if site.author.googleplus -%}
|
35
|
-
<li title="{{ __return | replace: '[NAME]', 'Google+' }}">
|
36
|
-
<div class="floating-action-round-button googlepluse">
|
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>
|
39
|
-
</a>
|
40
|
-
</div>
|
41
|
-
</li>
|
42
|
-
{%- endif -%}
|
43
|
-
{%- if site.author.github -%}
|
44
|
-
<li title="{{ __return | replace: '[NAME]', 'Github' }}">
|
45
|
-
<div class="floating-action-round-button github">
|
46
|
-
<a itemprop="sameAs" href="https://github.com/{{ site.author.github }}" target="_blank">
|
47
|
-
<div class="icon">{%- include icon/social/github.svg -%}</div>
|
48
|
-
</a>
|
49
|
-
</div>
|
50
|
-
</li>
|
51
|
-
{%- endif -%}
|
52
|
-
{%- if site.author.linkedin -%}
|
53
|
-
<li title="{{ __return | replace: '[NAME]', 'Linkedin' }}">
|
54
|
-
<div class="floating-action-round-button linkedin">
|
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>
|
57
|
-
</a>
|
58
|
-
</div>
|
59
|
-
</li>
|
60
|
-
{%- endif -%}
|
61
|
-
{%- if site.author.douban -%}
|
62
|
-
<li title="{{ __return | replace: '[NAME]', 'Douban' }}">
|
63
|
-
<div class="floating-action-round-button douban">
|
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>
|
66
|
-
</a>
|
67
|
-
</div>
|
68
|
-
</li>
|
69
|
-
{%- endif -%}
|
70
|
-
</ul>
|
71
|
-
{%- if site.author.email -%}
|
72
|
-
{%- assign __locale = site.data.locale.EMAIL_ME -%}
|
73
|
-
{%- include snippets/locale-to-string.html -%}
|
74
|
-
<p class="email">
|
75
|
-
<a title="{{ __return }}" href="mailto:{{ site.author.email }}" target="_self">{{ site.author.email }}</a>
|
76
|
-
</p>
|
77
|
-
{%- endif -%}
|
78
|
-
</div>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<div class="m-page-footer js-page-footer">
|
2
|
-
<div class="main">
|
3
|
-
<aside> {%- include components/follow-me.html -%} </aside>
|
4
|
-
<footer class="site-info">
|
5
|
-
<p>© {{ site.title }} {{ site.data.locale.COPYRIGHT_DATES }}</p>
|
6
|
-
<p>Powered by <a title="Jekyll is a simple, blog-aware, static site generator." href="http://jekyllrb.com/">Jekyll</a> & <a
|
7
|
-
title="TeXt is a succinct theme for blogging." href="https://github.com/kitian616/jekyll-TeXt-theme">TeXt Theme</a>.</p>
|
8
|
-
</footer>
|
9
|
-
</div>
|
10
|
-
</div>
|
@@ -1,42 +0,0 @@
|
|
1
|
-
<header class="m-page-header">
|
2
|
-
<div class="main clearfix">
|
3
|
-
<div class='site-logo'>
|
4
|
-
{%- include logo/logo.svg -%}
|
5
|
-
{%- assign __path = site.paths.base | default: site.data.variables.default.paths.base -%}
|
6
|
-
{%- include snippets/get-nav-url.html -%}
|
7
|
-
{%- if site.title -%}
|
8
|
-
<a title="{%- if site.description -%}{{ site.description }}{%- endif -%}" href="{{ __return }}">{{ site.title }}</a>
|
9
|
-
{%- endif -%}
|
10
|
-
</div>
|
11
|
-
<nav>
|
12
|
-
<ul>
|
13
|
-
{%- assign __path = site.paths.home | default: site.data.variables.default.paths.home -%}
|
14
|
-
{%- include snippets/get-nav-url.html -%}
|
15
|
-
{%- assign href = __return -%}
|
16
|
-
{%- assign __locale = site.data.locale.NAV.HOME -%}
|
17
|
-
{%- include snippets/locale-to-string.html -%}
|
18
|
-
<li><a href="{{ href }}">{{ __return }}</a></li>
|
19
|
-
{%- assign __path = site.paths.all | default: site.data.variables.default.paths.all -%}
|
20
|
-
{%- include snippets/get-nav-url.html -%}
|
21
|
-
{%- assign href = __return -%}
|
22
|
-
{%- assign __locale = site.data.locale.NAV.ALL -%}
|
23
|
-
{%- include snippets/locale-to-string.html -%}
|
24
|
-
<li><a href="{{ href }}">{{ __return }}</a></li>
|
25
|
-
{%- for list in site.nav_lists -%}
|
26
|
-
{%- assign __path = list.url -%}
|
27
|
-
{%- include snippets/get-nav-url.html -%}
|
28
|
-
{%- assign href = __return -%}
|
29
|
-
{%- assign __locale = list.titles -%}
|
30
|
-
{%- include snippets/locale-to-string.html -%}
|
31
|
-
<li><a href="{{ href }}">{%- if list.title -%}{{ list.title }}{%- else -%}{{ __return }}{%- endif -%}</a></li>
|
32
|
-
{%- endfor -%}
|
33
|
-
{%- assign __path = site.paths.rss | default: site.data.variables.default.paths.rss -%}
|
34
|
-
{%- include snippets/get-nav-url.html -%}
|
35
|
-
{%- assign href = __return -%}
|
36
|
-
{%- assign __locale = site.data.locale.NAV.RSS -%}
|
37
|
-
{%- include snippets/locale-to-string.html -%}
|
38
|
-
<li><a type="application/rss+xml" href="{{ href }}">{{ __return }}</a></li>
|
39
|
-
</ul>
|
40
|
-
</nav>
|
41
|
-
</div>
|
42
|
-
</header>
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<div class="m-license">
|
2
|
-
{%- assign locale = site.data.locale -%}
|
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 -%}
|
7
|
-
<a class="octocat" href="https://github.com/{{ site.repository }}/tree/{{ site.repository_tree }}/{{ page.path }}">
|
8
|
-
<img alt="View on Github" src="{{ __return }}" />
|
9
|
-
</a>
|
10
|
-
{%- assign __locale = locale.POST_ON_GITHUB -%}
|
11
|
-
{%- include snippets/locale-to-string.html -%}
|
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 -%}
|
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 -%}
|
19
|
-
<a class="license" rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
|
20
|
-
<img alt="Creative Commons License" src="{{ __return }}" />
|
21
|
-
</a>
|
22
|
-
{%- assign __locale = locale.LICENSE_INTRO -%}
|
23
|
-
{%- include snippets/locale-to-string.html -%}
|
24
|
-
<p>{{ __return }}</p>
|
25
|
-
</div>
|
26
|
-
</div>
|
@@ -1,52 +0,0 @@
|
|
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
|
-
<div class="m-tags js-tags">
|
19
|
-
<ul>
|
20
|
-
<li>
|
21
|
-
<button type="button" class="js-article-tag js-tag-show-all all pill-button inactive" data-encode="">
|
22
|
-
Show All<div class="tag-count">{{ site.posts | size }}</div>
|
23
|
-
</button>
|
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 -%}
|
46
|
-
<li><button type="button" class="js-article-tag tag-{{ c_index }} pill-button inactive" data-encode="{{ tag[0] | strip | url_encode }}">
|
47
|
-
<span>{{ tag[0] | strip }}</span><div class="tag-count">{{ tag[1].size }}</div>
|
48
|
-
</button>
|
49
|
-
</li>
|
50
|
-
{%- endfor -%}
|
51
|
-
</ul>
|
52
|
-
</div>
|
@@ -1,38 +0,0 @@
|
|
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 -%}
|
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 -%}
|
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 -%}
|
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 -%}
|
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 -%}
|
16
|
-
<link rel="shortcut icon" href="{{ __return }}">
|
17
|
-
<!-- for Chrome on Android https://developer.chrome.com/multidevice/android/installtohomescreen -->
|
18
|
-
<meta name="mobile-web-app-capable" content="yes">
|
19
|
-
{%- assign __path = '/assets/images/logo/icon-192x192.png' -%}
|
20
|
-
{%- include snippets/prepend-baseurl.html -%}
|
21
|
-
<link rel="icon" sizes="192x192" href="{{ __return }}">
|
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 -%}
|
25
|
-
<meta name="msapplication-TileImage" content="{{ __return }}">
|
26
|
-
{%- assign __path = '/assets/images/logo/icon-310x310.png' -%}
|
27
|
-
{%- include snippets/prepend-baseurl.html -%}
|
28
|
-
<meta name="msapplication-square310x310logo" content="{{ __return }}">
|
29
|
-
{%- assign __path = '/assets/images/logo/icon-310x150.png' -%}
|
30
|
-
{%- include snippets/prepend-baseurl.html -%}
|
31
|
-
<meta name="msapplication-wide310x150logo" content="{{ __return }}">
|
32
|
-
{%- assign __path = '/assets/images/logo/icon-150x150.png' -%}
|
33
|
-
{%- include snippets/prepend-baseurl.html -%}
|
34
|
-
<meta name="msapplication-square150x150logo" content="{{ __return }}">
|
35
|
-
{%- assign __path = '/assets/images/logo/icon-70x70.png' -%}
|
36
|
-
{%- include snippets/prepend-baseurl.html -%}
|
37
|
-
<meta name="msapplication-square70x70logo" content="{{ __return }}">
|
38
|
-
<meta name="msapplication-TileColor" content="#eeeeee">
|
data/_includes/icon/clear.svg
DELETED
data/_includes/icon/link.svg
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<svg fill="#000000" width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg>
|
data/_includes/icon/menu.svg
DELETED
data/_includes/icon/next.svg
DELETED
data/_includes/icon/omit.svg
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
<svg fill="#000000" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>
|
data/_includes/icon/previous.svg
DELETED
data/_includes/icon/search.svg
DELETED
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
|
3
|
-
</svg>
|
data/_includes/scripts/all.html
DELETED
@@ -1,244 +0,0 @@
|
|
1
|
-
{%- include snippets/page-title.html -%}
|
2
|
-
{%- assign _title = __return -%}
|
3
|
-
{%- include snippets/get-sources.html -%}
|
4
|
-
{%- assign _sources = __return -%}
|
5
|
-
{%- assign __path = '/search.json' -%}
|
6
|
-
{%- include snippets/prepend-baseurl.html -%}
|
7
|
-
{%- assign _search_path = __return -%}
|
8
|
-
<script>
|
9
|
-
(function() {
|
10
|
-
function queryString() {
|
11
|
-
// This function is anonymous, is executed immediately and
|
12
|
-
// the return value is assigned to QueryString!
|
13
|
-
var i = 0,
|
14
|
-
queryObj = {},
|
15
|
-
pair;
|
16
|
-
var queryStr = window.location.search.substring(1);
|
17
|
-
var queryArr = queryStr.split('&');
|
18
|
-
for (i = 0; i < queryArr.length; i++) {
|
19
|
-
pair = queryArr[i].split('=');
|
20
|
-
// If first entry with this name
|
21
|
-
if (typeof queryObj[pair[0]] === 'undefined') {
|
22
|
-
queryObj[pair[0]] = pair[1];
|
23
|
-
// If second entry with this name
|
24
|
-
} else if (typeof queryObj[pair[0]] === 'string') {
|
25
|
-
queryObj[pair[0]] = [queryObj[pair[0]], pair[1]];
|
26
|
-
// If third or later entry with this name
|
27
|
-
} else {
|
28
|
-
queryObj[pair[0]].push(pair[1]);
|
29
|
-
}
|
30
|
-
}
|
31
|
-
return queryObj;
|
32
|
-
}
|
33
|
-
|
34
|
-
function decodeUrl(str) {
|
35
|
-
return str ? decodeURIComponent(str.replace(/\+/g, '%20')) : '';
|
36
|
-
}
|
37
|
-
|
38
|
-
function memorize(f) {
|
39
|
-
var cache = {};
|
40
|
-
return function () {
|
41
|
-
var key = Array.prototype.join.call(arguments, ',');
|
42
|
-
if (key in cache) return cache[key];
|
43
|
-
else return cache[key] = f.apply(this, arguments);
|
44
|
-
};
|
45
|
-
};
|
46
|
-
function initData(json) {
|
47
|
-
var _data = JSON.parse(json), i, j, cur, _tags;
|
48
|
-
Object.keys(_data).forEach(function(year) {
|
49
|
-
for (i = 0; i < _data[year].length; i++) {
|
50
|
-
cur = _data[year][i], _tags = cur.tags;
|
51
|
-
cur.title = decodeUrl(cur.title);
|
52
|
-
if (_tags && _tags.length > 0) {
|
53
|
-
for (j = 0; j < _tags.length; j++) {
|
54
|
-
_tags[j] = decodeUrl(_tags[j]);
|
55
|
-
}
|
56
|
-
}
|
57
|
-
}
|
58
|
-
});
|
59
|
-
return _data;
|
60
|
-
}
|
61
|
-
|
62
|
-
var setUrlQuery = (function() {
|
63
|
-
var baseUrl = window.location.href.split('?')[0];
|
64
|
-
return function(query) {
|
65
|
-
if (typeof query === 'string') {
|
66
|
-
window.history.replaceState(null, '', baseUrl + query);
|
67
|
-
} else {
|
68
|
-
window.history.replaceState(null, '', baseUrl);
|
69
|
-
}
|
70
|
-
}
|
71
|
-
})();
|
72
|
-
|
73
|
-
var data = initData('{%- include scripts/data.html -%}');
|
74
|
-
|
75
|
-
var searchByTag = memorize(function(tag) {
|
76
|
-
var i, j, cur, _tags, _tag, _data = {};
|
77
|
-
Object.keys(data).forEach(function(year) {
|
78
|
-
for (i = 0; i < data[year].length; i++) {
|
79
|
-
cur = data[year][i], _tags = cur.tags;
|
80
|
-
if (_tags && _tags.length > 0) {
|
81
|
-
for (j = 0; j < _tags.length; j++) {
|
82
|
-
_tag = _tags[j];
|
83
|
-
if (_tag === tag) {
|
84
|
-
if (!_data[year]) {
|
85
|
-
_data[year] = []
|
86
|
-
}
|
87
|
-
_data[year].push(cur);
|
88
|
-
break;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
}
|
92
|
-
}
|
93
|
-
});
|
94
|
-
return _data;
|
95
|
-
});
|
96
|
-
|
97
|
-
var searchByQuery = function(query) {
|
98
|
-
var i, j, cur, _title, _data = { _: [] };
|
99
|
-
Object.keys(data).forEach(function(year) {
|
100
|
-
for (i = 0; i < data[year].length; i++) {
|
101
|
-
cur = data[year][i], _title = cur.title;
|
102
|
-
if (_title.toLowerCase().indexOf(query.toLowerCase()) >= 0) {
|
103
|
-
_data._.push(cur);
|
104
|
-
}
|
105
|
-
}
|
106
|
-
});
|
107
|
-
return _data;
|
108
|
-
};
|
109
|
-
|
110
|
-
window.Lazyload.js('{{ _sources.jquery }}', function() {
|
111
|
-
var $root = $('.js-all');
|
112
|
-
var $searchBox = $('.js-search-box');
|
113
|
-
var $searchInput = $searchBox.children('input');
|
114
|
-
var $searchClear = $searchBox.children('.icon-clear');
|
115
|
-
var $tags = $('.js-tags');
|
116
|
-
var $articleTags = $('.js-article-tag');
|
117
|
-
var $tagShowAll = $('.js-tag-show-all');
|
118
|
-
var $result = $('.js-result');
|
119
|
-
var $lastFocusButton = null;
|
120
|
-
|
121
|
-
function addClass(dom, className) {
|
122
|
-
dom.hasClass(className) || dom.addClass(className);
|
123
|
-
}
|
124
|
-
function removeClass(dom, className) {
|
125
|
-
dom.hasClass(className) && dom.removeClass(className);
|
126
|
-
}
|
127
|
-
|
128
|
-
var renderHeading = memorize(function (year) {
|
129
|
-
return $('<h2 class="year">' + year + '</h2>');
|
130
|
-
});
|
131
|
-
var renderItem = memorize(function (key, title, date, url, tags) {
|
132
|
-
return $('<li><span class="date">' + date + '</span><a class="link" href="' + url + '">' + title + '</a></li>');
|
133
|
-
});
|
134
|
-
function render(data) {
|
135
|
-
var $dom = $('<div></div>'), $section, $ul, i, cur, date;
|
136
|
-
Object.keys(data).sort(function(a, b) {
|
137
|
-
return b.localeCompare(a);
|
138
|
-
}).forEach(function(year) {
|
139
|
-
$section = $('<section></section>'), $ul = $('<ul></ul>');
|
140
|
-
(year === '_') || $section.append(renderHeading(year));
|
141
|
-
for (i = 0; i < data[year].length; i++) {
|
142
|
-
cur = data[year][i];
|
143
|
-
$ul.append(renderItem(cur.key, cur.title, cur.date, cur.url, cur.tags));
|
144
|
-
}
|
145
|
-
$dom.append($section.append($ul));
|
146
|
-
})
|
147
|
-
return $dom;
|
148
|
-
}
|
149
|
-
|
150
|
-
function searchButtonsByTag(_tag/*raw tag*/) {
|
151
|
-
if (!_tag) {
|
152
|
-
return $tagShowAll;
|
153
|
-
}
|
154
|
-
var _buttons = $articleTags.filter('[data-encode="' + _tag + '"]');
|
155
|
-
if (_buttons.length === 0) {
|
156
|
-
return $tagShowAll;
|
157
|
-
}
|
158
|
-
return _buttons;
|
159
|
-
}
|
160
|
-
function buttonFoucs(target) {
|
161
|
-
if (target) {
|
162
|
-
addClass(target, 'focus');
|
163
|
-
$lastFocusButton && !$lastFocusButton.is(target) && removeClass($lastFocusButton, 'focus');
|
164
|
-
$lastFocusButton = target;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
|
168
|
-
function setIsSearch() {
|
169
|
-
addClass($root, 'search');
|
170
|
-
}
|
171
|
-
function setNotSearch() {
|
172
|
-
removeClass($root, 'search');
|
173
|
-
}
|
174
|
-
function setIsEmpty() {
|
175
|
-
removeClass($searchBox, 'not-empty');
|
176
|
-
}
|
177
|
-
function setNotEmpty() {
|
178
|
-
addClass($searchBox, 'not-empty');
|
179
|
-
}
|
180
|
-
function setSearchBoxVal(val) {
|
181
|
-
($searchInput.val() === val) || $searchInput.val(val);
|
182
|
-
}
|
183
|
-
function clearSearchBox() {
|
184
|
-
setSearchBoxVal(''); queryInput('');
|
185
|
-
}
|
186
|
-
|
187
|
-
function showAll() {
|
188
|
-
setNotSearch(); setIsEmpty(); buttonFoucs($tagShowAll); setUrlQuery();
|
189
|
-
$result.html(render(data));
|
190
|
-
}
|
191
|
-
function tagSelect(tag/*decode tag*/, target) {
|
192
|
-
var _data, _tag;
|
193
|
-
if (tag === '' || tag === undefined) {
|
194
|
-
showAll();
|
195
|
-
} else {
|
196
|
-
$result.html(render(searchByTag(tag)));
|
197
|
-
}
|
198
|
-
if (target) {
|
199
|
-
buttonFoucs(target);
|
200
|
-
_tag = target.data('encode');
|
201
|
-
if (_tag === '' || typeof _tag !== 'string') {
|
202
|
-
setUrlQuery();
|
203
|
-
} else {
|
204
|
-
setUrlQuery('?tag=' + _tag)
|
205
|
-
}
|
206
|
-
}
|
207
|
-
}
|
208
|
-
function queryInput(query) {
|
209
|
-
var _data;
|
210
|
-
if (query === '' || typeof query !== 'string') {
|
211
|
-
showAll();
|
212
|
-
} else {
|
213
|
-
$result.html(render(searchByQuery(query))); setIsSearch(); setNotEmpty(); setUrlQuery('?q=' + query);
|
214
|
-
|
215
|
-
}
|
216
|
-
}
|
217
|
-
|
218
|
-
(function() {
|
219
|
-
$articleTags.removeClass('inactive');
|
220
|
-
var query = queryString(), _tag = query.tag, _q = query.q;
|
221
|
-
if (_tag !== undefined) {
|
222
|
-
query.tag === undefined || (_tag = query.tag);
|
223
|
-
tagSelect(decodeUrl(_tag));
|
224
|
-
buttonFoucs(searchButtonsByTag(_tag));
|
225
|
-
} else if (_q !== undefined) {
|
226
|
-
queryInput(_q); setSearchBoxVal(_q);
|
227
|
-
} else {
|
228
|
-
showAll();
|
229
|
-
}
|
230
|
-
})();
|
231
|
-
|
232
|
-
$tags.on('click', 'button', function() {
|
233
|
-
tagSelect($(this).children('span').text(), $(this));
|
234
|
-
});
|
235
|
-
|
236
|
-
$searchInput.on('input', window.throttle(function() {
|
237
|
-
queryInput($(this).val());
|
238
|
-
}, 400));
|
239
|
-
$searchClear.on('click', function() {
|
240
|
-
clearSearchBox();
|
241
|
-
});
|
242
|
-
});
|
243
|
-
})();
|
244
|
-
</script>
|