cosy-jekyll-theme 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1a5ba42303a312f30a3e9846a697ec9de9d3f8da
4
- data.tar.gz: f633e98567a2dfa9092c318ace46a6e5d7d9d784
3
+ metadata.gz: 54a9727684b288b41e1aec598cb228e01dd22d9b
4
+ data.tar.gz: 3cdfed5027f43a508d535cdd824f0f4783aaaecb
5
5
  SHA512:
6
- metadata.gz: 933ace64441589f0ba83593662f42a3e5b186fba7899ac0cbd3350584a41a6134af05d34b89ef883bffb68ff569846a694b431f6d97feac894bf26ae15bf0fb9
7
- data.tar.gz: b300374c27968da6a984937a3acd0a92c56727a5aba481c6ae8774a8f2b131aaf4f20a25deba423714e28c21f4361119226c94493c7a5a5606651d6ba586e4fe
6
+ metadata.gz: d2a4626e65bd51a2153175f3f76b9addaeda0ace5b8633df40c4beb98743ae1d2ff7097eeba4da48561d0282a929a227d5918e98c5e21bb7989c207514bb5736
7
+ data.tar.gz: bc4651ab860a1788fdf1e56dbc1a0e17e60f6383e0a1fd342619bd5251eb2e1c574c0bfd43843465e23851f8674021e3edf364241599b54d297a825bcc7d2f22
data/License ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) [2017] [Tangwei]
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 CHANGED
@@ -1,10 +1,10 @@
1
+ ## [tw93.github.io]((http://tw93.github.io/))
2
+ - This is Tw93 Front-End Blog. The blog theme named [cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme) is created by Tw93.
3
+
1
4
  ## [cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme)
