jekyll-theme-jod 0.1.9 → 0.2.3

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
2
  SHA256:
3
- metadata.gz: ff9189b8aebf9e7f3120d15d24564f6f47227f048a5f169405aaf5ef85c79911
4
- data.tar.gz: b1b66e51212258823875d976ebf45cb5891c635c0ff10aa62ca953564979a65d
3
+ metadata.gz: 9d30bb1cd1bb0db19684f098d6ad39af920e8e0eab2510f3769fb56f209a0598
4
+ data.tar.gz: d01d07d87f45768da3a31ab1470c516d3a5a6308780364af89faa0c92511f63b
5
5
  SHA512:
6
- metadata.gz: '026528d11c2551cb203231074536d8af489561ff56deb2f506d5c9667549a3da9c0b7ae5db7fd17d84f1af3c9c1a6fb079e8b657c999920ace08ac2bf4630917'
7
- data.tar.gz: 3388005880fc894855c664e3ae525486aa4906f40bcf636039335a9b1a1ae517836b2db33bba92e86f97a252adb38e930e89c740e05adb69828b9393ce5ab950
6
+ metadata.gz: 27df7c6f688672598193e472e4f32a5726453073969f9fc6a9d4fde2519b2ede62aa57cfe938c556ebeaad226f738a6896ee0fa7a4075b855827e6d7e63261fa
7
+ data.tar.gz: 9c52b92b79d238b51972229ea351be3033c221325fc7e0775642bdd3a03851d4b8cdba81e0d2ac0ca992146e3c86c673490b167818c116c2f275c1996240dddc
@@ -1,42 +1,43 @@
1
1
  {%- capture iri -%}<{{include.iri}}>{%- endcapture -%}
2
2
  {%- assign cardResource = iri | rdf_get -%}
3
+ {%- assign resource_md5 = cardResource.iri | md5 -%}
3
4
  <div
4
5
  class="card"
5
- id="{{ cardResource.iri | md5}}"
6
+ id="id-{{ resource_md5 }}"
6
7
  >
7
8
  <div class="card-header">
8
9
  <h4 class="card-title">{% include label.html iri = cardResource.iri %}</h4>
9
10
  <p><small class="text-muted">{{ cardResource.iri }}</small></p>
10
11
  <nav
11
12
  class="nav nav-tabs card-header-tabs"
12
- id="{{ cardResource.iri | md5}}-nav"
13
+ id="id-{{ resource_md5 }}-nav"
13
14
  role="tablist">
14
15
  <a
15
- href="#{{ cardResource.iri | md5}}-description"
16
+ href="#id-{{ resource_md5 }}-description"
16
17
  class="nav-item nav-link active"
17
18
  aria-selected="true"
18
- data-toggle="tab"
19
+ data-bs-toggle="tab"
19
20
  role="tab">Description</a>
20
21
  <a
21
- href="#{{ cardResource.iri | md5}}-annotations"
22
+ href="#id-{{ resource_md5 }}-annotations"
22
23
  class="nav-item nav-link"
23
24
  aria-selected="false"
24
- data-toggle="tab"
25
+ data-bs-toggle="tab"
25
26
  role="tab">Annotations</a>
26
27
  <a
27
- href="#{{ cardResource.iri | md5}}-relations"
28
- id="{{ cardResource.iri | md5}}-tab-relations"
28
+ href="#id-{{ resource_md5 }}-relations"
29
+ id="id-{{ resource_md5 }}-tab-relations"
29
30
  class="nav-item nav-link"
30
31
  aria-selected="false"
31
- data-toggle="tab"
32
+ data-bs-toggle="tab"
32
33
  role="tab">Relations</a>
33
34
  </nav>
34
35
  </div>
35
36
  <div
36
- id="{{ cardResource.iri | md5}}-tab-content"
37
+ id="id-{{ resource_md5 }}-tab-content"
37
38
  class="tab-content card-body">
38
39
  <div
39
- id="{{ cardResource.iri | md5}}-description"
40
+ id="id-{{ resource_md5 }}-description"
40
41
  class="card-text tab-pane fade show active"
41
42
  role="tabpanel">
42
43
  <p>
@@ -64,7 +65,7 @@
64
65
  </dl>
65
66
  </div>
66
67
  <div
67
- id="{{ cardResource.iri | md5}}-annotations"
68
+ id="id-{{ resource_md5 }}-annotations"
68
69
  class="card-text tab-pane fade"
69
70
  role="tabpanel">
70
71
  <dl>
@@ -124,7 +125,7 @@
124
125
  </dl>
125
126
  </div>
126
127
  <div
127
- id="{{ cardResource.iri | md5}}-relations"
128
+ id="id-{{ resource_md5 }}-relations"
128
129
  class="card-text tab-pane fade"
129
130
  role="tabpanel">
130
131
  <dl>
data/_includes/label.html CHANGED
@@ -2,6 +2,8 @@
2
2
  {%- assign labelResource = iri | rdf_get -%}
3
3
  {%- assign label = labelResource | rdf_property: 'skos:prefLabel', 'en' -%}
