jekyll-theme-h2o-ac 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.md +73 -0
  4. data/_config.yml +100 -0
  5. data/_includes/anchor.html +41 -0
  6. data/_includes/footer.html +15 -0
  7. data/_includes/head.html +18 -0
  8. data/_includes/header.html +16 -0
  9. data/_includes/mathjax.html +20 -0
  10. data/_includes/pageNav.html +18 -0
  11. data/_includes/post-head.html +25 -0
  12. data/_layouts/default.html +16 -0
  13. data/_layouts/page.html +93 -0
  14. data/_layouts/post.html +167 -0
  15. data/assets/css/app.min.css +1 -0
  16. data/assets/css/plugins.min.css +1 -0
  17. data/assets/fonts/Merriweather-Black.ttf +0 -0
  18. data/assets/fonts/Merriweather-Light.ttf +0 -0
  19. data/assets/fonts/Merriweather-Regular.ttf +0 -0
  20. data/assets/fonts/iconfont.eot +0 -0
  21. data/assets/fonts/iconfont.svg +88 -0
  22. data/assets/fonts/iconfont.ttf +0 -0
  23. data/assets/fonts/iconfont.woff +0 -0
  24. data/assets/icons/author.svg +1 -0
  25. data/assets/icons/date.svg +1 -0
  26. data/assets/icons/logo.svg +20 -0
  27. data/assets/icons/logo_default.svg +15 -0
  28. data/assets/icons/logo_pink.svg +15 -0
  29. data/assets/img/hero.jpg +0 -0
  30. data/assets/img/profile.png +0 -0
  31. data/assets/img/profile.webp +0 -0
  32. data/assets/js/index.min.js +1 -0
  33. data/assets/js/prism.js +279 -0
  34. data/assets/js/social-share.min.js +1 -0
  35. data/assets/js/util.js +16 -0
  36. data/dev/js/index.js +248 -0
  37. data/dev/sass/app.css +1114 -0
  38. data/dev/sass/app.scss +8 -0
  39. data/dev/sass/base.scss +46 -0
  40. data/dev/sass/common.scss +918 -0
  41. data/dev/sass/github-markdown.css +636 -0
  42. data/dev/sass/helper.scss +240 -0
  43. data/dev/sass/layouts.scss +297 -0
  44. data/dev/sass/prism.css +3 -0
  45. data/dev/sass/share.min.css +1 -0
  46. metadata +101 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e55eebbb35107b6aa365137d1ef4936751fa9bb2f4f99bfe6414175d01c6207f
