datalog-theme 0.6.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.
Files changed (180) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +162 -0
  3. data/CITATION.cff +29 -0
  4. data/LICENSE +21 -0
  5. data/README.md +257 -0
  6. data/_data/academic.yml +217 -0
  7. data/_data/cdn-integrity.yml +51 -0
  8. data/_data/config/author.yml +121 -0
  9. data/_data/config/features.yml +262 -0
  10. data/_data/config/site.yml +42 -0
  11. data/_data/config/theme.yml +181 -0
  12. data/_data/datasets.yml +28 -0
  13. data/_data/i18n/en.yml +438 -0
  14. data/_data/i18n/es.yml +438 -0
  15. data/_data/i18n/pt.yml +438 -0
  16. data/_data/js_manifest.json +22 -0
  17. data/_data/js_meta.json +371 -0
  18. data/_data/navigation.yml +145 -0
  19. data/_data/projects.yml +41 -0
  20. data/_data/publications.yml +28 -0
  21. data/_data/social.yml +73 -0
  22. data/_data/visualizations.yml +51 -0
  23. data/_includes/analytics/dashboard.html +149 -0
  24. data/_includes/analytics.html +9 -0
  25. data/_includes/components/academic-dashboard.html +347 -0
  26. data/_includes/components/advanced-search.html +682 -0
  27. data/_includes/components/api-function.html +94 -0
  28. data/_includes/components/author-bio.html +166 -0
  29. data/_includes/components/bookmark-system.html +96 -0
  30. data/_includes/components/breadcrumbs.html +89 -0
  31. data/_includes/components/citation-tools.html +94 -0
  32. data/_includes/components/comments.html +244 -0
  33. data/_includes/components/content-provenance.html +43 -0
  34. data/_includes/components/content-recommendations.html +228 -0
  35. data/_includes/components/difficulty-badge.html +84 -0
  36. data/_includes/components/email-preferences.html +200 -0
  37. data/_includes/components/enhanced-code-block.html +212 -0
  38. data/_includes/components/enhanced-metadata.html +228 -0
  39. data/_includes/components/enhanced-toc.html +209 -0
  40. data/_includes/components/hero.html +15 -0
  41. data/_includes/components/language-switcher.html +396 -0
  42. data/_includes/components/math-fallback.html +19 -0
  43. data/_includes/components/navigation-enhancements.html +454 -0
  44. data/_includes/components/newsletter-signup.html +178 -0
  45. data/_includes/components/open-science-badges.html +16 -0
  46. data/_includes/components/package-install.html +194 -0
  47. data/_includes/components/performance-monitor.html +170 -0
  48. data/_includes/components/popular-posts.html +233 -0
  49. data/_includes/components/post-hero.html +62 -0
  50. data/_includes/components/reading-progress.html +133 -0
  51. data/_includes/components/reading-time.html +121 -0
  52. data/_includes/components/responsive-image.html +63 -0
  53. data/_includes/components/search-facets.html +307 -0
  54. data/_includes/components/series-navigation.html +124 -0
  55. data/_includes/components/social-proof.html +34 -0
  56. data/_includes/components/social-share.html +119 -0
  57. data/_includes/components/user-preferences.html +566 -0
  58. data/_includes/components/visualization-card.html +24 -0
  59. data/_includes/components/viz-table-fallback.html +19 -0
  60. data/_includes/critical-css/default.html +0 -0
  61. data/_includes/critical-css/home.html +0 -0
  62. data/_includes/critical-css/post.html +0 -0
  63. data/_includes/csp-meta.html +17 -0
  64. data/_includes/footer/nav-column.html +31 -0
  65. data/_includes/footer.html +76 -0
  66. data/_includes/head.html +337 -0
  67. data/_includes/header/navigation.html +48 -0
  68. data/_includes/header.html +70 -0
  69. data/_includes/helpers/array-to-sentence.html +21 -0
  70. data/_includes/helpers/date-format.html +16 -0
  71. data/_includes/helpers/link-with-icon.html +26 -0
  72. data/_includes/layouts/default/article.html +67 -0
  73. data/_includes/meta/language-attributes.html +25 -0
  74. data/_includes/meta/math-config.html +21 -0
  75. data/_includes/meta/schema.html +153 -0
  76. data/_includes/meta/scripts-loader.html +52 -0
  77. data/_includes/post/related-posts.html +63 -0
  78. data/_includes/scripts.html +72 -0
  79. data/_includes/skip-link.html +1 -0
  80. data/_includes/toc.html +2 -0
  81. data/_layouts/archive.html +282 -0
  82. data/_layouts/dataset.html +52 -0
  83. data/_layouts/default.html +33 -0
  84. data/_layouts/home.html +48 -0
  85. data/_layouts/notebook.html +173 -0
  86. data/_layouts/package.html +238 -0
  87. data/_layouts/page.html +16 -0
  88. data/_layouts/portfolio.html +41 -0
  89. data/_layouts/post-sidebar.html +183 -0
  90. data/_layouts/post.html +338 -0
  91. data/_layouts/project.html +252 -0
  92. data/_layouts/research.html +504 -0
  93. data/_plugins/analytics_dashboard.rb +315 -0
  94. data/_plugins/config_validator.rb +397 -0
  95. data/_plugins/csp_generator.rb +115 -0
  96. data/_plugins/datalog_bibliography.rb +19 -0
  97. data/_plugins/datalog_comments.rb +18 -0
  98. data/_plugins/datalog_slides.rb +20 -0
  99. data/_plugins/front_matter_compat.rb +109 -0
  100. data/_plugins/i18n.rb +160 -0
  101. data/_plugins/image_optimizer.rb +445 -0
  102. data/_plugins/math_preprocessor.rb +185 -0
  103. data/_plugins/notebook_converter.rb +1107 -0
  104. data/_plugins/plugin_loader.rb +185 -0
  105. data/_plugins/publications_generator.rb +234 -0
  106. data/_plugins/reading_time.rb +15 -0
  107. data/_plugins/search_normalizer.rb +74 -0
  108. data/_plugins/sri_filter.rb +18 -0
  109. data/_plugins/toc_filter.rb +68 -0
  110. data/_plugins/warning_filter.rb +3 -0
  111. data/_sass/_base.scss +142 -0
  112. data/_sass/_components.scss +2380 -0
  113. data/_sass/_header.scss +470 -0
  114. data/_sass/_interactive.scss +344 -0
  115. data/_sass/_layout.scss +1760 -0
  116. data/_sass/_mathematical.scss +368 -0
  117. data/_sass/_mixins.scss +99 -0
  118. data/_sass/_package-docs.scss +715 -0
  119. data/_sass/_phase1-enhancements.scss +721 -0
  120. data/_sass/_phase3-enhancements.scss +874 -0
  121. data/_sass/_phase4-enhancements.scss +1214 -0
  122. data/_sass/_phase5-enhancements.scss +414 -0
  123. data/_sass/_search.scss +654 -0
  124. data/_sass/_syntax-highlighting.scss +128 -0
  125. data/_sass/_theme.scss +79 -0
  126. data/_sass/_typography.scss +148 -0
  127. data/_sass/_utilities.scss +334 -0
  128. data/_sass/_variables.scss +153 -0
  129. data/_sass/_visualizations.scss +242 -0
  130. data/assets/css/main.scss +4 -0
  131. data/assets/img/20220607123041_detail.001.png +0 -0
  132. data/assets/img/favicons/android-chrome-192x192.png +0 -0
  133. data/assets/img/favicons/android-chrome-512x512.png +0 -0
  134. data/assets/img/favicons/apple-touch-icon.png +0 -0
  135. data/assets/img/favicons/favicon-16x16.png +0 -0
  136. data/assets/img/favicons/favicon-32x32.png +0 -0
  137. data/assets/img/favicons/favicon.ico +0 -0
  138. data/assets/img/favicons/site.webmanifest +21 -0
  139. data/assets/img/portfolio-placeholder.svg +20 -0
  140. data/assets/js/academic.js +262 -0
  141. data/assets/js/analytics-dashboard.js +382 -0
  142. data/assets/js/core/dark-mode.js +79 -0
  143. data/assets/js/core/github-cards.js +123 -0
  144. data/assets/js/core/language-filter.js +69 -0
  145. data/assets/js/core/navigation.js +184 -0
  146. data/assets/js/core/scroll-progress.js +45 -0
  147. data/assets/js/core/search-hotkeys.js +62 -0
  148. data/assets/js/core/skip-links.js +62 -0
  149. data/assets/js/loader.js +163 -0
  150. data/assets/js/main.js +23 -0
  151. data/assets/js/math.js +818 -0
  152. data/assets/js/notebook.js +158 -0
  153. data/assets/js/search/analytics.js +91 -0
  154. data/assets/js/search/app.js +271 -0
  155. data/assets/js/search/autocomplete.js +120 -0
  156. data/assets/js/search/engine.js +260 -0
  157. data/assets/js/search/filters.js +38 -0
  158. data/assets/js/search/render.js +217 -0
  159. data/assets/js/search/utils.js +99 -0
  160. data/assets/js/search.js +354 -0
  161. data/assets/js/visualizations.js +816 -0
  162. data/assets/publications/datalog-publications.bib +8 -0
  163. data/assets/publications/datalog-publications.ris +9 -0
  164. data/assets/publications/publications.bib +30 -0
  165. data/assets/templates/diogo-ribeiro-cv.md +31 -0
  166. data/assets/templates/diogo-ribeiro-cv.tex +32 -0
  167. data/bin/datalog +26 -0
  168. data/datalog-theme.gemspec +72 -0
  169. data/lib/datalog/cli.rb +563 -0
  170. data/lib/datalog/plugin_system/dependency_resolver.rb +223 -0
  171. data/lib/datalog/plugin_system.rb +237 -0
  172. data/lib/datalog/plugins/citations.rb +182 -0
  173. data/lib/datalog/plugins/comments.rb +183 -0
  174. data/lib/datalog/plugins/search.rb +45 -0
  175. data/lib/datalog/plugins/slides.rb +121 -0
  176. data/lib/datalog/theme/theme.rb +18 -0
  177. data/lib/datalog/theme/version.rb +7 -0
  178. data/lib/datalog/warning_filter.rb +28 -0
  179. data/lib/datalog-theme.rb +17 -0
  180. metadata +555 -0
