ttl2html 2.0.9 → 2.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ttl2html/version.rb +1 -1
- data/lib/ttl2html.rb +4 -0
- data/locales/en.yml +2 -0
- data/locales/ja.yml +2 -0
- data/templates/about.html.erb +9 -1
- data/templates/dataset.html.erb +2 -2
- data/templates/index.html.erb +6 -0
- data/templates/layout.html.erb +6 -7
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9724547c455f091392715e13f386a3e0287c688cfffaf90f9609cb01ff887d4
|
4
|
+
data.tar.gz: 31e1fe0848b38b0015eaa405d51bb8040ba7f3bf0852c2968fc63ca2a4cfd708
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06c2ffd5d06abeffddc1ee87910cc6b0035949742cd36433f52e1e3b6efeced85f09c0dc7601a4ad9650deec3fb788ad8ad71e4924d5189c1f9766ca10dcec7
|
7
|
+
data.tar.gz: 0f3e934743a63fbcdabbe93aabbd78408891285ece08eb32f0a7fe752c0a296648204ae508ba2931e93a5312391e497e310427d5e05aa34c6dba65ff979177c7
|
data/lib/ttl2html/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
TTL2HTML::VERSION = "2.0.
|
1
|
+
TTL2HTML::VERSION = "2.0.11"
|
data/lib/ttl2html.rb
CHANGED
@@ -454,11 +454,15 @@ module TTL2HTML
|
|
454
454
|
contact[:members] = members
|
455
455
|
end
|
456
456
|
end
|
457
|
+
if data["http://rdfs.org/ns/void#sparqlEndpoint"]
|
458
|
+
endpoint = data["http://rdfs.org/ns/void#sparqlEndpoint"].first
|
459
|
+
end
|
457
460
|
result = {
|
458
461
|
uri: toplevel.to_s,
|
459
462
|
description: data["http://purl.org/dc/terms/description"],
|
460
463
|
license: license,
|
461
464
|
contact: contact,
|
465
|
+
endpoint: endpoint,
|
462
466
|
}
|
463
467
|
end
|
464
468
|
result
|
data/locales/en.yml
CHANGED
@@ -21,6 +21,8 @@ en:
|
|
21
21
|
latest-dataset: "Latest dataset"
|
22
22
|
past-versions: "Past versions"
|
23
23
|
license-text: "This dataset is freely usable as <a href=\"%{url}\">%{label}</a>"
|
24
|
+
sparql-endpoint: "SPARQL Endpoint"
|
25
|
+
sparql-endpoint-text: "The SPARQL endpoint for the dataset is available at"
|
24
26
|
dataset:
|
25
27
|
license-text: "This dataset is freely usable as <a href=\"%{url}\">%{label}</a>"
|
26
28
|
layout:
|
data/locales/ja.yml
CHANGED
@@ -21,6 +21,8 @@ ja:
|
|
21
21
|
latest-dataset: 最新のデータセット
|
22
22
|
past-versions: 過去の更新履歴
|
23
23
|
license-text: "このデータセットは<a href=\"%{url}\">%{label}</a>として自由に利用できます。"
|
24
|
+
sparql-endpoint: "SPARQLエンドポイント"
|
25
|
+
sparql-endpoint-text: "このデータセットに対するSPARQLエンドポイントは以下のURLからアクセスできます"
|
24
26
|
dataset:
|
25
27
|
license-text: "<a href=\"%{url}\">%{label}</a>として自由に利用できます"
|
26
28
|
layout:
|
data/templates/about.html.erb
CHANGED
@@ -26,8 +26,10 @@
|
|
26
26
|
<h2 data-toc-skip><%=h t('about.toc') %></h2>
|
27
27
|
<nav id="toc" data-toggle="toc" class="sticky-top"></nav>
|
28
28
|
</div>
|
29
|
-
|
29
|
+
<div class="col-md-10">
|
30
|
+
<%- else -%>
|
30
31
|
<div class="col-md">
|
32
|
+
<%- end -%>
|
31
33
|
<%- if param[:content] -%>
|
32
34
|
<%= param[:content] %>
|
33
35
|
<%- end -%>
|
@@ -51,6 +53,12 @@
|
|
51
53
|
<%- end -%>
|
52
54
|
</dl>
|
53
55
|
<%- end -%>
|
56
|
+
<%- if param[:toplevel][:endpoint] -%>
|
57
|
+
<h2 id="sparql-endpoint"><%=h t("index.sparql-endpoint") %> <i class="bi bi-database-add"></i></h2>
|
58
|
+
<p>
|
59
|
+
<%= t("index.sparql-endpoint-text") %>: <a href="<%=h param[:toplevel][:endpoint] %>"><%=h param[:toplevel][:endpoint] %></a>
|
60
|
+
</p>
|
61
|
+
<%- end -%>
|
54
62
|
<%- if param[:toplevel] and param[:toplevel][:contact] -%>
|
55
63
|
<h2 id="contact"><%=h t("about.contact") %></h2>
|
56
64
|
<%- if param[:toplevel][:contact][:name] -%>
|
data/templates/dataset.html.erb
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
<%- if not param[:license].empty? -%>
|
16
16
|
<span class="license">
|
17
17
|
<%- if param[:license][:icon] -%>
|
18
|
-
<a href="<%=h param[:license][:url] %>"><img src="<%=h param[:license][:icon] %>"></a>
|
18
|
+
<a href="<%=h param[:license][:url] %>"><img src="<%=h param[:license][:icon] %>" alt=""></a>
|
19
19
|
<%- end -%>
|
20
20
|
<%= t("dataset.license-text", label: get_language_literal(param[:license][:label]), url: param[:license][:url]) %>
|
21
21
|
</span>
|
@@ -32,4 +32,4 @@
|
|
32
32
|
<%- param[:subset].each do |subset| -%>
|
33
33
|
<%= to_html_raw("dataset.html.erb", subset) %>
|
34
34
|
<%- end -%>
|
35
|
-
<%- end -%>
|
35
|
+
<%- end -%>
|
data/templates/index.html.erb
CHANGED
@@ -33,5 +33,11 @@
|
|
33
33
|
<%- end -%>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
|
+
<div class="col-md">
|
37
|
+
<h2 id="sparql-endpoint"><%=h t("index.sparql-endpoint") %> <i class="bi bi-database-add"></i></h2>
|
38
|
+
<p>
|
39
|
+
<%= t("index.sparql-endpoint-text") %>: <a href="<%=h param[:toplevel][:endpoint] %>"><%=h param[:toplevel][:endpoint] %></a>
|
40
|
+
</p>
|
41
|
+
</div>
|
36
42
|
<%- end -%>
|
37
43
|
</div>
|
data/templates/layout.html.erb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
<head>
|
4
4
|
<meta charset="utf-8">
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
6
|
-
<link rel="stylesheet" href="https://
|
7
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.
|
6
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
|
7
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
|
8
8
|
<%- if @template == "about.html.erb" and param[:about_toc] -%>
|
9
|
-
<link rel="stylesheet" href="https://cdn.
|
9
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc/dist/bootstrap-toc.min.css">
|
10
10
|
<%- end -%>
|
11
11
|
<%- param[:css_file].each do |file| -%>
|
12
12
|
<link rel="stylesheet" href="<%=h relative_path(file) %>">
|
@@ -95,11 +95,10 @@
|
|
95
95
|
</footer>
|
96
96
|
|
97
97
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
98
|
-
<script src="https://
|
99
|
-
<script src="https://cdn.jsdelivr.net/npm/
|
100
|
-
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
98
|
+
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
99
|
+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
|
101
100
|
<%- if @template == "about.html.erb" and param[:about_toc] -%>
|
102
|
-
<script src="https://cdn.
|
101
|
+
<script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc/dist/bootstrap-toc.min.js"></script>
|
103
102
|
<%- end -%>
|
104
103
|
<%- param[:javascript_file].each do |file| -%>
|
105
104
|
<script src="<%=h relative_path(file) %>"></script>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttl2html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masao Takaku
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -199,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
|
-
rubygems_version: 3.5.
|
202
|
+
rubygems_version: 3.5.16
|
203
203
|
signing_key:
|
204
204
|
specification_version: 4
|
205
205
|
summary: ttl2html
|