4
+ data.tar.gz: aaa8762de9cb1fd05a4a187d8be38ab1b86412a8849da9a994b13dc14e15e67b
5
+ SHA512:
6
+ metadata.gz: 4e8852b4af9bdb2781c4a9c07e10d00143b21f7cb5051ef44ae796feb4e38579db5b0e9a96f82d0c84721a4842b8a39750c4dd6ad4e20833fae0e5a841d84d49
7
+ data.tar.gz: 4a08baf90d910857aa6d78a037b5176750c1fd2fde32197d99b3258b6af209d047cb7748e197b20252e405b59443c1a487855d79b032d9f04bfc82745a86f305
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 zhonger
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,73 @@
1
+ ## jekyll-theme-H2O-ac
2
+
3
+ 基于 Jekyll 和 [H2O](https://github.com/kaeyleo/jekyll-theme-H2O) 主题、适合学术研究人员和运维开发人员的博客主题模板。
4
+
5
+ An Jekyll theme for researchers and maintainers based on Jekyll and [H2O](https://github.com/kaeyleo/jekyll-theme-H2O) theme.
6
+
7
+ ### Preview
8
+
9
+ #### [在线预览 Live Demo →](http://lisz.me/)
10
+
11
+ ![vgy.me](https://i.vgy.me/pICzcE.png)
12
+ ![vgy.me](https://i.vgy.me/cI35JI.png)
13
+ ![vgy.me](https://i.vgy.me/ReKZeP.png)
14
+
15
+ 如果你喜欢这个博客模板,请在右上角star一下,非常感谢~
16
+
17
+ If you like this theme or using it, please give a ⭐️ for motivation ;)
18
+
19
+ 如果想体验手机浏览效果,可以扫一下二维码:
20
+
21
+ ![vgy.me](https://i.vgy.me/XGUDp6.png)
22
+
23
+ Using your smartphone to scan the QR Code
24
+
25
+ ### New Features based on H2O, 与 H2O 不同的新特性
26
+
27
+ #### CN
28
+
29
+ - 学术首页
30
+ - 归档页
31
+ - 系统日志页
32
+ - 社交图标扩展
33
+ - 查看大图
34
+ - 代码高亮优化
35
+ - 字数统计及阅读时间估计
36
+ - 配置项
37
+ - 前端自动构建工作流优化
38
+
39
+ #### EN
40
+
41
+ - Academic Home Page
42
+ - Archive Page
43
+ - System Logs Page
44
+ - An extened SNS icon set
45
+ - Enlarge any pictures in articles
46
+ - Optimize the code highlighting
47
+ - Words Counts and evaluate needed time
48
+ - New Settings
49
+ - Optimize the automatic workflow for static files
50
+
51
+ ### Usage 快速开始
52
+
53
+ 请访问 [H2O-ac theme for Jekyll](https://lisz.me/tech/webmaster/new-theme-h2o-ac.html) 查看详情。
54
+
55
+ Please refer to [H2O-ac theme for Jekyll](https://lisz.me/tech/webmaster/new-theme-h2o-ac.html) for details.
56
+
57
+ ### Contribution 贡献
58
+
59
+ Any types of contribution are welcome. Thanks.
60
+
61
+ 接受各种形式的贡献,包括不限于提交问题与需求,修复代码。等待您的 ```Pull Request```
62
+
63
+ #### 感谢参与 H2O 代码贡献的伙伴
64
+
65
+ - [kaeyleo](https://github.com/kaeyleo/)
66
+ - [Ray-Eldath](https://github.com/Ray-Eldath)
67
+ - [sctop](https://github.com/sctop)
68
+ - [bananaappletw](https://github.com/bananaappletw)
69
+ - [moycat](https://github.com/moycat)
70
+
71
+ ### License 许可证
72
+
73
+ Jekyll-Theme-H2O-ac is licensed under [MIT](https://github.com/kaeyleo/jekyll-theme-H2O-ac/blob/master/LICENSE).
data/_config.yml ADDED
@@ -0,0 +1,100 @@
1
+ # Site settings 配置站点
2
+ title: 'Mr Li'
3
+ description: '个人的一个技术博客站点,主要用于记录个人在学习过程中遇到的技术问题及解决方法、技术实验,以及一些比较有趣的事情。'
4
+ keyword: 'zhonger,zhonger的博客,nodejs,kvm, 机器学习'
5
+ url: '' # your host
6
+
7
+ # when build blog on server, if you don't need baseurl, you should leave this value blank.
8
+ # 在服务器上建站时,如果你不需要子域名,请将这一格留空
9
+ # if you're using GitHub Pages, set baseurl to your blog's .
10
+ # 如果你在使用 GitHub Pages, 请将 baseurl 设置为你的网址的子域名
11
+ # for example, if your site is "kaeyleo.github.io", then this url should leave blank.
12
+ # 例如,当你的域名是 "kaeyleo.github.io" 时,这个 url 需要留空
13
+ # but if your created a repo named "myblog", and the site is "kaeyleo.github.io/myblog", change baseurl to '/myblog'
14
+ # 但是,如果你创建了一个叫 "myblog" 的网站,此时网址会变成 "kaeyleo.github.io/myblog" ,这时再将 baseurl 设置为 '/myblog'
15
+ baseurl: ''
16
+
17
+ # Navigation links
18
+ nav:
19
+ home: '/'
20
+ blog: '/blog/index.html'
21
+ archives: '/archives.html'
22
+ tags: '/tags.html'
23
+ RSS: '/feed.xml'
24
+ logs: '/logs.html'
25
+
26
+ # Footer
27
+ footer:
28
+ since: 2015
29
+
30
+ # Author 配置博主信息
31
+ author: 'zhonger'
32
+ nickname: 'zhonger'
33
+ bio: '全栈开发者,热爱前端、运维和架构设计'
34
+ avatar: '/assets/img/profile.webp'
35
+
36
+ # Search
37
+ search: true
38
+
39
+ # Night mode
40
+ nightMode: false
41
+
42
+ # Comments 评论功能
43
+ comments:
44
+ disqus: false
45
+ disqus_url: 'https://liaokeyu.disqus.com/embed.js'
46
+
47
+ # MathJax 公式支持 by Ray-Eldath
48
+ mathjax: true
49
+
50
+ # Share
51
+ social-share: true
52
+ social-share-items: ['wechat', 'weibo', 'douban', 'twitter']
53
+
54
+ # theme color 主题皮肤
55
+ theme-color: 'default' # pink or default
56
+
57
+ # Post header background patterns (when the post no cover): circuitBoard, overlappingCircles, food, glamorous, ticTacToe, seaOfClouds
58
+ postPatterns: 'circuitBoard'
59
+
60
+ # SNS settings 配置社交网站
61
+ # url: email, weibo, zhihu, twitter, instagram, juejin, github, douban, facebook, dribble, uicn, jianshu, medium, linkedin
62
+ sns:
63
+ google-scholar: 'https://scholar.google.com/citations?user=AUupIooAAAAJ'
64
+ researchgate: 'https://www.researchgate.net/profile/Shengzhou-Li'
65
+ ORCID: 'https://orcid.org/0000-0001-6973-3825'
66
+ github: 'https://github.com/zhonger'
67
+ linkedin: 'https://www.linkedin.com/in/shengzhouli/'
68
+ segmentfault: 'https://segmentfault.com/u/wuwozhonger'
69
+
70
+ # Links 友情链接
71
+ links:
72
+ 'Mr Li': 'https://lisz.me'
73
+
74
+ # Beian 备案号
75
+ beian: '沪ICP备xxxxxxxx号'
76
+
77
+ # Tags 设置标签
78
+ recommend-tags: true # whether or not display recommend-tags on the sidebar
79
+ recommend-condition-size: 12 # a tag will be recommended if the size of it is more than this value
80
+
81
+ # Build settings
82
+ paginate: 10
83
+ paginate_path: 'blog/page:num'
84
+ exclude: ['node_modules', 'dev', 'package.json', 'gulpfile.js', '.gitignore', 'README.md']
85
+
86
+ # Markdown
87
+ markdown: kramdown
88
+ highlighter: rouge
89
+ kramdown:
90
+ input: GFM
91
+
92
+ # RSS
93
+ RSS: true
94
+
95
+ # Permalink
96
+ # See: https://github.com/kaeyleo/jekyll-theme-H2O/issues/35
97
+ permalink: /:categories/:title.html
98
+
99
+ # Plugins
100
+ plugins: [jekyll-paginate, jekyll-feed, jekyll-sitemap]
@@ -0,0 +1,41 @@
1
+ <!--
2
+ Author: Ray-Eldath
3
+ -->
4
+ <style>
5
+ .markdown-body .anchor{
6
+ float: left;
7
+ margin-top: -8px;
8
+ margin-left: -20px;
9
+ padding-right: 4px;
10
+ line-height: 1;
11
+ opacity: 0;
12
+ }
13
+
14
+ .markdown-body .anchor .anchor-icon{
15
+ font-size: 15px
16
+ }
17
+ </style>
18
+ <script>
19
+ $(document).ready(function() {
20
+ let nodes = document.querySelector(".markdown-body").querySelectorAll("h1,h2,h3")
21
+ for(let node of nodes) {
22
+ var anchor = document.createElement("a")
23
+ var anchorIcon = document.createElement("i")
24
+ anchorIcon.setAttribute("class", "fa fa-anchor fa-lg anchor-icon")
25
+ anchorIcon.setAttribute("aria-hidden", true)
26
+ anchor.setAttribute("class", "anchor")
27
+ anchor.setAttribute("href", "#" + node.getAttribute("id"))
28
+
29
+ anchor.onmouseover = function() {
30
+ this.style.opacity = "0.4"
31
+ }
32
+
33
+ anchor.onmouseout = function() {
34
+ this.style.opacity = "0"
35
+ }
36
+
37
+ anchor.appendChild(anchorIcon)
38
+ node.appendChild(anchor)
39
+ }
40
+ })
41
+ </script>
@@ -0,0 +1,15 @@
1
+ <footer class="g-footer">
2
+ <section>{{ site.title }} ©
3
+ {% assign current = "now" | date: "%Y" | plus: 0%}
4
+ {% unless site.footer.since and site.footer.since == current %}
5
+ {{ site.footer.since }}
6
+ -
7
+ {% endunless %}
8
+ {{ current }}
9
+ {% if site.beian %}
10
+ <a href="https://beian.miit.gov.cn/" target="_blank">{{ site.beian }}</a>
11
+ {% endif %}
12
+ </section>
13
+ <section>Powered by <a href="//jekyllrb.com">Jekyll</a> & <a href="https://github.com/zhonger/jekyll-theme-H2O-ac">Theme H2O-ac</a> (based on <a href="https://github.com/kaeyleo/jekyll-theme-H2O">Theme H2O</a>)</section>
14
+ </footer>
15
+ <script src="//at.alicdn.com/t/font_3046306_4quk6r21fv8.js"></script>
@@ -0,0 +1,18 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
5
+ <meta name="author" content="{{ site.author }}">
6
+ <meta name="description" content="{{ site.description }}">
7
+ <meta name="keywords" content="{{ site.keyword }}">
8
+ <!-- Open Graph -->
9
+ <meta property="og:title" content="{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}">
10
+ <meta property="og:type" content="website">
11
+ <meta property="og:url" content="{{ page.url | prepend: site.url }}">
12
+ <meta property="og:description" content="{{ site.description }}">
13
+ <meta property="og:site_name" content="{{ site.title }}">
14
+ <link rel="stylesheet" href="//cdn.staticfile.org/normalize/6.0.0/normalize.min.css">
15
+ <link rel="stylesheet" href="{{ "/assets/css/plugins.min.css" | relative_url }}">
16
+ <link rel="stylesheet" href="{{ "/assets/css/app.min.css" | relative_url }}">
17
+ <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
18
+ </head>
@@ -0,0 +1,16 @@
1
+ <header class="g-header">
2
+ <div class="g-logo">
3
+ <a href="{{ "/" | relative_url }}"></a>
4
+ </div>
5
+ <!-- <i id="menu-toggle" class="iconfont icon-menu"></i> -->
6
+ <svg id="menu-toggle" class="icon-menu" aria-hidden="true">
7
+ <use xlink:href="#icon-menu"></use>
8
+ </svg>
9
+ <nav class="g-nav">
10
+ <ul>
11
+ {% for i in site.nav %}
12
+ <li><a href="{{ i[1] | relative_url}}">{{ i[0] }}</a></li>
13
+ {% endfor %}
14
+ </ul>
15
+ </nav>
16
+ </header>
@@ -0,0 +1,20 @@
1
+ <!--
2
+ Author: Ray-Eldath
3
+ refer to:
4
+ - http://docs.mathjax.org/en/latest/options/index.html
5
+ -->
6
+ {% if site.mathjax %}
7
+ <script type="text/javascript" async src="https://cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
8
+
9
+ <script type="text/x-mathjax-config">
10
+ MathJax.Hub.Config({
11
+ jax: ["input/TeX", "output/HTML-CSS"],
12
+ tex2jax: {
13
+ inlineMath: [ ["$", "$"] ],
14
+ displayMath: [ ["$$", "$$"] ],
15
+ skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
16
+ },
17
+ "HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX","TeX"] }
18
+ });
19
+ </script>
20
+ {% endif %}
@@ -0,0 +1,18 @@
1
+ <nav class="pagination">
2
+ <input type="hidden" id="total_pages" value="{{ paginator.total_pages }}">
3
+ <input type="hidden" id="current_pages" value="{{ paginator.page }}">
4
+ <input type="hidden" id="base_url" value="{{ "/blog/" | relative_url }}">
5
+ <div class="page-links">
6
+ {% if paginator.previous_page %}
7
+ {% if paginator.previous_page == 1 %}
8
+ <a href="{{ "/blog/" | relative_url }}/index.html" class="page-link" title="Previous Page">&laquo;</a>
9
+ {% else %}
10
+ <a href="{{ site.baseurl }}/blog/page{{ paginator.previous_page }}/index.html" class="page-link" title="Previous Page">&laquo;</a>
11
+ {% endif %}
12
+ {% endif %}
13
+ <div id="page-link-container"></div>
14
+ {% if paginator.next_page %}
15
+ <a href="{{ site.baseurl }}/blog/page{{ paginator.next_page }}/index.html" class="page-link">&raquo;</a>
16
+ {% endif %}
17
+ </div>
18
+ </nav>
@@ -0,0 +1,25 @@
1
+ <head>
2
+ <meta charset="UTF-8">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
4
+ <title>{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}</title>
5
+ <meta name="author" content="{{ site.author }}">
6
+ <meta name="description" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
7
+ <meta name="keywords" content="{% if page.tags.size > 0 %}{% for tag in page.tags %}{{ tag }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}">
8
+ <!-- Open Graph -->
9
+ <meta property="og:title" content="{% if page.title %}{{ page.title }} - {{ site.title }}{% else %}{{ site.title }}{% endif %}">
10
+ <meta property="og:type" content="website">
11
+ <meta property="og:url" content="{{ page.url | prepend: site.url }}">
12
+ <meta property="og:description" content="{{ site.description }}">
13
+ <meta property="og:site_name" content="{{ site.title }}">
14
+ <link rel="stylesheet" href="//cdn.staticfile.org/normalize/6.0.0/normalize.min.css">
15
+ <link rel="stylesheet" href="//at.alicdn.com/t/font_roc50gemkxpw4s4i.css">
16
+ <link rel="stylesheet" href="{{ "/assets/css/plugins.min.css" | relative_url }}">
17
+ <link rel="stylesheet" href="{{ "/assets/css/app.min.css" | relative_url }}">
18
+ <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
19
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" />
20
+ <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
21
+ {% if site.mathjax %}
22
+ {% include mathjax.html %}
23
+ {% endif %}
24
+ {% include anchor.html %}
25
+ </head>
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ {% include head.html %}
4
+ <body>
5
+ <!--[if lt IE 10]>
6
+ <div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
7
+ <![endif]-->
8
+ <input id="nm-switch" type="hidden" value="{{ site.nightMode }}">
9
+ <div class="visible">
10
+ {{ content }}
11
+ </div>
12
+ <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
13
+ <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
14
+ <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
15
+ </body>
16
+ </html>
@@ -0,0 +1,93 @@
1
+ <!DOCTYPE html>
2
+ <html lang="zh-cn">
3
+ {% include head.html %}
4
+ <body>
5
+
6
+ {% include header.html %}
7
+
8
+ <div
9
+ class="g-banner home-banner {{ site.theme-color | prepend: 'banner-theme-' }}"
10
+ data-theme="{{ site.theme-color }}"
11
+ style="{% if page.header-img %}background: url({{ page.header-img | relative_url }}) no-repeat center center; background-size: cover;{% endif %}"
12
+ >
13
+ <h2>{{ page.home-title }}</h2>
14
+ <h3>{{ page.description }}</h3>
15
+ </div>
16
+
17
+ <main class="g-container home-content">
18
+ <div class="article-list">
19
+ <div class="post-content" style="padding-left: 30px;padding-right: 30px;width: auto;">
20
+ <article class="markdown-body" style="width: auto;">
21
+ {{ content }}
22
+ </article>
23
+ </div>
24
+ </div>
25
+
26
+ <aside class="g-sidebar-wrapper">
27
+ <div class="g-sidebar">
28
+ <section class="author-card">
29
+ <div class="avatar">
30
+ <img src="{{ site.avatar | relative_url }}" alt="">
31
+ </div>
32
+ <div class="author-name" rel="author">{{ site.author }}</div>
33
+ <div class="bio">
34
+ <p>{{ site.bio }}</p>
35
+ </div>
36
+ {% if site.sns.size > 0 %}
37
+ <ul id="sns-links" class="sns-links">
38
+ {% for s in site.sns %}
39
+ <li>
40
+ <a href="{{ s[1] }}" target="_blank">
41
+ <svg class="icon" aria-hidden="true">
42
+ <use xlink:href="#icon-{{ s[0] }}"></use>
43
+ </svg>
44
+ </a>
45
+ </li>
46
+ {% endfor %}
47
+ </ul>
48
+ {% endif %}
49
+ </section>
50
+
51
+ {% if site.recommend-tags and site.tags.size>0 %}
52
+ <section class="tags-card">
53
+ {% for tag in site.tags %}
54
+ {% if forloop.index > site.recommend-condition-size %}
55
+ {% break %}
56
+ {% endif %}
57
+ <a href="{{ "tags.html#" | append: tag[0] | relative_url }}" class="tag">{{ tag[0]}}</a>
58
+ {% endfor %}
59
+ </section>
60
+ {% endif %}
61
+
62
+ {% if site.links.size > 0 %}
63
+ <section class="tags-card">
64
+ <div class="links" rel="links">Links</div>
65
+ {% for link in site.links %}
66
+ <a href="{{ link[1] }}" target="_blank" class="tag" rel="noreferrer"> {{ link[0] }} </a>
67
+ {% endfor %}
68
+ </section>
69
+ {% endif %}
70
+
71
+ </div>
72
+
73
+ {% if site.search %}
74
+ <div class="search-card">
75
+ <input id="search_input" type="text" placeholder="Search..." autocomplete="off">
76
+ <svg class="icon" aria-hidden="true">
77
+ <use xlink:href="#icon-search"></use>
78
+ </svg>
79
+ <div class="search_result"></div>
80
+ </div>
81
+ {% endif %}
82
+
83
+ </aside>
84
+
85
+ </main>
86
+
87
+ {% include footer.html %}
88
+
89
+ <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
90
+ <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
91
+ <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
92
+ </body>
93
+ </html>
@@ -0,0 +1,167 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ {% include post-head.html %}
4
+
5
+ <body>
6
+ <!--[if lt IE 10]>
7
+ <div class="alert-danger" role="alert">你的浏览器实在太太太旧了,放学别走,升级完浏览器再说!<a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a></div>
8
+ <![endif]-->
9
+ <input id="nm-switch" type="hidden" value="{{ site.nightMode }}"> {% include header.html %}
10
+
11
+ <header
12
+ class="g-banner post-header {{ site.postPatterns | prepend: 'post-pattern-' }} {{ site.theme-color | prepend: 'bgcolor-' }} {% unless page.cover %}post-no-cover{% endunless %}"
13
+ data-theme="{{ site.theme-color }}"
14
+ >
15
+ <div class="post-wrapper">
16
+ <div class="post-tags">
17
+ {% if page.tags.size > 0 %}
18
+ {% for tag in page.tags %}
19
+ <a href="{{ "/tags.html#" | append: tag | relative_url }}" class="post-tag">{{ tag }}</a>
20
+ {% endfor %}
21
+ {% endif %}
22
+ </div>
23
+ <h1>{{ page.title }}</h1>
24
+ <div class="post-meta">
25
+ <span class="post-meta-item"><i class="iconfont icon-author"></i>{% if page.author %}{{ page.author }}{% else %}{{ site.author }}{% endif %}</span>
26
+ <time class="post-meta-item" datetime="{{ page.date | date:"%y-%m-%d" }}"><i class="iconfont icon-date"></i>{{ page.date | date_to_rfc822 }}</time>
27
+ </div>
28
+ <div class="post-meta">
29
+ <span>本文总共 {{ page.content | strip_html | strip_newlines | remove: " " | size }} 字 <b>·</b> 阅读全文大约需要 {{ page.content | strip_html | strip_newlines | remove: " " | size | divided_by: 350 | plus: 1 }} 分钟</span>
30
+ </div>
31
+ </div>
32
+ {% if page.cover %}
33
+ <div class="filter"></div>
34
+ <div class="post-cover" style="background: url('{{ page.cover | relative_url }}') center no-repeat; background-size: cover;"></div>
35
+ {% endif %}
36
+ </header>
37
+
38
+ <div class="post-content visible">
39
+ {% if page.subtitle %}
40
+ <h2 class="post-subtitle">{{ page.subtitle }}</h2>
41
+ {% endif %}
42
+
43
+ <article class="markdown-body">
44
+ {{ page.content }}
45
+ </article>
46
+
47
+ {% if site.social-share %}
48
+ <div class="social-share-wrapper">
49
+ <div class="social-share"></div>
50
+ </div>
51
+ {% endif %}
52
+ </div>
53
+
54
+ <section class="author-detail">
55
+ <section class="post-footer-item author-card">
56
+ <div class="avatar">
57
+ <img src="{{ site.avatar | relative_url }}" alt="">
58
+ </div>
59
+ <div class="author-name" rel="author">{{ site.author }}</div>
60
+ <div class="bio">
61
+ <p>{{ site.bio }}</p>
62
+ </div>
63
+ {% if site.sns.size > 0 %}
64
+ <ul class="sns-links">
65
+ {% for s in site.sns %}
66
+ <li>
67
+ <a href="{{ s[1] }}" target="_blank">
68
+ <svg class="icon" aria-hidden="true">
69
+ <use xlink:href="#icon-{{ s[0] }}"></use>
70
+ </svg>
71
+ </a>
72
+ </li>
73
+ {% endfor %}
74
+ </ul>
75
+ {% endif %}
76
+ </section>
77
+ <section class="post-footer-item read-next">
78
+ {% if page.next.url %}
79
+ <div class="read-next-item">
80
+ <a href="{{ page.next.url | relative_url }}" class="read-next-link"></a>
81
+ <section>
82
+ <span>{{ page.next.title }}</span>
83
+ <p>{{ page.next.excerpt | strip_html | strip_newlines | truncate: 60}}</p>
84
+ </section>
85
+ {% if page.next.cover %}
86
+ <div class="filter"></div>
87
+ <img src="{{ page.next.cover | relative_url }}" alt="">
88
+ {% endif %}
89
+ </div>
90
+ {% endif %}
91
+
92
+ {% if page.previous.url %}
93
+ <div class="read-next-item">
94
+ <a href="{{ page.previous.url | relative_url }}" class="read-next-link"></a>
95
+ <section>
96
+ <span>{{ page.previous.title }}</span>
97
+ <p>{{ page.previous.excerpt | strip_html | strip_newlines | truncate: 60}}</p>
98
+ </section>
99
+ {% if page.previous.cover %}
100
+ <div class="filter"></div>
101
+ <img src="{{ page.previous.cover | relative_url }}" alt="">
102
+ {% endif %}
103
+ </div>
104
+ {% endif %}
105
+ </section>
106
+ {% if site.comments.disqus %}
107
+ <section class="post-footer-item comment">
108
+ <div id="disqus_thread"></div>
109
+ </section>
110
+ {% endif %}
111
+ </section>
112
+
113
+ {% include footer.html %}
114
+
115
+ <script src="{{ "/assets/js/social-share.min.js" | relative_url }}"></script>
116
+ <script>
117
+ socialShare('.social-share', {
118
+ sites: [
119
+ {% for i in site.social-share-items %}
120
+ '{{ i }}'
121
+ {% if forloop.last == false %},
122
+ {% endif %}
123
+ {% endfor %}
124
+ ],
125
+ wechatQrcodeTitle: "分享到微信朋友圈",
126
+ wechatQrcodeHelper: '<p>扫码后点击右上角</p><p>将本文分享至朋友圈</p>'
127
+ });
128
+ </script>
129
+
130
+ {% if site.comments.disqus %}
131
+ <script>
132
+ /**
133
+ * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
134
+ * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables*/
135
+ /*
136
+ var disqus_config = function () {
137
+ this.page.url = PAGE_URL; // Replace PAGE_URL with your page's canonical URL variable
138
+ this.page.identifier = PAGE_IDENTIFIER; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
139
+ };
140
+ */
141
+ (function() { // DON'T EDIT BELOW THIS LINE
142
+ var d = document, s = d.createElement('script');
143
+ s.src = '{{ site.comments.disqus_url }}';
144
+ s.setAttribute('data-timestamp', +new Date());
145
+ (d.head || d.body).appendChild(s);
146
+ })();
147
+ </script>
148
+ {% endif %}
149
+
150
+ <script src="{{ "/assets/js/prism.js" | relative_url }}"></script>
151
+ <script src="{{ "/assets/js/index.min.js" | relative_url }}"></script>
152
+ <script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
153
+ <script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
154
+ <script>
155
+ // 给图片添加链接
156
+ $(document).ready(function() {
157
+ $("p img").each(function() {
158
+ var strA = "<a data-fancybox='gallery' ref='gallery1' href='" + this.src + "'></a>";
159
+ $(this).wrapAll(strA);
160
+ });
161
+
162
+ $('[data-fancybox="gallery"]').fancybox();
163
+ });
164
+ </script>
165
+ </body>
166
+
167
+ </html>