jekyll-lab-notebook 0.1.4 → 0.1.5

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: 23e11eaccbcb499bbb36ff720c8c0ac816213262
4
- data.tar.gz: 6b3ea462c0a4783d0cdfdd4992c4a8163008a97f
3
+ metadata.gz: a63b383cc3478445b89425789b7c05176c5cb298
4
+ data.tar.gz: dd4b4d9122ddaf0ca09599bbe44f336efebc3f5d
5
5
  SHA512:
6
- metadata.gz: 448718a0f4d8424d8d0ecf02f49ce6e960545a7eb51f9c2450fe45c69e49b3f08f8e6a45cbd84be7495b93bd8e863fd42135ec2befb728dfb7ca411242749507
7
- data.tar.gz: 6ed74b769b548ea489954817dc15495c7b4d3f5982ce62553d5bde20fa21fdee3f71089aeabd7c8b5296d3a6800d9ededeede758faf62108730b4418bab50eb1
6
+ metadata.gz: 1e08573bc258a173a268b3687bc7ce7fe0d0c0ca0734711e84111f7f2d242bce41a9dde434f1b0a9c3a718b09bb0a088c4211b0571e47ae9eb221c056c94b401
7
+ data.tar.gz: dacc22394e33469d7360fc351664863869985bb6eeb359083b0867804bd1c694fdcf280ce56c52788bcb0aff847ffd329bb3d186972e2771be65c68655e071d0
data/README.md CHANGED
@@ -24,7 +24,25 @@ whatever; think of this as your springboard.
24
24
 
25
25
  ## Installation and Usage
26
26
 
27
- See the [eln-example](https://github.com/tlnagy/eln-example) repo.
27
+ The `demo/` folder contains a fully functioning example ELN. Clone this repo and navigate into the `demo/` folder. Make sure you have a recent version of ruby installed and then run
28
+
29
+ ```
30
+ gem install bundler
31
+ ```
32
+
33
+ which will install the `bundle` package manager. Next, run
34
+
35
+ ```
36
+ bundle update
37
+ ```
38
+
39
+ inside the `demo/` folder, which will install all the necessary packages. Then run
40
+
41
+ ```
42
+ jekyll serve -wi
43
+ ```
44
+
45
+ to actually serve the ELN and navigate to the address listed using your browser to see your ELN. Edit the posts inside the `_posts/` subdirectory to add entries.
28
46
 
29
47
  ## Contributing
30
48
 
@@ -41,4 +41,20 @@
41
41
 
42
42
  </div>
43
43
 
44
+ <!-- script pointing to jekyll-search.js -->
45
+ <script src="{{ site.baseurl }}/assets/simple-jekyll-search.min.js"></script>
46
+
47
+ <script>
48
+ window.simpleJekyllSearch = new SimpleJekyllSearch({
49
+ searchInput: document.getElementById('search-input'),
50
+ resultsContainer: document.getElementById('results-container'),
51
+ json: '/search.json',
52
+ searchResultTemplate: '<li><a href="{url}" title="{desc}">{title}</a></li>',
53
+ noResultsText: 'No results found',
54
+ limit: 10,
55
+ fuzzy: false,
56
+ exclude: ['Welcome']
57
+ })
58
+ </script>
59
+
44
60
  </footer>
@@ -10,9 +10,11 @@
10
10
  {% for page in page_list %}
11
11
  <a class="page-link" href="/{{ page | downcase }}">{{ page }}</a>
12
12
  {% endfor %}
13
- <a class="page-link" href="{{ site.website }}">{{ site.website | remove: "https://" | remove: "http://" }}</a>
13
+ <input type="text" id="search-input" placeholder="search...">
14
14
  </div>
15
15
  </nav>
16
-
16
+ </div>
17
+ <div class="wrapper">
18
+ <ul id="results-container"></ul>
17
19
  </div>
18
20
  </header>
@@ -29,3 +29,16 @@
29
29
  .cf:after {
30
30
  clear: both;
31
31
  }
32
+
33
+ #results-container {
34
+ margin: 1em 0;
35
+ }
36
+
37
+ #results-container ul{
38
+ list-style: none;
39
+ }
40
+
41
+ #results-container li{
42
+ padding: 0.5em 1em;
43
+ display: inline-block;
44
+ }
@@ -71,3 +71,11 @@
71
71
  display: table;
72
72
  margin: 0 auto;
73
73
  }