@@ -0,0 +1,504 @@
1
+ ---
2
+ layout: default
3
+ schema_type: ScholarlyArticle
4
+ ---
5
+ {% assign date_format = site.date_format | default: '%B %-d, %Y' %}
6
+ {% assign authors_source = page.authors | default: page.author | default: site.author %}
7
+ {% assign authors = authors_source | arrayify %}
8
+ {% assign publication_name = page.publication | default: page.journal | default: page.conference %}
9
+ {% assign publication_status = page.publication_status | default: page.status %}
10
+ {% assign doi = page.doi %}
11
+ {% assign keywords = page.keywords | default: page.tags %}
12
+ {% assign keywords_list = keywords | arrayify %}
13
+ {% assign subject_classification = page.subject_classification | default: page.subjects %}
14
+ {% assign subject_list = subject_classification | arrayify %}
15
+ {% assign citation_key = page.citation_key | default: page.title | slugify %}
16
+ {% assign repository_links = page.code_repositories | default: page.repositories %}
17
+ {% assign repository_array = repository_links | arrayify %}
18
+ {% assign dataset_links = page.datasets | default: page.dataset_links %}
19
+ {% assign dataset_array = dataset_links | arrayify %}
20
+ {% assign methodology_content = page.methodology %}
21
+ {% assign results_content = page.results %}
22
+ {% assign data_availability = page.data_availability %}
23
+ {% assign reproducibility = page.reproducibility | default: page.reproducibility_notes %}
24
+ {% assign peer_review = page.peer_review | default: page.peer_review_notes %}
25
+ {% assign version_history = page.version_history %}
26
+ {% assign appendices = page.appendices %}
27
+ {% assign supplementary = page.supplementary | default: page.supplementary_materials %}
28
+ {% assign references = page.references %}
29
+ {% assign references_array = references | arrayify %}
30
+ {% assign funding = page.funding %}
31
+ {% assign rights = page.rights | default: page.license %}
32
+ {% assign affiliation_default = site.author.affiliation %}
33
+ {% assign show_publications = page.show_publications | default: false %}
34
+
35
+ <div class="research-wrapper" itemscope itemtype="https://schema.org/ScholarlyArticle">
36
+ <meta itemprop="headline" content="{{ page.title }}" />
37
+ {% if page.date %}
38
+ <meta itemprop="datePublished" content="{{ page.date | date_to_xmlschema }}" />
39
+ {% endif %}
40
+ {% if page.last_modified_at or page.updated %}
41
+ <meta itemprop="dateModified" content="{{ page.last_modified_at | default: page.updated | date_to_xmlschema }}" />
42
+ {% endif %}
43
+ {% if doi %}
44
+ <meta itemprop="identifier" content="doi:{{ doi }}" />
45
+ {% endif %}
46
+ {% if publication_name %}
47
+ <meta itemprop="isPartOf" content="{{ publication_name }}" />
48
+ {% endif %}
49
+ {% if keywords_list and keywords_list.size > 0 %}
50
+ <meta itemprop="keywords" content="{{ keywords_list | join: ', ' }}" />
51
+ {% endif %}
52
+
53
+ <header class="research-header" aria-labelledby="research-title">
54
+ <h1 id="research-title" class="research-title">{{ page.title }}</h1>
55
+
56
+ <div class="research-authors" aria-label="Authors">
57
+ <h2 class="visually-hidden">Authors</h2>
58
+ <ul class="research-author-list">
59
+ {% for author in authors %}
60
+ {% assign author_name = author.name | default: author %}
61
+ {% assign author_affiliation = author.affiliation | default: author.institution | default: affiliation_default %}
62
+ {% assign author_orcid = author.orcid | default: site.author.orcid %}
63
+ {% assign author_email = author.email | default: author.contact %}
64
+ <li class="research-author" itemprop="author" itemscope itemtype="https://schema.org/Person">
65
+ <span class="research-author-name" itemprop="name">{{ author_name }}</span>
66
+ {% if author_affiliation %}
67
+ <span class="research-author-affiliation" itemprop="affiliation">{{ author_affiliation }}</span>
68
+ {% endif %}
69
+ {% if author_orcid %}
70
+ <span class="research-author-orcid">
71
+ <a href="{{ author_orcid }}" target="_blank" rel="noopener noreferrer" itemprop="identifier" aria-label="ORCID profile for {{ author_name }}">
72
+ ORCID
73
+ </a>
74
+ </span>
75
+ {% endif %}
76
+ {% if author_email %}
77
+ <span class="research-author-contact">
78
+ <a href="mailto:{{ author_email }}" aria-label="Email {{ author_name }}">{{ author_email }}</a>
79
+ </span>
80
+ {% endif %}
81
+ </li>
82
+ {% endfor %}
83
+ </ul>
84
+ </div>
85
+
86
+ <dl class="research-metadata">
87
+ {% if page.date %}
88
+ <div>
89
+ <dt>Publication date</dt>
90
+ <dd>{{ page.date | localize_date: date_format }}</dd>
91
+ </div>
92
+ {% endif %}
93
+ {% if publication_name %}
94
+ <div>
95
+ <dt>Journal / Conference</dt>
96
+ <dd>{{ publication_name }}</dd>
97
+ </div>
98
+ {% endif %}
99
+ {% if publication_status %}
100
+ <div>
101
+ <dt>Status</dt>
102
+ <dd>{{ publication_status }}</dd>
103
+ </div>
104
+ {% endif %}
105
+ {% if doi %}
106
+ <div>
107
+ <dt>DOI</dt>
108
+ <dd><a href="https://doi.org/{{ doi }}" rel="noopener noreferrer">{{ doi }}</a></dd>
109
+ </div>
110
+ {% endif %}
111
+ {% if page.issn or page.isbn %}
112
+ <div>
113
+ <dt>{% if page.issn %}ISSN{% else %}ISBN{% endif %}</dt>
114
+ <dd>{{ page.issn | default: page.isbn }}</dd>
115
+ </div>
116
+ {% endif %}
117
+ {% if funding %}
118
+ <div>
119
+ <dt>Funding</dt>
120
+ <dd>{{ funding }}</dd>
121
+ </div>
122
+ {% endif %}
123
+ {% if rights %}
124
+ <div>
125
+ <dt>Rights</dt>
126
+ <dd>{{ rights }}</dd>
127
+ </div>
128
+ {% endif %}
129
+ </dl>
130
+
131
+ {% assign has_keywords = false %}{% if keywords_list and keywords_list.size > 0 %}{% assign has_keywords = true %}{% endif %}
132
+ {% assign has_subjects = false %}{% if subject_list and subject_list.size > 0 %}{% assign has_subjects = true %}{% endif %}
133
+ {% if has_keywords or has_subjects %}
134
+ <section class="research-topics" aria-label="Keywords and classification">
135
+ {% if keywords_list and keywords_list.size > 0 %}
136
+ <div class="research-keywords">
137
+ <h3>Keywords</h3>
138
+ <ul>
139
+ {% for keyword in keywords_list %}
140
+ <li itemprop="keywords">{{ keyword }}</li>
141
+ {% endfor %}
142
+ </ul>
143
+ </div>
144
+ {% endif %}
145
+ {% if subject_list and subject_list.size > 0 %}
146
+ <div class="research-classification">
147
+ <h3>Subject classification</h3>
148
+ <ul>
149
+ {% for subject in subject_list %}
150
+ <li>{{ subject }}</li>
151
+ {% endfor %}
152
+ </ul>
153
+ </div>
154
+ {% endif %}
155
+ </section>
156
+ {% endif %}
157
+ </header>
158
+
159
+ {% assign academic_profiles = site.data.academic.profiles %}
160
+ {% if academic_profiles %}
161
+ <nav class="research-profiles" aria-label="Academic profiles">
162
+ <ul>
163
+ {% if academic_profiles.google_scholar %}
164
+ <li><a href="{{ academic_profiles.google_scholar.url }}" target="_blank" rel="noopener">Google Scholar</a></li>
165
+ {% endif %}
166
+ {% if academic_profiles.orcid %}
167
+ <li><a href="{{ academic_profiles.orcid.url }}" target="_blank" rel="noopener">ORCID</a></li>
168
+ {% endif %}
169
+ {% if academic_profiles.researchgate %}
170
+ <li><a href="{{ academic_profiles.researchgate.url }}" target="_blank" rel="noopener">ResearchGate</a></li>
171
+ {% endif %}
172
+ {% if academic_profiles.academia %}
173
+ <li><a href="{{ academic_profiles.academia.url }}" target="_blank" rel="noopener">Academia.edu</a></li>
174
+ {% endif %}
175
+ </ul>
176
+ </nav>
177
+ {% endif %}
178
+
179
+ {% assign publication_metrics = site.data.publications.metrics %}
180
+ {% if publication_metrics %}
181
+ <aside class="research-metrics" aria-labelledby="research-metrics-heading">
182
+ <h2 id="research-metrics-heading">Citation impact</h2>
183
+ <ul class="research-metrics__list">
184
+ <li><span class="research-metric-label">Total citations</span> <span class="research-metric-value" data-citation-metric="total">{{ publication_metrics.total }}</span></li>
185
+ <li><span class="research-metric-label">h-index</span> <span class="research-metric-value" data-citation-metric="h_index">{{ publication_metrics.h_index }}</span></li>
186
+ <li><span class="research-metric-label">i10-index</span> <span class="research-metric-value" data-citation-metric="i10_index">{{ publication_metrics.i10_index }}</span></li>
187
+ </ul>
188
+ </aside>
189
+ {% endif %}
190
+
191
+ {% if page.abstract %}
192
+ <section class="research-abstract" aria-labelledby="abstract-heading">
193
+ <h2 id="abstract-heading">Abstract</h2>
194
+ <div class="abstract-content" itemprop="abstract">
195
+ {{ page.abstract | markdownify }}
196
+ </div>
197
+ </section>
198
+ {% endif %}
199
+
200
+ <section class="research-citation" aria-labelledby="citation-exports-heading">
201
+ <h2 id="citation-exports-heading">Citation exports</h2>
202
+ {% capture bibtex_authors %}
203
+ {% for author in authors %}
204
+ {% assign author_name = author.name | default: author %}
205
+ {{ author_name | strip }}{% unless forloop.last %} and {% endunless %}
206
+ {% endfor %}
207
+ {% endcapture %}
208
+ {% capture bibtex_entry %}
209
+ @article{ {{ citation_key }},
210
+ title = { {{ page.title | strip }} },
211
+ author = { {{ bibtex_authors | strip }} },
212
+ {% if publication_name %}journal = { {{ publication_name | strip }} },{% endif %}
213
+ {% if page.date %}year = { {{ page.date | date: '%Y' }} },{% endif %}
214
+ {% if doi %}doi = { {{ doi }} },{% endif %}
215
+ {% if page.publisher %}publisher = { {{ page.publisher }} },{% endif %}
216
+ {% if page.volume %}volume = { {{ page.volume }} },{% endif %}
217
+ {% if page.number %}number = { {{ page.number }} },{% endif %}
218
+ {% if page.pages %}pages = { {{ page.pages }} },{% endif %}
219
+ }
220
+ {% endcapture %}
221
+ {% capture ris_entry %}
222
+ TY - JOUR
223
+ TI - {{ page.title | strip }}
224
+ {% if publication_name %}JO - {{ publication_name | strip }}
225
+ {% endif %}
226
+ {% if page.date %}PY - {{ page.date | date: '%Y/%m/%d' }}
227
+ {% endif %}
228
+ {% for author in authors %}{% assign author_name = author.name | default: author %}AU - {{ author_name | strip }}
229
+ {% endfor %}
230
+ {% if doi %}DO - {{ doi }}
231
+ {% endif %}
232
+ ER -
233
+ {% endcapture %}
234
+ {% capture endnote_entry %}
235
+ %0 Journal Article
236
+ %T {{ page.title | strip }}
237
+ {% for author in authors %}{% assign author_name = author.name | default: author %}%A {{ author_name | strip }}
238
+ {% endfor %}
239
+ {% if publication_name %}%J {{ publication_name | strip }}
240
+ {% endif %}
241
+ {% if page.date %}%D {{ page.date | date: '%Y' }}
242
+ {% endif %}
243
+ {% if doi %}%R {{ doi }}
244
+ {% endif %}
245
+ {% endcapture %}
246
+ <div class="citation-export-grid">
247
+ <article>
248
+ <h3>BibTeX</h3>
249
+ <textarea readonly aria-label="BibTeX citation">{{ bibtex_entry | strip }}</textarea>
250
+ </article>
251
+ <article>
252
+ <h3>RIS</h3>
253
+ <textarea readonly aria-label="RIS citation">{{ ris_entry | strip }}</textarea>
254
+ </article>
255
+ <article>
256
+ <h3>EndNote</h3>
257
+ <textarea readonly aria-label="EndNote citation">{{ endnote_entry | strip }}</textarea>
258
+ </article>
259
+ </div>
260
+ </section>
261
+
262
+ <section class="research-body" itemprop="articleBody">
263
+ {% if methodology_content %}
264
+ <section class="research-methodology" aria-labelledby="methodology-heading">
265
+ <h2 id="methodology-heading">Methodology</h2>
266
+ {{ methodology_content | markdownify }}
267
+ </section>
268
+ {% endif %}
269
+
270
+ {% if results_content %}
271
+ <section class="research-results" aria-labelledby="results-heading">
272
+ <h2 id="results-heading">Results</h2>
273
+ {{ results_content | markdownify }}
274
+ </section>
275
+ {% endif %}
276
+
277
+ {{ content }}
278
+ </section>
279
+
280
+ {% assign has_datasets = false %}{% if dataset_array and dataset_array.size > 0 %}{% assign has_datasets = true %}{% endif %}
281
+ {% if data_availability or has_datasets %}
282
+ <section class="research-data" aria-labelledby="data-availability-heading">
283
+ <h2 id="data-availability-heading">Data availability</h2>
284
+ {% if data_availability %}
285
+ <div class="data-availability-note">
286
+ {{ data_availability | markdownify }}
287
+ </div>
288
+ {% endif %}
289
+ {% if dataset_array and dataset_array.size > 0 %}
290
+ <ul class="research-datasets">
291
+ {% for dataset in dataset_array %}
292
+ {% assign dataset_label = dataset.title | default: dataset.name | default: dataset %}
293
+ {% assign dataset_url = dataset.url | default: dataset %}
294
+ <li>
295
+ <a href="{{ dataset_url }}" rel="noopener noreferrer" target="_blank">{{ dataset_label }}</a>
296
+ </li>
297
+ {% endfor %}
298
+ </ul>
299
+ {% endif %}
300
+ </section>
301
+ {% endif %}
302
+
303
+ {% assign has_repos = false %}{% if repository_array and repository_array.size > 0 %}{% assign has_repos = true %}{% endif %}
304
+ {% if has_repos or reproducibility %}
305
+ <section class="research-reproducibility" aria-labelledby="reproducibility-heading">
306
+ <h2 id="reproducibility-heading">Code and reproducibility</h2>
307
+ {% if repository_array and repository_array.size > 0 %}
308
+ <ul class="research-repositories">
309
+ {% for repo in repository_array %}
310
+ {% assign repo_label = repo.title | default: repo.name | default: repo %}
311
+ {% assign repo_url = repo.url | default: repo %}
312
+ <li><a href="{{ repo_url }}" rel="noopener noreferrer" target="_blank">{{ repo_label }}</a></li>
313
+ {% endfor %}
314
+ </ul>
315
+ {% endif %}
316
+ {% if reproducibility %}
317
+ <div class="reproducibility-notes">
318
+ {{ reproducibility | markdownify }}
319
+ </div>
320
+ {% endif %}
321
+ </section>
322
+ {% endif %}
323
+
324
+ {% if supplementary or appendices %}
325
+ <section class="research-appendices" aria-labelledby="appendix-heading">
326
+ <h2 id="appendix-heading">Appendix and supplementary materials</h2>
327
+ {% if supplementary %}
328
+ <div class="supplementary-materials">
329
+ {{ supplementary | markdownify }}
330
+ </div>
331
+ {% endif %}
332
+ {% if appendices %}
333
+ <ol class="appendix-list">
334
+ {% for appendix in appendices %}
335
+ <li>
336
+ <article class="appendix-item">
337
+ {% if appendix.title %}
338
+ <h3>{{ appendix.title }}</h3>
339
+ {% endif %}
340
+ {% if appendix.content %}
341
+ {{ appendix.content | markdownify }}
342
+ {% else %}
343
+ {{ appendix | markdownify }}
344
+ {% endif %}
345
+ </article>
346
+ </li>
347
+ {% endfor %}
348
+ </ol>
349
+ {% endif %}
350
+ </section>
351
+ {% endif %}
352
+
353
+ {% if references_array and references_array.size > 0 %}
354
+ <section class="research-references" aria-labelledby="references-heading">
355
+ <h2 id="references-heading">References</h2>
356
+ {% assign references_markup = references_array | join: '' %}
357
+ {% if references_markup contains '<li>' %}
358
+ {{ references_markup }}
359
+ {% else %}
360
+ <ol class="reference-list">
361
+ {% for reference in references_array %}
362
+ <li>{{ reference | markdownify }}</li>
363
+ {% endfor %}
364
+ </ol>
365
+ {% endif %}
366
+ </section>
367
+ {% endif %}
368
+
369
+ {% assign publication_data = site.data.publications %}
370
+ {% assign publication_entries = publication_data.entries %}
371
+ {% assign publication_groups = publication_data.grouped %}
372
+ {% if show_publications and publication_entries and publication_entries.size > 0 %}
373
+ <section class="research-publications" aria-labelledby="publication-list-heading">
374
+ <h2 id="publication-list-heading">Related publications</h2>
375
+ {% if publication_groups %}
376
+ {% for group in publication_groups %}
377
+ {% assign group_label = group[0] %}
378
+ {% assign group_items = group[1] %}
379
+ <h3 class="research-publications__group">{{ group_label }}</h3>
380
+ <ul class="publication-list">
381
+ {% for publication in group_items %}
382
+ <li class="publication-list__item">
383
+ <article>
384
+ <h4 class="publication-title">{{ publication.title }}</h4>
385
+ {% assign publication_authors = publication.authors | arrayify %}
386
+ {% if publication_authors and publication_authors.size > 0 %}
387
+ <p class="publication-authors">{{ publication_authors | join: ', ' }}</p>
388
+ {% endif %}
389
+ <p class="publication-venue">
390
+ {% if publication.venue %}{{ publication.venue }}{% endif %}
391
+ {% if publication.year %} <span class="publication-year">({{ publication.year }})</span>{% endif %}
392
+ </p>
393
+ <p class="publication-links">
394
+ {% if publication.doi %}<a href="https://doi.org/{{ publication.doi }}" target="_blank" rel="noopener">DOI</a>{% endif %}
395
+ {% if publication.url %}<a href="{{ publication.url }}" target="_blank" rel="noopener">Access</a>{% endif %}
396
+ </p>
397
+ </article>
398
+ </li>
399
+ {% endfor %}
400
+ </ul>
401
+ {% endfor %}
402
+ {% else %}
403
+ <ul class="publication-list">
404
+ {% for publication in publication_entries %}
405
+ <li class="publication-list__item">
406
+ <article>
407
+ <h4 class="publication-title">{{ publication.title }}</h4>
408
+ {% assign publication_authors = publication.authors | arrayify %}
409
+ {% if publication_authors and publication_authors.size > 0 %}
410
+ <p class="publication-authors">{{ publication_authors | join: ', ' }}</p>
411
+ {% endif %}
412
+ <p class="publication-venue">
413
+ {% if publication.venue %}{{ publication.venue }}{% endif %}
414
+ {% if publication.year %} <span class="publication-year">({{ publication.year }})</span>{% endif %}
415
+ </p>
416
+ <p class="publication-links">
417
+ {% if publication.doi %}<a href="https://doi.org/{{ publication.doi }}" target="_blank" rel="noopener">DOI</a>{% endif %}
418
+ {% if publication.url %}<a href="{{ publication.url }}" target="_blank" rel="noopener">Access</a>{% endif %}
419
+ </p>
420
+ </article>
421
+ </li>
422
+ {% endfor %}
423
+ </ul>
424
+ {% endif %}
425
+ </section>
426
+ {% elsif show_publications and publication_data.settings.fallback_message %}
427
+ <section class="research-publications" aria-labelledby="publication-list-heading">
428
+ <h2 id="publication-list-heading">Related publications</h2>
429
+ <p>{{ publication_data.settings.fallback_message }}</p>
430
+ </section>
431
+ {% endif %}
432
+
433
+ {% if peer_review or version_history %}
434
+ <section class="research-history" aria-labelledby="history-heading">
435
+ <h2 id="history-heading">Peer review & version history</h2>
436
+ {% if peer_review %}
437
+ <div class="peer-review-notes">
438
+ {{ peer_review | markdownify }}
439
+ </div>
440
+ {% endif %}
441
+ {% if version_history %}
442
+ <ol class="version-history-list">
443
+ {% for version in version_history %}
444
+ <li>
445
+ <article class="version-entry">
446
+ <header>
447
+ <strong>{{ version.version | default: version.title | default: version }}</strong>
448
+ {% if version.date %}<span class="version-date">{{ version.date | localize_date: date_format }}</span>{% endif %}
449
+ </header>
450
+ {% if version.notes %}
451
+ <div class="version-notes">{{ version.notes | markdownify }}</div>
452
+ {% elsif version.description %}
453
+ <div class="version-notes">{{ version.description | markdownify }}</div>
454
+ {% endif %}
455
+ </article>
456
+ </li>
457
+ {% endfor %}
458
+ </ol>
459
+ {% endif %}
460
+ </section>
461
+ {% endif %}
462
+
463
+ {% include components/open-science-badges.html %}
464
+ </div>
465
+
466
+ <script nonce="{{ page.csp_nonce }}">
467
+ document.addEventListener('DOMContentLoaded', function () {
468
+ const figureSelector = '.research-body figure';
469
+ const tableSelector = '.research-body table';
470
+ let figureCount = 0;
471
+ document.querySelectorAll(figureSelector).forEach(function (figure) {
472
+ const caption = figure.querySelector('figcaption');
473
+ if (!caption) return;
474
+ figureCount += 1;
475
+ const numberSpan = document.createElement('span');
476
+ numberSpan.className = 'figure-label';
477
+ numberSpan.textContent = `Figure ${figureCount}. `;
478
+ if (!caption.dataset.numbered) {
479
+ caption.dataset.numbered = 'true';
480
+ caption.prepend(numberSpan);
481
+ }
482
+ if (!figure.id) {
483
+ figure.id = `figure-${figureCount}`;
484
+ }
485
+ });
486
+
487
+ let tableCount = 0;
488
+ document.querySelectorAll(tableSelector).forEach(function (table) {
489
+ const caption = table.querySelector('caption');
490
+ if (!caption) return;
491
+ tableCount += 1;
492
+ const label = document.createElement('span');
493
+ label.className = 'table-label';
494
+ label.textContent = `Table ${tableCount}. `;
495
+ if (!caption.dataset.numbered) {
496
+ caption.dataset.numbered = 'true';
497
+ caption.prepend(label);
498
+ }
499
+ if (!table.id) {
500
+ table.id = `table-${tableCount}`;
501
+ }
502
+ });
503
+ });
504
+ </script>