jekyll-lab-notebook 0.1.3 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2ea9aece042cf6986ba0adf3967d14d1b9a50578
4
- data.tar.gz: 0f1a18ae83887cf682386b18213009283cdeaa20
2
+ SHA256:
3
+ metadata.gz: 54c826f59b71c0203c17c05618ec0da0051ee4a56e6bf766744b9dafe8212744
4
+ data.tar.gz: 9f4b84c5160fb090963ff042e97fb0db9adc6a9276cccc68ec69d7ef73037a07
5
5
  SHA512:
6
- metadata.gz: f754ab130d3d72b56ea51bd5fbef3042e9f92ea70dfc131df1232d32997f9f161a3e6a62fc7ac3b4f4159d60d724876e337964d7f58ed3ee5131db2331bad5e0
7
- data.tar.gz: 8f546e1dfc9e5649bd06cdd04ee9d6e5671ebb618a0aea64e483ec0066571f1f6f4e2fdb2bdf8a27a7717b75c15518c3f846c3739ef17da8eb484b1ddf940aa5
6
+ metadata.gz: 38ceeb01bb99b19a025ec2dbd6ba0bcf927fac60742e0e721ca6239d1e252def2968a1342bfc3ff5b55b467756ee24a02f5bff1c40ea2d3de895e5ec6f4f72c1
7
+ data.tar.gz: ba27b9fa7fb77f7328814c7e39dacbe781d50c9b7383f1dfa9bc4aae178d7028b25e27e8b5754cd2db16440b97df1439e1c261fc22ad690abdb7a9a78b1c9de1
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # 📓 jekyll-lab-notebook
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/jekyll-lab-notebook.svg)](https://badge.fury.io/rb/jekyll-lab-notebook)
4
+ [![Build Status](https://travis-ci.org/tlnagy/jekyll-lab-notebook.svg?branch=master)](https://travis-ci.org/tlnagy/jekyll-lab-notebook)
4
5
 
5
6
  Supercharge your electronic lab notebook!
6
7
 
@@ -10,6 +11,8 @@ to view all your hard work. It's hackable to its core so you can tweak it to
10
11
  your heart's desire. Add pages, change layouts, add cool jekyll plugins,
11
12
  whatever; think of this as your springboard.
12
13
 
14
+ [LIVE DEMO HERE](http://tamasnagy.com/jekyll-lab-notebook/)
15
+
13
16
  ![](screenshot.png)
14
17
 
15
18
  ![](screenshot2.png)
@@ -24,7 +27,25 @@ whatever; think of this as your springboard.
24
27
 
25
28
  ## Installation and Usage
26
29
 
27
- See the [eln-example](https://github.com/tlnagy/eln-example) repo.
30
+ 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
31
+
32
+ ```
33
+ gem install bundler
34
+ ```
35
+
36
+ which will install the `bundle` package manager. Next, run
37
+
38
+ ```
39
+ bundle update
40
+ ```
41
+
42
+ inside the `demo/` folder, which will install all the necessary packages. Then run
43
+
44
+ ```
45
+ bundle exec jekyll serve -wi
46
+ ```
47
+
48
+ 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
49
 
29
50
  ## Contributing
30
51
 
@@ -51,7 +51,7 @@ caloptions = {
51
51
  month = ("0"+(date.getMonth()+1)).slice(-2);
52
52
  day = ("0" + date.getDate()).slice(-2);
53
53
  if (nb > 0){
54
- window.location.href = "/log/" + year + "_" + month + "/#" + year + month + day;
54
+ window.location.href = "{{ site.baseurl }}/log/" + year + "_" + month + "/#" + year + month + day;
55
55
  }
56
56
  },
57
57
  legendColors: {
@@ -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: '{{ site.baseurl }}/search.json',
52
+ searchResultTemplate: '<li><a href="{{ site.baseurl }}{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>
@@ -8,11 +8,13 @@
8
8
  {% assign static_pages = "Projects" | split: "," %}
9
9
  {% assign page_list = site.header-pages | concat: static_pages %}
10
10
  {% for page in page_list %}
11
- <a class="page-link" href="/{{ page | downcase }}">{{ page }}</a>
11
+ <a class="page-link" href="{{ site.baseurl }}/{{ 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>
@@ -11,10 +11,10 @@ layout: default
11
11
  {% if page.next.url or page.previous.url %}
12
12
  <div class="postNav cf">
13
13
  {% if page.next.url %}
14
- <a class="next{% if page.next.image %} image{% endif %}" href="{{ page.next.url | prepend: site.baseurl }}"><span>{{ page.next.date | date: "%B %Y" }}&nbsp;&raquo;</span></a>
14
+ <a class="next" href="{{ page.next.url | prepend: site.baseurl }}"><span>{{ page.next.date | date: "%B %Y" }}&nbsp;&raquo;</span></a>
15
15
  {% endif %}
16
16
  {% if page.previous.url %}
17
- <a class="prev{% if page.previous.image %} image{% endif %}" href="{{ page.previous.url | prepend: site.baseurl }}"><span>&laquo;&nbsp;{{ page.previous.date | date: "%B %Y" }}</span></a>
17
+ <a class="prev" href="{{ page.previous.url | prepend: site.baseurl }}#bottomNav"><span>&laquo;&nbsp;{{ page.previous.date | date: "%B %Y" }}</span></a>
18
18
  {% endif %}
19
19
  </div>
20
20
  {% endif %}
@@ -29,12 +29,12 @@ layout: default
29
29
  </div>
30
30
 
31
31
  {% if page.next.url or page.previous.url %}
32
- <div class="postNav cf">
32
+ <div class="postNav cf" id="bottomNav">
33
33
  {% if page.next.url %}
34
- <a class="next{% if page.next.image %} image{% endif %}" href="{{ page.next.url | prepend: site.baseurl }}"><span>{{ page.next.date | date: "%B %Y" }}&nbsp;&raquo;</span></a>
34
+ <a class="next" href="{{ page.next.url | prepend: site.baseurl }}"><span>{{ page.next.date | date: "%B %Y" }}&nbsp;&raquo;</span></a>
35
35
  {% endif %}
36
36
  {% if page.previous.url %}
37
- <a class="prev{% if page.previous.image %} image{% endif %}" href="{{ page.previous.url | prepend: site.baseurl }}"><span>&laquo;&nbsp;{{ page.previous.date | date: "%B %Y" }}</span></a>
37
+ <a class="prev" href="{{ page.previous.url | prepend: site.baseurl }}#bottomNav"><span>&laquo;&nbsp;{{ page.previous.date | date: "%B %Y" }}</span></a>
38
38
  {% endif %}
39
39
  </div>
40
40
  {% endif %}
@@ -7,7 +7,7 @@ title: Projects
7
7
  <ul>
8
8
  {% for project in site.data.tagmap %}
9
9
  <li>
10
- <a href="{{ page.url }}/{{ project[0] }}">{{ project[0] }}</a>
10
+ <a href="{{ site.baseurl }}{{ page.url }}{{ project[0] }}">{{ project[0] }}</a>
11
11
  </li>
12
12
  {% endfor %}
13
13
  </ul>
@@ -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,10 @@
71
71
  display: table;
72
72
  margin: 0 auto;
73
73
  }
74
+
75
+ .post-content img{
76
+ max-height: 400px;
77
+ display: block;
78
+ margin-left: auto;
79
+ margin-right: auto;
80
+ }
@@ -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.3
4
+ version: 0.1.8
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-07-21 00:00:00.000000000 Z
11
+ date: 2020-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -16,56 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.5'
19
+ version: '3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.5'
27
- - !ruby/object:Gem::Dependency
28
- name: jekyll-lab-notebook-plugins
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '0.1'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '0.1'
26
+ version: '3'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: bundler
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '1.12'
33
+ version: '2.1'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '1.12'
40
+ version: '2.1'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rake
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - "~>"
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
- version: '10.0'
47
+ version: 12.3.3
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - "~>"
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
- version: '10.0'
54
+ version: 12.3.3
69
55
  description:
70
56
  email:
71
57
  - tamas@tamasnagy.com
@@ -97,6 +83,7 @@ files:
97
83
  - _sass/minima/_layout.scss
98
84
  - _sass/minima/_syntax-highlighting.scss
99
85
  - assets/main.scss
86
+ - assets/simple-jekyll-search.min.js
100
87
  homepage: https://github.com/tlnagy/jekyll-lab-notebook
101
88
  licenses:
102
89
  - MIT
@@ -116,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
103
  - !ruby/object:Gem::Version
117
104
  version: '0'
118
105
  requirements: []
119
- rubyforge_project:
120
- rubygems_version: 2.6.11
106
+ rubygems_version: 3.1.2
121
107
  signing_key:
122
108
  specification_version: 4
123
109
  summary: A full-feature electronic lab notebook theme/engine for Jekyll