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,24 @@
1
+ ---
2
+ permalink: "/api/concepts-index-list.json"
3
+ ---
4
+ [
5
+ {% for concept in site.concepts %}
6
+ {
7
+ "termid": {{ concept.termid }},
8
+ "term": {{ concept.eng.terms.first.designation | jsonify }},
9
+
10
+ {% assign english_concept = concept["eng"] %}
11
+ {% for lang in site.geolexica.term_languages %}
12
+
13
+ "{{ lang }}": {% if concept[lang] %}{
14
+ "term": {{ concept[lang].terms.first.designation | jsonify }},
15
+ "id": {{ concept[lang].id | jsonify }},
16
+ "entry_status": {{ english_concept.entry_status | jsonify }},
17
+ "language_code": {{ concept[lang].language_code | jsonify }},
18
+ "review_decision": {{ english_concept.review_decision | jsonify }}
19
+ }{% else %}{}{% endif %}{% unless forloop.last %},{% endunless %}
20
+
21
+ {% endfor %}
22
+ }{% unless forloop.last %},{% endunless %}
23
+ {% endfor %}
24
+ ]
@@ -0,0 +1,14 @@
1
+ ---
2
+ permalink: "/api/concepts.json"
3
+ ---
4
+ {
5
+ {% for concept in site.concepts %}
6
+ {% assign json_concept = concept.representations.json %}
7
+ "{{ concept.termid }}": {
8
+ "term": "{{ concept.term }}",
9
+ "termid": {{ concept.termid }},
10
+ "uri-html": "{{ concept.url }}",
11
+ "uri-json": "{{ json_concept.url }}"
12
+ }{% unless forloop.last %},{% endunless %}
13
+ {% endfor %}
14
+ }
@@ -0,0 +1,38 @@
1
+ ---
2
+ layout: base-page
3
+ permalink: "/concepts/index.html"
4
+ nav_items: [home, about, stats, posts, feedback, registers]
5
+ bodyClass: concepts
6
+ title: All Concepts
7
+ ---
8
+ :page-liquid:
9
+
10
+ The concepts below are sorted by term name, alphabetically, in a case-insensitive way.
11
+
12
+ ++++
13
+ {% assign sortedConcepts = site.concepts | sort_natural: "term" %}
14
+
15
+ <div class="all-concepts">
16
+ <table>
17
+ <thead>
18
+ <tr>
19
+ <th class="field-termid">Term ID
20
+ <th class="field-term">Term
21
+ </tr>
22
+ </thead>
23
+
24
+ <tbody>
25
+ {% for concept in sortedConcepts %}
26
+ <tr>
27
+ <td class="field-termid">
28
+ <a href="{{ concept.url | relative_url }}">{{ concept.termid }}</a>
29
+ </td>
30
+ <td class="field-term">
31
+ <a href="{{ concept.url | relative_url }}">{{ concept.term }}</a>
32
+ </td>
33
+ </tr>
34
+ {% endfor %}
35
+ </tbody>
36
+ </table>
37
+ </div>
38
+ ++++
data/_pages/index.adoc ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: custom-home
3
+ permalink: /
4
+ nav_items: [about, posts, stats, feedback, registers]
5
+ title: Index
6
+ ---
7
+ :page-liquid:
8
+
data/_pages/posts.adoc ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ layout: posts
3
+ title: News & Articles
4
+ permalink: "/posts/index.html"
5
+ nav_items: [home, concepts, stats, about, feedback, registers]
6
+ ---
data/_pages/stats.adoc ADDED
@@ -0,0 +1,18 @@
1
+ ---
2
+ permalink: "/stats/index.html"
3
+ layout: base-page
4
+ nav_items: [concepts, posts, feedback, registers, about]
5
+ bodyClass: page
6
+ title: Statistics
7
+ ---
8
+ :page-liquid:
9
+
10
+ The following languages are provided in Geolexica, with the number of terms displayed below.
11
+
12
+ {% for lang in site.geolexica.term_languages %}
13
+ {% assign counter = glossary.language_statistics[lang] %}
14
+ * {{ site.data.lang[lang].lang_native }}{% if lang != "eng" %} ({{ site.data.lang[lang].lang_en }}){% endif %}: {{ counter }}
15
+ {% endfor %}
16
+
17
+ JSON: link:/api/stats.json[/api/stats.json]
18
+
data/_pages/stats.json ADDED
@@ -0,0 +1,5 @@
1
+ ---
2
+ permalink: "/api/stats.json"
3
+ layout: null
4
+ ---
5
+ {{ glossary.language_statistics | jsonify }}
@@ -0,0 +1,197 @@
1
+ // Asciidoctor-generated markup
2
+ // ============================
3
+
4
+ @mixin padded-code-snippet() {
5
+ padding: 0 .75em;
6
+ margin: 0 .2em;
7
+ background: $codeListingBackgroundColor;
8
+
9
+ border: 1px dashed $codeListingBorderColor;
10
+ border-radius: .25em;
11
+
12
+ font-size: 15px;
13
+ }
14
+
15
+ @mixin padded-code-snippet--reset() {
16
+ padding: 0;
17
+ margin: 0;
18
+ background: transparent;
19
+ border: 0;
20
+ border-radius: 0;
21
+ }
22
+
23
+ @mixin code-snippet-container() {
24
+ overflow-x: scroll;
25
+ overflow-y: hidden;
26
+ line-height: 1.2;
27
+
28
+ @include padded-code-snippet();
29
+ padding-top: .5em;
30
+ padding-bottom: .5em;
31
+
32
+ border-width: 0 0 0 1px;
33
+ border-radius: 0 .25em .25em 0;
34
+
35
+ margin-top: 1em;
36
+ margin-bottom: 1em;
37
+
38
+ margin-left: -.1em;
39
+
40
+ > code {
41
+ // Avoid bad formatting in case of <code> element nested
42
+ // inside a <pre>
43
+ @include padded-code-snippet--reset();
44
+ }
45
+ }
46
+
47
+ @mixin code-snippet() {
48
+ color: lighten($textColor, 24);
49
+
50
+ @include padded-code-snippet();
51
+ margin-top: -1px;
52
+ margin-bottom: -1px;
53
+
54
+ code {
55
+ // Avoid bad formatting in case of <code> elements nested
56
+ // into each other (possible with adoc output)
57
+ @include padded-code-snippet--reset();
58
+ }
59
+ }
60
+
61
+ @mixin asciidoc-markup() {
62
+
63
+ // Code listing
64
+
65
+ .paragraph code {
66
+ word-break: break-word;
67
+ }
68
+ code {
69
+ @include code-snippet();
70
+ }
71
+ pre {
72
+ @include code-snippet-container();
73
+ }
74
+
75
+ // Generic block title
76
+
77
+ .admonitionblock,
78
+ .listingblock,
79
+ .imageblock {
80
+ .title {
81
+ text-transform: uppercase;
82
+ font-size: 12px;
83
+ border-radius: .25em;
84
+ background-color: $textColor;
85
+ color: white;
86
+ font-weight: bold;
87
+ padding: .3em .6em .15em .6em;
88
+ }
89
+ }
90
+
91
+ // Specific blocks
92
+
93
+ .admonitionblock,
94
+ .listingblock {
95
+ margin-top: 1em;
96
+ margin-bottom: 1em;
97
+ }
98
+
99
+ .admonitionblock.warning {
100
+ td.icon .title {
101
+ background-color: $warningColor;
102
+ }
103
+ }
104
+ .admonitionblock.important {
105
+ td.icon .title {
106
+ background-color: $importantColor;
107
+ }
108
+ }
109
+
110
+ .imageblock {
111
+ .title {
112
+ background-color: $accentColor;
113
+ color: white;
114
+ }
115
+ }
116
+
117
+ .listingblock {
118
+ display: flex;
119
+ flex-flow: column nowrap;
120
+
121
+ .title {
122
+ align-self: flex-start;
123
+ background-color: $codeListingBorderColor;
124
+ color: white;
125
+ border-radius: 0;
126
+ }
127
+
128
+ .content {
129
+ align-self: stretch;
130
+
131
+ pre {
132
+ margin: 0;
133
+ }
134
+ }
135
+ }
136
+
137
+ .admonitionblock {
138
+ overflow-x: scroll;
139
+
140
+ table:first-child {
141
+ margin-top: 0;
142
+ }
143
+ table:last-child {
144
+ margin-bottom: 0;
145
+ }
146
+
147
+ td.icon {
148
+ vertical-align: top;
149
+ padding-left: 0;
150
+ padding-right: 1em;
151
+ font-size: 90%;
152
+ }
153
+
154
+ .title {
155
+ background-color: $linkColor;
156
+ color: white;
157
+ }
158
+
159
+ .content {
160
+ font-size: 90%;
161
+
162
+ .title {
163
+ background: transparent;
164
+ color: $textColor;
165
+ padding-left: 0;
166
+ }
167
+
168
+ .listingblock pre {
169
+ font-size: 100%;
170
+ }
171
+
172
+ > div:first-child {
173
+ > :first-child {
174
+ margin-top: 0;
175
+ }
176
+ }
177
+ > div:last-child {
178
+ > :last-child {
179
+ margin-bottom: 0;
180
+ }
181
+ &.ulist {
182
+ li:first-child > :first-child {
183
+ margin-top: 0;
184
+ }
185
+ li:last-child > :last-child {
186
+ margin-bottom: 0;
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ @media all and (-ms-high-contrast: none) {
193
+ body > main .admonitionblock {
194
+ overflow-x: auto;
195
+ }
196
+ }
197
+ }
@@ -0,0 +1,171 @@
1
+ body.concept {
2
+ > main > header h2 {
3
+ @extend .section-title;
4
+
5
+ .term-name {
6
+ @include titleFontFamily(false);
7
+ font-size: 160%;
8
+ display: block;
9
+ text-transform: none;
10
+ margin-top: .5em;
11
+
12
+ .q-open {
13
+ margin-left: -.4em;
14
+ }
15
+ }
16
+ }
17
+
18
+ .field {
19
+ padding-bottom: 1em;
20
+ display: flex;
21
+ flex-flow: row nowrap;
22
+ align-items: flex-start;
23
+
24
+ .field-name {
25
+ margin: 0 1em 0 0;
26
+ font-size: 18px;
27
+ text-transform: uppercase;
28
+ text-align: center;
29
+ font-size: unset;
30
+ flex-shrink: 0;
31
+
32
+ &.field-name-language {
33
+ text-transform: none;
34
+ }
35
+
36
+ @media screen and (min-width: $bigscreenBreakpoint) {
37
+ margin: 0;
38
+ text-align: center;
39
+ }
40
+ }
41
+
42
+ .abbrev {
43
+ }
44
+
45
+ p.field-value {
46
+ // Single-paragraph
47
+ margin: 0;
48
+ }
49
+
50
+ div.field-value {
51
+ // Multi-paragraph
52
+ > :first-child {
53
+ margin-top: 0;
54
+ }
55
+ .warning {
56
+ color: red;
57
+ font-style: italic;
58
+ }
59
+ }
60
+
61
+ ul.labels {
62
+ list-style: none;
63
+ margin: 0;
64
+ padding: 0;
65
+ font-style: italic;
66
+
67
+ li {
68
+ display: inline;
69
+ margin: 0;
70
+ padding: 0;
71
+ color: gray;
72
+
73
+ &:after {
74
+ content: ", ";
75
+ }
76
+ &:last-child:after {
77
+ content: "";
78
+ margin-left: 0;
79
+ }
80
+ }
81
+ }
82
+
83
+ dl.review {
84
+ margin: 0;
85
+ padding: 0;
86
+ font-style: italic;
87
+ color: gray;
88
+ padding-left: 20px;
89
+ font-size: 14px;
90
+
91
+ dt, dd {
92
+ display: inline;
93
+ margin: 0;
94
+ padding: 0;
95
+ }
96
+
97
+ .review-info {
98
+ /* TODO */
99
+ }
100
+
101
+ }
102
+
103
+
104
+ }
105
+
106
+ article {
107
+ border-top: 2px solid #f0f0f0;
108
+ padding-top: 1em;
109
+ padding-bottom: 1em;
110
+
111
+ @media screen and (max-width: $bigscreenBreakpoint) {
112
+ &.field {
113
+ display: block;
114
+ }
115
+ }
116
+
117
+ h3 {
118
+ @include titleFontFamily(true);
119
+ font-size: 100%;
120
+ line-height: 1.2;
121
+ }
122
+
123
+ &.lang-ara {
124
+ flex-direction: row-reverse;
125
+ .localized {
126
+ direction: rtl;
127
+ }
128
+ }
129
+
130
+ &.status-valid {
131
+ }
132
+ &.status-notValid {
133
+ color: red;
134
+ opacity: 0.5;
135
+ }
136
+ &.status-retired {
137
+ color: orange;
138
+ opacity: 0.5;
139
+ }
140
+ &.status-superseded {
141
+ color: gray;
142
+ opacity: 0.5;
143
+ }
144
+ }
145
+ }
146
+
147
+ body.concept > main {
148
+ padding-top: 1em;
149
+
150
+ > header h2 {
151
+ margin-left: $sideOffsetBase;
152
+ margin-right: $sideOffsetBase;
153
+ }
154
+ .field {
155
+ margin: 0 15vw 0 15vw;
156
+ }
157
+ @media screen and (min-width: $bigscreenBreakpoint) {
158
+ .field {
159
+ margin-left: calc(#{$sideOffsetBase} - #{$logoOffset});
160
+ margin-right: $sideOffsetBase;
161
+
162
+ .field-name {
163
+ width: $logoOffset;
164
+ }
165
+ }
166
+ .field.lang-ara {
167
+ margin-right: calc(#{$sideOffsetBase} - #{$logoOffset});
168
+ margin-left: $sideOffsetBase;
169
+ }
170
+ }
171
+ }