ttl2html 2.0.8 → 2.0.10

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: 3d8c7e6dce36bd989cd64b3ac4964afacc39dd7c7d523e6d7994e13b0627cce1
4
- data.tar.gz: 196b493e732acbeaa8d49c7e1a6529fe5a3626b81c60d0fc3218dc6b23ad68c5
3
+ metadata.gz: d3825234f88a6aa5721d0beb75b071af98b1429030613477450b782a5136aae2
4
+ data.tar.gz: 07201a686ac42ea09536599f3c96d66aaafbbfe6a04edc5a6c72c5a7b33a1664
5
5
  SHA512:
6
- metadata.gz: e0851e31375321f6dd210fd72522d6a21458d02b55c73847ebbd8d6f3b85f6439e59a34457004a6f4a2dd9f60f0522aaa987cd333375e347547f7f071c9bd3e8
7
- data.tar.gz: 4d025717df665375a3cf6e13bcecd14b8e40b81428547f54ce8799bff6283c7f31fe747e8786e6f41ed1535a3294e5e7656a7b90e7730d4b68cc3289af6ea363
6
+ metadata.gz: c1171465490568cb940dae3c6a335b60bf518ab0f63e4b31e0851c69c4f19d2f5a2e2b94bedcb4f9ad953357a62209b11bea0c78fa7a284d08fcccdd6b484a7a
7
+ data.tar.gz: 574b81f1d14c6031409c06ffb5fe83b7abfc476642ed0b43e6b5a89124af82c2ef27c3b507cdea067983b3976ea2987ea9c9c61075d9e2742d61763681b26e1f
@@ -1 +1 @@
1
- TTL2HTML::VERSION = "2.0.8"
1
+ TTL2HTML::VERSION = "2.0.10"
data/lib/ttl2html.rb CHANGED
@@ -199,6 +199,7 @@ module TTL2HTML
199
199
  param[:data_inverse_global] = @data_inverse
200
200
  param[:versions] = versions
201
201
  param[:toplevel] = toplevel
202
+ param[:description] = template.to_html_raw("description.html", {}) if template.find_template_path("description.html")
202
203
  subjects.sort.each do |subject|
203
204
  objects = []
204
205
  if @config.has_key? :top_additional_property
@@ -227,6 +228,7 @@ module TTL2HTML
227
228
  param[:data_global] = @data
228
229
  param[:versions] = versions
229
230
  param[:toplevel] = toplevel
231
+ param[:description] = template.to_html_raw("description.html", {}) if template.find_template_path("description.html")
230
232
  param[:shapes] = {}
231
233
  shapes.each do |subject|
232
234
  orders = []
@@ -452,11 +454,15 @@ module TTL2HTML
452
454
  contact[:members] = members
453
455
  end
454
456
  end
457
+ if data["http://rdfs.org/ns/void#sparqlEndpoint"]
458
+ endpoint = data["http://rdfs.org/ns/void#sparqlEndpoint"].first
459
+ end
455
460
  result = {
456
461
  uri: toplevel.to_s,
457
462
  description: data["http://purl.org/dc/terms/description"],
458
463
  license: license,
459
464
  contact: contact,
465
+ endpoint: endpoint,
460
466
  }
461
467
  end
462
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:
@@ -4,6 +4,9 @@
4
4
  <%- if param[:toplevel] and param[:toplevel][:description] -%>
5
5
  <p><%= get_language_literal(param[:toplevel][:description]) %></p>
6
6
  <%- end -%>
7
+ <%- if param[:description] -%>
8
+ <div class="description"><%= param[:description] %></div>
9
+ <%- end -%>
7
10
  </div>
8
11
  </div>
9
12
  <div class="container">
@@ -23,8 +26,10 @@
23
26
  <h2 data-toc-skip><%=h t('about.toc') %></h2>
24
27
  <nav id="toc" data-toggle="toc" class="sticky-top"></nav>
25
28
  </div>
26
- <%- end -%>
29
+ <div class="col-md-10">
30
+ <%- else -%>
27
31
  <div class="col-md">
32
+ <%- end -%>
28
33
  <%- if param[:content] -%>
29
34
  <%= param[:content] %>
30
35
  <%- end -%>
@@ -48,6 +53,12 @@
48
53
  <%- end -%>
49
54
  </dl>
50
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 -%>
51
62
  <%- if param[:toplevel] and param[:toplevel][:contact] -%>
52
63
  <h2 id="contact"><%=h t("about.contact") %></h2>
53
64
  <%- if param[:toplevel][:contact][:name] -%>
@@ -4,6 +4,9 @@
4
4
  <%- if param[:toplevel] and param[:toplevel][:description] -%>
5
5
  <p><%= get_language_literal(param[:toplevel][:description]) %></p>
6
6
  <%- end -%>
7
+ <%- if param[:description] -%>
8
+ <div class="description"><%= param[:description] %></div>
9
+ <%- end -%>
7
10
  <p><i class="bi bi-link-45deg"></i> <a href="<%=h param[:base_uri] %>"><%=h param[:base_uri] %></a></p>
8
11
  <p><a class="btn btn-info" href="<%=h relative_path(param[:about_file] || "about.html") %>"><%=h t("about.title", title: param[:site_title]) %> &raquo;</a></p>
9
12
  </div>
@@ -30,5 +33,11 @@
30
33
  <%- end -%>
31
34
  </div>
32
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>
33
42
  <%- end -%>
34
43
  </div>
@@ -3,8 +3,8 @@
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://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
7
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.1/font/bootstrap-icons.css">
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
9
  <link rel="stylesheet" href="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.css">
10
10
  <%- end -%>
@@ -95,9 +95,8 @@
95
95
  </footer>
96
96
 
97
97
  <!-- jQuery first, then Popper.js, then Bootstrap JS -->
98
- <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
99
- <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
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
101
  <script src="https://cdn.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></script>
103
102
  <%- end -%>
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.8
4
+ version: 2.0.10
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-03-20 00:00:00.000000000 Z
11
+ date: 2024-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri