jekyll-theme-jod 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/_includes/navigation.html +30 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4c12e50ab801a4eabe6cdfee6a203ff074065b12bac80aad6521436c8c8a836
4
- data.tar.gz: 06f51ecd743ac2221536abcd45d62999939c29e3d6abf70f4759e1e3ecba2680
3
+ metadata.gz: cf8b5000b6ee5c97c63c6628fdedc015f85bd214642e49f7e5d238daffdff8eb
4
+ data.tar.gz: 9e10cfdf9e17b741e2461cad3a9a894e04403f126309492db8cf29d1cc81e660
5
5
  SHA512:
6
- metadata.gz: 9a0f0428aaf4dc7a3d58a305569893500f446db0f0f838ab8d51bbe07d38922feef35fb817e929d65c7b85fa52e6a274a23d68d78dbbfe8981ce873e79912a4f
7
- data.tar.gz: a4fb7605541d4ded8d9130882346ebbb055fbfe7c0362eb373225dccc68a4b64069537ecc2323d4c605c8ef59e2a36f37a2cad2e0b23ef6b72028a0cf8c372f6
6
+ metadata.gz: 1137c3f8e356f125f6f0f8573d414b6dfdcf150f4b0cb139bfca12fbcd317d57571e6c089dbc3fae6cbcd0fc398d72363d63b9d52f07374fa76b6b5ec67bd71c
7
+ data.tar.gz: 6b5e846ad9d32f3bee266a947629fe8440a13816fbfcc356440cf809314e2219991c31af5d20c23695a096ca853454fe759d56bad6c0cce1131dba7497fd5ffd
@@ -1,4 +1,9 @@
1
- <nav class="col-sm-3 col-md-2 col-lg-3 col-xl-3 d-none d-sm-block bg-light sidebar">
1
+ <nav class="col-sm-3 col-md-2 col-lg-3 col-xl-3 d-none d-sm-block bg-light"
2
+ style="position: -webkit-sticky;
3
+ position: sticky;
4
+ top: 0;
5
+ height: 100vh;
6
+ overflow: auto;">
2
7
  <form class="bd-search d-flex align-items-center">
3
8
  <input
4
9
  type="search"
@@ -9,16 +14,38 @@
9
14
  spellcheck="false"
10
15
  role="combobox"
11
16
  dir="auto"
17
+ onkeyup="searchInList()"
12
18
  />
13
19
  </form>
14
20
 
15
- <ul class="nav nav-pills flex-column">
21
+ <ul class="nav nav-pills flex-column" id="search-list">
16
22
  {% for result in classesResultset %}
17
23
  <li class="nav-item">
18
- <a class="nav-link" href="#{{ result.subject.iri | md5 }}">
24
+ <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
19
25
  {% include label.html iri = result.subject.iri %}
20
26
  </a>
21
27
  </li>
22
28
  {% endfor %}
23
29
  </ul>
30
+ <script type="text/javascript">
31
+ function searchInList() {
32
+ // Declare variables
33
+ var input, filter, ul, li, a, i, txtValue;
34
+ input = document.getElementById('search-input');
35
+ filter = input.value.toUpperCase();
36
+ ul = document.getElementById("search-list");
37
+ li = ul.getElementsByTagName('li');
38
+
39
+ // Loop through all list items, and hide those who don't match the search query
40
+ for (i = 0; i < li.length; i++) {
41
+ a = li[i].getElementsByTagName("a")[0];
42
+ txtValue = a.textContent || a.innerText;
43
+ if (txtValue.toUpperCase().indexOf(filter) > -1) {
44
+ li[i].style.display = "";
45
+ } else {
46
+ li[i].style.display = "none";
47
+ }
48
+ }
49
+ }
50
+ </script>
24
51
  </nav>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-jod
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Tramp