4
4
  {%- unless label -%}{%- assign label = labelResource | rdf_property: 'skos:prefLabel' -%}{%- endunless -%}
5
+ {%- unless label -%}{%- assign label = labelResource | rdf_property: 'foaf:name', 'en' -%}{%- endunless -%}
6
+ {%- unless label -%}{%- assign label = labelResource | rdf_property: 'foaf:name' -%}{%- endunless -%}
5
7
  {%- unless label -%}{%- assign label = labelResource | rdf_property: 'rdfs:label', 'en' -%}{%- endunless -%}
6
8
  {%- unless label -%}{%- assign label = labelResource | rdf_property: 'rdfs:label' -%}{%- endunless -%}
7
9
  {%- unless label -%}{%- assign label = labelResource.iri | split: "#" -%}{%- assign label = {{label[1]}} -%}{%- endunless -%}
@@ -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,52 @@
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 }}">
25
+ {% include label.html iri = result.subject.iri %}
26
+ </a>
27
+ </li>
28
+ {% endfor %}
29
+ {% for result in objectPropertiesResultset %}
30
+ <li class="nav-item">
31
+ <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
32
+ {% include label.html iri = result.subject.iri %}
33
+ </a>
34
+ </li>
35
+ {% endfor %}
36
+ {% for result in datatypePropertiesResultset %}
37
+ <li class="nav-item">
38
+ <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
19
39
  {% include label.html iri = result.subject.iri %}
20
40
  </a>
21
41
  </li>
22
42
  {% endfor %}
23
43
  </ul>
44
+ <script type="text/javascript">
45
+ function searchInList() {
46
+ // Declare variables
47
+ var input, filter, ul, li, a, i, txtValue;
48
+ input = document.getElementById('search-input');
49
+ filter = input.value.toUpperCase();
50
+ ul = document.getElementById("search-list");
51
+ li = ul.getElementsByTagName('li');
52
+
53
+ // Loop through all list items, and hide those who don't match the search query
54
+ for (i = 0; i < li.length; i++) {
55
+ a = li[i].getElementsByTagName("a")[0];
56
+ txtValue = a.textContent || a.innerText;
57
+ if (txtValue.toUpperCase().indexOf(filter) > -1) {
58
+ li[i].style.display = "";
59
+ } else {
60
+ li[i].style.display = "none";
61
+ }
62
+ }
63
+ }
64
+ </script>
24
65
  </nav>
@@ -20,6 +20,24 @@
20
20
  <dt>Modified</dt>
21
21
  <dd>{{- dctmodified -}}</dd>
22
22
  {%- endif -%}
23
+ {%- assign dctcreators = page.rdf | rdf_property: 'dct:creator', nil, true -%}
24
+ {%- if dctcreators.first -%}
25
+ {%- if dctcreators.size > 1 -%}
26
+ <dt>Creators</dt>
27
+ {%- else -%}
28
+ <dt>Creator</dt>
29
+ {%- endif -%}
30
+ <dd>
31
+ {%- for dctcreator in dctcreators -%}
32
+ {%- if dctcreator.iri -%}
33
+ <a href="{{- dctcreator.iri -}}">{%- include label.html iri = dctcreator.iri -%}</a>
34
+ {%- else -%}
35
+ {{- dctcreator -}}
36
+ {%- endif -%}
37
+ {%- unless forloop.last -%}, {% endunless -%}
38
+ {%- endfor -%}
39
+ </dd>
40
+ {%- endif -%}
23
41
  {%- assign vannPreferredNamespacePrefix = page.rdf | rdf_property: 'vann:preferredNamespacePrefix' -%}
24
42
  {%- if vannPreferredNamespacePrefix -%}
25
43
  <dt>Preferred Namespace Prefix</dt>
@@ -7,7 +7,8 @@
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8
8
 
9
9
  <!-- Bootstrap CSS -->
10
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
10
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
11
+
11
12
  </head>
12
13
  <body>
13
14
 
@@ -15,8 +16,6 @@
15
16
 
16
17
  <!-- Optional JavaScript -->
17
18
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
18
- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
19
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
20
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
19
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
21
20
  </body>
22
21
  </html>
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.1.9
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Tramp
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-01-29 00:00:00.000000000 Z
12
+ date: 2021-10-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '3.5'
20
+ version: '4.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '3.5'
27
+ version: '4.2'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: jekyll-rdf
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -39,6 +39,20 @@ dependencies:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '3.0'
42
+ - !ruby/object:Gem::Dependency
43
+ name: liquid-md5
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: 0.0.3
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: 0.0.3
42
56
  - !ruby/object:Gem::Dependency
43
57
  name: bundler
44
58
  requirement: !ruby/object:Gem::Requirement
@@ -107,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
121
  version: '0'
108
122
  requirements: []
109
123
  rubyforge_project:
110
- rubygems_version: 2.7.6
124
+ rubygems_version: 2.7.6.2
111
125
  signing_key:
112
126
  specification_version: 4
113
127
  summary: The JOD theme generates documentation web pages from Ontology turtle documents