jekyll-geolexica 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +6 -0
  3. data/README.adoc +102 -0
  4. data/_config.yml +88 -0
  5. data/_data/lang.yaml +96 -0
  6. data/_includes/_title.html +5 -0
  7. data/_includes/head.html +48 -0
  8. data/_includes/localized-concept.html +99 -0
  9. data/_includes/newsroll-entry.html +17 -0
  10. data/_includes/page-header.html +31 -0
  11. data/_includes/resource-tree-item.html +49 -0
  12. data/_includes/script.html +0 -0
  13. data/_layouts/base-page.html +7 -0
  14. data/_layouts/concept.html +154 -0
  15. data/_layouts/concept.jsonld.html +152 -0
  16. data/_layouts/concept.ttl.html +83 -0
  17. data/_layouts/custom-home.html +33 -0
  18. data/_layouts/custom-post.html +7 -0
  19. data/_layouts/default.html +176 -0
  20. data/_layouts/home.html +6 -0
  21. data/_layouts/page.html +6 -0
  22. data/_layouts/post.html +13 -0
  23. data/_layouts/posts.html +10 -0
  24. data/_layouts/resource-index.html +14 -0
  25. data/_layouts/resource-page.html +25 -0
  26. data/_pages/404.adoc +12 -0
  27. data/_pages/api/rdf-profile.ttl +225 -0
  28. data/_pages/concepts-index-list.json +24 -0
  29. data/_pages/concepts-index.json +14 -0
  30. data/_pages/concepts.adoc +38 -0
  31. data/_pages/index.adoc +8 -0
  32. data/_pages/posts.adoc +6 -0
  33. data/_pages/stats.adoc +18 -0
  34. data/_pages/stats.json +5 -0
  35. data/_sass/adoc-markup.scss +197 -0
  36. data/_sass/concept.scss +171 -0
  37. data/_sass/concepts.scss +18 -0
  38. data/_sass/expandable-nav.scss +187 -0
  39. data/_sass/geolexica_home.scss +174 -0
  40. data/_sass/home.scss +87 -0
  41. data/_sass/jekyll-theme-isotc211.scss +146 -0
  42. data/_sass/legacy-crossbrowser.scss +67 -0
  43. data/_sass/main.scss +413 -0
  44. data/_sass/mixins.scss +39 -0
  45. data/_sass/normalize.scss +424 -0
  46. data/_sass/offsets.scss +59 -0
  47. data/_sass/post.scss +16 -0
  48. data/_sass/posts.scss +18 -0
  49. data/assets/algolia-search.js +28 -0
  50. data/assets/js/concept-search-worker.js +103 -0
  51. data/assets/js/concept-search.js +293 -0
  52. data/assets/js/ga.js +15 -0
  53. data/assets/js/nav.js +125 -0
  54. data/assets/js/resource-browser.js +79 -0
  55. data/assets/logo-ribose.svg +1 -0
  56. data/assets/resource-viewer-placeholder.html +11 -0
  57. data/assets/style.scss +11 -0
  58. data/babel.config.js +16 -0
  59. data/browserconfig.xml +12 -0
  60. data/fonts/MetaWebPro-Normal.woff +0 -0
  61. data/fonts/MetaWebPro-Thin.woff +0 -0
  62. data/jekyll-geolexica.gemspec +45 -0
  63. data/lib/jekyll-geolexica.rb +5 -0
  64. data/lib/jekyll/geolexica.rb +19 -0
  65. data/lib/jekyll/geolexica/concept_page.rb +169 -0
  66. data/lib/jekyll/geolexica/concept_serializer.rb +44 -0
  67. data/lib/jekyll/geolexica/concepts_generator.rb +64 -0
  68. data/lib/jekyll/geolexica/configuration.rb +47 -0
  69. data/lib/jekyll/geolexica/glossary.rb +95 -0
  70. data/lib/jekyll/geolexica/hooks.rb +33 -0
  71. data/lib/jekyll/geolexica/meta_pages_generator.rb +58 -0
  72. data/lib/jekyll/geolexica/version.rb +8 -0
  73. data/package-lock.json +2921 -0
  74. data/package.json +10 -0
  75. metadata +209 -0
