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,282 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%- comment -%}
6
+ Archive Layout
7
+ Displays posts organized by year and month with filtering options
8
+ {%- endcomment -%}
9
+
10
+ <div class="archive-layout">
11
+ <header class="archive-layout__header">
12
+ <h1 class="archive-layout__title">{{ page.title | default: "Archive" }}</h1>
13
+ {% if page.description %}
14
+ <p class="archive-layout__description">{{ page.description }}</p>
15
+ {% endif %}
16
+ </header>
17
+
18
+ {%- comment -%} Filter options {%- endcomment -%}
19
+ <div class="archive-layout__filters" data-archive-filters>
20
+ <div class="archive-filter">
21
+ <label for="filter-year" class="archive-filter__label">Year:</label>
22
+ <select id="filter-year" class="archive-filter__select" data-filter="year">
23
+ <option value="all">All Years</option>
24
+ {%- assign years = "" | split: "" -%}
25
+ {%- for post in site.posts -%}
26
+ {%- assign year = post.date | date: "%Y" -%}
27
+ {%- unless years contains year -%}
28
+ {%- assign years = years | push: year -%}
29
+ {%- endunless -%}
30
+ {%- endfor -%}
31
+ {%- assign sorted_years = years | sort | reverse -%}
32
+ {%- for year in sorted_years -%}
33
+ <option value="{{ year }}">{{ year }}</option>
34
+ {%- endfor -%}
35
+ </select>
36
+ </div>
37
+
38
+ <div class="archive-filter">
39
+ <label for="filter-category" class="archive-filter__label">Category:</label>
40
+ <select id="filter-category" class="archive-filter__select" data-filter="category">
41
+ <option value="all">All Categories</option>
42
+ {%- assign all_categories = "" | split: "" -%}
43
+ {%- for post in site.posts -%}
44
+ {%- if post.categories -%}
45
+ {%- assign all_categories = all_categories | concat: post.categories -%}
46
+ {%- endif -%}
47
+ {%- endfor -%}
48
+ {%- assign unique_categories = all_categories | uniq | sort -%}
49
+ {%- for category in unique_categories -%}
50
+ <option value="{{ category | slugify }}">{{ category }}</option>
51
+ {%- endfor -%}
52
+ </select>
53
+ </div>
54
+
55
+ <div class="archive-filter">
56
+ <label for="filter-tag" class="archive-filter__label">Tag:</label>
57
+ <select id="filter-tag" class="archive-filter__select" data-filter="tag">
58
+ <option value="all">All Tags</option>
59
+ {%- assign all_tags = "" | split: "" -%}
60
+ {%- for post in site.posts -%}
61
+ {%- if post.tags -%}
62
+ {%- assign all_tags = all_tags | concat: post.tags -%}
63
+ {%- endif -%}
64
+ {%- endfor -%}
65
+ {%- assign unique_tags = all_tags | uniq | sort -%}
66
+ {%- for tag in unique_tags limit: 50 -%}
67
+ <option value="{{ tag | slugify }}">{{ tag }}</option>
68
+ {%- endfor -%}
69
+ </select>
70
+ </div>
71
+
72
+ <button type="button" class="archive-filter__reset" data-reset-filters>
73
+ Reset Filters
74
+ </button>
75
+ </div>
76
+
77
+ {%- comment -%} Statistics {%- endcomment -%}
78
+ <div class="archive-layout__stats">
79
+ <div class="archive-stat">
80
+ <span class="archive-stat__number" data-total-posts>{{ site.posts.size }}</span>
81
+ <span class="archive-stat__label">Total Posts</span>
82
+ </div>
83
+ <div class="archive-stat">
84
+ <span class="archive-stat__number" data-visible-posts>{{ site.posts.size }}</span>
85
+ <span class="archive-stat__label">Showing</span>
86
+ </div>
87
+ <div class="archive-stat">
88
+ <span class="archive-stat__number">{{ sorted_years.size }}</span>
89
+ <span class="archive-stat__label">Years</span>
90
+ </div>
91
+ <div class="archive-stat">
92
+ <span class="archive-stat__number">{{ unique_categories.size }}</span>
93
+ <span class="archive-stat__label">Categories</span>
94
+ </div>
95
+ </div>
96
+
97
+ {%- comment -%} Posts organized by year and month {%- endcomment -%}
98
+ <div class="archive-layout__content">
99
+ {%- for year in sorted_years -%}
100
+ {%- assign year_posts = "" | split: "" -%}
101
+ {%- for post in site.posts -%}
102
+ {%- assign post_year = post.date | date: '%Y' -%}
103
+ {%- if post_year == year -%}{%- assign year_posts = year_posts | push: post -%}{%- endif -%}
104
+ {%- endfor -%}
105
+
106
+ <section class="archive-year" data-year="{{ year }}">
107
+ <h2 class="archive-year__heading">
108
+ <span class="archive-year__number">{{ year }}</span>
109
+ <span class="archive-year__count">({{ year_posts.size }} posts)</span>
110
+ </h2>
111
+
112
+ {%- comment -%} Group by month {%- endcomment -%}
113
+ {%- assign months = "01,02,03,04,05,06,07,08,09,10,11,12" | split: "," -%}
114
+ {%- for month_num in months -%}
115
+ {%- assign month_posts = "" | split: "" -%}
116
+ {%- for post in year_posts -%}
117
+ {%- assign post_month = post.date | date: '%m' -%}
118
+ {%- if post_month == month_num -%}{%- assign month_posts = month_posts | push: post -%}{%- endif -%}
119
+ {%- endfor -%}
120
+ {%- if month_posts.size > 0 -%}
121
+ {%- assign month_name = month_num | prepend: year | append: "-01" | date: "%B" -%}
122
+
123
+ <div class="archive-month">
124
+ <h3 class="archive-month__heading">{{ month_name }}</h3>
125
+
126
+ <ul class="archive-posts">
127
+ {%- for post in month_posts -%}
128
+ <li class="archive-post"
129
+ data-post
130
+ data-year="{{ year }}"
131
+ data-month="{{ month_num }}"
132
+ data-categories="{{ post.categories | join: ',' | slugify }}"
133
+ data-tags="{{ post.tags | join: ',' | slugify }}"
134
+ data-difficulty="{% if post.difficulty %}{{ post.difficulty | slugify }}{% endif %}">
135
+
136
+ <article class="archive-post__article">
137
+ <time class="archive-post__date" datetime="{{ post.date | date_to_xmlschema }}">
138
+ {{ post.date | date: "%b %d" }}
139
+ </time>
140
+
141
+ <div class="archive-post__content">
142
+ <h4 class="archive-post__title">
143
+ <a href="{{ post.url | relative_url }}">{{ post.title }}</a>
144
+ </h4>
145
+
146
+ {% if post.excerpt %}
147
+ <p class="archive-post__excerpt">{{ post.excerpt | strip_html | truncate: 150 }}</p>
148
+ {% endif %}
149
+
150
+ <div class="archive-post__meta">
151
+ {% if post.difficulty %}
152
+ {% include components/difficulty-badge.html level=post.difficulty %}
153
+ {% endif %}
154
+
155
+ {% if post.categories %}
156
+ <span class="archive-post__categories">
157
+ {% for category in post.categories limit: 2 %}
158
+ <span class="archive-post__category">{{ category }}</span>
159
+ {% endfor %}
160
+ </span>
161
+ {% endif %}
162
+
163
+ {% if post.tags %}
164
+ <span class="archive-post__tags">
165
+ {% for tag in post.tags limit: 3 %}
166
+ <span class="archive-post__tag">{{ tag }}</span>
167
+ {% endfor %}
168
+ </span>
169
+ {% endif %}
170
+ </div>
171
+ </div>
172
+ </article>
173
+ </li>
174
+ {%- endfor -%}
175
+ </ul>
176
+ </div>
177
+ {%- endif -%}
178
+ {%- endfor -%}
179
+ </section>
180
+ {%- endfor -%}
181
+ </div>
182
+
183
+ {%- comment -%} No results message {%- endcomment -%}
184
+ <div class="archive-layout__empty" data-empty-state style="display: none;">
185
+ <p>No posts found matching the selected filters.</p>
186
+ <button type="button" class="archive-filter__reset" data-reset-filters>
187
+ Reset Filters
188
+ </button>
189
+ </div>
190
+ </div>
191
+
192
+ <script>
193
+ (function() {
194
+ 'use strict';
195
+
196
+ document.addEventListener('DOMContentLoaded', function() {
197
+ const filters = document.querySelector('[data-archive-filters]');
198
+ if (!filters) return;
199
+
200
+ const yearFilter = filters.querySelector('[data-filter="year"]');
201
+ const categoryFilter = filters.querySelector('[data-filter="category"]');
202
+ const tagFilter = filters.querySelector('[data-filter="tag"]');
203
+ const resetButtons = document.querySelectorAll('[data-reset-filters]');
204
+ const posts = document.querySelectorAll('[data-post]');
205
+ const visibleCount = document.querySelector('[data-visible-posts]');
206
+ const emptyState = document.querySelector('[data-empty-state]');
207
+ const yearSections = document.querySelectorAll('.archive-year');
208
+
209
+ function applyFilters() {
210
+ const selectedYear = yearFilter.value;
211
+ const selectedCategory = categoryFilter.value;
212
+ const selectedTag = tagFilter.value;
213
+
214
+ let visible = 0;
215
+ const visibleYears = new Set();
216
+
217
+ posts.forEach(post => {
218
+ let isVisible = true;
219
+
220
+ // Year filter
221
+ if (selectedYear !== 'all' && post.dataset.year !== selectedYear) {
222
+ isVisible = false;
223
+ }
224
+
225
+ // Category filter
226
+ if (selectedCategory !== 'all') {
227
+ const categories = post.dataset.categories.split(',');
228
+ if (!categories.includes(selectedCategory)) {
229
+ isVisible = false;
230
+ }
231
+ }
232
+
233
+ // Tag filter
234
+ if (selectedTag !== 'all') {
235
+ const tags = post.dataset.tags.split(',');
236
+ if (!tags.includes(selectedTag)) {
237
+ isVisible = false;
238
+ }
239
+ }
240
+
241
+ post.style.display = isVisible ? '' : 'none';
242
+ if (isVisible) {
243
+ visible++;
244
+ visibleYears.add(post.dataset.year);
245
+ }
246
+ });
247
+
248
+ // Update count
249
+ if (visibleCount) {
250
+ visibleCount.textContent = visible;
251
+ }
252
+
253
+ // Show/hide year sections
254
+ yearSections.forEach(section => {
255
+ const year = section.dataset.year;
256
+ section.style.display = visibleYears.has(year) ? '' : 'none';
257
+ });
258
+
259
+ // Show/hide empty state
260
+ if (emptyState) {
261
+ emptyState.style.display = visible === 0 ? 'block' : 'none';
262
+ }
263
+ }
264
+
265
+ function resetFilters() {
266
+ yearFilter.value = 'all';
267
+ categoryFilter.value = 'all';
268
+ tagFilter.value = 'all';
269
+ applyFilters();
270
+ }
271
+
272
+ // Event listeners
273
+ yearFilter.addEventListener('change', applyFilters);
274
+ categoryFilter.addEventListener('change', applyFilters);
275
+ tagFilter.addEventListener('change', applyFilters);
276
+
277
+ resetButtons.forEach(button => {
278
+ button.addEventListener('click', resetFilters);
279
+ });
280
+ });
281
+ })();
282
+ </script>
@@ -0,0 +1,52 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% assign localization_config = site.theme_options.localization %}
5
+ {% assign date_format = page.date_format | default: localization_config.date_format | default: 'long' %}
6
+ <article class="dataset">
7
+ <header class="dataset-header">
8
+ <h1>{{ page.title }}</h1>
9
+ {% if page.updated %}<p class="dataset-meta"><strong>{% t 'dataset.last_updated' %}</strong> {{ page.updated | localize_date: date_format }}</p>{% endif %}
10
+ {% if page.license %}<p class="dataset-meta"><strong>{% t 'dataset.license' %}</strong> {{ page.license }}</p>{% endif %}
11
+ </header>
12
+ <div class="dataset-summary">
13
+ {{ page.summary | default: page.excerpt }}
14
+ </div>
15
+ <section class="dataset-details">
16
+ {{ content }}
17
+ </section>
18
+ {% if page.download_url and page.download_button %}
19
+ <p class="dataset-download">
20
+ <a class="btn btn-primary" href="{{ page.download_url }}">{% t 'dataset.download' %}</a>
21
+ </p>
22
+ {% endif %}
23
+ {% if page.schema %}
24
+ <section class="dataset-schema">
25
+ <h2>{% t 'dataset.schema_title' %}</h2>
26
+ <table>
27
+ <thead>
28
+ <tr>
29
+ <th>{% t 'dataset.schema.field' %}</th>
30
+ <th>{% t 'dataset.schema.description' %}</th>
31
+ <th>{% t 'dataset.schema.type' %}</th>
32
+ </tr>
33
+ </thead>
34
+ <tbody>
35
+ {% for field in page.schema %}
36
+ <tr>
37
+ <td>{{ field.name }}</td>
38
+ <td>{{ field.description }}</td>
39
+ <td>{{ field.type }}</td>
40
+ </tr>
41
+ {% endfor %}
42
+ </tbody>
43
+ </table>
44
+ </section>
45
+ {% endif %}
46
+ {% assign citation_key = page.citation_key | default: page.slug | default: page.title | slugify %}
47
+ {% assign citation_authors = page.authors | default: page.author | default: site.author.name %}
48
+ {% assign citation_date = page.date | default: page.updated %}
49
+ {% assign citation_url = page.url | absolute_url %}
50
+ {% include components/citation-tools.html title=page.title authors=citation_authors date=citation_date url=citation_url citation_key=citation_key publisher=site.author.affiliation citation_type='dataset' doi=page.doi %}
51
+ {% include components/open-science-badges.html %}
52
+ </article>
@@ -0,0 +1,33 @@
1
+ {% include meta/math-config.html page=page %}
2
+ {% include meta/language-attributes.html page=page %}
3
+ {% assign empty_hash = "" | split: "" %}
4
+ {% assign localization_config = site.theme_options.localization | default: empty_hash %}
5
+ {% assign date_format = page.date_format | default: localization_config.date_format | default: 'long' %}
6
+ <!DOCTYPE html>
7
+ <html lang="{{ html_lang }}" dir="{{ html_dir }}">
8
+ <head>
9
+ {% include head.html %}
10
+ <meta name="twitter:creator" content="{{ site.author.twitter | default: site.social.twitter }}" />
11
+ {% if page.tags and page.tags.size > 0 %}
12
+ <meta name="keywords" content="{% include helpers/array-to-sentence.html items=page.tags conjunction='and' %}" />
13
+ {% endif %}
14
+ <meta name="format-detection" content="telephone=no" />
15
+ <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin />
16
+ {% include meta/schema.html page=page %}
17
+ {% include meta/scripts-loader.html location='head' %}
18
+ </head>
19
+ {% capture body_classes %}
20
+ site-body{% if page.layout %} layout-{{ page.layout | replace: ' ', '-' }}{% endif %}{% if page.page_class %} page-{{ page.page_class | replace: ' ', '-' | downcase }}{% endif %}{% if page.classes %} {{ page.classes | join: ' ' }}{% endif %}{% if site.features.dark_mode_toggle %} has-dark-toggle{% endif %}{% if html_dir == 'rtl' %} rtl{% endif %}
21
+ {% endcapture %}
22
+ <body class="{{ body_classes | strip }}" data-theme="{{ page.theme | default: 'system' }}">
23
+ {% include skip-link.html %}
24
+ {% include header.html %}
25
+ <main id="main-content" class="site-main container" role="main" tabindex="-1" aria-describedby="{{ math_status_id }}">
26
+ {% include components/math-fallback.html expressions=page.math_expressions %}
27
+ {% include layouts/default/article.html page=page content=content date_format=date_format %}
28
+ </main>
29
+ {% include footer.html %}
30
+ <div class="visually-hidden" aria-live="polite" id="{{ math_status_id }}">{% t 'global.math_loading' %}</div>
31
+ {% include meta/scripts-loader.html location='body' %}
32
+ </body>
33
+ </html>
@@ -0,0 +1,48 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ {% assign localization_config = site.theme_options.localization %}
5
+ {% include components/hero.html %}
6
+ <section class="section section-highlight">
7
+ <div class="container">
8
+ <h2 class="section-title">{% t 'home.latest_research' %}</h2>
9
+ <div class="card-grid">
10
+ {% assign posts_limit = site.posts | slice: 0, 6 %}
11
+ {% for post in posts_limit %}
12
+ <article class="card">
13
+ {% if post.teaser %}
14
+ <a class="card-media" href="{{ post.url | relative_url }}" tabindex="-1" aria-hidden="true"><img src="{{ post.teaser | relative_url }}" alt="" loading="lazy" decoding="async" /></a>
15
+ {% endif %}
16
+ <h3><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h3>
17
+ {% assign home_date_format = localization_config.date_format | default: 'long' %}
18
+ {% assign reading_minutes = post.reading_time | default: post.content | number_of_words | divided_by: 180 | ceil %}
19
+ {% capture reading_label %}
20
+ {% if reading_minutes == 1 %}
21
+ {% t 'home.reading_time_one' %}
22
+ {% else %}
23
+ {% t 'home.reading_time_many' minutes: reading_minutes %}
24
+ {% endif %}
25
+ {% endcapture %}
26
+ <p class="card-meta">{{ post.date | localize_date: home_date_format }} · {{ reading_label | strip }}</p>
27
+ <p>{{ post.excerpt | strip_html | truncate: 140 }}</p>
28
+ <a class="card-link" href="{{ post.url | relative_url }}" aria-label="{% t 'home.read_post' title: post.title %}">{% t 'home.read_more' %}</a>
29
+ </article>
30
+ {% endfor %}
31
+ </div>
32
+ </div>
33
+ </section>
34
+ <section class="section section-portfolio">
35
+ <div class="container">
36
+ <h2 class="section-title">{% t 'home.featured_projects' %}</h2>
37
+ <div class="card-grid">
38
+ {% assign featured = site.portfolio | sort: 'weight' | slice: 0, 3 %}
39
+ {% for item in featured %}
40
+ <article class="card">
41
+ <h3><a href="{{ item.url | relative_url }}">{{ item.title }}</a></h3>
42
+ <p>{{ item.summary | default: item.excerpt | strip_html | truncate: 120 }}</p>
43
+ <a class="card-link" href="{{ item.url | relative_url }}">{% t 'home.view_project' %}</a>
44
+ </article>
45
+ {% endfor %}
46
+ </div>
47
+ </div>
48
+ </section>
@@ -0,0 +1,173 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ {%- comment -%}
6
+ Prepare safe aliases and fallbacks. Never use `| default: {}` in Liquid.
7
+ {%- endcomment -%}
8
+ {% assign localization_config = site.theme_options.localization %}
9
+ {% assign date_format = page.date_format | default: localization_config.date_format | default: 'long' %}
10
+ {% assign nb = page.notebook %}
11
+ {% assign nb_lang = '' %}
12
+ {% if nb and nb.kernelspec and nb.kernelspec.language %}
13
+ {% assign nb_lang = nb.kernelspec.language %}
14
+ {% endif %}
15
+
16
+ <article class="notebook-article"
17
+ data-language="{{ page.language | default: nb_lang }}"
18
+ itemscope itemtype="https://schema.org/TechArticle">
19
+
20
+ <header class="notebook-article__header">
21
+ <p class="notebook-article__label">{% t 'notebook.label' %}</p>
22
+ <h1 class="notebook-article__title" itemprop="headline">{{ page.title }}</h1>
23
+ <p class="notebook-article__summary">{{ page.summary | default: page.excerpt }}</p>
24
+
25
+ <ul class="notebook-article__meta">
26
+ <li>
27
+ <span>{% t 'notebook.meta.published' %}</span>
28
+ <time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | localize_date: date_format }}</time>
29
+ </li>
30
+
31
+ {% if page.last_modified_at %}
32
+ <li>
33
+ <span>{% t 'notebook.meta.updated' %}</span>
34
+ <time datetime="{{ page.last_modified_at | date_to_xmlschema }}" itemprop="dateModified">{{ page.last_modified_at | localize_date: date_format }}</time>
35
+ </li>
36
+ {% endif %}
37
+
38
+ {% if nb and nb.executed_at %}
39
+ <li>
40
+ <span>{% t 'notebook.meta.executed' %}</span>
41
+ <time datetime="{{ nb.executed_at | date_to_xmlschema }}">{{ nb.executed_at | localize_date: 'datetime' }}</time>
42
+ </li>
43
+ {% endif %}
44
+
45
+ {% if nb and nb.kernelspec and nb.kernelspec.display_name %}
46
+ <li><span>{% t 'notebook.meta.kernel' %}</span> {{ nb.kernelspec.display_name }}</li>
47
+ {% endif %}
48
+
49
+ {% if nb_lang %}
50
+ <li><span>{% t 'notebook.meta.language' %}</span> {{ nb_lang | capitalize }}</li>
51
+ {% endif %}
52
+
53
+ {% if page.difficulty %}
54
+ <li><span>{% t 'notebook.meta.difficulty' %}</span> {{ page.difficulty | capitalize }}</li>
55
+ {% endif %}
56
+
57
+ {% if nb and nb.duration %}
58
+ <li><span>{% t 'notebook.meta.runtime' %}</span> {{ nb.duration }}</li>
59
+ {% endif %}
60
+ </ul>
61
+
62
+ <div class="notebook-article__actions">
63
+ {% if nb and nb.download %}
64
+ <a class="btn" href="{{ nb.download | relative_url }}" download>
65
+ <span aria-hidden="true">⬇</span>
66
+ <span>{% t 'notebook.actions.download' %}</span>
67
+ </a>
68
+ {% endif %}
69
+
70
+ {% if nb and nb.integrations and nb.integrations.binder %}
71
+ <a class="btn btn--ghost" href="{{ nb.integrations.binder }}" rel="noopener" target="_blank">{% t 'notebook.actions.launch_binder' %}</a>
72
+ {% endif %}
73
+
74
+ {% if nb and nb.integrations and nb.integrations.colab %}
75
+ <a class="btn btn--ghost" href="{{ nb.integrations.colab }}" rel="noopener" target="_blank">{% t 'notebook.actions.open_colab' %}</a>
76
+ {% endif %}
77
+
78
+ {% if nb and nb.integrations and nb.integrations.source %}
79
+ <a class="btn btn--ghost" href="{{ nb.integrations.source }}" rel="noopener" target="_blank">{% t 'notebook.actions.view_source' %}</a>
80
+ {% endif %}
81
+ </div>
82
+
83
+ {% if page.tags %}
84
+ <ul class="notebook-article__tags" aria-label="{% t 'notebook.tags_label' %}">
85
+ {% for tag in page.tags %}
86
+ <li>{{ tag }}</li>
87
+ {% endfor %}
88
+ </ul>
89
+ {% endif %}
90
+ </header>
91
+
92
+ <div class="notebook-article__layout">
93
+ <div class="notebook-article__content" itemprop="articleBody">
94
+ {{ content }}
95
+ </div>
96
+
97
+ <aside class="notebook-article__sidebar" aria-label="{% t 'notebook.sidebar_label' %}">
98
+ <section class="notebook-sidebar__section">
99
+ <h2>{% t 'notebook.sidebar.overview' %}</h2>
100
+ <ul class="notebook-sidebar__stats">
101
+ {% assign code_cells = nb.code_cells | default: 0 %}
102
+ {% assign markdown_cells = nb.markdown_cells | default: 0 %}
103
+ {% assign error_cells = nb.error_cells | default: 0 %}
104
+ <li><strong>{{ code_cells }}</strong> {% t 'notebook.sidebar.code_cells' %}</li>
105
+ <li><strong>{{ markdown_cells }}</strong> {% t 'notebook.sidebar.markdown_cells' %}</li>
106
+ <li><strong>{{ error_cells }}</strong> {% t 'notebook.sidebar.error_outputs' %}</li>
107
+ </ul>
108
+ </section>
109
+
110
+ <section class="notebook-sidebar__section">
111
+ <h2>{% t 'notebook.sidebar.execution' %}</h2>
112
+ {% capture sidebar_kernel_fallback %}{% t 'notebook.sidebar.not_specified' %}{% endcapture %}
113
+ {% capture sidebar_language_fallback %}{% t 'notebook.sidebar.na' %}{% endcapture %}
114
+ <dl class="notebook-sidebar__metadata">
115
+ <div>
116
+ <dt>{% t 'notebook.sidebar.kernel' %}</dt>
117
+ <dd>{{ nb.kernelspec.display_name | default: sidebar_kernel_fallback | strip }}</dd>
118
+ </div>
119
+ <div>
120
+ <dt>{% t 'notebook.sidebar.language' %}</dt>
121
+ <dd>{{ nb_lang | default: sidebar_language_fallback | strip }}</dd>
122
+ </div>
123
+ <div>
124
+ <dt>{% t 'notebook.sidebar.file' %}</dt>
125
+ <dd><code>{{ nb.source }}</code></dd>
126
+ </div>
127
+
128
+ {% if nb and nb.integrations and nb.integrations.branch %}
129
+ <div>
130
+ <dt>{% t 'notebook.sidebar.branch' %}</dt>
131
+ <dd>{{ nb.integrations.branch }}</dd>
132
+ </div>
133
+ {% endif %}
134
+
135
+ {% if nb and nb.duration %}
136
+ <div>
137
+ <dt>{% t 'notebook.sidebar.runtime' %}</dt>
138
+ <dd>{{ nb.duration }}</dd>
139
+ </div>
140
+ {% endif %}
141
+ </dl>
142
+ </section>
143
+
144
+ {% if nb.integrations %}
145
+ {% if nb.integrations.binder or nb.integrations.colab %}
146
+ <section class="notebook-sidebar__section">
147
+ <h2>{% t 'notebook.sidebar.run_online' %}</h2>
148
+ <ul class="notebook-sidebar__links">
149
+ {% if nb.integrations.binder %}
150
+ <li><a href="{{ nb.integrations.binder }}" target="_blank" rel="noopener">{% t 'notebook.sidebar.launch_binder' %}</a></li>
151
+ {% endif %}
152
+ {% if nb.integrations.colab %}
153
+ <li><a href="{{ nb.integrations.colab }}" target="_blank" rel="noopener">{% t 'notebook.sidebar.open_colab' %}</a></li>
154
+ {% endif %}
155
+ </ul>
156
+ </section>
157
+ {% endif %}
158
+ {% endif %}
159
+
160
+ {% if nb and nb.git and nb.git.last_commit %}
161
+ <section class="notebook-sidebar__section">
162
+ <h2>{% t 'notebook.sidebar.version_history' %}</h2>
163
+ {% assign commit_short = nb.git.last_commit | slice: 0, 7 %}
164
+ {% capture commit_markup %}<code>{{ commit_short }}</code>{% endcapture %}
165
+ <p>{% t 'notebook.sidebar.last_commit' commit: commit_markup %}</p>
166
+ {% if nb.integrations and nb.integrations.source %}
167
+ <a class="notebook-sidebar__link" href="{{ nb.integrations.source }}" target="_blank" rel="noopener">{% t 'notebook.sidebar.view_latest' %}</a>
168
+ {% endif %}
169
+ </section>
170
+ {% endif %}
171
+ </aside>
172
+ </div>
173
+ </article>