jekyll-theme-h2o-ac 1.2.1 → 1.3.1
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 +5 -4
- data/_config.yml +15 -17
- data/_data/collections.yml +11 -0
- data/_data/locales/en.yml +6 -0
- data/_data/locales/ja.yml +6 -0
- data/_data/locales/zh-Hans.yml +6 -0
- data/_data/locales/zh-Hant.yml +6 -0
- data/_includes/{footer.html → layouts/footer.html} +61 -35
- data/_includes/{post-head.html → layouts/head.html} +35 -29
- data/_includes/{header.html → layouts/header.html} +19 -1
- data/_includes/layouts/metainfo.html +40 -0
- data/_includes/{paginate-article.html → layouts/paginate-article.html} +9 -2
- data/_includes/{paginate.html → layouts/paginate.html} +5 -5
- data/_includes/{sidebar.html → layouts/sidebar.html} +21 -4
- data/_includes/layouts/submenu.html +30 -0
- data/_includes/plugins/analytics/analytics.html +3 -0
- data/_includes/{analytics.html → plugins/analytics/google.html} +1 -2
- data/_includes/plugins/comments/comments_block.html +67 -0
- data/_includes/plugins/comments/comments_js.html +24 -0
- data/_includes/plugins/comments/disqus.html +19 -0
- data/_includes/plugins/comments/waline_css.html +3 -0
- data/_includes/plugins/comments/waline_js.html +14 -0
- data/_includes/plugins/i18n.html +32 -0
- data/_includes/plugins/markdown/fancybox_css.html +1 -0
- data/_includes/plugins/markdown/fancybox_js.html +24 -0
- data/_includes/plugins/markdown/hotkeys.html +31 -0
- data/_includes/plugins/markdown/markdown.html +7 -0
- data/_includes/{mathjax.html → plugins/markdown/mathjax.html} +4 -9
- data/_includes/plugins/markdown/mermaid_block.html +10 -0
- data/_includes/plugins/markdown/mermaid_js.html +12 -0
- data/_includes/plugins/markdown/prism_css.html +16 -0
- data/_includes/plugins/markdown/prism_js.html +3 -0
- data/_includes/plugins/others/calendar_block.html +31 -0
- data/_includes/plugins/others/calendar_css.html +3 -0
- data/_includes/plugins/others/calendar_js.html +8 -0
- data/_includes/plugins/others/social_block.html +5 -0
- data/_includes/plugins/others/social_css.html +1 -0
- data/_includes/plugins/others/social_js.html +15 -0
- data/_layouts/404.html +17 -0
- data/_layouts/archives.html +89 -59
- data/_layouts/blog.html +4 -10
- data/_layouts/categories.html +3 -1
- data/_layouts/default.html +62 -45
- data/_layouts/links.html +14 -4
- data/_layouts/page.html +17 -87
- data/_layouts/post.html +146 -483
- data/_layouts/stats.html +52 -0
- data/_layouts/tags.html +2 -2
- data/assets/css/app.min.css +1 -2591
- data/assets/css/app.min.css.map +1 -1
- data/assets/css/cv.min.css +1 -279
- data/assets/css/cv.min.css.map +1 -1
- data/assets/js/app.min.js +1 -686
- data/assets/js/app.min.js.LICENSE.txt +15 -0
- data/assets/js/app.min.js.map +1 -1
- metadata +43 -20
- data/_includes/comments.html +0 -53
- data/_includes/head.html +0 -47
- data/_includes/mermaid.html +0 -12
- data/_includes/waline.html +0 -3
- /data/_includes/{pageNav.html → layouts/pageNav.html} +0 -0
- /data/_includes/{toc.html → layouts/toc.html} +0 -0
- /data/_includes/{busuanzi.html → plugins/analytics/busuanzi.html} +0 -0
- /data/_includes/{umami.html → plugins/analytics/umami.html} +0 -0
- /data/_includes/{pwa.html → plugins/others/pwa.html} +0 -0
- /data/_includes/{webpusher.html → plugins/others/webpusher.html} +0 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
{% if page.submenu %}
|
2
|
+
<div class="submenu">
|
3
|
+
{% for collection in site.data.collections %}
|
4
|
+
{% if collection.id == page.submenu %}
|
5
|
+
<h4>
|
6
|
+
<svg class="icon" aria-hidden="true">
|
7
|
+
<use xlink:href="#icon-submenu"></use>
|
8
|
+
</svg>{{ collection.name }}
|
9
|
+
</h4>
|
10
|
+
<ul>
|
11
|
+
{% for article in collection.articles %}
|
12
|
+
<li>
|
13
|
+
{% if article.url contains "://" %}
|
14
|
+
<a href="{{ article.url }}" class="extlinks">
|
15
|
+
{{ article.name }}
|
16
|
+
</a>
|
17
|
+
{% else %}
|
18
|
+
<a href="{{ article.url | prepend: site.baseurl }}">
|
19
|
+
{{ article.name }}
|
20
|
+
</a>
|
21
|
+
{% endif %}
|
22
|
+
</li>
|
23
|
+
{% endfor %}
|
24
|
+
</ul>
|
25
|
+
{% endif %}
|
26
|
+
{% endfor %}
|
27
|
+
{% else %}
|
28
|
+
<div class="submenu hidden">
|
29
|
+
{% endif %}
|
30
|
+
</div>
|
@@ -3,9 +3,8 @@
|
|
3
3
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{site.google_analytics}}"></script>
|
4
4
|
<script>
|
5
5
|
window.dataLayer = window.dataLayer || [];
|
6
|
-
function gtag(){dataLayer.push(arguments);}
|
6
|
+
function gtag() { dataLayer.push(arguments); }
|
7
7
|
gtag('js', new Date());
|
8
|
-
|
9
8
|
gtag('config', '{{site.google_analytics}}');
|
10
9
|
</script>
|
11
10
|
{% endif %}
|
@@ -0,0 +1,67 @@
|
|
1
|
+
{% capture block %}
|
2
|
+
<section class="post-footer-item comment">
|
3
|
+
<div class="comments-headline">
|
4
|
+
<svg class="icon" aria-hidden="true">
|
5
|
+
<use xlink:href="#icon-comment"></use>
|
6
|
+
</svg>
|
7
|
+
<span>{{ locales.post.comment }}</span>
|
8
|
+
</div>
|
9
|
+
{% if layout.type == "post" %}
|
10
|
+
{% if site.comments.disqus and site.comments.waline %}
|
11
|
+
<div id="comments-switch">
|
12
|
+
<span class="first-comment">Disqus</span>
|
13
|
+
<span class="switch-button">
|
14
|
+
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
15
|
+
<label for="cmn-toggle-4"></label>
|
16
|
+
</span>
|
17
|
+
<span class="second-comment">Waline</span>
|
18
|
+
</div>
|
19
|
+
{% endif %}
|
20
|
+
{% else %}
|
21
|
+
{% if page.comments.disqus and page.comments.waline %}
|
22
|
+
<div id="comments-switch">
|
23
|
+
<span class="first-comment">Disqus</span>
|
24
|
+
<span class="switch-button">
|
25
|
+
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
|
26
|
+
<label for="cmn-toggle-4"></label>
|
27
|
+
</span>
|
28
|
+
<span class="second-comment">Waline</span>
|
29
|
+
</div>
|
30
|
+
{% endif %}
|
31
|
+
{% endif %}
|
32
|
+
</section>
|
33
|
+
{% endcapture %}
|
34
|
+
|
35
|
+
{% if layout.type == "post" %}
|
36
|
+
{% if site.comments.disqus or site.comments.waline or page.comments.waline or page.comments.disqus %}
|
37
|
+
{{ block }}
|
38
|
+
{% endif %}
|
39
|
+
{% else %}
|
40
|
+
{% if page.comments.disqus or page.comments.waline %}
|
41
|
+
{{ block }}
|
42
|
+
{% endif %}
|
43
|
+
{% endif %}
|
44
|
+
|
45
|
+
{% if layout.type == "post" %}
|
46
|
+
{% if site.comments.disqus %}
|
47
|
+
<section class="post-footer-item comment">
|
48
|
+
<div id="disqus_thread"></div>
|
49
|
+
</section>
|
50
|
+
{% endif %}
|
51
|
+
{% if site.comments.waline %}
|
52
|
+
<section class="post-footer-item comment">
|
53
|
+
<div id="waline"></div>
|
54
|
+
</section>
|
55
|
+
{% endif %}
|
56
|
+
{% else %}
|
57
|
+
{% if page.comments.disqus %}
|
58
|
+
<section class="post-footer-item comment">
|
59
|
+
<div id="disqus_thread"></div>
|
60
|
+
</section>
|
61
|
+
{% endif %}
|
62
|
+
{% if page.comments.waline %}
|
63
|
+
<section class="post-footer-item comment">
|
64
|
+
<div id="waline"></div>
|
65
|
+
</section>
|
66
|
+
{% endif %}
|
67
|
+
{% endif %}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
{% include plugins/comments/disqus.html %}
|
2
|
+
{% include plugins/comments/waline_js.html %}
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
if ($("#comments-switch").length > 0) {
|
6
|
+
var comment_status = $("#cmn-toggle-4")[0].checked;
|
7
|
+
if (comment_status) {
|
8
|
+
$("#waline").addClass("active");
|
9
|
+
} else {
|
10
|
+
$("#disqus_thread").addClass("active");
|
11
|
+
}
|
12
|
+
$("#cmn-toggle-4").click(function () {
|
13
|
+
$("#disqus_thread").toggleClass("active");
|
14
|
+
$("#waline").toggleClass("active");
|
15
|
+
})
|
16
|
+
} else {
|
17
|
+
if ($("#disqus_thread").length > 0) {
|
18
|
+
$("#disqus_thread").addClass("active");
|
19
|
+
} else if ($("#waline").length > 0) {
|
20
|
+
$("#waline").addClass("active");
|
21
|
+
}
|
22
|
+
}
|
23
|
+
})
|
24
|
+
</script>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{% if site.comments.disqus or page.comments.disqus %}
|
2
|
+
<script>
|
3
|
+
/**
|
4
|
+
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
|
5
|
+
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
|
6
|
+
/*
|
7
|
+
var disqus_config = function () {
|
8
|
+
this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
|
9
|
+
this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
|
10
|
+
};
|
11
|
+
*/
|
12
|
+
(function () { // DON'T EDIT BELOW THIS LINE
|
13
|
+
var d = document, s = d.createElement('script');
|
14
|
+
s.src = '{{ site.comments.disqus_url }}';
|
15
|
+
s.setAttribute('data-timestamp', +new Date());
|
16
|
+
(d.head || d.body).appendChild(s);
|
17
|
+
})();
|
18
|
+
</script>
|
19
|
+
{% endif %}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{% if site.comments.waline or page.comments.waline %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/@waline/client/dist/waline.umd.js"></script>
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
Waline.init({
|
6
|
+
el: '#waline',
|
7
|
+
serverURL: '{{ site.comments.waline_url }}',
|
8
|
+
reaction: {{ site.comments.waline_reaction }},
|
9
|
+
comment: true,
|
10
|
+
locale: {{ site.comments.waline_locale }}
|
11
|
+
});
|
12
|
+
});
|
13
|
+
</script>
|
14
|
+
{% endif %}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{% assign lang = page.lang | default: site.default_lang %}
|
2
|
+
{% assign locales = site.data.locales[lang] %}
|
3
|
+
{% if page.langs %}
|
4
|
+
<p>
|
5
|
+
<b>{{ locales.langs }}</b>
|
6
|
+
{% assign langs = "zh-Hans, zh-Hant, en, ja" | split: ", " %}
|
7
|
+
{% assign langnames = "简中, 繁中, EN, 日本語" | split: ", " %}
|
8
|
+
{% if lang == site.default_lang %}
|
9
|
+
{% assign url = page.url %}
|
10
|
+
{% else %}
|
11
|
+
{% assign urls = page.url | split: '/' %}
|
12
|
+
{% assign url = "" %}
|
13
|
+
{% for u in urls offset:2 %}
|
14
|
+
{% assign url = url | append: "/" | append: u %}
|
15
|
+
{% endfor %}
|
16
|
+
{% endif %}
|
17
|
+
{% for l in page.langs %}
|
18
|
+
{% for i in (0..4) %}
|
19
|
+
{% if langs[i] == l %}
|
20
|
+
{% if l == page.lang %}
|
21
|
+
{{ langnames[i] }}
|
22
|
+
{% elsif l == site.default_lang %}
|
23
|
+
<a href="{{ url }}">{{ langnames[i] }}</a>
|
24
|
+
{% else %}
|
25
|
+
{% assign prefix = "/" | append: l %}
|
26
|
+
<a href="{{ url | prepend: prefix }}">{{ langnames[i] }}</a>
|
27
|
+
{% endif %}
|
28
|
+
{% endif %}
|
29
|
+
{% endfor %}
|
30
|
+
{% endfor %}
|
31
|
+
</p>
|
32
|
+
{% endif %}
|
@@ -0,0 +1 @@
|
|
1
|
+
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.min.css" />
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.min.js"></script>
|
2
|
+
<script>
|
3
|
+
$(document).ready(function () {
|
4
|
+
var baseurl = $("meta[property='og:baseurl']").attr('content');
|
5
|
+
$("p img").each(function () {
|
6
|
+
$(this).attr('data-src', $(this).attr('src')).removeAttr('src').addClass("lazyload").attr('src', baseurl + '/assets/img/loading.gif');
|
7
|
+
var strA = "<a data-fancybox='gallery' ref='gallery' href='" + $(this).attr('data-src') + "' data-caption='" + $(this).attr('alt') + "'></a>";
|
8
|
+
$(this).wrapAll(strA);
|
9
|
+
var caption = $(this)[0].alt;
|
10
|
+
$(this).parent().after('<span class="caption">' + caption + '</span>');
|
11
|
+
});
|
12
|
+
Fancybox.bind('[data-fancybox]', {
|
13
|
+
on: {
|
14
|
+
load: (fancybox, slide) => {
|
15
|
+
var gray = $("meta[property='og:gray']").attr('content');
|
16
|
+
if (gray == "true") {
|
17
|
+
$(".fancybox__content img").addClass("gray");
|
18
|
+
$(".carousel__track .fancybox__thumb").addClass("gray");
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
});
|
23
|
+
});
|
24
|
+
</script>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/hotkeys-js/dist/hotkeys.min.js"></script>
|
2
|
+
<script>
|
3
|
+
$(document).ready(function () {
|
4
|
+
var previous_url = $("meta[property='og:previous_url']").attr('content');
|
5
|
+
var next_url = $("meta[property='og:next_url']").attr('content');
|
6
|
+
|
7
|
+
hotkeys('left', function (event, handler) {
|
8
|
+
// Prevent the default refresh event under WINDOWS system
|
9
|
+
event.preventDefault();
|
10
|
+
if (previous_url) {
|
11
|
+
console.log('you pressed left!');
|
12
|
+
window.location.href = previous_url;
|
13
|
+
} else {
|
14
|
+
$("#no-previous").addClass("active");
|
15
|
+
setTimeout(function () { $("#no-previous").removeClass("active"); }, 1500);
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
hotkeys('right', function (event, handler) {
|
20
|
+
// Prevent the default refresh event under WINDOWS system
|
21
|
+
event.preventDefault();
|
22
|
+
if (next_url) {
|
23
|
+
console.log('you pressed right!');
|
24
|
+
window.location.href = next_url;
|
25
|
+
} else {
|
26
|
+
$("#no-next").addClass("active");
|
27
|
+
setTimeout(function () { $("#no-next").removeClass("active"); }, 1500);
|
28
|
+
}
|
29
|
+
});
|
30
|
+
});
|
31
|
+
</script>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{% include plugins/markdown/mathjax.html %}
|
2
|
+
{% if layout.type == "post" %}
|
3
|
+
{% include plugins/markdown/fancybox_js.html %}
|
4
|
+
{% endif %}
|
5
|
+
{% include plugins/markdown/hotkeys.html %}
|
6
|
+
{% include plugins/markdown/mermaid_js.html %}
|
7
|
+
{% include plugins/markdown/prism_js.html %}
|
@@ -1,20 +1,15 @@
|
|
1
|
-
<!--
|
2
|
-
Author: Ray-Eldath
|
3
|
-
refer to:
|
4
|
-
- http://docs.mathjax.org/en/latest/options/index.html
|
5
|
-
-->
|
6
1
|
{% if site.mathjax %}
|
7
2
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
8
|
-
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-
|
3
|
+
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax-full@3.2.2/es5/tex-mml-svg.min.js"></script>
|
9
4
|
<script type="text/x-mathjax-config">
|
10
5
|
MathJax.Hub.Config({
|
11
6
|
jax: ["input/TeX", "output/HTML-CSS"],
|
12
7
|
tex2jax: {
|
13
|
-
inlineMath: [ ["
|
14
|
-
|
8
|
+
inlineMath: [['$', '$'], ["\\(", "\\)"]],
|
9
|
+
processEscapes: true,
|
15
10
|
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
|
16
11
|
},
|
17
12
|
"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"] }
|
18
13
|
});
|
19
14
|
</script>
|
20
|
-
{% endif %}
|
15
|
+
{% endif %}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{% if page.mermaid or site.mermaid %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@9.1.6/dist/mermaid.min.js"></script>
|
3
|
+
<script>
|
4
|
+
$(document).ready(function () {
|
5
|
+
mermaid.initialize({
|
6
|
+
startOnLoad: true,
|
7
|
+
theme: "default",
|
8
|
+
});
|
9
|
+
mermaid.init(undefined, $('.mermaid2'));
|
10
|
+
});
|
11
|
+
</script>
|
12
|
+
{% endif %}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{% assign prisms1 = "coy,dark,funky,okaidia,solarizedlight,tomorrow,twilight" | split: "," %}
|
2
|
+
{% assign prisms2 =
|
3
|
+
"a11y-dark,atom-dark,base16-ateliersulphurpool.light,cb,coldark-cold,coy-without-shadows,darcula,duotone-dark,duotone-earth,duotone-light,dutone-sea,dutone-space,ghcolors,gruvbox-dark,gruvbox-light,holi-theme,hopscotch,lucario,material-dark,material-light,material-oceanic,night-owl,nord,one-dark,one-light,pojoaque,shades-of-purple,solarized-dark-atom,synthwave84,vs,vsc-dark-plus,xonokai,z-touch"
|
4
|
+
| split: "," %}
|
5
|
+
{% if prisms1 contains site.prism.theme %}
|
6
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism-{{site.prism.theme}}.min.css" />
|
7
|
+
{% else if prisms2 contains site.prism.theme %}
|
8
|
+
<link rel="stylesheet"
|
9
|
+
href="https://cdn.jsdelivr.net/npm/prism-themes@1.9.0/themes/prism-{{site.prism.theme}}.min.css" />
|
10
|
+
{% else %}
|
11
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/themes/prism.min.css" />
|
12
|
+
{% endif %}
|
13
|
+
{% if site.prism.line_numbers %}
|
14
|
+
<link rel="stylesheet"
|
15
|
+
href="https://cdn.jsdelivr.net/npm/prismjs@1.28.0/plugins/line-numbers/prism-line-numbers.min.css">
|
16
|
+
{% endif %}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script>
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script>
|
3
|
+
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<section class="tags-card">
|
2
|
+
<div class="links">
|
3
|
+
<svg class="icon" aria-hidden="true">
|
4
|
+
<use xlink:href="#icon-calendar"></use>
|
5
|
+
</svg> {{ panel.calendar }}
|
6
|
+
</div>
|
7
|
+
<div id="cal-heatmap">
|
8
|
+
<div id="ex-ghDay" class="calendar-top">
|
9
|
+
<a id="ex-ghDay-prev" class="button" href="#" aria-label="Prev month">
|
10
|
+
<svg class="icon" aria-hidden="true">
|
11
|
+
<use xlink:href="#icon-left"></use>
|
12
|
+
</svg>
|
13
|
+
</a>
|
14
|
+
<a id="ex-ghDay-next" class="button" href="#" aria-label="Next month">
|
15
|
+
<svg class="icon" aria-hidden="true">
|
16
|
+
<use xlink:href="#icon-right"></use>
|
17
|
+
</svg>
|
18
|
+
</a>
|
19
|
+
<a id="ex-ghDay-today" class="button" href="#" aria-label="Rotate view to today">
|
20
|
+
<svg class="icon" aria-hidden="true">
|
21
|
+
<use xlink:href="#icon-rotate"></use>
|
22
|
+
</svg>
|
23
|
+
</a>
|
24
|
+
<div class="legends">
|
25
|
+
<span class="text">{{panel.calendar_less}}</span>
|
26
|
+
<div id="ex-ghDay-legend"></div>
|
27
|
+
<span class="text">{{panel.calendar_more}}</span>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</section>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
{% if site.calendar %}
|
2
|
+
<script src="https://cdn.jsdelivr.net/npm/d3@7.9.0/dist/d3.min.js"></script>
|
3
|
+
<script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/cal-heatmap.min.js"></script>
|
4
|
+
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/umd/popper.min.js"></script>
|
5
|
+
<script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/Tooltip.min.js"></script>
|
6
|
+
<script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/LegendLite.min.js"></script>
|
7
|
+
<script src="https://cdn.jsdelivr.net/npm/cal-heatmap@4.2.4/dist/plugins/CalendarLabel.min.js"></script>
|
8
|
+
{% endif %}
|
@@ -0,0 +1 @@
|
|
1
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/css/share.min.css">
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<script src="https://cdn.jsdelivr.net/npm/social-share.js@1.0.16/dist/js/social-share.min.js"></script>
|
2
|
+
<script>
|
3
|
+
socialShare('.social-share', {
|
4
|
+
sites: [
|
5
|
+
{% for i in site.social-share-items %}
|
6
|
+
'{{ i }}'{% if forloop.last == false %}, {% endif %}
|
7
|
+
{% endfor %}
|
8
|
+
],
|
9
|
+
wechatQrcodeTitle: "分享到微信朋友圈",
|
10
|
+
wechatQrcodeHelper: '<p>扫码后点击右上角</p><p>将本文分享至朋友圈</p>'
|
11
|
+
});
|
12
|
+
$("a.social-share-icon").each(function () {
|
13
|
+
$(this).attr("aria-label", $(this).attr("class").split(' ')[1])
|
14
|
+
});
|
15
|
+
</script>
|
data/_layouts/404.html
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
description: "Sorry, Page Not Found :("
|
4
|
+
permalink: /404.html
|
5
|
+
---
|
6
|
+
|
7
|
+
{% include layouts/header.html %}
|
8
|
+
|
9
|
+
<header class="g-banner np-banner {{ site.postPatterns | prepend: 'post-pattern-' }}" data-theme="{{ site.theme-color }}">
|
10
|
+
<div class="post-wrapper">
|
11
|
+
<h1>404</h1>
|
12
|
+
<span class="subheading">{{ page.description }}</span>
|
13
|
+
<a href="{{ site.nav.home }}" class="btn">Back to home</a>
|
14
|
+
</div>
|
15
|
+
</header>
|
16
|
+
|
17
|
+
|
data/_layouts/archives.html
CHANGED
@@ -12,6 +12,9 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
|
|
12
12
|
{% assign unpin_posts_num = unpin_posts | size %}
|
13
13
|
{% assign nyear = "1900" %}
|
14
14
|
{% assign total_size = 0 %}
|
15
|
+
{% assign lang = page.lang | default: site.default_lang %}
|
16
|
+
{% assign locales = site.data.locales[lang] %}
|
17
|
+
{% assign panel = locales.panel %}
|
15
18
|
|
16
19
|
{% for post in site.posts %}
|
17
20
|
{% assign post_size = post.content | strip_html | strip_newlines | remove: " " | size %}
|
@@ -38,65 +41,92 @@ cover: https://images.unsplash.com/photo-1465189684280-6a8fa9b19a7a?w=1600&q=900
|
|
38
41
|
{{ archives.words.unit }}
|
39
42
|
</p>
|
40
43
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
<
|
45
|
-
<
|
46
|
-
|
47
|
-
|
48
|
-
<
|
49
|
-
|
50
|
-
|
51
|
-
{% when 0 %}
|
52
|
-
{{ post.date | date: "%Y-%m-%d" }}
|
53
|
-
{% when 1 %}
|
54
|
-
{{ post.date | date_to_string }}
|
55
|
-
{% else %}
|
56
|
-
{{ post.date | date: "%Y年%-m月%-d日" }}
|
57
|
-
{% endcase %}
|
58
|
-
</span>
|
59
|
-
<a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
|
60
|
-
</p>
|
61
|
-
</li>
|
62
|
-
{% endfor %}
|
63
|
-
{% endif %}
|
64
|
-
|
65
|
-
{% if unpin_posts_num > 0%}
|
66
|
-
{% for post in unpin_posts %}
|
67
|
-
{% assign year = post.date | date: '%Y' %}
|
68
|
-
{% assign animal = year | minus:1900 | modulo:12 %}
|
69
|
-
{% if year != nyear %}
|
70
|
-
{% assign nyear = year %}
|
71
|
-
</ul>
|
72
|
-
<h3 class="year">{{ post.date | date: '%Y' }}
|
73
|
-
<span class="icon-item">
|
74
|
-
<svg class="icon animal" aria-hidden="true">
|
75
|
-
<use xlink:href="#icon-{{ ssyears[animal] }}"></use>
|
44
|
+
<div id="archive-heatmap">
|
45
|
+
<div id="ex-ghDay2" class="calendar-top">
|
46
|
+
<a id="ex-ghDay-prev2" class="button" href="#" aria-label="Calendar heatmap prev">
|
47
|
+
<svg class="icon" aria-hidden="true">
|
48
|
+
<use xlink:href="#icon-left"></use>
|
49
|
+
</svg>
|
50
|
+
</a>
|
51
|
+
<a id="ex-ghDay-next2" class="button" href="#" aria-label="Calendar heatmap next">
|
52
|
+
<svg class="icon" aria-hidden="true">
|
53
|
+
<use xlink:href="#icon-right"></use>
|
76
54
|
</svg>
|
77
|
-
|
78
|
-
|
55
|
+
</a>
|
56
|
+
<a id="ex-ghDay-today2" class="button" href="#" aria-label="Calendar heatmap today">
|
57
|
+
<svg class="icon" aria-hidden="true">
|
58
|
+
<use xlink:href="#icon-rotate"></use>
|
79
59
|
</svg>
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
60
|
+
</a>
|
61
|
+
<div class="legends">
|
62
|
+
<span class="text">{{panel.calendar_less}}</span>
|
63
|
+
<div id="ex-ghDay-legend2"></div>
|
64
|
+
<span class="text">{{panel.calendar_more}}</span>
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
84
68
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
{
|
102
|
-
|
69
|
+
{% assign ssyears = "rat,ox,tiger,rabbit,dragon,snake,horse,goat,monkey,rooster,dog,pig" | split: "," %}
|
70
|
+
|
71
|
+
<div id="archive-articles">
|
72
|
+
{% if pin_posts_num > 0 %}
|
73
|
+
<h3>{{ archives.pin.title }}</h3>
|
74
|
+
<ul>
|
75
|
+
{% for post in pin_posts %}
|
76
|
+
<li>
|
77
|
+
<p class="archives-title">
|
78
|
+
<span class="archives-date">
|
79
|
+
{% case site.formats.time %}
|
80
|
+
{% when 0 %}
|
81
|
+
{{ post.date | date: "%Y-%m-%d" }}
|
82
|
+
{% when 1 %}
|
83
|
+
{{ post.date | date_to_string }}
|
84
|
+
{% else %}
|
85
|
+
{{ post.date | date: "%Y年%-m月%-d日" }}
|
86
|
+
{% endcase %}
|
87
|
+
</span>
|
88
|
+
<a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
|
89
|
+
</p>
|
90
|
+
</li>
|
91
|
+
{% endfor %}
|
92
|
+
{% endif %}
|
93
|
+
|
94
|
+
{% if unpin_posts_num > 0%}
|
95
|
+
{% for post in unpin_posts %}
|
96
|
+
{% assign year = post.date | date: '%Y' %}
|
97
|
+
{% assign animal = year | minus:1900 | modulo:12 %}
|
98
|
+
{% if year != nyear %}
|
99
|
+
{% assign nyear = year %}
|
100
|
+
</ul>
|
101
|
+
<h3 class="year">{{ post.date | date: '%Y' }}
|
102
|
+
<span class="icon-item">
|
103
|
+
<svg class="icon animal" aria-hidden="true">
|
104
|
+
<use xlink:href="#icon-{{ ssyears[animal] }}"></use>
|
105
|
+
</svg>
|
106
|
+
<svg class="icon dz" aria-hidden="true">
|
107
|
+
<use xlink:href="#icon-{{ ssyears[animal]}}_dz"></use>
|
108
|
+
</svg>
|
109
|
+
</span>
|
110
|
+
</h3>
|
111
|
+
<ul>
|
112
|
+
{% endif %}
|
113
|
+
|
114
|
+
<li>
|
115
|
+
<p class="archives-title">
|
116
|
+
<span class="archives-date">
|
117
|
+
{% case site.formats.time %}
|
118
|
+
{% when 0 %}
|
119
|
+
{{ post.date | date: "%m-%d" }}
|
120
|
+
{% when 1 %}
|
121
|
+
{{ post.date | date_to_string }}
|
122
|
+
{% else %}
|
123
|
+
{{ post.date | date: "%-m月%-d日" }}
|
124
|
+
{% endcase %}
|
125
|
+
</span>
|
126
|
+
<a href="{{ post.url | prepend: site.baseurl }}"> {{ post.title }} </a>
|
127
|
+
</p>
|
128
|
+
</li>
|
129
|
+
{% endfor %}
|
130
|
+
{% endif %}
|
131
|
+
</ul>
|
132
|
+
</div>
|
data/_layouts/blog.html
CHANGED
@@ -4,8 +4,6 @@ home-title: H2O Theme For Jekyll
|
|
4
4
|
description: 或许是最漂亮的Jekyll主题
|
5
5
|
---
|
6
6
|
|
7
|
-
{% include header.html %}
|
8
|
-
|
9
7
|
<div
|
10
8
|
class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}"
|
11
9
|
data-theme="{{ site.theme-color }}"
|
@@ -17,15 +15,11 @@ description: 或许是最漂亮的Jekyll主题
|
|
17
15
|
|
18
16
|
<main class="g-container home-content">
|
19
17
|
<div class="article-list">
|
20
|
-
{% include paginate.html %}
|
18
|
+
{% include layouts/paginate.html %}
|
21
19
|
|
22
20
|
{% if paginator.total_pages > 1 %}
|
23
|
-
{% include pageNav.html %}
|
21
|
+
{% include layouts/pageNav.html %}
|
24
22
|
{% endif %}
|
25
23
|
</div>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
</main>
|
30
|
-
|
31
|
-
{% include footer.html %}
|
24
|
+
{% include layouts/sidebar.html %}
|
25
|
+
</main>
|