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.
- checksums.yaml +4 -4
- data/_includes/navigation.html +30 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf8b5000b6ee5c97c63c6628fdedc015f85bd214642e49f7e5d238daffdff8eb
|
4
|
+
data.tar.gz: 9e10cfdf9e17b741e2461cad3a9a894e04403f126309492db8cf29d1cc81e660
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1137c3f8e356f125f6f0f8573d414b6dfdcf150f4b0cb139bfca12fbcd317d57571e6c089dbc3fae6cbcd0fc398d72363d63b9d52f07374fa76b6b5ec67bd71c
|
7
|
+
data.tar.gz: 6b5e846ad9d32f3bee266a947629fe8440a13816fbfcc356440cf809314e2219991c31af5d20c23695a096ca853454fe759d56bad6c0cce1131dba7497fd5ffd
|
data/_includes/navigation.html
CHANGED
@@ -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
|
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>
|