jekyll-text-theme 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/_data/locale.yml +4 -4
- data/_includes/blog/article-data.html +1 -1
- data/_includes/blog/header.html +6 -17
- data/_includes/blog/tags.html +2 -2
- data/_includes/info/follow-me.html +7 -7
- data/_includes/snippets/get-nav-url.html +7 -0
- data/_includes/utils/comment-gitalk.html +22 -0
- data/_includes/utils/google-analytics.html +2 -2
- data/_includes/utils/mathjax.html +5 -2
- data/_includes/utils/mermaid.html +9 -0
- data/_layouts/blog-base.html +3 -2
- data/_layouts/home.html +7 -7
- data/_layouts/page.html +1 -0
- data/_layouts/post.html +6 -4
- data/_sass/base/_links.scss +27 -31
- data/_sass/blog/_layout.post.scss +2 -1
- data/_sass/colors/_colors.chocolate.scss +1 -1
- data/_sass/colors/_colors.dark.scss +1 -1
- data/_sass/colors/_colors.default.scss +1 -1
- data/_sass/colors/_colors.forest.scss +1 -1
- data/_sass/colors/_colors.ocean.scss +1 -1
- data/_sass/colors/_colors.orange.scss +1 -1
- data/_sass/components/_article.content.scss +15 -15
- data/_sass/components/_follow-me.scss +10 -9
- data/_sass/components/_footer.scss +0 -5
- data/_sass/components/_license.scss +2 -3
- data/_sass/components/_toc.scss +14 -21
- data/_sass/components/_wrapper.scss +2 -2
- data/_sass/mixins/_link.scss +11 -11
- data/_sass/mixins/_shape.scss +19 -0
- data/_sass/settings/_base.scss +5 -5
- data/_sass/settings/_colors.scss +4 -1
- data/_sass/settings/_highlighting.scss +9 -3
- data/assets/css/blog.scss +1 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93c347fb53eec2e1bda0852209a9049932e2d60e
|
4
|
+
data.tar.gz: ddaee6e856ae386f598f4ae358b7346caeef4c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 912a7e1d30414c5af48861d85be7be7fba4284eb8c5b169b9d0e83922b8b1a5c91137995c7276694af268a0568376e49d7e1f9c6a0d783ec4ff2727f60fac783
|
7
|
+
data.tar.gz: 92667fb44eebd026105e1f4e1cd46eb0af28b9cd40eea63193e40830e843c6d760128c5572f91d17452f48f08adef21ef42366dd65767453bd60808c94df57f1
|
data/README.md
CHANGED
@@ -24,13 +24,14 @@ TeXt 是针对博客的一款简洁的主题,它虽然简洁但并不简单。
|
|
24
24
|
- 文章标签
|
25
25
|
- 阅读次数统计([LeanCloud](https://leancloud.cn/))
|
26
26
|
- Emoji([Jemoji](https://github.com/jekyll/jemoji))
|
27
|
-
- 评论([Disqus](https://disqus.com/))
|
27
|
+
- 评论([Disqus](https://disqus.com/), [gitalk](https://gitalk.github.io/))
|
28
28
|
- Google Analytics
|
29
29
|
- 联系方式设置(Email, Facebook, Twitter, 微博, 知乎……)
|
30
30
|
- Web 语意化
|
31
31
|
- 网站图标的自动化工具([gulp-svg2png](https://www.npmjs.com/package/gulp-svg2png), [gulp-to-ico](https://www.npmjs.com/package/gulp-to-ico))
|
32
32
|
- Color Theme
|
33
33
|
- 数学公式([MathJax](https://www.mathjax.org/))
|
34
|
+
- 流程图, 序列图,甘特图([mermaid](https://mermaidjs.github.io/))
|
34
35
|
- RSS([jekyll-feed](https://github.com/jekyll/jekyll-feed))
|
35
36
|
- 多语言支持(English | 简体中文 | 繁體中文)
|
36
37
|
|
@@ -140,7 +141,15 @@ bundle exec jekyll serve -H 0.0.0.0
|
|
140
141
|
|
141
142
|
### 评论系统
|
142
143
|
|
143
|
-
|
144
|
+
目前支持 Disqus 和 gitalk 评论系统,优先使用 Disqus。
|
145
|
+
|
146
|
+
#### Disqus
|
147
|
+
|
148
|
+
在 ./\_config.yml 文件的 `disqus.shortname` 项填上你在 [Disqus](https://disqus.com/) 上为网站建立的 site 对应的 shortname 即可,需要注意的是 Disqus 在大陆是无法直接访问的。
|
149
|
+
|
150
|
+
#### gitalk
|
151
|
+
|
152
|
+
在 ./\_config.yml 文件的 `gitalk` 的子项(`clientID`,`clientSecret`, `repository`, `owner`, `admin`)填上 gitalk 的对应参数 即可,详见 [gitalk 中文文档](https://github.com/gitalk/gitalk/blob/master/readme-cn.md)。
|
144
153
|
|
145
154
|
> 注意:使用评论系统必须在文章的头信息中设置 key 值(可用字符集:`字母`、`数字` 及 `- _ : .`)。
|
146
155
|
|
data/_data/locale.yml
CHANGED
@@ -21,7 +21,7 @@ READMORE:
|
|
21
21
|
zh-Hans: "点我阅读更多..."
|
22
22
|
zh-Hant: "「點我閱讀更多」"
|
23
23
|
|
24
|
-
COPYRIGHT_DATES: "
|
24
|
+
COPYRIGHT_DATES: "2018"
|
25
25
|
|
26
26
|
LAST_UPDATED:
|
27
27
|
en: "Last updated"
|
@@ -43,9 +43,9 @@ ARTICLE_LIST_DATE_FORMAT:
|
|
43
43
|
|
44
44
|
STATISTICS:
|
45
45
|
en: "[POST_COUNT] post articles, [PAGE_COUNT] pages."
|
46
|
-
zh: "共计 [POST_COUNT]
|
47
|
-
zh-Hans: "共计 [POST_COUNT]
|
48
|
-
zh-Hant: "共計 [POST_COUNT]
|
46
|
+
zh: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。"
|
47
|
+
zh-Hans: "共计 [POST_COUNT] 篇文章,[PAGE_COUNT] 页。"
|
48
|
+
zh-Hant: "共計 [POST_COUNT] 篇文章,[PAGE_COUNT] 頁。"
|
49
49
|
|
50
50
|
LICENSE_ANNOUNCE:
|
51
51
|
en: "This work is licensed under a [LICENSE] license."
|
@@ -26,7 +26,7 @@
|
|
26
26
|
{%- assign __path = all_path | append: '?tag=' -%}
|
27
27
|
{%- include snippets/prepend-baseurl.html -%}
|
28
28
|
<li>
|
29
|
-
<a class="
|
29
|
+
<a class="pill-button" href="{{ __return | append: _tag | replace: '//', '/' }}">{{ tag }}</a>
|
30
30
|
</li>
|
31
31
|
{%- endfor -%}
|
32
32
|
</ul>
|
data/_includes/blog/header.html
CHANGED
@@ -4,13 +4,7 @@
|
|
4
4
|
{%- else -%}
|
5
5
|
{%- assign __path = '/' -%}
|
6
6
|
{%- endif -%}
|
7
|
-
{%-
|
8
|
-
{%- if pre7 == 'http://' or pre8 == 'https://' -%}
|
9
|
-
{%- assign href = __path -%}
|
10
|
-
{%- else -%}
|
11
|
-
{%- include snippets/prepend-baseurl.html -%}
|
12
|
-
{%- assign href = __return -%}
|
13
|
-
{%- endif -%}
|
7
|
+
{%- include snippets/get-nav-url.html -%}
|
14
8
|
{%- if site.title -%}
|
15
9
|
<a class="site-title" title="{%- if site.description -%}{{ site.description }}{%- endif -%}" href="{{ __return }}">{{ site.title }}</a>
|
16
10
|
{%- endif -%}
|
@@ -24,13 +18,8 @@
|
|
24
18
|
{%- else -%}
|
25
19
|
{%- assign __path = '/' -%}
|
26
20
|
{%- endif -%}
|
27
|
-
{%-
|
28
|
-
{%-
|
29
|
-
{%- assign href = __path -%}
|
30
|
-
{%- else -%}
|
31
|
-
{%- include snippets/prepend-baseurl.html -%}
|
32
|
-
{%- assign href = __return -%}
|
33
|
-
{%- endif -%}
|
21
|
+
{%- include snippets/get-nav-url.html -%}
|
22
|
+
{%- assign href = __return -%}
|
34
23
|
{%- assign __locale = site.data.locale.NAV.HOME -%}
|
35
24
|
{%- include snippets/locale-to-string.html -%}
|
36
25
|
<li><a href="{{ href }}">{{ __return }}</a></li>
|
@@ -39,14 +28,14 @@
|
|
39
28
|
{%- else -%}
|
40
29
|
{%- assign __path = '/all.html' -%}
|
41
30
|
{%- endif -%}
|
42
|
-
{%- include snippets/
|
31
|
+
{%- include snippets/get-nav-url.html -%}
|
43
32
|
{%- assign href = __return -%}
|
44
33
|
{%- assign __locale = site.data.locale.NAV.ALL -%}
|
45
34
|
{%- include snippets/locale-to-string.html -%}
|
46
35
|
<li><a href="{{ href }}">{{ __return }}</a></li>
|
47
36
|
{%- for list in site.nav_lists -%}
|
48
37
|
{%- assign __path = list.url -%}
|
49
|
-
{%- include snippets/
|
38
|
+
{%- include snippets/get-nav-url.html -%}
|
50
39
|
{%- assign href = __return -%}
|
51
40
|
{%- assign __locale = list.titles -%}
|
52
41
|
{%- include snippets/locale-to-string.html -%}
|
@@ -57,7 +46,7 @@
|
|
57
46
|
{%- else -%}
|
58
47
|
{%- assign __path = '/feed.xml' -%}
|
59
48
|
{%- endif -%}
|
60
|
-
{%- include snippets/
|
49
|
+
{%- include snippets/get-nav-url.html -%}
|
61
50
|
{%- assign href = __return -%}
|
62
51
|
{%- assign __locale = site.data.locale.NAV.RSS -%}
|
63
52
|
{%- include snippets/locale-to-string.html -%}
|
data/_includes/blog/tags.html
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
<div class="m-tags">
|
19
19
|
<ul class="inline-list">
|
20
20
|
<li>
|
21
|
-
<button type="button" class="js-article-tag js-tag-show-all all
|
21
|
+
<button type="button" class="js-article-tag js-tag-show-all all pill-button" onclick="tagSelect('')">Show All
|
22
22
|
<div class="tag-count">{{ site.posts | size }}</div>
|
23
23
|
</button>
|
24
24
|
</li>
|
@@ -43,7 +43,7 @@
|
|
43
43
|
{%- else -%}
|
44
44
|
{%- assign c_index = 4 -%}
|
45
45
|
{%- endif -%}
|
46
|
-
<li><button type="button" class="js-article-tag tag-{{ c_index }}
|
46
|
+
<li><button type="button" class="js-article-tag tag-{{ c_index }} pill-button"
|
47
47
|
data-tag="{{ tag[0] | strip | url_encode }}" onclick="tagSelect('{{ tag[0] | strip | url_encode }}')">
|
48
48
|
<span>{{ tag[0] | strip }}</span><div class="tag-count">{{ tag[1].size }}</div>
|
49
49
|
</button>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<link itemprop="url" href="{{ '/' | prepend: site.url }}">
|
7
7
|
{%- if site.author.weibo -%}
|
8
8
|
<li title="{{ __return | replace: '[NAME]', 'Weibo' }}">
|
9
|
-
<div class="round-button weibo">
|
9
|
+
<div class="floating-action-round-button weibo">
|
10
10
|
<a itemprop="sameAs" href="https://weibo.com/{{ site.author.weibo }}" target="_blank">
|
11
11
|
<div class="icon">{%- include icon/social/weibo.svg -%}</div>
|
12
12
|
</a>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
{%- endif -%}
|
16
16
|
{%- if site.author.facebook -%}
|
17
17
|
<li title="{{ __return | replace: '[NAME]', 'Facebook' }}">
|
18
|
-
<div class="round-button facebook">
|
18
|
+
<div class="floating-action-round-button facebook">
|
19
19
|
<a itemprop="sameAs" href="https://www.facebook.com/{{ site.author.facebook }}" target="_blank">
|
20
20
|
<div class="icon">{%- include icon/social/facebook.svg -%}</div>
|
21
21
|
</a>
|
@@ -24,7 +24,7 @@
|
|
24
24
|
{%- endif -%}
|
25
25
|
{%- if site.author.twitter -%}
|
26
26
|
<li title="{{ __return | replace: '[NAME]', 'Twitter' }}">
|
27
|
-
<div class="round-button twitter">
|
27
|
+
<div class="floating-action-round-button twitter">
|
28
28
|
<a itemprop="sameAs" href="https://twitter.com/{{ site.author.twitter }}" target="_blank">
|
29
29
|
<div class="icon">{%- include icon/social/twitter.svg -%}</div>
|
30
30
|
</a>
|
@@ -33,7 +33,7 @@
|
|
33
33
|
{%- endif -%}
|
34
34
|
{%- if site.author.googleplus -%}
|
35
35
|
<li title="{{ __return | replace: '[NAME]', 'Google+' }}">
|
36
|
-
<div class="round-button googlepluse">
|
36
|
+
<div class="floating-action-round-button googlepluse">
|
37
37
|
<a itemprop="sameAs" href="https://plus.google.com/u/0/{{ site.author.googleplus }}" target="_blank">
|
38
38
|
<div class="icon">{%- include icon/social/googleplus.svg -%}</div>
|
39
39
|
</a>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
{%- endif -%}
|
43
43
|
{%- if site.author.github -%}
|
44
44
|
<li title="{{ __return | replace: '[NAME]', 'Github' }}">
|
45
|
-
<div class="round-button github">
|
45
|
+
<div class="floating-action-round-button github">
|
46
46
|
<a itemprop="sameAs" href="https://github.com/{{ site.author.github }}" target="_blank">
|
47
47
|
<div class="icon">{%- include icon/social/github.svg -%}</div>
|
48
48
|
</a>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
{%- endif -%}
|
52
52
|
{%- if site.author.linkedin -%}
|
53
53
|
<li title="{{ __return | replace: '[NAME]', 'Linkedin' }}">
|
54
|
-
<div class="round-button linkedin">
|
54
|
+
<div class="floating-action-round-button linkedin">
|
55
55
|
<a itemprop="sameAs" href="https://www.linkedin.com/in/{{ site.author.linkedin }}" target="_blank">
|
56
56
|
<div class="icon">{%- include icon/social/linkedin.svg -%}</div>
|
57
57
|
</a>
|
@@ -60,7 +60,7 @@
|
|
60
60
|
{%- endif -%}
|
61
61
|
{%- if site.author.douban -%}
|
62
62
|
<li title="{{ __return | replace: '[NAME]', 'Douban' }}">
|
63
|
-
<div class="round-button douban">
|
63
|
+
<div class="floating-action-round-button douban">
|
64
64
|
<a itemprop="sameAs" href="https://www.douban.com/people/{{ site.author.douban }}" target="_blank">
|
65
65
|
<div class="icon">{%- include icon/social/douban.svg -%}</div>
|
66
66
|
</a>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{%- assign pre7 = __path | slice: 0, 7 -%} {%- assign pre8 = __path | slice: 0, 8 -%}
|
2
|
+
{%- if pre7 == 'http://' or pre8 == 'https://' -%}
|
3
|
+
{%- assign __return = __path -%}
|
4
|
+
{%- else -%}
|
5
|
+
{%- include snippets/prepend-baseurl.html -%}
|
6
|
+
{%- assign __return = __return -%}
|
7
|
+
{%- endif -%}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
{%- if site.disqus.shortname == nil and site.gitalk.clientID and site.gitalk.clientSecret and site.gitalk.repository and site.gitalk.owner and site.gitalk.admin and page.key -%}
|
2
|
+
<link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
|
3
|
+
<div id="js-gitalk-container"></div>
|
4
|
+
{%- assign admin = '' -%}
|
5
|
+
{%- for adminId in site.gitalk.admin -%}
|
6
|
+
{%- assign admin = admin | append: ", '" | append: adminId | append: "'" -%}
|
7
|
+
{%- endfor -%}
|
8
|
+
{%- assign last = admin | size | minus: 1 -%}
|
9
|
+
{%- assign admin = admin | slice: 2, last -%}
|
10
|
+
<script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script>
|
11
|
+
<script>
|
12
|
+
var gitalk = new Gitalk({
|
13
|
+
clientID: '{{ site.gitalk.clientID }}',
|
14
|
+
clientSecret: '{{ site.gitalk.clientSecret }}',
|
15
|
+
repo: '{{ site.gitalk.repository }}',
|
16
|
+
owner: '{{ site.gitalk.owner }}',
|
17
|
+
admin: [{{ admin }}],
|
18
|
+
id: '{{ page.key }}'
|
19
|
+
});
|
20
|
+
gitalk.render('js-gitalk-container');
|
21
|
+
</script>
|
22
|
+
{%- endif -%}
|
@@ -4,10 +4,10 @@
|
|
4
4
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
5
5
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
6
6
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
7
|
-
})(window,document,'script','
|
7
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
8
8
|
|
9
9
|
ga('create', '{{ site.ga_tracking_id }}', 'auto');
|
10
10
|
ga('send', 'pageview');
|
11
11
|
</script>
|
12
12
|
<!-- End Google Analytics -->
|
13
|
-
{%- endif -%}
|
13
|
+
{%- endif -%}
|
@@ -1,5 +1,8 @@
|
|
1
1
|
{%- if site.mathjax == true or page.mathjax == true -%}
|
2
|
-
<script type="text/
|
3
|
-
|
2
|
+
<script type="text/x-mathjax-config">
|
3
|
+
MathJax.Hub.Config({
|
4
|
+
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
|
5
|
+
});
|
4
6
|
</script>
|
7
|
+
<script type="text/javascript" async src="//cdn.bootcss.com/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML"></script>
|
5
8
|
{%- endif -%}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
{%- if site.mermaid == true or page.mermaid == true -%}
|
2
|
+
<script src="//cdn.bootcss.com/mermaid/7.1.2/mermaid.min.js"></script>
|
3
|
+
<script>
|
4
|
+
mermaid.init(undefined, '.language-mermaid');
|
5
|
+
$(function() {
|
6
|
+
mermaid.initialize({ startOnLoad: true });
|
7
|
+
});
|
8
|
+
</script>
|
9
|
+
{%- endif -%}
|
data/_layouts/blog-base.html
CHANGED
@@ -15,7 +15,6 @@
|
|
15
15
|
{%- endif -%}
|
16
16
|
</style>
|
17
17
|
<script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
|
18
|
-
{%- include utils/mathjax.html -%}
|
19
18
|
</head>
|
20
19
|
<body>
|
21
20
|
<div class="m-page-stage js-page-stage">{{ content }}</div>
|
@@ -28,7 +27,9 @@
|
|
28
27
|
});
|
29
28
|
});
|
30
29
|
</script>
|
31
|
-
{%-
|
30
|
+
{%- include utils/mathjax.html -%}
|
31
|
+
{%- include utils/mermaid.html -%}
|
32
|
+
{%- if site.isdebug == false -%}
|
32
33
|
{%- include utils/google-analytics.html -%}
|
33
34
|
{%- endif -%}
|
34
35
|
</body>
|
data/_layouts/home.html
CHANGED
@@ -57,12 +57,12 @@ titles:
|
|
57
57
|
<div class="round-button cur"><span>{{ page }}</span></div>
|
58
58
|
</li>
|
59
59
|
{%- elsif page == 1 -%}
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
60
|
+
{%- if site.paths.base -%}
|
61
|
+
{%- assign __path = site.paths.base -%}
|
62
|
+
{%- else -%}
|
63
|
+
{%- assign __path = '/' -%}
|
64
|
+
{%- endif -%}
|
65
|
+
{%- include snippets/prepend-baseurl.html -%}
|
66
66
|
{%- assign href = __return -%}
|
67
67
|
<li>
|
68
68
|
<a class="round-button" href="{{ href }}"><span>{{ page }}</span></a>
|
@@ -96,7 +96,7 @@ titles:
|
|
96
96
|
</div>
|
97
97
|
</div>
|
98
98
|
{%- if site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false -%}
|
99
|
-
<script src="
|
99
|
+
<script src="//cdn1.lncld.net/static/js/3.4.1/av-min.js"></script>
|
100
100
|
<script>
|
101
101
|
$(function() {
|
102
102
|
AV.init({
|
data/_layouts/page.html
CHANGED
@@ -8,6 +8,7 @@ layout: blog-default
|
|
8
8
|
<div class="m-article-content" itemprop="articleBody">{{ content }}</div>
|
9
9
|
{%- if page.comment != false -%}
|
10
10
|
<section>{%- include utils/comment-disqus.html -%}</section>
|
11
|
+
<section>{%- include utils/comment-gitalk.html -%}</section>
|
11
12
|
{%- endif -%}
|
12
13
|
</article>
|
13
14
|
</div>
|
data/_layouts/post.html
CHANGED
@@ -30,7 +30,8 @@ layout: blog-default
|
|
30
30
|
</div>
|
31
31
|
</footer>
|
32
32
|
{%- if page.comment != false -%}
|
33
|
-
|
33
|
+
<section>{%- include utils/comment-disqus.html -%}</section>
|
34
|
+
<section>{%- include utils/comment-gitalk.html -%}</section>
|
34
35
|
{%- endif -%}
|
35
36
|
</article>
|
36
37
|
</div>
|
@@ -147,7 +148,7 @@ layout: blog-default
|
|
147
148
|
});
|
148
149
|
</script>
|
149
150
|
{%- if page.key and site.leancloud.app_id and site.leancloud.app_key and site.leancloud.app_class and site.isdebug == false -%}
|
150
|
-
<script src="
|
151
|
+
<script src="//cdn1.lncld.net/static/js/3.4.1/av-min.js"></script>
|
151
152
|
<script type="text/javascript">
|
152
153
|
$(function() {
|
153
154
|
// 初始化
|
@@ -179,8 +180,9 @@ layout: blog-default
|
|
179
180
|
|
180
181
|
function addOne(page) {
|
181
182
|
page.increment('views', 1);
|
182
|
-
page.
|
183
|
-
|
183
|
+
page.save(null, {
|
184
|
+
fetchWhenSave: true
|
185
|
+
}).then(function(page) {
|
184
186
|
$("#post-key-{{ page.key }}").text(page.attributes.views);
|
185
187
|
}, function(error) {
|
186
188
|
if (error) {
|
data/_sass/base/_links.scss
CHANGED
@@ -23,17 +23,11 @@ a {
|
|
23
23
|
@include transition(all .8s ease 0s);
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
%button {
|
27
27
|
font-weight: $bold-font-weight;
|
28
28
|
line-height: 1;
|
29
|
-
@include flexbox;
|
30
|
-
@include justify-content(center);
|
31
|
-
@include align-items(center);
|
32
|
-
box-sizing: border-box;
|
33
|
-
width: $base-font-size * 2;
|
34
|
-
height: $base-font-size * 2;
|
35
29
|
text-decoration: none;
|
36
|
-
|
30
|
+
box-sizing: border-box;
|
37
31
|
@extend %cursor-pointer;
|
38
32
|
@include link-colors( $text-color-3, $main-color-3, $text-color-1, $main-color-1);
|
39
33
|
@include link-normal {
|
@@ -46,32 +40,34 @@ a {
|
|
46
40
|
svg {
|
47
41
|
width: $base-font-size;
|
48
42
|
height: $base-font-size;
|
43
|
+
path {
|
44
|
+
@include transition(fill .8s ease 0s);
|
45
|
+
}
|
49
46
|
}
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
}
|
48
|
+
|
49
|
+
%floating-action {
|
50
|
+
box-shadow: $shadow-base;
|
51
|
+
&:hover {
|
52
|
+
box-shadow: $shadow-high;
|
53
53
|
}
|
54
54
|
}
|
55
55
|
|
56
|
-
.round-
|
57
|
-
|
58
|
-
|
56
|
+
.round-button {
|
57
|
+
@extend %button;
|
58
|
+
@include round;
|
59
|
+
@include flexbox;
|
60
|
+
@include justify-content(center);
|
61
|
+
@include align-items(center);
|
62
|
+
}
|
63
|
+
|
64
|
+
.floating-action-round-button {
|
65
|
+
@extend .round-button;
|
66
|
+
@extend %floating-action;
|
67
|
+
}
|
68
|
+
|
69
|
+
.pill-button {
|
70
|
+
@extend %button;
|
71
|
+
@include round-rect($base-font-size * 2);
|
59
72
|
display: block;
|
60
|
-
box-sizing: border-box;
|
61
|
-
padding: $base-font-size * .4 $base-font-size * .6;
|
62
|
-
text-decoration: none;
|
63
|
-
border-radius: $base-font-size * 2;
|
64
|
-
@extend %cursor-pointer;
|
65
|
-
@include link-colors( $text-color-3, $main-color-3, $text-color-1, $main-color-1);
|
66
|
-
@include link-normal {
|
67
|
-
text-decoration: none;
|
68
|
-
}
|
69
|
-
@include link-emphasize {
|
70
|
-
text-decoration: none;
|
71
|
-
}
|
72
|
-
@include transition(all .8s ease 0s);
|
73
|
-
svg {
|
74
|
-
width: $base-font-size;
|
75
|
-
height: $base-font-size;
|
76
|
-
}
|
77
73
|
}
|
@@ -26,7 +26,7 @@ $text-background-color:#e3d1ca;
|
|
26
26
|
$border-color: #dcc6bd;
|
27
27
|
$select-color: rgba($main-color-3, .5);
|
28
28
|
$decorate-color: rgba(#000, .1);
|
29
|
-
$shadow-
|
29
|
+
$shadow-color: rgba(#000, .15);
|
30
30
|
|
31
31
|
// logo colors
|
32
32
|
$mail-color: #0072c5;
|
@@ -26,7 +26,7 @@ $text-background-color:#f2f2f2;
|
|
26
26
|
$border-color: #aeaeae;
|
27
27
|
$select-color: rgba($main-color-1, .5);
|
28
28
|
$decorate-color: rgba(#000, .1);
|
29
|
-
$shadow-
|
29
|
+
$shadow-color: rgba(#000, .15);
|
30
30
|
|
31
31
|
// logo colors
|
32
32
|
$mail-color: #0072c5;
|
@@ -26,7 +26,7 @@ $text-background-color:#f2f2f2;
|
|
26
26
|
$border-color: #eacfd3;
|
27
27
|
$select-color: rgba($main-color-1, .5);
|
28
28
|
$decorate-color: rgba(#bb6170, .15);
|
29
|
-
$shadow-
|
29
|
+
$shadow-color: rgba(#000, .15);
|
30
30
|
|
31
31
|
// logo colors
|
32
32
|
$mail-color: #0072c5;
|
@@ -26,7 +26,7 @@ $text-background-color:#f2f2f2;
|
|
26
26
|
$border-color: #aeaeae;
|
27
27
|
$select-color: rgba($main-color-1, .5);
|
28
28
|
$decorate-color: rgba(#000, .1);
|
29
|
-
$shadow-
|
29
|
+
$shadow-color: rgba(#000, .15);
|
30
30
|
|
31
31
|
// logo colors
|
32
32
|
$mail-color: #0072c5;
|
@@ -26,7 +26,7 @@ $text-background-color:rgba(#000, .05);
|
|
26
26
|
$border-color: rgba(#000, .2);
|
27
27
|
$select-color: rgba($main-color-3, .5);
|
28
28
|
$decorate-color: rgba(#000, .1);
|
29
|
-
$shadow-
|
29
|
+
$shadow-color: rgba(#000, .15);
|
30
30
|
|
31
31
|
// logo colors
|
32
32
|
$mail-color: #0072c5;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
.m-article-content {
|
2
|
+
word-wrap: break-word;
|
2
3
|
line-height: $article-line-height;
|
3
4
|
h1,
|
4
5
|
h2,
|
@@ -44,40 +45,39 @@
|
|
44
45
|
height: $base-font-size * $article-line-height * .7;
|
45
46
|
}
|
46
47
|
code {
|
47
|
-
|
48
|
-
border-radius: $code-font-size * .4;
|
49
|
-
background-color: $text-background-color;
|
48
|
+
@include round-rect($round-rect-radius, $base-font-size * .2 $base-font-size * .5);
|
50
49
|
span {
|
51
50
|
padding: 0;
|
52
51
|
margin: 0;
|
53
52
|
}
|
54
53
|
}
|
54
|
+
div.highlighter-rouge, figure, pre {
|
55
|
+
margin: $content-gap 0;
|
56
|
+
}
|
57
|
+
code.language-mermaid {
|
58
|
+
background-color: $background-color;
|
59
|
+
}
|
55
60
|
pre {
|
56
61
|
display: block;
|
57
62
|
overflow: auto;
|
58
63
|
-webkit-overflow-scrolling: touch;
|
59
|
-
|
60
|
-
border-radius: $code-font-size * .4;
|
61
|
-
;
|
62
|
-
background-size: auto $code-font-size * $code-line-height * 2;
|
63
|
-
background-origin: content-box;
|
64
|
+
border-radius: $round-rect-radius;
|
64
65
|
&>code {
|
66
|
+
padding-top: $code-font-size * 1.5;
|
67
|
+
padding-bottom: $code-font-size * 1.3;
|
65
68
|
font-size: $code-font-size;
|
66
|
-
|
69
|
+
word-wrap: normal;
|
67
70
|
margin: 0;
|
68
71
|
display: block;
|
69
72
|
line-height: $code-line-height;
|
70
|
-
background-color: transparent;
|
71
73
|
}
|
72
74
|
}
|
73
75
|
figure {
|
74
|
-
margin: $content-gap 0;
|
75
76
|
&:before {
|
76
77
|
content: attr(data-lang);
|
77
|
-
background-color: $text-background-color;
|
78
78
|
display: block;
|
79
|
-
border-top-left-radius: $
|
80
|
-
border-top-right-radius: $
|
79
|
+
border-top-left-radius: $round-rect-radius;
|
80
|
+
border-top-right-radius: $round-rect-radius;
|
81
81
|
padding: $code-font-size / 2 $code-font-size $code-font-size / 2 0;
|
82
82
|
color: $decorate-color;
|
83
83
|
font-weight: $bold-font-weight;
|
@@ -86,9 +86,9 @@
|
|
86
86
|
text-transform: uppercase;
|
87
87
|
}
|
88
88
|
&>pre {
|
89
|
+
margin: 0;
|
89
90
|
border-top-left-radius: 0;
|
90
91
|
border-top-right-radius: 0;
|
91
|
-
margin: 0;
|
92
92
|
&>code {
|
93
93
|
padding-top: 0;
|
94
94
|
}
|
@@ -2,6 +2,7 @@
|
|
2
2
|
text-align: center;
|
3
3
|
&>ul {
|
4
4
|
margin: 0;
|
5
|
+
justify-content: center;
|
5
6
|
}
|
6
7
|
.round-button {
|
7
8
|
color: $text-color-1;
|
@@ -11,30 +12,30 @@
|
|
11
12
|
&:not(:last-child) {
|
12
13
|
margin-right: $spacing-unit / 6;
|
13
14
|
}
|
14
|
-
@include link-background-colors ( $main-color-1,
|
15
|
+
@include link-background-colors ( $main-color-1, lighten($main-color-1, 5%))
|
15
16
|
}
|
16
17
|
.mail {
|
17
|
-
@include link-background-colors ( $mail-color,
|
18
|
+
@include link-background-colors ( $mail-color, lighten($mail-color, 5%))
|
18
19
|
}
|
19
20
|
.weibo {
|
20
|
-
@include link-background-colors ( $weibo-color,
|
21
|
+
@include link-background-colors ( $weibo-color, lighten($weibo-color, 5%))
|
21
22
|
}
|
22
23
|
.facebook {
|
23
|
-
@include link-background-colors ( $facebook-color,
|
24
|
+
@include link-background-colors ( $facebook-color, lighten($facebook-color, 5%))
|
24
25
|
}
|
25
26
|
.twitter {
|
26
|
-
@include link-background-colors ( $twitter-color,
|
27
|
+
@include link-background-colors ( $twitter-color, lighten($twitter-color, 5%))
|
27
28
|
}
|
28
29
|
.googlepluse {
|
29
|
-
@include link-background-colors ( $google-plus-color,
|
30
|
+
@include link-background-colors ( $google-plus-color, lighten($google-plus-color, 5%))
|
30
31
|
}
|
31
32
|
.github {
|
32
|
-
@include link-background-colors ( $github-color, lighten($github-color,
|
33
|
+
@include link-background-colors ( $github-color, lighten($github-color, 20%))
|
33
34
|
}
|
34
35
|
.linkedin {
|
35
|
-
@include link-background-colors ( $linkedin-color,
|
36
|
+
@include link-background-colors ( $linkedin-color, lighten($linkedin-color, 5%))
|
36
37
|
}
|
37
38
|
.douban {
|
38
|
-
@include link-background-colors ( $douban-color,
|
39
|
+
@include link-background-colors ( $douban-color, lighten($douban-color, 5%))
|
39
40
|
}
|
40
41
|
}
|
@@ -1,8 +1,7 @@
|
|
1
1
|
.m-license {
|
2
|
-
|
2
|
+
@include round-rect($base-font-size, $base-font-size / 2 $base-font-size);
|
3
3
|
background-color: $text-background-color;
|
4
|
-
box-shadow: $shadow-
|
5
|
-
padding: $base-font-size / 2 $base-font-size;
|
4
|
+
box-shadow: $shadow-base;
|
6
5
|
font-weight: $bold-font-weight;
|
7
6
|
img {
|
8
7
|
vertical-align: bottom;
|
data/_sass/components/_toc.scss
CHANGED
@@ -2,33 +2,23 @@
|
|
2
2
|
ul {
|
3
3
|
display: block;
|
4
4
|
list-style-type: none;
|
5
|
-
&>li {
|
6
|
-
border: 0 solid rgba(0, 0, 0, 0);
|
7
|
-
border-left-width: 4px;
|
8
|
-
margin-left: -4px;
|
9
|
-
&:not(:last-child) {
|
10
|
-
margin-bottom: $content-gap / 4;
|
11
|
-
}
|
12
|
-
}
|
13
5
|
}
|
14
6
|
a {
|
15
|
-
display: block;
|
16
|
-
margin: $small-font-size / 4;
|
7
|
+
display: inline-block;
|
17
8
|
font-size: $small-font-size;
|
18
9
|
text-decoration: none;
|
19
10
|
line-height: $toc-line-height;
|
20
11
|
font-weight: $base-font-weight;
|
21
|
-
@include
|
22
|
-
color: $text-color;
|
23
|
-
}
|
12
|
+
@include round-rect($round-rect-radius, $base-font-size / 5 $base-font-size);
|
24
13
|
@include link-emphasize-no-focus {
|
25
|
-
color: $
|
14
|
+
background-color: $text-background-color;
|
26
15
|
}
|
27
16
|
}
|
28
17
|
.toc-h1,
|
29
18
|
.toc-h2 {
|
30
19
|
padding: 0;
|
31
20
|
a {
|
21
|
+
color: $text-color-d;
|
32
22
|
font-weight: $bold-font-weight;
|
33
23
|
}
|
34
24
|
}
|
@@ -37,29 +27,32 @@
|
|
37
27
|
.toc-h5,
|
38
28
|
.toc-h6 {
|
39
29
|
a {
|
30
|
+
color: $text-color;
|
40
31
|
font-size: $tiny-font-size;
|
41
32
|
}
|
42
33
|
}
|
43
34
|
.toc-h1,
|
44
35
|
.toc-h2 {
|
45
|
-
margin-top: $
|
36
|
+
margin-top: $base-font-size * .6;
|
46
37
|
}
|
47
38
|
.toc-h3 {
|
48
|
-
padding-left: $
|
39
|
+
padding-left: $base-font-size * 1.5;
|
49
40
|
}
|
50
41
|
.toc-h4 {
|
51
|
-
padding-left: $
|
42
|
+
padding-left: $base-font-size * 3;
|
52
43
|
}
|
53
44
|
.toc-h5 {
|
54
|
-
|
45
|
+
color: $text-color-l;
|
46
|
+
padding-left: $base-font-size * 3;
|
55
47
|
}
|
56
48
|
.toc-h6 {
|
57
|
-
|
49
|
+
color: $text-color-l;
|
50
|
+
font-size: $tiny-font-size;
|
51
|
+
padding-left: $base-font-size * 3;
|
58
52
|
}
|
59
53
|
.toc-active {
|
60
|
-
border-color: $main-color-1;
|
61
|
-
@include transition(border-color ease .8s);
|
62
54
|
a {
|
55
|
+
background-color: $text-background-color;
|
63
56
|
color: $main-color-1;
|
64
57
|
}
|
65
58
|
}
|
data/_sass/mixins/_link.scss
CHANGED
@@ -29,21 +29,15 @@
|
|
29
29
|
@include link-normal {
|
30
30
|
color: $nc;
|
31
31
|
background-color: $nbc;
|
32
|
+
svg path {
|
33
|
+
fill: $nc;
|
34
|
+
}
|
32
35
|
}
|
33
36
|
@include link-emphasize {
|
34
37
|
color: $ec;
|
35
38
|
background-color: $ebc;
|
36
|
-
|
37
|
-
|
38
|
-
@include link-normal {
|
39
|
-
path {
|
40
|
-
fill: $nc;
|
41
|
-
}
|
42
|
-
}
|
43
|
-
@include link-emphasize {
|
44
|
-
path {
|
45
|
-
fill: $ec;
|
46
|
-
}
|
39
|
+
svg path {
|
40
|
+
fill: $ec;
|
47
41
|
}
|
48
42
|
}
|
49
43
|
}
|
@@ -51,9 +45,15 @@
|
|
51
45
|
@mixin link-text-colors($nc, $ec) {
|
52
46
|
@include link-normal {
|
53
47
|
color: $nc;
|
48
|
+
svg path {
|
49
|
+
fill: $nc;
|
50
|
+
}
|
54
51
|
}
|
55
52
|
@include link-emphasize {
|
56
53
|
color: $ec;
|
54
|
+
svg path {
|
55
|
+
fill: $ec;
|
56
|
+
}
|
57
57
|
}
|
58
58
|
}
|
59
59
|
|
@@ -0,0 +1,19 @@
|
|
1
|
+
$round-length: $base-font-size * 2;
|
2
|
+
$round-rect-radius: $base-font-size * .4;
|
3
|
+
$round-rect-padding: $base-font-size * .4 $base-font-size * .6;
|
4
|
+
|
5
|
+
@mixin round(
|
6
|
+
$length: $round-length
|
7
|
+
) {
|
8
|
+
width: $length;
|
9
|
+
height: $length;
|
10
|
+
border-radius: 50%;
|
11
|
+
}
|
12
|
+
|
13
|
+
@mixin round-rect(
|
14
|
+
$radius: $round-rect-radius,
|
15
|
+
$padding: $round-rect-padding
|
16
|
+
) {
|
17
|
+
padding: $padding;
|
18
|
+
border-radius: $radius;
|
19
|
+
}
|
data/_sass/settings/_base.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
// Our variables
|
2
|
-
$spacing-unit:
|
3
|
-
$content-gap:
|
2
|
+
$spacing-unit: 30px;
|
3
|
+
$content-gap: 0.8em;
|
4
4
|
|
5
5
|
// Width of the content area
|
6
|
-
$content-max-width:
|
7
|
-
$aside-width:
|
8
|
-
$footer-height:
|
6
|
+
$content-max-width: 800px;
|
7
|
+
$aside-width: 240px;
|
8
|
+
$footer-height: 12em;
|
9
9
|
|
10
10
|
// Device Width
|
11
11
|
$on-palm: 500px;
|
data/_sass/settings/_colors.scss
CHANGED
@@ -3,4 +3,7 @@
|
|
3
3
|
// @import './colors/_colors.forest.scss';
|
4
4
|
// @import './colors/_colors.ocean.scss';
|
5
5
|
// @import './colors/_colors.chocolate.scss';
|
6
|
-
// @import './colors/_colors.orange.scss';
|
6
|
+
// @import './colors/_colors.orange.scss';
|
7
|
+
|
8
|
+
$shadow-base: 0 2px 10px $shadow-color, 0 0 16px rgba($shadow-color, opacity($shadow-color) * 0.6);
|
9
|
+
$shadow-high: 0 4px 10px rgba($shadow-color, opacity($shadow-color) / 3 + 0.3), 0 0 16px $shadow-color;
|
@@ -1,9 +1,15 @@
|
|
1
1
|
/**
|
2
2
|
* Syntax highlighting styles
|
3
3
|
*/
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
.m-article-content {
|
5
|
+
figure:before {
|
6
|
+
background-color: $text-background-color;
|
7
|
+
}
|
8
|
+
code, pre {
|
9
|
+
background-color: $text-background-color;
|
10
|
+
}
|
11
|
+
pre>code {
|
12
|
+
background-color: transparent;
|
7
13
|
color: $text-color;
|
8
14
|
}
|
9
15
|
}
|
data/assets/css/blog.scss
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-text-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kitian616
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -145,13 +145,16 @@ files:
|
|
145
145
|
- _includes/info/follow-me.html
|
146
146
|
- _includes/logo/logo.svg
|
147
147
|
- _includes/snippets/get-lang.html
|
148
|
+
- _includes/snippets/get-nav-url.html
|
148
149
|
- _includes/snippets/locale-to-string.html
|
149
150
|
- _includes/snippets/page-title.html
|
150
151
|
- _includes/snippets/page-url.html
|
151
152
|
- _includes/snippets/prepend-baseurl.html
|
152
153
|
- _includes/utils/comment-disqus.html
|
154
|
+
- _includes/utils/comment-gitalk.html
|
153
155
|
- _includes/utils/google-analytics.html
|
154
156
|
- _includes/utils/mathjax.html
|
157
|
+
- _includes/utils/mermaid.html
|
155
158
|
- _layouts/all.html
|
156
159
|
- _layouts/blog-base.html
|
157
160
|
- _layouts/blog-default.html
|
@@ -191,6 +194,7 @@ files:
|
|
191
194
|
- _sass/mixins/_link.scss
|
192
195
|
- _sass/mixins/_media.scss
|
193
196
|
- _sass/mixins/_prefix.scss
|
197
|
+
- _sass/mixins/_shape.scss
|
194
198
|
- _sass/settings/_base.scss
|
195
199
|
- _sass/settings/_colors.scss
|
196
200
|
- _sass/settings/_font.scss
|