jekyll-materialdocs 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/_layouts/default.html +6 -0
- data/assets/jekyll-materialdocs.css +102 -0
- data/assets/search.html +27 -0
- data/assets/search.json +14 -0
- data/assets/simple-jekyll-search.min.js +6 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03507e3e42e4ba9a054c95203c84dde22a929972
|
4
|
+
data.tar.gz: 5ad99b2f60c4c320693e9dfa82e980b150c42c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22e7c8349fc704394148133fc737877e30ca49ffc544494fb07ff255714be1746dbcb8c3f4f67f2b501c2ad07dae4fa1a5aea4e9ad6fb4bd727d872f5a465fda
|
7
|
+
data.tar.gz: fe301714e16f364887c943a11d1c32cb14a6448cdf1dab3fbef133df7b8f26c22f1c21d39ee2b8e2d0aec92674299596755f05680fc470f4db5485221d7a5f79
|
data/README.md
CHANGED
@@ -49,6 +49,7 @@ remote_theme: chromatical/jekyll-materialdocs
|
|
49
49
|
```yaml
|
50
50
|
mdl_colors: indigo-pink # a supported Material Design Lite color scheme
|
51
51
|
copyright: Your Name # will override the copyright notice (default is site title)
|
52
|
+
search: true # enabled by default, set to false to disable site search
|
52
53
|
```
|
53
54
|
MaterialDocs supports changing the color scheme by setting `mdl_colors` in _config.yml to a supported Material Design Lite scheme (e.g. indigo-pink, deep_orange-blue). Use the [MDL theme builder](https://getmdl.io/customize/index.html) to find color schemes.
|
54
55
|
|
data/_layouts/default.html
CHANGED
@@ -11,6 +11,12 @@
|
|
11
11
|
<span class="mdl-layout-title">
|
12
12
|
{% if page.title %}<h1 id="page-title" class="mdl-typography--title">{{ page.title }}</h1>{% endif %}
|
13
13
|
</span>
|
14
|
+
{% if site.search != false %}
|
15
|
+
<div class="mdl-layout-spacer"></div>
|
16
|
+
<a href="{{ site.baseurl }}/assets/search" class="mdl-button mdl-js-button mdl-button--icon">
|
17
|
+
<i class="material-icons">search</i>
|
18
|
+
</a>
|
19
|
+
{% endif %}
|
14
20
|
</div>
|
15
21
|
</header>
|
16
22
|
<div class="mdl-layout__drawer">
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#site-title{
|
2
|
+
color: inherit;
|
3
|
+
text-decoration: none;
|
4
|
+
}
|
5
|
+
.mdl-layout__drawer > .mdl-layout-title{
|
6
|
+
padding-left: 16px;
|
7
|
+
padding-right: 16px;
|
8
|
+
text-align: center;
|
9
|
+
line-height: 32px;
|
10
|
+
margin-top: 32px;
|
11
|
+
margin-bottom: 32px;
|
12
|
+
}
|
13
|
+
.content{
|
14
|
+
max-width: 800px;
|
15
|
+
padding: 40px 40px 40px 40px;
|
16
|
+
margin-left: auto;
|
17
|
+
margin-right: auto;
|
18
|
+
}
|
19
|
+
.parent{
|
20
|
+
font-weight: bold;
|
21
|
+
}
|
22
|
+
.child{
|
23
|
+
padding: 5px 40px 5px 60px !important;
|
24
|
+
}
|
25
|
+
.is-active{
|
26
|
+
background-color: #e0e0e0;
|
27
|
+
}
|
28
|
+
.content img, .content video {
|
29
|
+
max-width: 100%;
|
30
|
+
padding: 10px;
|
31
|
+
border: 1px whitesmoke solid;
|
32
|
+
border-radius: 10px;
|
33
|
+
}
|
34
|
+
footer{
|
35
|
+
text-align: right;
|
36
|
+
padding-right: 10px;
|
37
|
+
}
|
38
|
+
.lineno{
|
39
|
+
padding-right: 8px;
|
40
|
+
}
|
41
|
+
|
42
|
+
/* Copied from Syntax.css (https://github.com/mojombo/tpw/blob/master/css/syntax.css) */
|
43
|
+
.highlight { background: #ffffff; }
|
44
|
+
.highlight .c { color: #999988; font-style: italic } /* Comment */
|
45
|
+
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
46
|
+
.highlight .k { font-weight: bold } /* Keyword */
|
47
|
+
.highlight .o { font-weight: bold } /* Operator */
|
48
|
+
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
|
49
|
+
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
|
50
|
+
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
|
51
|
+
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
|
52
|
+
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
|
53
|
+
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
|
54
|
+
.highlight .ge { font-style: italic } /* Generic.Emph */
|
55
|
+
.highlight .gr { color: #aa0000 } /* Generic.Error */
|
56
|
+
.highlight .gh { color: #999999 } /* Generic.Heading */
|
57
|
+
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
|
58
|
+
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
|
59
|
+
.highlight .go { color: #888888 } /* Generic.Output */
|
60
|
+
.highlight .gp { color: #555555 } /* Generic.Prompt */
|
61
|
+
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
62
|
+
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
|
63
|
+
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
|
64
|
+
.highlight .kc { font-weight: bold } /* Keyword.Constant */
|
65
|
+
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
|
66
|
+
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
|
67
|
+
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
|
68
|
+
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
|
69
|
+
.highlight .m { color: #009999 } /* Literal.Number */
|
70
|
+
.highlight .s { color: #d14 } /* Literal.String */
|
71
|
+
.highlight .na { color: #008080 } /* Name.Attribute */
|
72
|
+
.highlight .nb { color: #0086B3 } /* Name.Builtin */
|
73
|
+
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
|
74
|
+
.highlight .no { color: #008080 } /* Name.Constant */
|
75
|
+
.highlight .ni { color: #800080 } /* Name.Entity */
|
76
|
+
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
|
77
|
+
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
|
78
|
+
.highlight .nn { color: #555555 } /* Name.Namespace */
|
79
|
+
.highlight .nt { color: #000080 } /* Name.Tag */
|
80
|
+
.highlight .nv { color: #008080 } /* Name.Variable */
|
81
|
+
.highlight .ow { font-weight: bold } /* Operator.Word */
|
82
|
+
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
83
|
+
.highlight .mf { color: #009999 } /* Literal.Number.Float */
|
84
|
+
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
|
85
|
+
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
|
86
|
+
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
|
87
|
+
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
|
88
|
+
.highlight .sc { color: #d14 } /* Literal.String.Char */
|
89
|
+
.highlight .sd { color: #d14 } /* Literal.String.Doc */
|
90
|
+
.highlight .s2 { color: #d14 } /* Literal.String.Double */
|
91
|
+
.highlight .se { color: #d14 } /* Literal.String.Escape */
|
92
|
+
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
|
93
|
+
.highlight .si { color: #d14 } /* Literal.String.Interpol */
|
94
|
+
.highlight .sx { color: #d14 } /* Literal.String.Other */
|
95
|
+
.highlight .sr { color: #009926 } /* Literal.String.Regex */
|
96
|
+
.highlight .s1 { color: #d14 } /* Literal.String.Single */
|
97
|
+
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
|
98
|
+
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
|
99
|
+
.highlight .vc { color: #008080 } /* Name.Variable.Class */
|
100
|
+
.highlight .vg { color: #008080 } /* Name.Variable.Global */
|
101
|
+
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
|
102
|
+
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
|
data/assets/search.html
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
---
|
2
|
+
layout: page
|
3
|
+
title: Search
|
4
|
+
menu: false
|
5
|
+
---
|
6
|
+
{% if site.search != false %}
|
7
|
+
<div id="search-container">
|
8
|
+
<form action="#">
|
9
|
+
<div class="mdl-textfield mdl-js-textfield">
|
10
|
+
<input class="mdl-textfield__input" type="text" id="search">
|
11
|
+
<label class="mdl-textfield__label" for="search">Keywords...</label>
|
12
|
+
</div>
|
13
|
+
</form>
|
14
|
+
<ul class="demo-list-item mdl-list" id="results"></ul>
|
15
|
+
</div>
|
16
|
+
<script src="{{ site.baseurl }}/assets/simple-jekyll-search.min.js"></script>
|
17
|
+
<script>
|
18
|
+
SimpleJekyllSearch({
|
19
|
+
searchInput: document.getElementById('search'),
|
20
|
+
resultsContainer: document.getElementById('results'),
|
21
|
+
json: '{{ site.baseurl }}/assets/search.json',
|
22
|
+
searchResultTemplate: '<li class="mdl-list__item"><a href="{url}"><span class="mdl-list__item-primary-content">{title}</span></a></li>'
|
23
|
+
})
|
24
|
+
</script>
|
25
|
+
{% else %}
|
26
|
+
<p>Search is disabled.</p>
|
27
|
+
{% endif %}
|
data/assets/search.json
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
layout: null
|
3
|
+
---
|
4
|
+
{% if site.search != false %}
|
5
|
+
[
|
6
|
+
{% for node in site.pages %}{% if node.title and node.content %}
|
7
|
+
{
|
8
|
+
"title" : "{{ node.title | escape }}",
|
9
|
+
"url" : "{{ site.baseurl }}{{ node.url }}",
|
10
|
+
"content" : {{ node.content | newlines_to_br | strip_html | jsonify }}
|
11
|
+
},
|
12
|
+
{% endif %}{% endfor %}{}
|
13
|
+
]
|
14
|
+
{% endif %}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Simple-Jekyll-Search v1.6.0 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
3
|
+
* Copyright 2015-2018, Christian Fei
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*/
|
6
|
+
!function(){"use strict";function t(){return 0}function e(t){return Boolean(t)&&"[object Object]"===Object.prototype.toString.call(t)}function n(t){return l.push(t),l}var r={load:function(t,e){var n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");n.open("GET",t,!0),n.onreadystatechange=function(t,e){return function(){if(4===t.readyState&&200===t.status)try{e(null,JSON.parse(t.responseText))}catch(n){e(n,null)}}}(n,e),n.send()}},i=function(t,e){var n=e.length,r=t.length;if(r>n)return!1;if(r===n)return t===e;t:for(var i=0,o=0;i<r;i++){for(var u=t.charCodeAt(i);o<n;)if(e.charCodeAt(o++)===u)continue t;return!1}return!0},o=new function(){this.matches=function(t,e){return i(e,t)}},u=new function(){this.matches=function(t,e){return"string"==typeof t&&(t=t.trim()).toLowerCase().indexOf(e.toLowerCase())>=0}},a={put:function(t){return e(t)?n(t):function(t){return Boolean(t)&&"[object Array]"===Object.prototype.toString.call(t)}(t)?function(t){for(var r=[],i=0,o=t.length;i<o;i++)e(t[i])&&r.push(n(t[i]));return r}(t):undefined},clear:function(){return l.length=0,l},search:function(t){return t?function(t,e,n,r){for(var i=[],o=0;o<t.length&&i.length<r.limit;o++){var u=function(t,e,n,r){for(var i in t)if(!function(t,e){for(var n=!1,r=0,i=(e=e||[]).length;r<i;r++){var o=e[r];!n&&new RegExp(t).test(o)&&(n=!0)}return n}(t[i],r.exclude)&&n.matches(t[i],e))return t}(t[o],e,n,r);u&&i.push(u)}return i}(l,t,c.searchStrategy,c).sort(c.sort):[]},setOptions:function(e){(c=e||{}).fuzzy=e.fuzzy||!1,c.limit=e.limit||10,c.searchStrategy=e.fuzzy?o:u,c.sort=e.sort||t}},l=[],c={};c.fuzzy=!1,c.limit=10,c.searchStrategy=c.fuzzy?o:u,c.sort=t;var f={compile:function(t){return s.template.replace(s.pattern,function(e,n){var r=s.middleware(n,t[n],s.template);return void 0!==r?r:t[n]||e})},setOptions:function(t){s.pattern=t.pattern||s.pattern,s.template=t.template||s.template,"function"==typeof t.middleware&&(s.middleware=t.middleware)}},s={};s.pattern=/\{(.*?)\}/g,s.template="",s.middleware=function(){};var p={merge:function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r],"undefined"!=typeof e[r]&&(n[r]=e[r]));return n},isJSON:function(t){try{return!!(t instanceof Object&&JSON.parse(JSON.stringify(t)))}catch(e){return!1}}};!function(t){function e(t){a.put(t),u.searchInput.addEventListener("keyup",function(t){(function(t){return-1===[13,16,20,37,38,39,40,91].indexOf(t)})(t.which)&&(u.resultsContainer.innerHTML="",i(t.target.value))})}function n(t){u.resultsContainer.innerHTML+=t}function i(t){(function(t){return t&&t.length>0})(t)&&function(t){var e=t.length;if(0===e)return n(u.noResultsText);for(var r=0;r<e;r++)n(f.compile(t[r]))}(a.search(t))}function o(t){throw new Error("SimpleJekyllSearch --- "+t)}var u={searchInput:null,resultsContainer:null,json:[],searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:function(){},sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},l=["searchInput","resultsContainer","json"],c=function s(t){if(!function(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(t))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof s))return new s(t);var e=t.required;this.getRequiredOptions=function(){return e},this.validate=function(t){var n=[];return e.forEach(function(e){"undefined"==typeof t[e]&&n.push(e)}),n}}({required:l});t.SimpleJekyllSearch=function(t){return c.validate(t).length>0&&o("You must specify the following required options: "+l),u=p.merge(u,t),f.setOptions({template:u.searchResultTemplate,middleware:u.templateMiddleware}),a.setOptions({fuzzy:u.fuzzy,limit:u.limit,sort:u.sortMiddleware}),p.isJSON(u.json)?e(u.json):function(t){r.load(t,function(n,r){n&&o("failed to get JSON ("+t+")"),e(r)})}(u.json),{search:i}},t.SimpleJekyllSearch.init=t.SimpleJekyllSearch,"function"==typeof t.SimpleJekyllSearchInit&&t.SimpleJekyllSearchInit.call(this,t.SimpleJekyllSearch)}(window)}();
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-materialdocs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James King
|
@@ -66,6 +66,10 @@ files:
|
|
66
66
|
- _includes/menu.html
|
67
67
|
- _layouts/default.html
|
68
68
|
- _layouts/page.html
|
69
|
+
- assets/jekyll-materialdocs.css
|
70
|
+
- assets/search.html
|
71
|
+
- assets/search.json
|
72
|
+
- assets/simple-jekyll-search.min.js
|
69
73
|
homepage: https://github.com/chromatical/jekyll-materialdocs
|
70
74
|
licenses:
|
71
75
|
- MIT
|