jekyll-theme-jod 0.3.2 → 0.4.0

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
  SHA256:
3
- metadata.gz: 674fd58c25ba6f4f91366b53c5254c785c2221cd34ebd8bbe2f70e3f7fcc01be
4
- data.tar.gz: 76a2574eacfdb8f0c5ef4b64a4706f3c789b01ff456dd763ee50481b25055d66
3
+ metadata.gz: 5cdf8e0554413e21efd14db7a30e12995650141f94101811443cd65510d11022
4
+ data.tar.gz: a43859104a371e296cc55757f09b10e67926e0357f59ba28893f60a6d022ba90
5
5
  SHA512:
6
- metadata.gz: 64b3dd02b1d3ae95ee6ec21366be9be58c95a362af340c195d173346351359a707351f28fa3127ae7acea62b7d302573bff6ad7effe97dd87387bd8a630cc791
7
- data.tar.gz: 8bbb4af7e5ed896cb6cf12e28cdca73cd85d9fd9bc148f2afd73439493479dfd8889a917371726307ab75a46134b076871845115309eeefb0e302314625c041e
6
+ metadata.gz: 15bd7ac3c908e9c361c615f370e25fd239f2cc5968452a1d4f73cd1aacb5aadd58039b390c976303329d88a62ef0de3db824093a544b4aeb99a6d5138f20a8f0
7
+ data.tar.gz: 81d020e11a03a619ab39e7885df2db590785b6b44aff2f331343d8b17f54da2b45b63a26fc241d4276244f248d0ed1a3917bdb7035a5dfb5c7d2f9c5c30a6996
data/README.md CHANGED
@@ -68,10 +68,14 @@ When your theme is released, only the files in `_layouts`, `_includes`, and `_sa
68
68
 
69
69
  The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). Take a look at the `LICENSE` file.
70
70
 
71
- ## Screenshot
71
+ ## Examples and Screenshot
72
72
 
73
73
  ![Screenshot](./Screenshot.png "Screenshot")
74
74
 
75
+ Examples of using jod
76
+ - [diggr Video Game Vocabulary](https://diggr.github.io/diggr-video-game-vocabulary/) ([repo](https://github.com/diggr/diggr-video-game-vocabulary))
77
+ - [GND Ontology](https://d-nb.info/standards/elementset/gnd)
78
+
75
79
  ## Related Projects
76
80
 
77
81
  - [Widoco](https://github.com/dgarijo/Widoco), a Wizard for documenting ontologies
@@ -20,22 +20,51 @@ style="position: -webkit-sticky;
20
20
 
21
21
  <ul class="nav nav-pills flex-column" id="search-list">
22
22
  {% for result in classesResultset %}
23
+ {%- if forloop.first %}
24
+ <li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Classes</div></li>
25
+ {% endif -%}
23
26
  <li class="nav-item">
24
- <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
27
+ <a search-string="class" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
28
+ {% include label.html iri = result.subject.iri %}
29
+ </a>
30
+ </li>
31
+ {% endfor %}
32
+ {% for result in rdfPropertiesResultset %}
33
+ {%- if forloop.first %}
34
+ <li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">RDF Properties</div></li>
35
+ {% endif -%}
36
+ <li class="nav-item">
37
+ <a search-string="rdf property" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
25
38
  {% include label.html iri = result.subject.iri %}
26
39
  </a>
27
40
  </li>
28
41
  {% endfor %}
29
42
  {% for result in objectPropertiesResultset %}
43
+ {%- if forloop.first %}
44
+ <li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Object Properties</div></li>
45
+ {% endif -%}
30
46
  <li class="nav-item">
31
- <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
47
+ <a search-string="object property" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
32
48
  {% include label.html iri = result.subject.iri %}
33
49
  </a>
34
50
  </li>
35
51
  {% endfor %}
36
52
  {% for result in datatypePropertiesResultset %}
53
+ {%- if forloop.first %}
54
+ <li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Datatype Properties</div></li>
55
+ {% endif -%}
56
+ <li class="nav-item">
57
+ <a search-string="datatype proeprty" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
58
+ {% include label.html iri = result.subject.iri %}
59
+ </a>
60
+ </li>
61
+ {% endfor %}
62
+ {% for result in namedIndividualsResultset %}
63
+ {%- if forloop.first %}
64
+ <li class="list-group-item list-group-item-dark disabled"><div class="fw-bold">Named Individuals</div></li>
65
+ {% endif -%}
37
66
  <li class="nav-item">
38
- <a class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
67
+ <a search-string="named individual" class="nav-link" href="#id-{{ result.subject.iri | md5 }}">
39
68
  {% include label.html iri = result.subject.iri %}
40
69
  </a>
41
70
  </li>
@@ -53,11 +82,14 @@ style="position: -webkit-sticky;
53
82
  // Loop through all list items, and hide those who don't match the search query
54
83
  for (i = 0; i < li.length; i++) {
55
84
  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";
85
+ if (a != undefined) {
86
+ txtValue = a.textContent || a.innerText;
87
+ txtValue = txtValue + a.getAttribute("search-string");
88
+ if (txtValue.toUpperCase().indexOf(filter) > -1) {
89
+ li[i].style.display = "";
90
+ } else {
91
+ li[i].style.display = "none";
92
+ }
61
93
  }
62
94
  }
63
95
  }
@@ -63,30 +63,26 @@
63
63
  </dl>
64
64
  </p>
65
65
  <hr class="my-4">
66
- <p>
67
- {% for result in countClassResultSet %}
68
- <a class="btn btn-primary btn-lg" href="#classes" role="button">
66
+ <p style="line-height: 3.3rem;">
67
+ <a class="btn btn-primary btn-lg {% unless countClass > 0 %}disabled{% endunless %}" href="#classes" role="button">
69
68
  Classes
70
- <span class="badge badge-light">{{ result.classes}}</span>
69
+ <span class="badge badge-light">{{ countClass }}</span>
71
70
  </a>
72
- {% endfor %}
73
- {% for result in countRdfPropertiesResultSet %}
74
- <a class="btn btn-primary btn-lg" href="#rdfProperties" role="button">
71
+ <a class="btn btn-primary btn-lg {% unless countRdfProperties > 0 %}disabled{% endunless %}" href="#rdfProperties" role="button">
75
72
  RDF Properties
76
- <span class="badge badge-light">{{ result.rdfProperties}}</span>
73
+ <span class="badge badge-light">{{ countRdfProperties }}</span>
77
74
  </a>
78
- {% endfor %}
79
- {% for result in countObjectPropertiesResultSet %}
80
- <a class="btn btn-primary btn-lg" href="#objectProperties" role="button">
75
+ <a class="btn btn-primary btn-lg {% unless countObjectProperties > 0 %}disabled{% endunless %}" href="#objectProperties" role="button">
81
76
  Object Properties
82
- <span class="badge badge-light">{{ result.objectProperties}}</span>
77
+ <span class="badge badge-light">{{ countObjectProperties}}</span>
83
78
  </a>
84
- {% endfor %}
85
- {%- for result in countDatatypePropertiesResultSet -%}
86
- <a class="btn btn-primary btn-lg" href="#datatypeProperties" role="button">
79
+ <a class="btn btn-primary btn-lg {% unless countDatatypeProperties > 0 %}disabled{% endunless %}" href="#datatypeProperties" role="button">
87
80
  Datatype Properties
88
- <span class="badge badge-light">{{ result.datatypeProperties }}</span>
81
+ <span class="badge badge-light">{{ countDatatypeProperties }}</span>
82
+ </a>
83
+ <a class="btn btn-primary btn-lg {% unless countNamedIndividuals > 0 %}disabled{% endunless %}" href="#namedIndividuals" role="button">
84
+ Named Individuals
85
+ <span class="badge badge-light">{{ countNamedIndividuals }}</span>
89
86
  </a>
90
- {%- endfor -%}
91
87
  </p>
92
88
  </div>
@@ -94,6 +94,45 @@ rdf_prefix_path: "_data/prefixes.pref"
94
94
  ' %}
95
95
  {% assign countDatatypePropertiesResultSet = page.rdf | sparql_query: countDatatypePropertiesQuery %}
96
96
 
97
+ {% assign namedIndividualsQuery = '
98
+ SELECT DISTINCT ?subject
99
+ WHERE
100
+ {
101
+ ?subject a ?class .
102
+ FILTER ( ?class IN (owl:NamedIndividual) )
103
+ FILTER isIRI(?subject)
104
+ }
105
+ ORDER BY ?label' %}
106
+ {% assign namedIndividualsResultset = page.rdf | sparql_query: namedIndividualsQuery %}
107
+
108
+ {% assign countNamedIndividualsQuery = '
109
+ SELECT DISTINCT (COUNT(?subject) as ?namedIndividuals)
110
+ WHERE
111
+ {
112
+ ?subject a ?class .
113
+ FILTER ( ?class IN (owl:NamedIndividual) )
114
+ FILTER isIRI(?subject)
115
+ }
116
+ ' %}
117
+ {% assign countNamedIndividualsResultSet = page.rdf | sparql_query: countNamedIndividualsQuery %}
118
+
119
+
120
+ {% for result in countClassResultSet %}
121
+ {% assign countClass = result.classes | plus: 0 %}
122
+ {% endfor %}
123
+ {% for result in countRdfPropertiesResultSet %}
124
+ {% assign countRdfProperties = result.rdfProperties | plus: 0 %}
125
+ {% endfor %}
126
+ {% for result in countObjectPropertiesResultSet %}
127
+ {% assign countObjectProperties = result.objectProperties | plus: 0 %}
128
+ {% endfor %}
129
+ {% for result in countDatatypePropertiesResultSet %}
130
+ {% assign countDatatypeProperties = result.datatypeProperties | plus: 0 %}
131
+ {% endfor %}
132
+ {% for result in countNamedIndividualsResultSet %}
133
+ {% assign countNamedIndividuals = result.namedIndividuals | plus: 0 %}
134
+ {% endfor %}
135
+
97
136
  <div class="container-fluid">
98
137
  <div class="row">
99
138
  {% include navigation.html iri = result.subject.iri %}
@@ -101,24 +140,38 @@ rdf_prefix_path: "_data/prefixes.pref"
101
140
  <main role="main" class="container col-sm-9 col-md-10 col-lg-8 col-xl-7">
102
141
  {% include ontology-head.html iri = result.subject.iri %}
103
142
 
104
- <h2 id="classes">Overview</h2>
105
- <h2 id="classes">Classes</h2>
106
143
  {% for result in classesResultset %}
144
+ {%- if forloop.first %}
145
+ <h2 id="classes">Classes</h2>
146
+ {% endif -%}
107
147
  <p>{% include class-card.html iri = result.subject.iri %}</p>
108
148
  {% endfor %}
109
149
 
110
- <h2 id="rdfProperties">RDF Properties</h2>
111
150
  {% for result in rdfPropertiesResultset %}
151
+ {%- if forloop.first %}
152
+ <h2 id="rdfProperties">RDF Properties</h2>
153
+ {% endif -%}
112
154
  <p>{% include class-card.html iri = result.subject.iri %}</p>
113
155
  {% endfor %}
114
156
 
115
- <h2 id="objectProperties">Object Properties</h2>
116
157
  {% for result in objectPropertiesResultset %}
158
+ {%- if forloop.first %}
159
+ <h2 id="objectProperties">Object Properties</h2>
160
+ {% endif -%}
117
161
  <p>{% include class-card.html iri = result.subject.iri %}</p>
118
162
  {% endfor %}
119
163
 
120
- <h2 id="datatypeProperties">Datatype Properties</h2>
121
164
  {% for result in datatypePropertiesResultset %}
165
+ {%- if forloop.first %}
166
+ <h2 id="datatypeProperties">Datatype Properties</h2>
167
+ {% endif -%}
168
+ <p>{% include class-card.html iri = result.subject.iri %}</p>
169
+ {% endfor %}
170
+
171
+ {% for result in namedIndividualsResultset %}
172
+ {%- if forloop.first %}
173
+ <h2 id="namedIndividuals">Named Individuals</h2>
174
+ {% endif -%}
122
175
  <p>{% include class-card.html iri = result.subject.iri %}</p>
123
176
  {% endfor %}
124
177
 
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.3.2
4
+ version: 0.4.0
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: 2023-07-03 00:00:00.000000000 Z
12
+ date: 2025-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jekyll
@@ -87,14 +87,20 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: '13'
90
+ version: '13.0'
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 13.0.6
91
94
  type: :development
92
95
  prerelease: false
93
96
  version_requirements: !ruby/object:Gem::Requirement
94
97
  requirements:
95
98
  - - "~>"
96
99
  - !ruby/object:Gem::Version
97
- version: '13'
100
+ version: '13.0'
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 13.0.6
98
104
  description:
99
105
  email:
100
106
  - sebastian.tramp@eccenca.com
@@ -135,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
141
  - !ruby/object:Gem::Version
136
142
  version: '0'
137
143
  requirements: []
138
- rubygems_version: 3.4.10
144
+ rubygems_version: 3.3.27
139
145
  signing_key:
140
146
  specification_version: 4
141
147
  summary: The JOD theme generates documentation web pages from Ontology turtle documents