writers-zone 0.1.0
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 +7 -0
- data/LICENSE.txt +65 -0
- data/README.md +57 -0
- data/_includes/disqus_comments.html +25 -0
- data/_includes/footer.html +50 -0
- data/_includes/google-analytics.html +11 -0
- data/_includes/head.html +25 -0
- data/_includes/header.html +29 -0
- data/_includes/icon-github.html +1 -0
- data/_includes/icon-github.svg +1 -0
- data/_includes/icon-twitter.html +1 -0
- data/_includes/icon-twitter.svg +1 -0
- data/_includes/pagination/pages.html +20 -0
- data/_includes/pagination/posts.html +19 -0
- data/_includes/search/search-box.html +6 -0
- data/_includes/search/search-config.html +14 -0
- data/_includes/search/search-js.min.html +3 -0
- data/_layouts/default.html +35 -0
- data/_layouts/page.html +14 -0
- data/_layouts/post.html +20 -0
- data/_sass/writers-zone/_base.scss +198 -0
- data/_sass/writers-zone/_layout.scss +237 -0
- data/_sass/writers-zone/_plugins.scss +77 -0
- data/_sass/writers-zone/_syntax-highlighting.scss +71 -0
- data/_sass/writers-zone.scss +44 -0
- data/demo/Gemfile +32 -0
- data/demo/_config.yml +86 -0
- data/demo/_posts/2016-09-21-welcome-to-jekyll.markdown +25 -0
- data/demo/_posts/2016-09-30-jekyll-gist-demo.md +34 -0
- data/demo/about.md +19 -0
- data/demo/css/main.scss +39 -0
- data/demo/feed.xml +30 -0
- data/demo/index.html +23 -0
- data/demo/search.json +28 -0
- metadata +106 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c61141d21b23b1db671294288d655c5e2cc9ded1
|
4
|
+
data.tar.gz: c91000b24ca304e3ea261add066118d98e59a5de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0a8adec7d1823efe9c8599aa4e3980cbdbc0707dc938b66dbaec29d8234f657158966b45413c73a44d97448cb99d8b7f2b6d4f662cbdb141270e0dbdfc495f98
|
7
|
+
data.tar.gz: 3b3b0daace3cabe5febe8989f6aadb99540526b1aa9a1d1017c2af5e1faf1174916d506a4133cdc2be23bd1668a4f8a25ef964fda2f11f784bbceee9e0a1d3f7
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
## writers-zone
|
2
|
+
|
3
|
+
The MIT License (MIT)
|
4
|
+
|
5
|
+
Copyright (c) 2016 StartZeroGnu
|
6
|
+
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
9
|
+
in the Software without restriction, including without limitation the rights
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
12
|
+
furnished to do so, subject to the following conditions:
|
13
|
+
|
14
|
+
The above copyright notice and this permission notice shall be included in
|
15
|
+
all copies or substantial portions of the Software.
|
16
|
+
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
23
|
+
THE SOFTWARE.
|
24
|
+
|
25
|
+
## Minima Theme
|
26
|
+
|
27
|
+
The MIT License (MIT)
|
28
|
+
|
29
|
+
Copyright (c) 2016 Parker Moore
|
30
|
+
|
31
|
+
## Jekyll Feed
|
32
|
+
|
33
|
+
The MIT License (MIT)
|
34
|
+
|
35
|
+
Copyright (c) 2015 Ben Balter
|
36
|
+
|
37
|
+
## Jekyll Gist
|
38
|
+
|
39
|
+
The MIT License (MIT)
|
40
|
+
|
41
|
+
Copyright (c) 2014 Parker Moore
|
42
|
+
|
43
|
+
## Jekyll Paginate
|
44
|
+
|
45
|
+
The MIT License (MIT)
|
46
|
+
|
47
|
+
Copyright (c) 2014 Parker Moore
|
48
|
+
|
49
|
+
## Jekyll SEO
|
50
|
+
|
51
|
+
The MIT License (MIT)
|
52
|
+
|
53
|
+
Copyright (c) 2015 Ben Balter
|
54
|
+
|
55
|
+
## Jekyll Sitemap
|
56
|
+
|
57
|
+
The MIT License (MIT)
|
58
|
+
|
59
|
+
Copyright (c) 2014 GitHub, inc.
|
60
|
+
|
61
|
+
## Simple Jekyll Search
|
62
|
+
|
63
|
+
The MIT License (MIT)
|
64
|
+
|
65
|
+
Copyright (c) 2015 Christian Fei
|
data/README.md
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
# writers-zone
|
2
|
+
|
3
|
+
Gem Theme for [Jekyll (3.2.1)](https://jekyllrb.com/) based on the official theme
|
4
|
+
[minima (1.2)](https://github.com/jekyll/minima) by
|
5
|
+
[Parker Moore](https://github.com/parkr).
|
6
|
+
|
7
|
+
## Plugins
|
8
|
+
|
9
|
+
* [Jekyll Feed](https://rubygems.org/gems/jekyll-feed) by [Ben Balter](https://github.com/benbalter)
|
10
|
+
more info [about plugin and configs](https://github.com/jekyll/jekyll-feed)
|
11
|
+
* [Jekyll Gist](https://rubygems.org/gems/jekyll-gist) by [Parker Moore](https://github.com/parkr)
|
12
|
+
more info [about plugin and configs](https://github.com/jekyll/jekyll-gist)
|
13
|
+
* **Usage**
|
14
|
+
* `{% gist StartZeroGnu/8b038a1a07b8f7aa8e429960e1500662 %}` (entire gist with all files)
|
15
|
+
* `{% gist StartZeroGnu/8b038a1a07b8f7aa8e429960e1500662 demo2.md %}` (to show just the specified file)
|
16
|
+
* [Jekyll Paginate](https://rubygems.org/gems/jekyll-paginate) by [Parker Moore](https://github.com/parkr)
|
17
|
+
more info [about plugin and configs](http://jekyllrb.com/docs/pagination/)
|
18
|
+
* **Usage**
|
19
|
+
* To enable rename `{% for post in site.posts %}` to `{% for post in paginator.posts %}`
|
20
|
+
in `index.html`
|
21
|
+
* [Jekyll SEO](https://rubygems.org/gems/jekyll-seo-tag) by [Ben Balter](https://github.com/benbalter)
|
22
|
+
more info [about plugin and configs](https://github.com/jekyll/jekyll-seo-tag)
|
23
|
+
* [Jekyll Sitemap](https://rubygems.org/gems/jekyll-sitemap) by [Ben Balter](https://github.com/benbalter)
|
24
|
+
more info [about plugin and configs](https://github.com/jekyll/jekyll-sitemap)
|
25
|
+
* **Usage**
|
26
|
+
* To exclude specific pages/posts set `sitemap: false` in the front matter of the page/post
|
27
|
+
* [Simple Jekyll Search](https://github.com/christian-fei/Simple-Jekyll-Search) by [Christian Fei](https://github.com/christian-fei)
|
28
|
+
more info [about plugin and configs](https://github.com/christian-fei/Simple-Jekyll-Search)
|
29
|
+
|
30
|
+
If you want to know the steps to create or re-use this scaffold, **take a look at this** [**wiki**](https://github.com/StartZeroGnu/gem-themes/wiki)
|
31
|
+
|
32
|
+
**I used this files of "minima theme" as an example** to create this scaffold
|
33
|
+
|
34
|
+
* ["minima.gemspec"](https://github.com/jekyll/minima/blob/master/minima.gemspec)
|
35
|
+
* [".gitignore"](https://github.com/jekyll/minima/blob/master/.gitignore)
|
36
|
+
* ["Rakefile"](https://github.com/jekyll/minima/blob/master/Rakefile)
|
37
|
+
|
38
|
+
## Credits and Thanks
|
39
|
+
|
40
|
+
* [Jekyll (3.2.1)](http://jekyllrb.com)
|
41
|
+
* [Jekyll Docs | Themes](http://jekyllrb.com/docs/themes/)
|
42
|
+
* [Minima (1.2)](https://github.com/jekyll/minima)
|
43
|
+
* [RubyGems](https://rubygems.org)
|
44
|
+
* [Jekyll Feed](https://github.com/jekyll/jekyll-feed)
|
45
|
+
* [Jekyll Gist](https://github.com/jekyll/jekyll-gist)
|
46
|
+
* [Jekyll Paginate](https://github.com/jekyll/jekyll-paginate)
|
47
|
+
* [Jekyll SEO](https://github.com/jekyll/jekyll-seo-tag)
|
48
|
+
* [Jekyll Sitemap](https://github.com/jekyll/jekyll-sitemap)
|
49
|
+
* [Simple Jekyll Search](https://github.com/christian-fei/Simple-Jekyll-Search)
|
50
|
+
|
51
|
+
## Contributing
|
52
|
+
|
53
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/StartZeroGnu/writers-zone/issues. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
54
|
+
|
55
|
+
## License
|
56
|
+
|
57
|
+
The theme is available as open source under the terms of the [MIT License](/LICENSE.txt).
|
@@ -0,0 +1,25 @@
|
|
1
|
+
{% if page.comments != false and jekyll.environment == "production" %}
|
2
|
+
{% if site.url %}
|
3
|
+
{% assign disqus_url = page.url | prepend: site.url %}
|
4
|
+
{% elsif site.github.url %}
|
5
|
+
{% assign disqus_url = page.url | prepend: site.github.url %}
|
6
|
+
{% endif %}
|
7
|
+
|
8
|
+
<div id="disqus_thread"></div>
|
9
|
+
<script>
|
10
|
+
var disqus_config = function () {
|
11
|
+
this.page.url = '{{ disqus_url }}';
|
12
|
+
this.page.identifier = '{{ disqus_url }}';
|
13
|
+
};
|
14
|
+
|
15
|
+
(function() {
|
16
|
+
var d = document, s = d.createElement('script');
|
17
|
+
|
18
|
+
s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
|
19
|
+
|
20
|
+
s.setAttribute('data-timestamp', +new Date());
|
21
|
+
(d.head || d.body).appendChild(s);
|
22
|
+
})();
|
23
|
+
</script>
|
24
|
+
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
25
|
+
{% endif %}
|
@@ -0,0 +1,50 @@
|
|
1
|
+
<footer class="site-footer">
|
2
|
+
|
3
|
+
<div class="wrapper">
|
4
|
+
|
5
|
+
<h2 class="footer-heading">{{ site.title | escape }}</h2>
|
6
|
+
|
7
|
+
<div class="footer-col-wrapper">
|
8
|
+
<div class="footer-col footer-col-1">
|
9
|
+
<ul class="contact-list">
|
10
|
+
<li>
|
11
|
+
{% if site.author %}
|
12
|
+
{{ site.author | escape }}
|
13
|
+
{% else %}
|
14
|
+
{{ site.title | escape }}
|
15
|
+
{% endif %}
|
16
|
+
</li>
|
17
|
+
<li><a href="mailto:{{ site.email }}">{{ site.email }}</a></li>
|
18
|
+
</ul>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<div class="footer-col footer-col-2">
|
22
|
+
<ul class="social-media-list">
|
23
|
+
{% if site.github_username %}
|
24
|
+
<li>
|
25
|
+
{% include icon-github.html username=site.github_username %}
|
26
|
+
</li>
|
27
|
+
{% endif %}
|
28
|
+
|
29
|
+
{% if site.twitter_username %}
|
30
|
+
<li>
|
31
|
+
{% include icon-twitter.html username=site.twitter_username %}
|
32
|
+
</li>
|
33
|
+
{% endif %}
|
34
|
+
</ul>
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div class="footer-col footer-col-3">
|
38
|
+
<p>{{ site.description | escape }}</p>
|
39
|
+
<p class="rss-subscribe">
|
40
|
+
subscribe via
|
41
|
+
<a href="{{ "/atom.xml" | prepend: site.baseurl }}">Atom</a>
|
42
|
+
or
|
43
|
+
<a href="{{ "/feed.xml" | prepend: site.baseurl }}">RSS</a>
|
44
|
+
</p>
|
45
|
+
</div>
|
46
|
+
</div>
|
47
|
+
|
48
|
+
</div>
|
49
|
+
|
50
|
+
</footer>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<script>
|
2
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
3
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
4
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
5
|
+
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
6
|
+
|
7
|
+
ga('create', '{{ site.google_analytics }}', 'auto');
|
8
|
+
ga('send', 'pageview');
|
9
|
+
|
10
|
+
</script>
|
11
|
+
|
data/_includes/head.html
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
<head>
|
2
|
+
<meta charset="utf-8">
|
3
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
+
<!-- <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title> -->
|
6
|
+
<!-- <meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}"> -->
|
7
|
+
<!-- <link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: full_base_url }}"> -->
|
8
|
+
{% assign custom_url = site.url | append: site.baseurl %}
|
9
|
+
{% assign full_base_url = custom_url | default: site.github.url %}
|
10
|
+
|
11
|
+
{% seo %}
|
12
|
+
|
13
|
+
<!-- Feeds -->
|
14
|
+
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | prepend: full_base_url }}">
|
15
|
+
{% feed_meta %}
|
16
|
+
<!-- Feeds -->
|
17
|
+
|
18
|
+
<!-- Styles -->
|
19
|
+
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: full_base_url }}">
|
20
|
+
<!-- Styles -->
|
21
|
+
|
22
|
+
{% if jekyll.environment == 'production' and site.google_analytics %}
|
23
|
+
{% include google-analytics.html %}
|
24
|
+
{% endif %}
|
25
|
+
</head>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<header class="site-header" role="banner">
|
2
|
+
|
3
|
+
<div class="wrapper">
|
4
|
+
|
5
|
+
{% assign custom_url = site.url | append: site.baseurl %}
|
6
|
+
{% assign full_base_url = site.github.url | default: custom_url %}
|
7
|
+
<a class="site-title" href="{{ full_base_url }}/">{{ site.title | escape }}</a>
|
8
|
+
|
9
|
+
<nav class="site-nav">
|
10
|
+
<a href="#" class="menu-icon">
|
11
|
+
<svg viewBox="0 0 18 15" width="18px" height="15px">
|
12
|
+
<path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
|
13
|
+
<path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
|
14
|
+
<path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
|
15
|
+
</svg>
|
16
|
+
</a>
|
17
|
+
|
18
|
+
<div class="trigger">
|
19
|
+
{% for my_page in site.pages %}
|
20
|
+
{% if my_page.title %}
|
21
|
+
<a class="page-link" href="{{ my_page.url | prepend: full_base_url }}">{{ my_page.title | escape }}</a>
|
22
|
+
{% endif %}
|
23
|
+
{% endfor %}
|
24
|
+
</div>
|
25
|
+
</nav>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</header>
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="https://github.com/{{ include.username }}" title="{{ include.username }}"><span class="icon icon--github">{% include icon-github.svg %}</span><span class="username">{{ include.username }}</span></a>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="#828282" d="M7.999,0.431c-4.285,0-7.76,3.474-7.76,7.761 c0,3.428,2.223,6.337,5.307,7.363c0.388,0.071,0.53-0.168,0.53-0.374c0-0.184-0.007-0.672-0.01-1.32 c-2.159,0.469-2.614-1.04-2.614-1.04c-0.353-0.896-0.862-1.135-0.862-1.135c-0.705-0.481,0.053-0.472,0.053-0.472 c0.779,0.055,1.189,0.8,1.189,0.8c0.692,1.186,1.816,0.843,2.258,0.645c0.071-0.502,0.271-0.843,0.493-1.037 C4.86,11.425,3.049,10.76,3.049,7.786c0-0.847,0.302-1.54,0.799-2.082C3.768,5.507,3.501,4.718,3.924,3.65 c0,0,0.652-0.209,2.134,0.796C6.677,4.273,7.34,4.187,8,4.184c0.659,0.003,1.323,0.089,1.943,0.261 c1.482-1.004,2.132-0.796,2.132-0.796c0.423,1.068,0.157,1.857,0.077,2.054c0.497,0.542,0.798,1.235,0.798,2.082 c0,2.981-1.814,3.637-3.543,3.829c0.279,0.24,0.527,0.713,0.527,1.437c0,1.037-0.01,1.874-0.01,2.129 c0,0.208,0.14,0.449,0.534,0.373c3.081-1.028,5.302-3.935,5.302-7.362C15.76,3.906,12.285,0.431,7.999,0.431z"/></svg>
|
@@ -0,0 +1 @@
|
|
1
|
+
<a href="https://twitter.com/{{ include.username }}" title="{{ include.username }}"><span class="icon icon--twitter">{% include icon-twitter.svg %}</span><span class="username">{{ include.username }}</span></a>
|
@@ -0,0 +1 @@
|
|
1
|
+
<svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="#828282" d="M15.969,3.058c-0.586,0.26-1.217,0.436-1.878,0.515c0.675-0.405,1.194-1.045,1.438-1.809c-0.632,0.375-1.332,0.647-2.076,0.793c-0.596-0.636-1.446-1.033-2.387-1.033c-1.806,0-3.27,1.464-3.27,3.27 c0,0.256,0.029,0.506,0.085,0.745C5.163,5.404,2.753,4.102,1.14,2.124C0.859,2.607,0.698,3.168,0.698,3.767 c0,1.134,0.577,2.135,1.455,2.722C1.616,6.472,1.112,6.325,0.671,6.08c0,0.014,0,0.027,0,0.041c0,1.584,1.127,2.906,2.623,3.206 C3.02,9.402,2.731,9.442,2.433,9.442c-0.211,0-0.416-0.021-0.615-0.059c0.416,1.299,1.624,2.245,3.055,2.271 c-1.119,0.877-2.529,1.4-4.061,1.4c-0.264,0-0.524-0.015-0.78-0.046c1.447,0.928,3.166,1.469,5.013,1.469 c6.015,0,9.304-4.983,9.304-9.304c0-0.142-0.003-0.283-0.009-0.423C14.976,4.29,15.531,3.714,15.969,3.058z"/></svg>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!--
|
2
|
+
copy/paste from:
|
3
|
+
http://jekyllrb.com/docs/pagination/#render-the-paginated-posts
|
4
|
+
-->
|
5
|
+
|
6
|
+
<div class="wrapper">
|
7
|
+
<div class="pagination-pages">
|
8
|
+
{% if paginator.previous_page %}
|
9
|
+
<a class="previous-pages" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">« Previous</a>
|
10
|
+
{% else %}
|
11
|
+
<span class="previous-pages">« Previous</span>
|
12
|
+
{% endif %}
|
13
|
+
<span class="page-number">{{ paginator.page }} of {{ paginator.total_pages }}</span>
|
14
|
+
{% if paginator.next_page %}
|
15
|
+
<a class="next-pages" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Next »</a>
|
16
|
+
{% else %}
|
17
|
+
<span class="next-pages">Next »</span>
|
18
|
+
{% endif %}
|
19
|
+
</div>
|
20
|
+
</div>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!--
|
2
|
+
settings and more info:
|
3
|
+
http://jekyllrb.com/docs/pagination/#render-the-paginated-posts
|
4
|
+
source code copy/paste from:
|
5
|
+
http://www.sigmainfy.com/blog/how-to-add-jekyll-pagination-next-previous-post-link.html#add-next-and-previous-post-links
|
6
|
+
-->
|
7
|
+
|
8
|
+
<div class="pagination-posts">
|
9
|
+
{% if page.previous.url %}
|
10
|
+
<a class="previous-posts" href="{{ page.previous.url | prepend: site.baseurl }}">« {{ page.previous.title | truncate: 45 }}</a>
|
11
|
+
{% else %}
|
12
|
+
<span>« ...</span>
|
13
|
+
{% endif %}
|
14
|
+
{% if page.next.url %}
|
15
|
+
<a class="next-posts" href="{{ page.next.url | prepend: site.baseurl }}">{{ page.next.title | truncate: 45 }} »</a>
|
16
|
+
{% else %}
|
17
|
+
<span>... »</span>
|
18
|
+
{% endif %}
|
19
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
<script>
|
4
|
+
SimpleJekyllSearch({
|
5
|
+
searchInput: document.getElementById('search-input'),
|
6
|
+
resultsContainer: document.getElementById('results-container'),
|
7
|
+
json: '{{ site.baseurl }}/search.json',
|
8
|
+
searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
|
9
|
+
noResultsText: 'No results found',
|
10
|
+
limit: 10,
|
11
|
+
fuzzy: false,
|
12
|
+
exclude: ['Welcome']
|
13
|
+
})
|
14
|
+
</script>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
<script>
|
2
|
+
!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function load(location,callback){var xhr=getXHR();xhr.open("GET",location,!0),xhr.onreadystatechange=createStateChangeListener(xhr,callback),xhr.send()}function createStateChangeListener(xhr,callback){return function(){if(4===xhr.readyState&&200===xhr.status)try{callback(null,JSON.parse(xhr.responseText))}catch(err){callback(err,null)}}}function getXHR(){return window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}module.exports={load:load}},{}],2:[function(require,module,exports){"use strict";module.exports=function OptionsValidator(params){function validateParams(params){return params?void 0!==params.required&¶ms.required instanceof Array:!1}if(!validateParams(params))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof OptionsValidator))return new OptionsValidator(params);var requiredOptions=params.required;this.getRequiredOptions=function(){return requiredOptions},this.validate=function(parameters){var errors=[];return requiredOptions.forEach(function(requiredOptionName){void 0===parameters[requiredOptionName]&&errors.push(requiredOptionName)}),errors}}},{}],3:[function(require,module,exports){"use strict";function put(data){return isObject(data)?addObject(data):isArray(data)?addArray(data):void 0}function clear(){return data.length=0,data}function get(){return data}function isObject(obj){return!!obj&&"[object Object]"===Object.prototype.toString.call(obj)}function isArray(obj){return!!obj&&"[object Array]"===Object.prototype.toString.call(obj)}function addObject(_data){return data.push(_data),data}function addArray(_data){for(var added=[],i=0;i<_data.length;i++)isObject(_data[i])&&added.push(addObject(_data[i]));return added}function search(crit){return crit?findMatches(data,crit,opt.searchStrategy,opt):[]}function setOptions(_opt){opt=_opt||{},opt.fuzzy=_opt.fuzzy||!1,opt.limit=_opt.limit||10,opt.searchStrategy=_opt.fuzzy?FuzzySearchStrategy:LiteralSearchStrategy}function findMatches(data,crit,strategy,opt){for(var matches=[],i=0;i<data.length&&matches.length<opt.limit;i++){var match=findMatchesInObject(data[i],crit,strategy,opt);match&&matches.push(match)}return matches}function findMatchesInObject(obj,crit,strategy,opt){for(var key in obj)if(!isExcluded(obj[key],opt.exclude)&&strategy.matches(obj[key],crit))return obj}function isExcluded(term,excludedTerms){var excluded=!1;excludedTerms=excludedTerms||[];for(var i=0;i<excludedTerms.length;i++){var excludedTerm=excludedTerms[i];!excluded&&new RegExp(term).test(excludedTerm)&&(excluded=!0)}return excluded}module.exports={put:put,clear:clear,get:get,search:search,setOptions:setOptions};var FuzzySearchStrategy=require("./SearchStrategies/FuzzySearchStrategy"),LiteralSearchStrategy=require("./SearchStrategies/LiteralSearchStrategy"),data=[],opt={};opt.fuzzy=!1,opt.limit=10,opt.searchStrategy=opt.fuzzy?FuzzySearchStrategy:LiteralSearchStrategy},{"./SearchStrategies/FuzzySearchStrategy":4,"./SearchStrategies/LiteralSearchStrategy":5}],4:[function(require,module,exports){"use strict";function FuzzySearchStrategy(){function fuzzyFrom(string){var fuzzy=string.trim().split("").join(".*?").replace("??","?");return new RegExp(fuzzy,"gi")}this.matches=function(string,crit){if("string"!=typeof string||"string"!=typeof crit)return!1;var fuzzy=fuzzyFrom(crit);return!!fuzzy.test(string)}}module.exports=new FuzzySearchStrategy},{}],5:[function(require,module,exports){"use strict";function LiteralSearchStrategy(){this.matches=function(string,crit){return"string"!=typeof string?!1:(string=string.trim(),string.toLowerCase().indexOf(crit.toLowerCase())>=0)}}module.exports=new LiteralSearchStrategy},{}],6:[function(require,module,exports){"use strict";function setOptions(_options){options.pattern=_options.pattern||options.pattern,options.template=_options.template||options.template,"function"==typeof _options.middleware&&(options.middleware=_options.middleware)}function compile(data){return options.template.replace(options.pattern,function(match,prop){var value=options.middleware(prop,data[prop],options.template);return void 0!==value?value:data[prop]||match})}module.exports={compile:compile,setOptions:setOptions};var options={};options.pattern=/\{(.*?)\}/g,options.template="",options.middleware=function(){}},{}],7:[function(require,module,exports){!function(window,document,undefined){"use strict";function initWithJSON(json){repository.put(json),registerInput()}function initWithURL(url){jsonLoader.load(url,function(err,json){err&&throwError("failed to get JSON ("+url+")"),initWithJSON(json)})}function emptyResultsContainer(){options.resultsContainer.innerHTML=""}function appendToResultsContainer(text){options.resultsContainer.innerHTML+=text}function registerInput(){options.searchInput.addEventListener("keyup",function(e){var key=e.which,query=e.target.value;isWhitelistedKey(key)&&isValidQuery(query)&&(emptyResultsContainer(),render(repository.search(query)))})}function render(results){if(0===results.length)return appendToResultsContainer(options.noResultsText);for(var i=0;i<results.length;i++)appendToResultsContainer(templater.compile(results[i]))}function isValidQuery(query){return query&&query.length>0}function isWhitelistedKey(key){return-1===[13,16,20,37,38,39,40,91].indexOf(key)}function throwError(message){throw new Error("SimpleJekyllSearch --- "+message)}var options={searchInput:null,resultsContainer:null,json:[],searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:function(){},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},requiredOptions=["searchInput","resultsContainer","json"],templater=require("./Templater"),repository=require("./Repository"),jsonLoader=require("./JSONLoader"),optionsValidator=require("./OptionsValidator")({required:requiredOptions}),utils=require("./utils");window.SimpleJekyllSearch=function(_options){var errors=optionsValidator.validate(_options);errors.length>0&&throwError("You must specify the following required options: "+requiredOptions),options=utils.merge(options,_options),templater.setOptions({template:options.searchResultTemplate,middleware:options.templateMiddleware}),repository.setOptions({fuzzy:options.fuzzy,limit:options.limit}),utils.isJSON(options.json)?initWithJSON(options.json):initWithURL(options.json)},window.SimpleJekyllSearch.init=window.SimpleJekyllSearch}(window,document)},{"./JSONLoader":1,"./OptionsValidator":2,"./Repository":3,"./Templater":6,"./utils":8}],8:[function(require,module,exports){"use strict";function merge(defaultParams,mergeParams){var mergedOptions={};for(var option in defaultParams)mergedOptions[option]=defaultParams[option],void 0!==mergeParams[option]&&(mergedOptions[option]=mergeParams[option]);return mergedOptions}function isJSON(json){try{return json instanceof Object&&JSON.parse(JSON.stringify(json))?!0:!1}catch(e){return!1}}module.exports={merge:merge,isJSON:isJSON}},{}]},{},[7]);
|
3
|
+
</script>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
|
3
|
+
|
4
|
+
{% include head.html %}
|
5
|
+
|
6
|
+
<body>
|
7
|
+
|
8
|
+
{% include header.html %}
|
9
|
+
|
10
|
+
<main class="page-content" aria-label="Content">
|
11
|
+
|
12
|
+
<div class="wrapper">
|
13
|
+
{% if page.url == '/' or page.url contains 'page' %}
|
14
|
+
{% include search/search-box.html %}
|
15
|
+
{% endif %}
|
16
|
+
|
17
|
+
{{ content }}
|
18
|
+
</div>
|
19
|
+
|
20
|
+
{% if paginator.total_pages > 1 %}
|
21
|
+
{% include pagination/pages.html %}
|
22
|
+
{% endif %}
|
23
|
+
|
24
|
+
</main>
|
25
|
+
|
26
|
+
{% include footer.html %}
|
27
|
+
|
28
|
+
{% if page.url == '/' or page.url contains 'page' %}
|
29
|
+
{% include search/search-js.min.html %}
|
30
|
+
{% include search/search-config.html %}
|
31
|
+
{% endif %}
|
32
|
+
|
33
|
+
</body>
|
34
|
+
|
35
|
+
</html>
|
data/_layouts/page.html
ADDED
data/_layouts/post.html
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
|
5
|
+
|
6
|
+
<header class="post-header">
|
7
|
+
<h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
|
8
|
+
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
|
9
|
+
</header>
|
10
|
+
|
11
|
+
<div class="post-content" itemprop="articleBody">
|
12
|
+
{{ content }}
|
13
|
+
</div>
|
14
|
+
|
15
|
+
{% include pagination/posts.html %}
|
16
|
+
|
17
|
+
{% if site.disqus.shortname %}
|
18
|
+
{% include disqus_comments.html %}
|
19
|
+
{% endif %}
|
20
|
+
</article>
|
@@ -0,0 +1,198 @@
|
|
1
|
+
/**
|
2
|
+
* Reset some basic elements
|
3
|
+
*/
|
4
|
+
body, h1, h2, h3, h4, h5, h6,
|
5
|
+
p, blockquote, pre, hr,
|
6
|
+
dl, dd, ol, ul, figure {
|
7
|
+
margin: 0;
|
8
|
+
padding: 0;
|
9
|
+
}
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Basic styling
|
15
|
+
*/
|
16
|
+
body {
|
17
|
+
font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family;
|
18
|
+
color: $text-color;
|
19
|
+
background-color: $background-color;
|
20
|
+
-webkit-text-size-adjust: 100%;
|
21
|
+
-webkit-font-feature-settings: "kern" 1;
|
22
|
+
-moz-font-feature-settings: "kern" 1;
|
23
|
+
-o-font-feature-settings: "kern" 1;
|
24
|
+
font-feature-settings: "kern" 1;
|
25
|
+
font-kerning: normal;
|
26
|
+
}
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Set `margin-bottom` to maintain vertical rhythm
|
32
|
+
*/
|
33
|
+
h1, h2, h3, h4, h5, h6,
|
34
|
+
p, blockquote, pre,
|
35
|
+
ul, ol, dl, figure,
|
36
|
+
%vertical-rhythm {
|
37
|
+
margin-bottom: $spacing-unit / 2;
|
38
|
+
}
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Images
|
44
|
+
*/
|
45
|
+
img {
|
46
|
+
max-width: 100%;
|
47
|
+
vertical-align: middle;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Figures
|
54
|
+
*/
|
55
|
+
figure > img {
|
56
|
+
display: block;
|
57
|
+
}
|
58
|
+
|
59
|
+
figcaption {
|
60
|
+
font-size: $small-font-size;
|
61
|
+
}
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Lists
|
67
|
+
*/
|
68
|
+
ul, ol {
|
69
|
+
margin-left: $spacing-unit;
|
70
|
+
}
|
71
|
+
|
72
|
+
li {
|
73
|
+
> ul,
|
74
|
+
> ol {
|
75
|
+
margin-bottom: 0;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Headings
|
83
|
+
*/
|
84
|
+
h1, h2, h3, h4, h5, h6 {
|
85
|
+
font-weight: $base-font-weight;
|
86
|
+
}
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
/**
|
91
|
+
* Links
|
92
|
+
*/
|
93
|
+
a {
|
94
|
+
color: $brand-color;
|
95
|
+
text-decoration: none;
|
96
|
+
|
97
|
+
&:visited {
|
98
|
+
color: darken($brand-color, 15%);
|
99
|
+
}
|
100
|
+
|
101
|
+
&:hover {
|
102
|
+
color: $text-color;
|
103
|
+
text-decoration: underline;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
/**
|
110
|
+
* Blockquotes
|
111
|
+
*/
|
112
|
+
blockquote {
|
113
|
+
color: $grey-color;
|
114
|
+
border-left: 4px solid $grey-color-light;
|
115
|
+
padding-left: $spacing-unit / 2;
|
116
|
+
font-size: 18px;
|
117
|
+
letter-spacing: -1px;
|
118
|
+
font-style: italic;
|
119
|
+
|
120
|
+
> :last-child {
|
121
|
+
margin-bottom: 0;
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
/**
|
128
|
+
* Code formatting
|
129
|
+
*/
|
130
|
+
pre,
|
131
|
+
code {
|
132
|
+
font-size: 15px;
|
133
|
+
border: 1px solid $grey-color-light;
|
134
|
+
border-radius: 3px;
|
135
|
+
background-color: #eef;
|
136
|
+
}
|
137
|
+
|
138
|
+
code {
|
139
|
+
padding: 1px 5px;
|
140
|
+
}
|
141
|
+
|
142
|
+
pre {
|
143
|
+
padding: 8px 12px;
|
144
|
+
overflow-x: auto;
|
145
|
+
|
146
|
+
> code {
|
147
|
+
border: 0;
|
148
|
+
padding-right: 0;
|
149
|
+
padding-left: 0;
|
150
|
+
}
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
/**
|
156
|
+
* Wrapper
|
157
|
+
*/
|
158
|
+
.wrapper {
|
159
|
+
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2));
|
160
|
+
max-width: calc(#{$content-width} - (#{$spacing-unit} * 2));
|
161
|
+
margin-right: auto;
|
162
|
+
margin-left: auto;
|
163
|
+
padding-right: $spacing-unit;
|
164
|
+
padding-left: $spacing-unit;
|
165
|
+
@extend %clearfix;
|
166
|
+
|
167
|
+
@include media-query($on-laptop) {
|
168
|
+
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
|
169
|
+
max-width: calc(#{$content-width} - (#{$spacing-unit}));
|
170
|
+
padding-right: $spacing-unit / 2;
|
171
|
+
padding-left: $spacing-unit / 2;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
/**
|
178
|
+
* Clearfix
|
179
|
+
*/
|
180
|
+
%clearfix:after {
|
181
|
+
content: "";
|
182
|
+
display: table;
|
183
|
+
clear: both;
|
184
|
+
}
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
/**
|
189
|
+
* Icons
|
190
|
+
*/
|
191
|
+
.icon > svg {
|
192
|
+
display: inline-block;
|
193
|
+
vertical-align: middle;
|
194
|
+
|
195
|
+
path {
|
196
|
+
fill: $grey-color;
|
197
|
+
}
|
198
|
+
}
|