cosy-jekyll-theme 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/License +1 -1
- data/README.md +48 -21
- data/_includes/buy-me-coffee.html +1 -1
- data/_includes/footer.html +36 -49
- data/_includes/gitalk.html +4 -0
- data/_includes/head.html +54 -43
- data/_includes/header.html +2 -2
- data/_includes/read-more.html +1 -1
- data/_layouts/home.html +1 -7
- data/_layouts/page.html +2 -9
- data/_layouts/post.html +3 -27
- data/_sass/_404.scss +215 -0
- data/_sass/_gitalk.scss +1186 -0
- data/_sass/_mixins.scss +8 -1
- data/_sass/_page.scss +87 -84
- data/_sass/_reset.scss +2 -2
- data/_sass/_typography.scss +0 -1
- data/_sass/_variables.scss +1 -1
- metadata +25 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f838ac032b12b10071d988d3f5ac025dd67796380296020e50ee19eb6dadbadd
|
4
|
+
data.tar.gz: cc05843569ec2b342549b5d16b737f9667308b313f99be634994c0ff702bb487
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41afb787e2b2544b3d6545d0ac4b0599f831e04779f356df036870f0a471d6e46a92acdeff9f1635425cd5e42f6a3e9158e9f3dd9dea96ed811f25407f0b79e9
|
7
|
+
data.tar.gz: 9b27b69386e8b8bdf8aedc1c85e39c27037c13b4ff90b7bb8ec0663eedc862cd35e82d8fa55425630ed794dc546f0fb4467f783919988e487cf726b383d42fd8
|
data/License
CHANGED
data/README.md
CHANGED
@@ -1,32 +1,59 @@
|
|
1
|
-
## [tw93.github.io](
|
2
|
-
|
1
|
+
## [tw93.github.io](http://tw93.github.io/)
|
2
|
+
|
3
|
+
- This is Tw93's front-end technology blog.
|
4
|
+
- Commonly used to record learning and research front-end technology.
|
5
|
+
- Concerned about the front-end new technology and new thinking.
|
6
|
+
- The blog theme named [cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme) is created by [Tw93](http://tw93.github.io/about/).
|
3
7
|
|
4
8
|
## [cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme)
|
5
|
-
- Modern and minimal design. **No jQuery**, More concise、More geeks and Faster than other jekyll theme.
|
6
|
-
- Responsive templates for post, page, and post index _layouts. Looks great on mobile, tablet, and desktop devices; also has a better reading experience.
|
7
|
-
- More suitable for China. (You Know。。。
|
8
|
-
|
9
|
-
### PC Preview
|
10
9
|
|
11
|
-
|
10
|
+
- cosy-jekyll-theme is a responsive blog template providing a good reading experience.
|
11
|
+
- **No jQuery**, No other redundant resources.
|
12
|
+
- Modern and minimal design, **More concise and Faster** than other jekyll theme.
|
13
|
+
- **Responsive templates for post, page**,Looks great on mobile, tablet, and desktop devices.
|
14
|
+
- **Loading resources selectively on different platforms.**
|
15
|
+
- **Support Lazyload.**
|
16
|
+
- Compress JavaScript and CSS.
|
17
|
+
- By using SVG and Canvas Makes this blog more geeks.
|
18
|
+
- When running in PC,It will show a QRcode that you can read on mobile.
|
19
|
+
- When the picture in articles is **too complicated to see it clearly,you can zoom it in full-screen.** .
|
20
|
+
- Funny [custom 404 page](http://tw93.github.io/err),You will like it.
|
21
|
+
- **More suitable for China**:
|
22
|
+
|
23
|
+
- Dropping Google webfont, using proxy webfont.
|
24
|
+
- Delay loading of resources that are not immediately required.
|
25
|
+
- When Discus failed to load, It will be a good suggestion.
|
26
|
+
- Add Buy Me A Coffee by using WeChat payment.
|
27
|
+
|
28
|
+
## [PC Preview](http://tw93.github.io/)
|
29
|
+
|
30
|
+
![demo.png](http://gtms02.alicdn.com/tfs/TB1W3NFQVXXXXaUXpXXXXXXXXXX-2316-1537.jpg)
|
31
|
+
|
32
|
+
## H5 Preview
|
12
33
|
|
13
|
-
|
34
|
+
<img src="http://ww1.sinaimg.cn/large/0060lm7Tgy1fc8ex6yyh3j30xp1iy0z1.jpg" width="290"/><img src="http://ww3.sinaimg.cn/large/0060lm7Tgy1fc8eyalu16j30xp1iyq7g.jpg" width="290"/><img src="http://ww3.sinaimg.cn/large/0060lm7Tgy1fc8ex5vn9dj30xp1iyafo.jpg" width="290"/>
|
14
35
|
|
15
|
-
|
36
|
+
## QR code
|
16
37
|
|
17
|
-
|
38
|
+
![](http://ww1.sinaimg.cn/large/0060lm7Tgy1fc8eyyn0msj305k05kglf.jpg)
|
39
|
+
|
40
|
+
## How To Use
|
18
41
|
|
19
|
-
![](http://ww1.sinaimg.cn/large/0060lm7Tgy1fc8eyyn0msj305k05kglf.jpg)
|
20
|
-
|
21
|
-
#### How To Use
|
22
42
|
1. [Fork the repo](https://github.com/tw93/tw93.github.io)
|
23
|
-
2. Clone down the repo with
|
24
|
-
3. Install bundler with
|
25
|
-
4. Install gems with
|
26
|
-
5. Run Jekyll with
|
27
|
-
6. Begin hacking for your project
|
43
|
+
2. Clone down the repo with `$ git clone git@github.com:username/reponame.git`
|
44
|
+
3. Install bundler with `$ gem install bundler`
|
45
|
+
4. Install gems with `$ bundle install`
|
46
|
+
5. Run Jekyll with `$ npm run dev`
|
47
|
+
6. Begin hacking for your project,You need modify `about.md` and `_config.yml`
|
28
48
|
7. For more details, read [documentation](http://jekyllrb.com/)
|
29
49
|
|
30
|
-
|
50
|
+
## Support
|
51
|
+
|
52
|
+
- **Feel free to fork. I'll Appreciate it if you keep the Author & Github link at footer**.
|
53
|
+
- Give it **a Star** if you like, fork or just clone to use.
|
54
|
+
- Having a problem getting something to work or want to know why I setup something in a certain way? [File a GitHub Issue](https://github.com/tw93/tw93.github.io/issues/new).
|
55
|
+
- If you make something cool with this theme feel free to let me know.
|
56
|
+
|
57
|
+
## License
|
58
|
+
|
31
59
|
- The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
32
|
-
- Last but not least,[cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme) is inspired by [neo-hpstr-jekyll-theme(MIT License)](http://github.com/aron-bordin/neo-hpstr-jekyll-theme).
|
@@ -1,6 +1,6 @@
|
|
1
1
|
{% if site.showBuyCoffee != false %}
|
2
2
|
<div class="coffee">
|
3
3
|
<div class="buy-me-coffee" id="J_buy-me-coffee" onclick="document.getElementById('J_my_pay_image').classList.toggle('active');this.classList.toggle('active');">Buy Me a Coffee !</div>
|
4
|
-
<img src="{{ site.payImage }}" class="my-pay-img" id="J_my_pay_image">
|
4
|
+
<img data-src="{{ site.payImage }}" class="my-pay-img lazyload" id="J_my_pay_image">
|
5
5
|
</div>
|
6
6
|
{% endif %}
|
data/_includes/footer.html
CHANGED
@@ -1,29 +1,46 @@
|
|
1
1
|
<div class="footer-wrapper">
|
2
2
|
<footer role="contentinfo">
|
3
|
-
<a href="https://github.com/tw93/tw93.github.io" rel="nofollow" target="_blank"
|
3
|
+
© {{ site.time | date: '%Y' }} Using <a href="https://github.com/tw93/tw93.github.io" rel="nofollow" target="_blank" class="need_dotted">cosy jekyll theme</a> by Tw93.
|
4
4
|
</footer>
|
5
5
|
</div>
|
6
6
|
|
7
|
-
<script type="text/javascript" src="{{ site.url }}/js/index.js"></script>
|
7
|
+
<script type="text/javascript" src="{{ site.url }}/js/index.min.js"></script>
|
8
8
|
|
9
9
|
{% if site.google_analytics %}
|
10
|
-
<!-- Asynchronous Google Analytics snippet -->
|
11
10
|
<script type="text/javascript">
|
12
|
-
(function (
|
13
|
-
i
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
setTimeout(function () {
|
12
|
+
(function (i, s, o, g, r, a, m) {
|
13
|
+
i['GoogleAnalyticsObject'] = r;
|
14
|
+
i[r] = i[r] || function () {
|
15
|
+
(i[r].q = i[r].q || []).push(arguments)
|
16
|
+
}, i[r].l = 1 * new Date();
|
17
|
+
a = s.createElement(o),
|
18
|
+
m = s.getElementsByTagName(o)[0];
|
19
|
+
a.async = 1;
|
20
|
+
a.src = g;
|
21
|
+
m.parentNode.insertBefore(a, m)
|
22
|
+
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
ga('create', '{{ site.google_analytics }}', 'auto');
|
25
|
+
ga('require', 'linkid', 'linkid.js');
|
26
|
+
ga('send', 'pageview');
|
27
|
+
}, 3000);
|
28
|
+
</script>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% if page.comments != false %}
|
32
|
+
<script type="text/javascript">
|
33
|
+
setTimeout(function(){
|
34
|
+
new Gitalk({
|
35
|
+
clientID: 'ca11229a5275e8e1c2fd',
|
36
|
+
clientSecret: '61557a125b1b9c0db677239575f816f64114845f',
|
37
|
+
repo: 'tw93.github.io',
|
38
|
+
owner: 'tw93',
|
39
|
+
admin: 'tw93',
|
40
|
+
id: md5(location.pathname),
|
41
|
+
distractionFreeMode: false
|
42
|
+
}).render('gitalk-container');
|
43
|
+
},300)
|
27
44
|
</script>
|
28
45
|
{% endif %}
|
29
46
|
|
@@ -35,7 +52,7 @@
|
|
35
52
|
var string = hereDoc(function () {/*
|
36
53
|
|
37
54
|
|
38
|
-
|
55
|
+
_ ___ _____ _ _
|
39
56
|
| | |_ | / ___| (_) | |
|
40
57
|
| | ___ __ _ _ __ _ __ | | __ ___ ____ _\ `--. ___ _ __ _ _ __ | |_
|
41
58
|
| | / _ \/ _` | '__| '_ \ | |/ _` \ \ / / _` |`--. \/ __| '__| | '_ \| __|
|
@@ -43,39 +60,9 @@
|
|
43
60
|
\_____/\___|\__,_|_| |_| |_| \____/ \__,_| \_/ \__,_\____/ \___|_| |_| .__/ \__|
|
44
61
|
|
45
62
|
|
46
|
-
Tw93
|
47
|
-
|
63
|
+
This is Tw93's front-end technology blog, Commonly used to record learning and research front-end technology, Concerned about the front-end new technology and new thinking.
|
48
64
|
*/
|
49
65
|
});
|
50
66
|
console.log(string);
|
51
67
|
</script>
|
52
68
|
{% endif %}
|
53
|
-
|
54
|
-
{% if page.comments != false and site.disqus_shortname %}
|
55
|
-
<script type="text/javascript">
|
56
|
-
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
57
|
-
var disqus_shortname = '{{ site.disqus_shortname }}'; // required: replace example with your forum shortname
|
58
|
-
|
59
|
-
/* * * DON'T EDIT BELOW THIS LINE * * */
|
60
|
-
(function () {
|
61
|
-
var dsq = document.createElement('script');
|
62
|
-
dsq.type = 'text/javascript';
|
63
|
-
dsq.async = true;
|
64
|
-
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
65
|
-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
66
|
-
})();
|
67
|
-
|
68
|
-
/* * * DON'T EDIT BELOW THIS LINE * * */
|
69
|
-
(function () {
|
70
|
-
var s = document.createElement('script');
|
71
|
-
s.async = true;
|
72
|
-
s.type = 'text/javascript';
|
73
|
-
s.src = '//' + disqus_shortname + '.disqus.com/count.js';
|
74
|
-
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
|
75
|
-
}());
|
76
|
-
</script>
|
77
|
-
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>
|
78
|
-
</noscript>
|
79
|
-
{% endif %}
|
80
|
-
|
81
|
-
|
data/_includes/head.html
CHANGED
@@ -1,45 +1,56 @@
|
|
1
1
|
<head>
|
2
|
-
<meta charset="utf-8">
|
3
|
-
<title>{
|
4
|
-
<meta name="description"
|
5
|
-
{% if page.
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<meta property="og:
|
11
|
-
<meta property="og:
|
12
|
-
<meta property="og:
|
13
|
-
<meta property="og:
|
14
|
-
|
15
|
-
|
16
|
-
{
|
17
|
-
|
18
|
-
{%
|
19
|
-
<meta
|
20
|
-
{% endif %}
|
21
|
-
|
22
|
-
{%
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
<meta
|
28
|
-
|
29
|
-
<meta
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
<
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<title>{% if page.layout =='post' or page.hideHomeActive or page.is404 %}{{ page.title }} - {% endif %}{{ site.title }}</title>
|
4
|
+
<meta name="description"
|
5
|
+
content="{{ site.description }}{% if page.categories %}{{ page.categories }}{% endif %}{% if page.summary %}{{ page.summary }}{% endif %}">
|
6
|
+
{% if page.tags %}
|
7
|
+
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
|
8
|
+
{% endif %}
|
9
|
+
<!-- Open Graph -->
|
10
|
+
<meta property="og:locale" content="{{ site.locale }}">
|
11
|
+
<meta property="og:type" content="article">
|
12
|
+
<meta property="og:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}">
|
13
|
+
<meta property="og:description"
|
14
|
+
content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
|
15
|
+
<meta property="og:url" content="{{ site.url }}{{ page.url }}">
|
16
|
+
<meta property="og:site_name" content="{{ site.title }}">
|
17
|
+
|
18
|
+
{% if site.baidu_verify %}
|
19
|
+
<meta name="baidu-site-verification" content="{{site.baidu_verify}}"/>
|
20
|
+
{% endif %}
|
21
|
+
|
22
|
+
{% if site.google_verify %}
|
23
|
+
<meta name="google-site-verification" content="{{ site.google_verify }}">
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
{% if page.image.feature %}
|
27
|
+
<meta property="og:image" content="{{ site.url }}/images/{{ page.image.feature }}">
|
28
|
+
{% else %}
|
29
|
+
<meta property="og:image"
|
30
|
+
content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}">
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
{% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url |
|
34
|
+
remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
|
35
|
+
<link rel="canonical" href="{{ canonical }}">
|
36
|
+
<link href="{{ site.url }}/feed.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
|
37
|
+
|
38
|
+
<!-- http://t.co/dKP3o1e -->
|
39
|
+
<meta name="HandheldFriendly" content="True">
|
40
|
+
<meta name="MobileOptimized" content="320">
|
41
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
|
42
|
+
|
43
|
+
<link rel="stylesheet" href="{{ site.url }}/css/index.css">
|
44
|
+
|
45
|
+
<meta http-equiv="cleartype" content="on">
|
46
|
+
|
47
|
+
<link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
|
48
|
+
|
49
|
+
{% if page.layout == "post" %}
|
50
|
+
<script src="//gw.alipayobjects.com/os/rmsportal/PIYOQOcFoeIvZLKgqukk.js" async></script>
|
51
|
+
{% endif %}
|
52
|
+
|
53
|
+
{% if page.comments != false %}
|
54
|
+
<script src="//gw.alipayobjects.com/os/rmsportal/hLaEIutAxSUpcpcRhdtd.js" async></script>
|
55
|
+
{% endif %}
|
45
56
|
</head>
|
data/_includes/header.html
CHANGED
@@ -32,9 +32,9 @@
|
|
32
32
|
<svg width="100%" height="200" xmlns="http://www.w3.org/2000/svg"
|
33
33
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
|
34
34
|
<path id="svg-title-path">
|
35
|
-
<animate attributeName="d" from="m0,110 h0" to="m0,110 h1100" dur="
|
35
|
+
<animate attributeName="d" from="m0,110 h0" to="m0,110 h1100" dur="2s" repeatCount="1" fill="freeze" begin="0s" />
|
36
36
|
</path>
|
37
|
-
<text font-size="36" fill='#ffffff' x="50%" y="50%" text-anchor="middle">
|
37
|
+
<text font-size="36" fill='#ffffff' x="50%" y="50%" text-anchor="middle" word-spacing="4" letter-spacing="1">
|
38
38
|
<textPath xlink:href="#svg-title-path">{{ page.title }}</textPath>
|
39
39
|
</text>
|
40
40
|
</svg>
|
data/_includes/read-more.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
{% if page.previous.url %}
|
1
|
+
{% if page.previous.url and site.related_posts.size > 0 and page.previous.hide !=true%}
|
2
2
|
<a class="read-more" href="{{ site.url }}{{ page.previous.url }}" title="{{ page.previous.url.title }}">
|
3
3
|
<div class="read-more-header">
|
4
4
|
<div class="read-more-btn">Read More</div>
|
data/_layouts/home.html
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
<html class="no-js" lang="
|
3
|
-
|
2
|
+
<html class="no-js" lang="{{site.lang}}">
|
4
3
|
{% include head.html %}
|
5
|
-
|
6
4
|
<body id="post-index">
|
7
|
-
|
8
5
|
{% include header.html %}
|
9
|
-
|
10
6
|
<div id="main" role="main">
|
11
7
|
{{ content }}
|
12
8
|
</div>
|
13
|
-
|
14
9
|
{% include footer.html %}
|
15
|
-
|
16
10
|
</body>
|
17
11
|
</html>
|
data/_layouts/page.html
CHANGED
@@ -1,23 +1,16 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
<html class="no-js" lang="
|
2
|
+
<html class="no-js" lang="{{site.lang}}">
|
3
3
|
{% include head.html %}
|
4
|
-
|
5
4
|
<body id="page">
|
6
|
-
|
7
5
|
{% include header.html %}
|
8
|
-
|
9
6
|
<div id="main" role="main">
|
10
7
|
<article class="hentry">
|
11
8
|
<div class="entry-content">
|
12
9
|
{{ content }}
|
13
10
|
</div>
|
14
|
-
{%
|
15
|
-
<section id="disqus_thread">Disqus评论正在推倒墙......</section>
|
16
|
-
{% endif %}
|
11
|
+
{% include gitalk.html %}
|
17
12
|
</article>
|
18
13
|
</div>
|
19
|
-
|
20
14
|
{% include footer.html %}
|
21
|
-
|
22
15
|
</body>
|
23
16
|
</html>
|
data/_layouts/post.html
CHANGED
@@ -1,27 +1,12 @@
|
|
1
1
|
<!doctype html>
|
2
|
-
<html class="no-js" lang="
|
2
|
+
<html class="no-js" lang="{{site.lang}}">
|
3
3
|
{% include head.html %}
|
4
|
-
|
5
|
-
<body id="post" {% if page.image.feature %}class="feature" {% endif %}>
|
6
|
-
|
4
|
+
<body id="post">
|
7
5
|
{% include header.html %}
|
8
|
-
|
9
6
|
<div id="main" role="main">
|
10
7
|
<article class="hentry">
|
11
8
|
<div class="entry-content">
|
12
|
-
|
13
|
-
{% if page.image.feature %}
|
14
|
-
<div class="entry-image-index">
|
15
|
-
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
|
16
|
-
{% if page.image.credit %}
|
17
|
-
<div class="image-credit">Image source:
|
18
|
-
<a target="_blank" href="{{ page.image.creditlink }}">{{page.image.credit }}</a>
|
19
|
-
</div>
|
20
|
-
{% endif %}
|
21
|
-
</div>
|
22
|
-
{% endif %}
|
23
9
|
<h1 class="post-title entry-title">{{ page.title }}</h1>
|
24
|
-
|
25
10
|
<h4 class="page-info">
|
26
11
|
<span>Categories: {{page.categories}}</span>
|
27
12
|
<time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%Y-%m-%d" }}</time>
|
@@ -30,21 +15,12 @@
|
|
30
15
|
</div>
|
31
16
|
</h4>
|
32
17
|
{{ content }}
|
33
|
-
|
34
18
|
{% include buy-me-coffee.html %}
|
35
|
-
|
36
19
|
</div>
|
37
|
-
{%
|
38
|
-
<section id="disqus_thread">Disqus评论正在推倒墙......</section>
|
39
|
-
{% endif %}
|
40
|
-
|
41
|
-
{% if site.related_posts.size > 0 %}
|
20
|
+
{% include gitalk.html %}
|
42
21
|
{% include read-more.html %}
|
43
|
-
{% endif %}
|
44
22
|
</article>
|
45
23
|
</div>
|
46
|
-
|
47
24
|
{% include footer.html %}
|
48
|
-
|
49
25
|
</body>
|
50
26
|
</html>
|