2
- - **Occam's Razor: Non sunt multiplicanda entia sine necessitate.**
3
- - [cosy-jekyll-theme](https://rubygems.org/gems/cosy-jekyll-theme) is a responsive and easy to read [blog template](https://jekyllrb.com/docs/themes/
4
- ).
5
- - [Tw93 Blog](http://tw93.github.io/) use this template.
6
- - Inspired by [neo-hpstr-jekyll-theme](http://github.com/aron-bordin/neo-hpstr-jekyll-theme), But No jQuery、More concise、Better use and Faster.
7
- - More suitable for China.
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
8
 
9
9
  ### PC Preview
10
10
 
@@ -18,9 +18,15 @@
18
18
 
19
19
       ![](http://ww1.sinaimg.cn/large/0060lm7Tgy1fc8eyyn0msj305k05kglf.jpg)
20
20
 
21
+ #### How To Use
22
+ 1. [Fork the repo](https://github.com/tw93/tw93.github.io)
23
+ 2. Clone down the repo with $ git clone git@github.com:username/reponame.git
24
+ 3. Install bundler with $ gem install bundler
25
+ 4. Install gems with $ bundle install
26
+ 5. Run Jekyll with $ npm run dev
27
+ 6. Begin hacking for your project
28
+ 7. For more details, read [documentation](http://jekyllrb.com/)
21
29
 
22
- ### GemFile:
23
- - gem 'cosy-jekyll-theme', '~> 1.0', '>= 1.0.5'
24
-
25
- ### Install:
26
- - gem install cosy-jekyll-theme
30
+ ### License
31
+ - 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).
@@ -0,0 +1,6 @@
1
+ {% if site.showBuyCoffee != false %}
2
+ <div class="coffee">
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">
5
+ </div>
6
+ {% endif %}
@@ -1,5 +1,33 @@
1
- <span>&copy; {{ site.time | date: '%Y' }}<a href="https://github.com/tw93/tw93.github.io" rel="nofollow" target="_blank"> Cosy Jekyll Theme By Tw93.</a></span>
1
+ <div class="footer-wrapper">
2
+ <footer role="contentinfo">
3
+ <a href="https://github.com/tw93/tw93.github.io" rel="nofollow" target="_blank">&copy; {{ site.time | date: '%Y' }} Cosy Jekyll Theme By Tw93.</a>
4
+ </footer>
5
+ </div>
2
6
 
7
+ <script type="text/javascript" src="{{ site.url }}/js/index.js"></script>
8
+
9
+ {% if site.google_analytics %}
10
+ <!-- Asynchronous Google Analytics snippet -->
11
+ <script type="text/javascript">
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
+
24
+ ga('create', '{{ site.google_analytics }}', 'auto');
25
+ ga('require', 'linkid', 'linkid.js');
26
+ ga('send', 'pageview');
27
+ </script>
28
+ {% endif %}
29
+
30
+ {% if page.url=="/" %}
3
31
  <script>
4
32
  function hereDoc(f) {
5
33
  return f.toString().replace(/^[^\/]+\/\*!?\s?/, '').replace(/\*\/[^\/]+$/, '');
@@ -7,7 +35,7 @@
7
35
  var string = hereDoc(function () {/*
8
36
 
9
37
 
10
- _ ___ _____ _ _
38
+ _ ___ _____ _ _
11
39
  | | |_ | / ___| (_) | |
12
40
  | | ___ __ _ _ __ _ __ | | __ ___ ____ _\ `--. ___ _ __ _ _ __ | |_
13
41
  | | / _ \/ _` | '__| '_ \ | |/ _` \ \ / / _` |`--. \/ __| '__| | '_ \| __|
@@ -21,3 +49,33 @@
21
49
  });
22
50
  console.log(string);
23
51
  </script>
52
+ {% 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,3 +1,4 @@
1
+ <head>
1
2
  <meta charset="utf-8">
2
3
  <title>{{ site.title }}{% if page.title %} - {{ page.title }}{% endif %}</title>
3
4
  <meta name="description" content="{{ site.description }}{% if page.categories %}{{ page.categories }}{% endif %}{% if page.summary %}{{ page.summary }}{% endif %}">
@@ -10,8 +11,13 @@
10
11
  <meta property="og:description" content="{% if page.description %}{{ page.description }}{% else %}{{ site.description }}{% endif %}">
11
12
  <meta property="og:url" content="{{ site.url }}{{ page.url }}">
12
13
  <meta property="og:site_name" content="{{ site.title }}">
13
- {% if page.image.feature %}<meta property="og:image" content="{{ site.url }}/images/{{ page.image.feature }}">
14
- {% else %}<meta property="og:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}">{% endif %}
14
+ <meta name="baidu-site-verification" content="kxGpkpWG7G" />
15
+
16
+ {% if page.image.feature %}
17
+ <meta property="og:image" content="{{ site.url }}/images/{{ page.image.feature }}">
18
+ {% else %}
19
+ <meta property="og:image" content="{% if page.image.thumb %}{{ site.url }}/images/{{ page.image.thumb }}{% else %}{{ site.url }}/images/{{ site.logo }}{% endif %}">
20
+ {% endif %}
15
21
 
16
22
  {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %}
17
23
  <link rel="canonical" href="{{ canonical }}">
@@ -22,18 +28,18 @@
22
28
  <meta name="MobileOptimized" content="320">
23
29
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
24
30
 
25
- <!-- For all browsers -->
26
- <link rel="stylesheet" href="{{ site.url }}/assets/css/main.css">
27
- <!-- Webfonts -->
31
+ <link rel="stylesheet" href="{{ site.url }}/css/index.css">
32
+
28
33
  <link href="//fonts.proxy.ustclug.org/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">
29
34
 
30
35
  <meta http-equiv="cleartype" content="on">
31
36
 
32
37
 
33
- {% include icons.html %}
38
+ <link rel="shortcut icon" href="{{ site.url }}/favicon.ico">
34
39
 
35
40
  {% if page.image.background or site.background %}
36
41
  {% capture background %}{% if page.image.background %}{{ page.image.background }}{% else %}{{ site.background }}{% endif %}{% endcapture %}
37
42
  {% unless background contains 'http://' or background contains 'https://' %}{% capture background %}{{ site.url }}/images/{{ background }}{% endcapture %}{% endunless %}
38
43
  <style type="text/css">body {background-image:url({{ background }});}</style>
39
44
  {% endif %}
45
+ </head>
@@ -1,51 +1,42 @@
1
- {% capture site_cats %}{% for cat in site.categories %}{{ cat | first }}{% unless forloop.last %},{% endunless %}{% endfor %}{% endcapture %}
2
- {% assign cats_list = site_cats | split:',' | sort %}
1
+ <!--[if lt IE 10]>
2
+ <div class="upgrade"><strong><a href="http://whatbrowser.org/" target="_blank">Your browser is quite old!</strong> Why
3
+ not upgrade to a different browser to better enjoy this site?</a></div>
4
+ <![endif]-->
3
5
 
4
- <div class="header-menu header-menu-top" id="J_header">
6
+ {% assign homeActive = 'active' %}
7
+ {% if page.hideHomeActive %}
8
+ {% assign homeActive = nil %}
9
+ {% endif %}
10
+ <div class="header-menu" id="J_header">
5
11
  <ul class="header-item-container">
6
- <li class="header-item-title">
7
- <a href="{{site.url}}/">
8
- {% if site.logo %}
9
- <img class="logo" src="{{site.url}}/{{ site.logo }}" alt="{{ site.title }}">
10
- {% endif %}
11
- <a href="{{site.url}}/" class="title"> {{ site.title }}</a>
12
- </a>
12
+ <li class="header-item-title {{homeActive}}">
13
+ <a href="{{site.url}}/" class="title"> {{ site.title }}</a>
13
14
  </li>
14
15
  {% for menu in site.menu reversed %}
16
+
15
17
  {% assign class = nil %}
16
- {% if ((page.url contains menu.url and menu.url != '/') or (page.url == '/index.html' and menu.url == '/')) %}
18
+ {% if (page.url contains menu.url and menu.url != '/') %}
17
19
  {% assign class = 'active' %}
18
20
  {% endif %}
19
21
 
20
- {% if menu.type == 'categories' %}
21
- <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a>
22
- <ul class="header-submenu">
23
- {% for item in (0..site.categories.size) %}{% unless forloop.last %}
24
- {% capture this_word %}{{ cats_list[item] | strip_newlines }}{% endcapture %}
25
- <li class="sub-item"><a href="{{site.url}}/categories/#{{this_word}}">{{this_word}}</a></li>
26
- {% endunless %}{% endfor %}
27
- </ul>
28
- </li>
29
- {% elsif menu.submenu %}
30
- <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a>
31
- <ul class="header-submenu">
32
- {% for sub in menu.submenu %}
33
- <li class="sub-item"><a href="{{site.url}}{{sub.url}}">{{sub.title}}</a></li>
34
- {% endfor %}
35
- </ul>
36
- </li>
37
- {% else %}
38
22
  {% if menu.url contains 'http://' or menu.url contains 'https://' %}
39
- <li class="header-item {{class}}"><a href="{{menu.url}}" target="_blank"><h3>{{ menu.title }}</h3></a></li>
23
+ <li class="header-item {{class}}"><a href="{{menu.url}}" target="_blank">{{ menu.title }}</a></li>
40
24
  {% else %}
41
- <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}"><h3>{{ menu.title }}</h3></a></li>
42
- {% endif %}
25
+ <li class="header-item {{class}}"><a href="{{site.url}}{{menu.url}}">{{ menu.title }}</a></li>
43
26
  {% endif %}
44
27
  {% endfor %}
45
28
  </ul>
46
29
  </div>
30
+
47
31
  <div class="entry-header">
48
- <div class="header-title">
49
- <h1>{{ page.title }}</h1>
50
- </div>
32
+ <svg width="100%" height="200" xmlns="http://www.w3.org/2000/svg"
33
+ xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
34
+ <path id="svg-title-path">
35
+ <animate attributeName="d" from="m0,110 h0" to="m0,110 h1100" dur="1s" repeatCount="1" fill="freeze" begin="0s" />
36
+ </path>
37
+ <text font-size="36" fill='#ffffff' x="50%" y="50%" text-anchor="middle">
38
+ <textPath xlink:href="#svg-title-path">{{ page.title }}</textPath>
39
+ </text>
40
+ </svg>
41
+ <canvas id="J_firework_canvas"></canvas>
51
42
  </div>
@@ -1,20 +1,11 @@
1
- <div class="read-more">
2
- {% for post in site.related_posts limit:1 offset:1 %}
1
+ {% if page.previous.url %}
2
+ <a class="read-more" href="{{ site.url }}{{ page.previous.url }}" title="{{ page.previous.url.title }}">
3
3
  <div class="read-more-header">
4
- <a href="{{ site.url }}{{ page.previous.url }}" class="read-more-btn">Read More</a>
4
+ <div class="read-more-btn">Read More</div>
5
5
  </div>
6
6
  <div class="read-more-content">
7
- <h3><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h3>
8
- <p>{% if post.summary %}{{ post.summary }}&hellip;{% endif %} <a href="{{ site.url }}{{ post.url }}">Continue
9
- reading</a></p>
7
+ <h3>{{ page.previous.title}}</h3>
8
+ <p>【{{ page.previous.date | date: "%Y-%m-%d" }}】{% if page.previous.summary %}{{ page.previous.summary }}{% endif %}</p>
10
9
  </div>
11
- {% endfor %}
12
- <div class="read-more-list">
13
- {% for post in site.related_posts limit:2 offset:1 %}
14
- <div class="list-item">
15
- <h4><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></h4>
16
- <span>Published on {{ post.date | date: "%Y-%m-%d" }}</span>
17
- </div>
18
- {% endfor %}
19
- </div>
20
- </div>
10
+ </a>
11
+ {% endif %}
data/_layouts/home.html CHANGED
@@ -1,25 +1,17 @@
1
1
  <!doctype html>
2
2
  <html class="no-js" lang="en">
3
- <head>
4
- {% include head.html %}
5
- </head>
3
+
4
+ {% include head.html %}
6
5
 
7
6
  <body id="post-index">
8
7
 
9
- {% include browser-upgrade.html %}
10
8
  {% include header.html %}
11
9
 
12
10
  <div id="main" role="main">
13
11
  {{ content }}
14
12
  </div>
15
13
 
16
- {% include scripts.html %}
17
-
18
- <div class="footer-wrapper">
19
- <footer role="contentinfo">
20
- {% include footer.html %}
21
- </footer>
22
- </div>
14
+ {% include footer.html %}
23
15
 
24
16
  </body>
25
17
  </html>
data/_layouts/page.html CHANGED
@@ -1,37 +1,23 @@
1
1
  <!doctype html>
2
2
  <html class="no-js" lang="en">
3
- <head>
4
- {% include head.html %}
5
- </head>
3
+ {% include head.html %}
6
4
 
7
5
  <body id="page">
8
6
 
9
- {% include browser-upgrade.html %}
10
7
  {% include header.html %}
11
8
 
12
9
  <div id="main" role="main">
13
- <article class="hentry">
14
- <div class="entry-content">
15
- {{ content }}
16
- <footer class="entry-meta">
17
- {% if page.modified %}<span>Updated on <span class="entry-date date published updated"><time
18
- datetime="{{ page.modified }}">{{ page.modified | date: "%B %d, %Y" }}</time></span></span>
19
- <span class="author vcard"><span class="fn">{{ site.owner.name }}</span></span>{% endif %}
20
- </footer>
21
- </div>
22
- {% if page.comments != false and site.disqus_shortname %}
23
- <section id="disqus_thread">Disqus评论正在推倒墙......</section>
24
- {% endif %}
25
- </article>
10
+ <article class="hentry">
11
+ <div class="entry-content">
12
+ {{ content }}
13
+ </div>
14
+ {% if page.comments != false and site.disqus_shortname %}
15
+ <section id="disqus_thread">Disqus评论正在推倒墙......</section>
16
+ {% endif %}
17
+ </article>
26
18
  </div>
27
19
 
28
- {% include scripts.html %}
29
-
30
- <div class="footer-wrapper">
31
- <footer role="contentinfo">
32
- {% include footer.html %}
33
- </footer>
34
- </div>
20
+ {% include footer.html %}
35
21
 
36
22
  </body>
37
23
  </html>
data/_layouts/post.html CHANGED
@@ -1,12 +1,9 @@
1
1
  <!doctype html>
2
2
  <html class="no-js" lang="en">
3
- <head>
4
- {% include head.html %}
5
- </head>
3
+ {% include head.html %}
6
4
 
7
5
  <body id="post" {% if page.image.feature %}class="feature" {% endif %}>
8
6
 
9
- {% include browser-upgrade.html %}
10
7
  {% include header.html %}
11
8
 
12
9
  <div id="main" role="main">
@@ -28,21 +25,14 @@
28
25
  <h4 class="page-info">
29
26
  <span>Categories:&nbsp;&nbsp;{{page.categories}}</span>
30
27
  <time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%Y-%m-%d" }}</time>
28
+ <div class="qr-text" id="J_qr_text">
29
+ <div id="J_qr_code" class="qr-code" onmouseover="this.title='';"></div>
30
+ </div>
31
31
  </h4>
32
-
33
32
  {{ content }}
34
- <footer class="entry-meta">
35
- <span class="entry-tags">
36
- {% for tag in page.tags %}
37
- <a href="{{ site.url }}/tags#{{ tag }}" title="Pages tagged {{ tag }}" class="tag">
38
- <span class="term">{{ tag }}</span>
39
- </a>
40
- {% unless forloop.last %}{% endunless %}{% endfor %}
41
- </span>
42
- <span class="author vcard">
43
- <span class="fn">{{ site.owner.name }}</span>
44
- </span>
45
- </footer>
33
+
34
+ {% include buy-me-coffee.html %}
35
+
46
36
  </div>
47
37
  {% if page.comments != false and site.disqus_shortname %}
48
38
  <section id="disqus_thread">Disqus评论正在推倒墙......</section>
@@ -54,13 +44,7 @@
54
44
  </article>
55
45
  </div>
56
46
 
57
- {% include scripts.html %}
58
-
59
- <div class="footer-wrapper">
60
- <footer role="contentinfo">
61
- {% include footer.html %}
62
- </footer>
63
- </div>
47
+ {% include footer.html %}
64
48
 
65
49
  </body>
66
50
  </html>