@@ -0,0 +1,17 @@
1
+ <article class="
2
+ news-item-card
3
+ {% if post.illustration %}news-item--with-illustration{% endif %}">
4
+
5
+ {% if post.illustration %}
6
+ <a class="illustration-container" href="{{ post.url | relative_url }}"
7
+ style="background-image: url({{ post.illustration | relative_url }});">
8
+ </a>
9
+ {% endif %}
10
+
11
+ <h3 class="title"><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
12
+
13
+ <div class="meta">{{ post.date | date: '%B %d, %Y' }}</div>
14
+
15
+ <div class="excerpt">{{ post.excerpt }}</div>
16
+
17
+ </article>
@@ -0,0 +1,31 @@
1
+ {% assign title = page.title | default: page.title_html | default: layout.title | default: layout.title_html %}
2
+ {% assign parent_title = page.parent_title | default: layout.parent_title %}
3
+ {% assign parent_link = page.parent_link | default: layout.parent_link %}
4
+ {% if title or parent_title %}
5
+ <header>
6
+ {% if parent_title %}
7
+ <p class="section-title">
8
+ {% if parent_link %}
9
+ <a href="{{ parent_link }}">{{ parent_title }}</a>
10
+ {% else %}
11
+ {{ parent_title }}
12
+ {% endif %}
13
+ </p>
14
+ {% endif %}
15
+
16
+ {% if title %}
17
+ <h1>{{ title }}</h1>
18
+ {% endif %}
19
+
20
+ {% if page.show_header_meta and page.date or page.version %}
21
+ <div class="meta">
22
+ {% if page.date %}
23
+ <p>{{ page.date | date: '%B %d, %Y' }}
24
+ {% endif %}
25
+ {% if page.version %}
26
+ <p>Version: {{ page.version }}
27
+ {% endif %}
28
+ </div>
29
+ {% endif %}
30
+ </header>
31
+ {% endif %}
@@ -0,0 +1,49 @@
1
+ <li class="bp3-tree-node bp3-tree-node-expanded">
2
+
3
+ <div class="
4
+ bp3-tree-node-content
5
+ {% if include.level > 0 %}bp3-tree-node-content-{{ include.level }}{% endif %}">
6
+
7
+ <span class="
8
+ {% if include.children %}bp3-tree-node-caret bp3-tree-node-caret-open
9
+ {% else %}bp3-tree-node-caret-none
10
+ {% endif %}
11
+ bp3-icon-standard"></span>
12
+ <span class="
13
+ bp3-tree-node-icon bp3-icon-standard
14
+ {% if include.children %}bp3-icon-folder-close
15
+ {% else %}bp3-icon-document
16
+ {% endif %}"></span>
17
+
18
+ <span class="bp3-tree-node-label" title="{{ include.data }}">
19
+ {% unless include.children %}
20
+ <a href="/{{ include.full_path }}">{{ include.data }}</a>
21
+ {% else %}
22
+ {{ include.data }}
23
+ {% endunless %}
24
+ </span>
25
+
26
+ {% unless include.children %}
27
+ <span class="bp3-tree-node-secondary-label">
28
+ <a
29
+ title="Open in separate viewer window"
30
+ target="resource-viewer"
31
+ class="bp3-icon-standard bp3-icon-document-share"
32
+ href="/{{ include.full_path }}"></a>
33
+ </span>
34
+ {% endunless %}
35
+ </div>
36
+
37
+ {% if include.children %}
38
+ <ul class="bp3-tree-node-list">
39
+ {% for subitem in include.children %}
40
+ {% include resource-tree-item.html
41
+ full_path=subitem.full_path
42
+ data=subitem.data
43
+ children=subitem.children
44
+ level=subitem.level %}
45
+ {% endfor %}
46
+ </ul>
47
+ {% endif %}
48
+
49
+ </li>
File without changes
@@ -0,0 +1,7 @@
1
+ ---
2
+ # “Normal” page with header.
3
+ layout: default
4
+ ---
5
+ {% include page-header.html %}
6
+
7
+ {{ content }}
@@ -0,0 +1,154 @@
1
+ ---
2
+ layout: default
3
+ nav_items: [concepts, stats, about, posts, feedback, registers]
4
+ bodyClass: concept
5
+ term_attributes:
6
+ - definition
7
+ - notes
8
+ - examples
9
+ - entry_status
10
+ - authoritative_source
11
+ - lineage_source
12
+ - lineage_source_similarity
13
+ - date_accepted
14
+ - review_date
15
+ - review_status
16
+ - review_decision
17
+ - review_decision_event
18
+ - review_decision_notes
19
+ - release
20
+ ---
21
+ <header>
22
+ <h2 class="section-title">
23
+ Concept
24
+ <span class="term-name"><span class="q-open">“</span>{{ page.term | escape }}”</span>
25
+ </h2>
26
+ </header>
27
+
28
+ <section class="field ref">
29
+ <p class="field-name">Term ID</p>
30
+ <p class="field-value">{{ page.termid }}</p>
31
+ </section>
32
+
33
+ {% assign english = page["eng"] %}
34
+ <section class="field source">
35
+ <p class="field-name">source</p>
36
+ <p class="field-value">
37
+ {% if english.authoritative_source.link %}
38
+ <a href="{{ english.authoritative_source.link }}">{{ english.authoritative_source.ref | default: english.authoritative_source.link | escape_once }}</a>{% if english.authoritative_source.clause %}, {{ english.authoritative_source.clause }}{% endif %}
39
+ {% else %}
40
+ {{ english.authoritative_source.ref }}{% if english.authoritative_source.clause %}, {{ english.authoritative_source.clause }}{% endif %}
41
+ {% endif %}
42
+ </p>
43
+ </section>
44
+
45
+ {% for lang in site.geolexica.term_languages %}
46
+
47
+ {%- assign localized_term = page[lang] -%}
48
+
49
+ {%- if localized_term -%}
50
+ {%- include localized-concept.html lang=lang localized_term=localized_term english=english -%}
51
+ {%- endif %}
52
+
53
+ {% endfor %}
54
+
55
+ {% assign json_url = page.representations.json.url -%}
56
+ {% if json_url -%}
57
+ <section class="field json">
58
+ <p class="field-name">JSON</p>
59
+ <p class="field-value"><a href="{{ json_url }}">{{ json_url }}</a></p>
60
+ </section>
61
+ {%- endif %}
62
+
63
+ {% assign yaml_url = page.representations.yaml.url -%}
64
+ {% if yaml_url -%}
65
+ <section class="field yaml">
66
+ <p class="field-name">YAML</p>
67
+ <p class="field-value"><a href="{{ yaml_url }}">{{ yaml_url }}</a></p>
68
+ </section>
69
+ {%- endif %}
70
+
71
+ {% assign json_url = page.representations.jsonld.url -%}
72
+ {% if json_url -%}
73
+ <section class="field json">
74
+ <p class="field-name">SKOS in JSON-LD</p>
75
+ <p class="field-value"><a href="{{ json_url }}">{{ json_url }}</a></p>
76
+ </section>
77
+ {%- endif %}
78
+
79
+ {% assign ttl_url = page.representations.turtle.url -%}
80
+ {% if ttl_url -%}
81
+ <section class="field ttl">
82
+ <p class="field-name">SKOS in RDF</p>
83
+ <p class="field-value"><a href="{{ ttl_url }}">{{ ttl_url }}</a></p>
84
+ </section>
85
+ {%- endif %}
86
+
87
+ {% assign tbx_url = page.representations.tbx.url -%}
88
+ {% if tbx_url -%}
89
+ <section class="field tbx">
90
+ <p class="field-name">TBX-ISO-TML</p>
91
+ <p class="field-value"><a href="{{ tbx_url }}">{{ tbx_url }}</a></p>
92
+ </section>
93
+ {%- endif %}
94
+
95
+ <section class="field info">
96
+ <p class="field-name">info</p>
97
+ <div class="field-value">
98
+ <ul class="labels">
99
+ {% if english.entry_status -%}
100
+ <li>status: {{ english.entry_status | escape }}</li>
101
+ {% endif -%}
102
+
103
+ {% if english.terms.first.normative_status -%}
104
+ <li>classification: {{ english.terms.first.normative_status | escape }}</li>
105
+ {% endif -%}
106
+
107
+ {% if english.date_accepted -%}
108
+ <li>date accepted: {{ english.date_accepted | date: "%F" }}</li>
109
+ {% endif -%}
110
+
111
+ {% if english.date_amended -%}
112
+ <li>date amended: {{ english.date_amended | date: "%F" }}</li>
113
+ {%- endif %}
114
+ </ul>
115
+ </div>
116
+ </section>
117
+
118
+ {% if english.review_date -%}
119
+ <section class="field json">
120
+ <p class="field-name">Review</p>
121
+ <div class="field-value">
122
+ <dl class="review">
123
+ <div class="review-info">
124
+ <dt>last review performed:</dt>
125
+ <dd>({{ english.review_date | date: "%F" }})</dd>
126
+ </div>
127
+ {% if english.review_status -%}
128
+ <div class="review-info">
129
+ <dt>status:</dt>
130
+ <dd>{{ english.review_status }}</dd>
131
+ </div>
132
+ {% endif -%}
133
+ {% if english.review_decision -%}
134
+ <div class="review-info">
135
+ <dt>decision:</dt>
136
+ <dd>{{ english.review_decision | escape }}</dd>
137
+ </div>
138
+ {% endif -%}
139
+ {% if english.review_decision_event -%}
140
+ <div class="review-info">
141
+ <dt>decision event:</dt>
142
+ <dd>{{ english.review_decision_event | escape }}</dd>
143
+ </div>
144
+ {% endif -%}
145
+ {% if english.review_decision_notes -%}
146
+ <div class="review-info">
147
+ <dt>notes:</dt>
148
+ <dd>{{ english.review_decision_notes | escape }}</dd>
149
+ </div>
150
+ {%- endif %}
151
+ </dl>
152
+ </div>
153
+ </section>
154
+ {% endif -%}
@@ -0,0 +1,152 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+ {%- assign concept = page["eng"] -%}
5
+ {
6
+ "@context": {
7
+ "skos": "http://www.w3.org/2004/02/skos/core#",
8
+ "format": "http://purl.org/dc/terms/format",
9
+ "dateAccepted": "http://purl.org/dc/terms/dateAccepted",
10
+ "modified": "http://purl.org/dc/terms/modified",
11
+ "created": "http://purl.org/dc/terms/created",
12
+ "source": "http://purl.org/dc/terms/source"
13
+ },
14
+
15
+ "@id": "{{ page.url }}",
16
+ "@type": "skos:Concept",
17
+ "format": "linked-data-api",
18
+ "skos:notation": "{{ page.termid }}",
19
+
20
+ "skos:prefLabel": [
21
+ {%- for lang in site.geolexica.term_languages -%}
22
+ {%- assign localized_term = page[lang] -%}
23
+ {%- if localized_term.terms.size > 0 -%}
24
+ {
25
+ "@language": "{{ site.data.lang[lang].iso-639-1 }}",
26
+ "@value": {{ localized_term.terms.first.designation | jsonify }}
27
+ }{% unless forloop.last %},{% endunless %}
28
+ {%- endif -%}
29
+ {%- endfor -%}
30
+ ],
31
+
32
+ "skos:altLabel": [
33
+ {%- for lang in site.geolexica.term_languages -%}
34
+ {%- assign outer_forloop = forloop -%}
35
+ {%- assign localized_term = page[lang] -%}
36
+ {%- for term in localized_term.terms -%}
37
+ {%- unless forloop.first -%}
38
+ {
39
+ "@language": "{{ site.data.lang[lang].iso-639-1 }}",
40
+ "@value": {{ term.designation | jsonify }}
41
+ }{% unless outer_forloop.last and forloop.last %},{% endunless %}
42
+ {%- endunless -%}
43
+ {%- endfor -%}
44
+ {%- endfor -%}
45
+ ],
46
+
47
+ "skos:definition": [
48
+ {%- for lang in site.geolexica.term_languages -%}
49
+ {%- assign localized_term = page[lang] -%}
50
+ {%- if localized_term.definition -%}
51
+ {
52
+ "@language": "{{ site.data.lang[lang].iso-639-1 }}",
53
+ "@value": {{ localized_term.definition | jsonify }}
54
+ }{% unless forloop.last %},{% endunless %}
55
+ {%- endif -%}
56
+ {%- endfor -%}
57
+ ],
58
+
59
+ {%- if concept.date_accepted -%}
60
+ "dateAccepted": "{{ concept.date_accepted | date: "%F" }}",
61
+ {%- endif -%}
62
+
63
+ {%- if concept.date_amended -%}
64
+ "modified": "{{ concept.date_amended | date: "%F" }}",
65
+ {%- endif -%}
66
+
67
+ {%- if concept.notes -%}
68
+ "notes": {
69
+ {%- for lang in site.geolexica.term_languages -%}
70
+ {%- assign localized_term = page[lang] -%}
71
+ {%- if localized_term.notes.size > 0 -%}
72
+ "{{ lang }}": [
73
+ {%- for note in localized_term.notes -%}
74
+ {%- assign notenum = "" -%}
75
+ {%- if localized_term.notes.size > 1 -%}
76
+ {%- assign notenum = " " | append: forloop.index -%}
77
+ {
78
+ "note-id": {{ notenum }},
79
+ "note": {
80
+ "@language": "{{ site.data.lang[lang].iso-639-1 }}",
81
+ "@type": "skos:note",
82
+ {%- if lang != "eng" and note == concept.notes[forloop.index0] -%}
83
+ "@value": "notTranslated",
84
+ {%- else -%}
85
+ "@value": {{ note | jsonify }}
86
+ {%- endif -%}
87
+ }
88
+ }{% unless forloop.last %},{% endunless %}
89
+ {%- endif -%}
90
+ {%- endfor -%}
91
+ ]{% unless forloop.last %},{% endunless %}
92
+ {%- endif -%}
93
+ {%- endfor -%}
94
+ },
95
+ {%- endif -%}
96
+
97
+ {%- if concept.examples -%}
98
+ "examples": {
99
+ {%- for lang in site.geolexica.term_languages -%}
100
+ {%- assign localized_term = page[lang] -%}
101
+ {%- if localized_term.examples.size > 0 -%}
102
+ "{{ lang }}": [
103
+ {%- for example in localized_term.examples -%}
104
+ {%- assign examplenum = "" -%}
105
+ {%- if localized_term.examples.size > 1 -%}
106
+ {%- assign examplenum = " " | append: forloop.index -%}
107
+ {
108
+ "example-id": {{ examplenum }},
109
+ "example": {
110
+ "@language": "{{ site.data.lang[lang].iso-639-1 }}",
111
+ "@type": "skos:example",
112
+ {%- if lang != "eng" and example == concept.examples[forloop.index0] -%}
113
+ "@value": "notTranslated",
114
+ {%- else -%}
115
+ "@value": {{ example | jsonify }}
116
+ {%- endif -%}
117
+ }
118
+ }{% unless forloop.last %},{% endunless %}
119
+ {%- endif -%}
120
+ {%- endfor -%}
121
+ ]{% unless forloop.last %},{% endunless %}
122
+ {%- endif -%}
123
+ {%- endfor -%}
124
+ },
125
+ {%- endif -%}
126
+
127
+ {%- if concept.authoritative_source -%}
128
+ "source": {
129
+ {%- if concept.authoritative_source.link -%}
130
+ "link": "{{ concept.authoritative_source.link }}",
131
+ {%- endif -%}
132
+ {%- if concept.authoritative_source.clause -%}
133
+ "clause": "{{ concept.authoritative_source.clause }}",
134
+ {%- endif -%}
135
+ "ref": "{{ concept.authoritative_source.ref }}"
136
+ },
137
+ {%- endif -%}
138
+
139
+ {%- if concept.entry_status -%}
140
+ "status": {
141
+ "@value": {{ concept.entry_status | jsonify }}
142
+ },
143
+ {%- endif -%}
144
+
145
+ {%- if concept.terms.first.normative_status -%}
146
+ "classification": {
147
+ "@value": {{ concept.terms.first.normative_status | jsonify }}
148
+ },
149
+ {%- endif -%}
150
+
151
+ "uri": "{{ page.url }}"
152
+ }
@@ -0,0 +1,83 @@
1
+ ---
2
+ layout: null
3
+ ---
4
+ {%- assign concept = page["eng"] -%}
5
+ {%- assign rdfprofile = "/api/rdf-profile" -%}
6
+ {%- assign concept_html = page.representations.html -%}
7
+ {%- assign concept_id = concept_html.url -%}
8
+ {%- assign english = page["eng"] -%}
9
+ # baseURI: "{{ concept_id }}"
10
+ # imports: http://purl.org/dc/terms/
11
+ # imports: https://www.geolexica.org/api/rdf-profile
12
+ # imports: http://www.w3.org/2004/02/skos/core
13
+
14
+ @prefix : <{{ concept_id }}> .
15
+ @prefix dcterms: <http://purl.org/dc/terms/> .
16
+ @prefix owl: <http://www.w3.org/2002/07/owl#> .
17
+ @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
18
+ @prefix rdf-profile: <{{ rdfprofile }}#> .
19
+ @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
20
+ @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
21
+ @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
22
+
23
+ <{{ concept_id }}>
24
+ rdf:type owl:Ontology ;
25
+ owl:imports dcterms: ;
26
+ owl:imports <{{ rdfprofile }}> ;
27
+ owl:imports <http://www.w3.org/2004/02/skos/core> ;
28
+ .
29
+ :closure
30
+ rdf:type skos:Concept ;
31
+
32
+ {%- if concept.authoritative_source.link %}
33
+ dcterms:source "{{ concept.authoritative_source.link }}" ;
34
+ {%- endif %}
35
+
36
+ {%- for lang in site.geolexica.term_languages %}
37
+ {%- assign localized_term = page[lang] -%}
38
+ {%- if localized_term.terms.size > 0 %}
39
+ rdf-profile:{{ lang }}Origin rdf-profile:{{ site.data.lang[lang].lang_en }} ;
40
+ {%- endif %}
41
+ {%- endfor %}
42
+ rdf-profile:termID <{{ page.url }}> ;
43
+ rdfs:label "{{ english.terms.first.designation | escape }}" ;
44
+ skos:notation {{ page.termid }} ;
45
+ {%- for lang in site.geolexica.term_languages %}
46
+ {%- assign localized_term = page[lang] -%}
47
+ {%- if localized_term.definition %}
48
+ skos:definition "{{ localized_term.definition | escape }}"@{{ site.data.lang[lang].iso-639-1 }} ;
49
+ {%- endif %}
50
+ {%- endfor %}
51
+ skos:inScheme rdf-profile:GeolexicaConceptScheme ;
52
+
53
+ {%- for lang in site.geolexica.term_languages %}
54
+ {%- assign localized_term = page[lang] -%}
55
+ {%- for term in localized_term.terms %}
56
+ {%- if forloop.first %}
57
+ skos:prefLabel "{{ term.designation | escape }}"@{{ site.data.lang[lang].iso-639-1 }} ;
58
+ {%- else %}
59
+ skos:altLabel "{{ term.designation | escape }}"@{{ site.data.lang[lang].iso-639-1 }} ;
60
+ {%- endif %}
61
+ {%- endfor %}
62
+ {%- endfor %}
63
+
64
+ {%- if concept.date_accepted %}
65
+ dcterms:dateAccepted "{{ concept.date_accepted | date: "%F" }}" ;
66
+ {%- endif %}
67
+
68
+ {%- if concept.date_amended %}
69
+ dcterms:modified "{{ concept.date_amended | date: "%F" }}" ;
70
+ {%- endif %}
71
+
72
+ {%- if concept.entry_status %}
73
+ :status "{{ concept.entry_status | escape }}" ;
74
+ {%- endif %}
75
+
76
+ {%- if concept.terms.first.normative_status %}
77
+ :classification "{{ concept.terms.first.normative_status | escape }}" ;
78
+ {%- endif %}
79
+ .
80
+ :linked-data-api
81
+ rdf:type dcterms:MediaTypeOrExtent ;
82
+ skos:prefLabel "linked-data-api" ;
83
+ .