74
+
75
+ .post-content img{
76
+ height: 100%;
77
+ max-height: 400px;
78
+ display: block;
79
+ margin-left: auto;
80
+ margin-right: auto;
81
+ }
@@ -0,0 +1,6 @@
1
+ /*!
2
+ * Simple-Jekyll-Search v1.6.0 (https://github.com/christian-fei/Simple-Jekyll-Search)
3
+ * Copyright 2015-2017, Christian Fei
4
+ * Licensed under the MIT License.
5
+ */
6
+ !function(){"use strict";function e(e){return Boolean(e)&&"[object Object]"===Object.prototype.toString.call(e)}function t(e){return a.push(e),a}var n={load:function(e,t){var n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");n.open("GET",e,!0),n.onreadystatechange=function(e,t){return function(){if(4===e.readyState&&200===e.status)try{t(null,JSON.parse(e.responseText))}catch(n){t(n,null)}}}(n,t),n.send()}},r=function(e,t){var n=t.length,r=e.length;if(r>n)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){for(var u=e.charCodeAt(i);o<n;)if(t.charCodeAt(o++)===u)continue e;return!1}return!0},i=new function(){this.matches=function(e,t){return r(t,e)}},o=new function(){this.matches=function(e,t){return"string"==typeof e&&(e=e.trim()).toLowerCase().indexOf(t.toLowerCase())>=0}},u={put:function(n){return e(n)?t(n):function(e){return Boolean(e)&&"[object Array]"===Object.prototype.toString.call(e)}(n)?function(n){for(var r=[],i=0,o=n.length;i<o;i++)e(n[i])&&r.push(t(n[i]));return r}(n):undefined},clear:function(){return a.length=0,a},search:function(e){return e?function(e,t,n,r){for(var i=[],o=0;o<e.length&&i.length<r.limit;o++){var u=function(e,t,n,r){for(var i in e)if(!function(e,t){for(var n=!1,r=0,i=(t=t||[]).length;r<i;r++){var o=t[r];!n&&new RegExp(e).test(o)&&(n=!0)}return n}(e[i],r.exclude)&&n.matches(e[i],t))return e}(e[o],t,n,r);u&&i.push(u)}return i}(a,e,l.searchStrategy,l):[]},setOptions:function(e){(l=e||{}).fuzzy=e.fuzzy||!1,l.limit=e.limit||10,l.searchStrategy=e.fuzzy?i:o}},a=[],l={};l.fuzzy=!1,l.limit=10,l.searchStrategy=l.fuzzy?i:o;var c={compile:function(e){return f.template.replace(f.pattern,function(t,n){var r=f.middleware(n,e[n],f.template);return void 0!==r?r:e[n]||t})},setOptions:function(e){f.pattern=e.pattern||f.pattern,f.template=e.template||f.template,"function"==typeof e.middleware&&(f.middleware=e.middleware)}},f={};f.pattern=/\{(.*?)\}/g,f.template="",f.middleware=function(){};var s={merge:function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r],"undefined"!=typeof t[r]&&(n[r]=t[r]));return n},isJSON:function(e){try{return!!(e instanceof Object&&JSON.parse(JSON.stringify(e)))}catch(t){return!1}}};!function(e){function t(e){u.put(e),a.searchInput.addEventListener("keyup",function(e){(function(e){return-1===[13,16,20,37,38,39,40,91].indexOf(e)})(e.which)&&(a.resultsContainer.innerHTML="",i(e.target.value))})}function r(e){a.resultsContainer.innerHTML+=e}function i(e){(function(e){return e&&e.length>0})(e)&&function(e){var t=e.length;if(0===t)return r(a.noResultsText);for(var n=0;n<t;n++)r(c.compile(e[n]))}(u.search(e))}function o(e){throw new Error("SimpleJekyllSearch --- "+e)}var a={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:[]},l=["searchInput","resultsContainer","json"],f=function p(e){if(!function(e){return!!e&&"undefined"!=typeof e.required&&e.required instanceof Array}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof p))return new p(e);var t=e.required;this.getRequiredOptions=function(){return t},this.validate=function(e){var n=[];return t.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}}({required:l});e.SimpleJekyllSearch=function(e){return f.validate(e).length>0&&o("You must specify the following required options: "+l),a=s.merge(a,e),c.setOptions({template:a.searchResultTemplate,middleware:a.templateMiddleware}),u.setOptions({fuzzy:a.fuzzy,limit:a.limit}),s.isJSON(a.json)?t(a.json):function(e){n.load(e,function(n,r){n&&o("failed to get JSON ("+e+")"),t(r)})}(a.json),{search:i}},e.SimpleJekyllSearch.init=e.SimpleJekyllSearch,"function"==typeof e.SimpleJekyllSearchInit&&e.SimpleJekyllSearchInit.call(this,e.SimpleJekyllSearch)}(window)}();
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-lab-notebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tamas Nagy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-08 00:00:00.000000000 Z
11
+ date: 2018-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -83,6 +83,7 @@ files:
83
83
  - _sass/minima/_layout.scss
84
84
  - _sass/minima/_syntax-highlighting.scss
85
85
  - assets/main.scss
86
+ - assets/simple-jekyll-search.min.js
86
87
  homepage: https://github.com/tlnagy/jekyll-lab-notebook
87
88
  licenses:
88
89
  - MIT
@@ -103,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
104
  version: '0'
104
105
  requirements: []
105
106
  rubyforge_project:
106
- rubygems_version: 2.6.11
107
+ rubygems_version: 2.6.14
107
108
  signing_key:
108
109
  specification_version: 4
109
110
  summary: A full-feature electronic lab notebook theme/engine for Jekyll