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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +162 -0
- data/CITATION.cff +29 -0
- data/LICENSE +21 -0
- data/README.md +257 -0
- data/_data/academic.yml +217 -0
- data/_data/cdn-integrity.yml +51 -0
- data/_data/config/author.yml +121 -0
- data/_data/config/features.yml +262 -0
- data/_data/config/site.yml +42 -0
- data/_data/config/theme.yml +181 -0
- data/_data/datasets.yml +28 -0
- data/_data/i18n/en.yml +438 -0
- data/_data/i18n/es.yml +438 -0
- data/_data/i18n/pt.yml +438 -0
- data/_data/js_manifest.json +22 -0
- data/_data/js_meta.json +371 -0
- data/_data/navigation.yml +145 -0
- data/_data/projects.yml +41 -0
- data/_data/publications.yml +28 -0
- data/_data/social.yml +73 -0
- data/_data/visualizations.yml +51 -0
- data/_includes/analytics/dashboard.html +149 -0
- data/_includes/analytics.html +9 -0
- data/_includes/components/academic-dashboard.html +347 -0
- data/_includes/components/advanced-search.html +682 -0
- data/_includes/components/api-function.html +94 -0
- data/_includes/components/author-bio.html +166 -0
- data/_includes/components/bookmark-system.html +96 -0
- data/_includes/components/breadcrumbs.html +89 -0
- data/_includes/components/citation-tools.html +94 -0
- data/_includes/components/comments.html +244 -0
- data/_includes/components/content-provenance.html +43 -0
- data/_includes/components/content-recommendations.html +228 -0
- data/_includes/components/difficulty-badge.html +84 -0
- data/_includes/components/email-preferences.html +200 -0
- data/_includes/components/enhanced-code-block.html +212 -0
- data/_includes/components/enhanced-metadata.html +228 -0
- data/_includes/components/enhanced-toc.html +209 -0
- data/_includes/components/hero.html +15 -0
- data/_includes/components/language-switcher.html +396 -0
- data/_includes/components/math-fallback.html +19 -0
- data/_includes/components/navigation-enhancements.html +454 -0
- data/_includes/components/newsletter-signup.html +178 -0
- data/_includes/components/open-science-badges.html +16 -0
- data/_includes/components/package-install.html +194 -0
- data/_includes/components/performance-monitor.html +170 -0
- data/_includes/components/popular-posts.html +233 -0
- data/_includes/components/post-hero.html +62 -0
- data/_includes/components/reading-progress.html +133 -0
- data/_includes/components/reading-time.html +121 -0
- data/_includes/components/responsive-image.html +63 -0
- data/_includes/components/search-facets.html +307 -0
- data/_includes/components/series-navigation.html +124 -0
- data/_includes/components/social-proof.html +34 -0
- data/_includes/components/social-share.html +119 -0
- data/_includes/components/user-preferences.html +566 -0
- data/_includes/components/visualization-card.html +24 -0
- data/_includes/components/viz-table-fallback.html +19 -0
- data/_includes/critical-css/default.html +0 -0
- data/_includes/critical-css/home.html +0 -0
- data/_includes/critical-css/post.html +0 -0
- data/_includes/csp-meta.html +17 -0
- data/_includes/footer/nav-column.html +31 -0
- data/_includes/footer.html +76 -0
- data/_includes/head.html +337 -0
- data/_includes/header/navigation.html +48 -0
- data/_includes/header.html +70 -0
- data/_includes/helpers/array-to-sentence.html +21 -0
- data/_includes/helpers/date-format.html +16 -0
- data/_includes/helpers/link-with-icon.html +26 -0
- data/_includes/layouts/default/article.html +67 -0
- data/_includes/meta/language-attributes.html +25 -0
- data/_includes/meta/math-config.html +21 -0
- data/_includes/meta/schema.html +153 -0
- data/_includes/meta/scripts-loader.html +52 -0
- data/_includes/post/related-posts.html +63 -0
- data/_includes/scripts.html +72 -0
- data/_includes/skip-link.html +1 -0
- data/_includes/toc.html +2 -0
- data/_layouts/archive.html +282 -0
- data/_layouts/dataset.html +52 -0
- data/_layouts/default.html +33 -0
- data/_layouts/home.html +48 -0
- data/_layouts/notebook.html +173 -0
- data/_layouts/package.html +238 -0
- data/_layouts/page.html +16 -0
- data/_layouts/portfolio.html +41 -0
- data/_layouts/post-sidebar.html +183 -0
- data/_layouts/post.html +338 -0
- data/_layouts/project.html +252 -0
- data/_layouts/research.html +504 -0
- data/_plugins/analytics_dashboard.rb +315 -0
- data/_plugins/config_validator.rb +397 -0
- data/_plugins/csp_generator.rb +115 -0
- data/_plugins/datalog_bibliography.rb +19 -0
- data/_plugins/datalog_comments.rb +18 -0
- data/_plugins/datalog_slides.rb +20 -0
- data/_plugins/front_matter_compat.rb +109 -0
- data/_plugins/i18n.rb +160 -0
- data/_plugins/image_optimizer.rb +445 -0
- data/_plugins/math_preprocessor.rb +185 -0
- data/_plugins/notebook_converter.rb +1107 -0
- data/_plugins/plugin_loader.rb +185 -0
- data/_plugins/publications_generator.rb +234 -0
- data/_plugins/reading_time.rb +15 -0
- data/_plugins/search_normalizer.rb +74 -0
- data/_plugins/sri_filter.rb +18 -0
- data/_plugins/toc_filter.rb +68 -0
- data/_plugins/warning_filter.rb +3 -0
- data/_sass/_base.scss +142 -0
- data/_sass/_components.scss +2380 -0
- data/_sass/_header.scss +470 -0
- data/_sass/_interactive.scss +344 -0
- data/_sass/_layout.scss +1760 -0
- data/_sass/_mathematical.scss +368 -0
- data/_sass/_mixins.scss +99 -0
- data/_sass/_package-docs.scss +715 -0
- data/_sass/_phase1-enhancements.scss +721 -0
- data/_sass/_phase3-enhancements.scss +874 -0
- data/_sass/_phase4-enhancements.scss +1214 -0
- data/_sass/_phase5-enhancements.scss +414 -0
- data/_sass/_search.scss +654 -0
- data/_sass/_syntax-highlighting.scss +128 -0
- data/_sass/_theme.scss +79 -0
- data/_sass/_typography.scss +148 -0
- data/_sass/_utilities.scss +334 -0
- data/_sass/_variables.scss +153 -0
- data/_sass/_visualizations.scss +242 -0
- data/assets/css/main.scss +4 -0
- data/assets/img/20220607123041_detail.001.png +0 -0
- data/assets/img/favicons/android-chrome-192x192.png +0 -0
- data/assets/img/favicons/android-chrome-512x512.png +0 -0
- data/assets/img/favicons/apple-touch-icon.png +0 -0
- data/assets/img/favicons/favicon-16x16.png +0 -0
- data/assets/img/favicons/favicon-32x32.png +0 -0
- data/assets/img/favicons/favicon.ico +0 -0
- data/assets/img/favicons/site.webmanifest +21 -0
- data/assets/img/portfolio-placeholder.svg +20 -0
- data/assets/js/academic.js +262 -0
- data/assets/js/analytics-dashboard.js +382 -0
- data/assets/js/core/dark-mode.js +79 -0
- data/assets/js/core/github-cards.js +123 -0
- data/assets/js/core/language-filter.js +69 -0
- data/assets/js/core/navigation.js +184 -0
- data/assets/js/core/scroll-progress.js +45 -0
- data/assets/js/core/search-hotkeys.js +62 -0
- data/assets/js/core/skip-links.js +62 -0
- data/assets/js/loader.js +163 -0
- data/assets/js/main.js +23 -0
- data/assets/js/math.js +818 -0
- data/assets/js/notebook.js +158 -0
- data/assets/js/search/analytics.js +91 -0
- data/assets/js/search/app.js +271 -0
- data/assets/js/search/autocomplete.js +120 -0
- data/assets/js/search/engine.js +260 -0
- data/assets/js/search/filters.js +38 -0
- data/assets/js/search/render.js +217 -0
- data/assets/js/search/utils.js +99 -0
- data/assets/js/search.js +354 -0
- data/assets/js/visualizations.js +816 -0
- data/assets/publications/datalog-publications.bib +8 -0
- data/assets/publications/datalog-publications.ris +9 -0
- data/assets/publications/publications.bib +30 -0
- data/assets/templates/diogo-ribeiro-cv.md +31 -0
- data/assets/templates/diogo-ribeiro-cv.tex +32 -0
- data/bin/datalog +26 -0
- data/datalog-theme.gemspec +72 -0
- data/lib/datalog/cli.rb +563 -0
- data/lib/datalog/plugin_system/dependency_resolver.rb +223 -0
- data/lib/datalog/plugin_system.rb +237 -0
- data/lib/datalog/plugins/citations.rb +182 -0
- data/lib/datalog/plugins/comments.rb +183 -0
- data/lib/datalog/plugins/search.rb +45 -0
- data/lib/datalog/plugins/slides.rb +121 -0
- data/lib/datalog/theme/theme.rb +18 -0
- data/lib/datalog/theme/version.rb +7 -0
- data/lib/datalog/warning_filter.rb +28 -0
- data/lib/datalog-theme.rb +17 -0
- metadata +555 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
API Function Documentation Component
|
|
3
|
+
Documents a function/method in ReadTheDocs style
|
|
4
|
+
|
|
5
|
+
Parameters:
|
|
6
|
+
- name: Function name
|
|
7
|
+
- signature: Function signature
|
|
8
|
+
- description: Function description
|
|
9
|
+
- parameters: Array of parameter objects {name, type, description, default}
|
|
10
|
+
- returns: Return value description
|
|
11
|
+
- return_type: Return type
|
|
12
|
+
- examples: Code examples
|
|
13
|
+
- see_also: Related functions
|
|
14
|
+
{%- endcomment -%}
|
|
15
|
+
|
|
16
|
+
<div class="api-function" id="{{ include.name | slugify }}">
|
|
17
|
+
<div class="api-function__header">
|
|
18
|
+
<h3 class="api-function__name">
|
|
19
|
+
<code>{{ include.name }}</code>
|
|
20
|
+
</h3>
|
|
21
|
+
{% if include.signature %}
|
|
22
|
+
<pre class="api-function__signature"><code>{{ include.signature }}</code></pre>
|
|
23
|
+
{% endif %}
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
{% if include.description %}
|
|
27
|
+
<div class="api-function__description">
|
|
28
|
+
{{ include.description | markdownify }}
|
|
29
|
+
</div>
|
|
30
|
+
{% endif %}
|
|
31
|
+
|
|
32
|
+
{% if include.parameters %}
|
|
33
|
+
<div class="api-function__section">
|
|
34
|
+
<h4 class="api-function__section-title">Parameters</h4>
|
|
35
|
+
<dl class="api-function__params">
|
|
36
|
+
{% for param in include.parameters %}
|
|
37
|
+
<div class="api-function__param">
|
|
38
|
+
<dt class="api-function__param-name">
|
|
39
|
+
<code>{{ param.name }}</code>
|
|
40
|
+
{% if param.type %}
|
|
41
|
+
<span class="api-function__param-type">{{ param.type }}</span>
|
|
42
|
+
{% endif %}
|
|
43
|
+
{% if param.default %}
|
|
44
|
+
<span class="api-function__param-default">= {{ param.default }}</span>
|
|
45
|
+
{% endif %}
|
|
46
|
+
{% if param.optional %}
|
|
47
|
+
<span class="api-function__param-badge">optional</span>
|
|
48
|
+
{% endif %}
|
|
49
|
+
</dt>
|
|
50
|
+
<dd class="api-function__param-desc">
|
|
51
|
+
{{ param.description | markdownify }}
|
|
52
|
+
</dd>
|
|
53
|
+
</div>
|
|
54
|
+
{% endfor %}
|
|
55
|
+
</dl>
|
|
56
|
+
</div>
|
|
57
|
+
{% endif %}
|
|
58
|
+
|
|
59
|
+
{% if include.returns or include.return_type %}
|
|
60
|
+
<div class="api-function__section">
|
|
61
|
+
<h4 class="api-function__section-title">Returns</h4>
|
|
62
|
+
<div class="api-function__returns">
|
|
63
|
+
{% if include.return_type %}
|
|
64
|
+
<span class="api-function__return-type">{{ include.return_type }}</span>
|
|
65
|
+
{% endif %}
|
|
66
|
+
{% if include.returns %}
|
|
67
|
+
<p>{{ include.returns | markdownify }}</p>
|
|
68
|
+
{% endif %}
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
{% endif %}
|
|
72
|
+
|
|
73
|
+
{% if include.examples %}
|
|
74
|
+
<div class="api-function__section">
|
|
75
|
+
<h4 class="api-function__section-title">Examples</h4>
|
|
76
|
+
<div class="api-function__examples">
|
|
77
|
+
{{ include.examples | markdownify }}
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
{% endif %}
|
|
81
|
+
|
|
82
|
+
{% if include.see_also %}
|
|
83
|
+
<div class="api-function__section">
|
|
84
|
+
<h4 class="api-function__section-title">See Also</h4>
|
|
85
|
+
<ul class="api-function__see-also">
|
|
86
|
+
{% for item in include.see_also %}
|
|
87
|
+
<li>
|
|
88
|
+
<a href="#{{ item | slugify }}"><code>{{ item }}</code></a>
|
|
89
|
+
</li>
|
|
90
|
+
{% endfor %}
|
|
91
|
+
</ul>
|
|
92
|
+
</div>
|
|
93
|
+
{% endif %}
|
|
94
|
+
</div>
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Author bio card with social links and credentials
|
|
3
|
+
Parameters:
|
|
4
|
+
- author: Author name (default: page.author or site.author.name)
|
|
5
|
+
- show_avatar: Show author avatar (default: true)
|
|
6
|
+
- show_social: Show social links (default: true)
|
|
7
|
+
- compact: Compact layout (default: false)
|
|
8
|
+
{%- endcomment -%}
|
|
9
|
+
|
|
10
|
+
{%- assign author_name = include.author | default: page.author | default: site.author.name -%}
|
|
11
|
+
{%- assign show_avatar = include.show_avatar | default: true -%}
|
|
12
|
+
{%- assign show_social = include.show_social | default: true -%}
|
|
13
|
+
{%- assign compact = include.compact | default: false -%}
|
|
14
|
+
|
|
15
|
+
{%- comment -%} Get author details from site.data.authors or site.author {%- endcomment -%}
|
|
16
|
+
{%- if site.data.authors and site.data.authors[author_name] -%}
|
|
17
|
+
{%- assign author_data = site.data.authors[author_name] -%}
|
|
18
|
+
{%- else -%}
|
|
19
|
+
{%- assign author_data = site.author -%}
|
|
20
|
+
{%- endif -%}
|
|
21
|
+
|
|
22
|
+
<aside class="author-bio{% if compact %} author-bio--compact{% endif %}" itemscope itemtype="https://schema.org/Person">
|
|
23
|
+
<div class="author-bio__inner">
|
|
24
|
+
{%- if show_avatar -%}
|
|
25
|
+
<div class="author-bio__avatar">
|
|
26
|
+
{%- if author_data.avatar or author_data.image -%}
|
|
27
|
+
<img src="{{ author_data.avatar | default: author_data.image | relative_url }}"
|
|
28
|
+
alt="{{ author_name }}"
|
|
29
|
+
itemprop="image"
|
|
30
|
+
class="author-bio__avatar-img"
|
|
31
|
+
loading="lazy"
|
|
32
|
+
width="80"
|
|
33
|
+
height="80">
|
|
34
|
+
{%- else -%}
|
|
35
|
+
{%- comment -%} Fallback avatar with initials {%- endcomment -%}
|
|
36
|
+
{%- assign initials = author_name | split: ' ' | map: 'first' | slice: 0, 2 | join: '' | upcase -%}
|
|
37
|
+
<div class="author-bio__avatar-placeholder" aria-label="{{ author_name }}">
|
|
38
|
+
<span>{{ initials }}</span>
|
|
39
|
+
</div>
|
|
40
|
+
{%- endif -%}
|
|
41
|
+
</div>
|
|
42
|
+
{%- endif -%}
|
|
43
|
+
|
|
44
|
+
<div class="author-bio__content">
|
|
45
|
+
<h3 class="author-bio__name" itemprop="name">{{ author_name }}</h3>
|
|
46
|
+
|
|
47
|
+
{%- if author_data.affiliation -%}
|
|
48
|
+
<p class="author-bio__affiliation" itemprop="affiliation">
|
|
49
|
+
{{ author_data.affiliation }}
|
|
50
|
+
</p>
|
|
51
|
+
{%- endif -%}
|
|
52
|
+
|
|
53
|
+
{%- if author_data.biography or author_data.bio -%}
|
|
54
|
+
<p class="author-bio__description" itemprop="description">
|
|
55
|
+
{{ author_data.biography | default: author_data.bio }}
|
|
56
|
+
</p>
|
|
57
|
+
{%- endif -%}
|
|
58
|
+
|
|
59
|
+
{%- if author_data.research_areas and author_data.research_areas.size > 0 -%}
|
|
60
|
+
<div class="author-bio__research">
|
|
61
|
+
<strong class="author-bio__research-label">Research interests:</strong>
|
|
62
|
+
<span class="author-bio__research-list">{{ author_data.research_areas | join: ', ' }}</span>
|
|
63
|
+
</div>
|
|
64
|
+
{%- endif -%}
|
|
65
|
+
|
|
66
|
+
{%- if show_social -%}
|
|
67
|
+
<ul class="author-bio__social">
|
|
68
|
+
{%- if author_data.email -%}
|
|
69
|
+
<li>
|
|
70
|
+
<a href="mailto:{{ author_data.email }}"
|
|
71
|
+
class="author-bio__social-link author-bio__social-link--email"
|
|
72
|
+
itemprop="email"
|
|
73
|
+
aria-label="Email {{ author_name }}">
|
|
74
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
75
|
+
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
|
76
|
+
<polyline points="22,6 12,13 2,6"></polyline>
|
|
77
|
+
</svg>
|
|
78
|
+
<span class="visually-hidden">Email</span>
|
|
79
|
+
</a>
|
|
80
|
+
</li>
|
|
81
|
+
{%- endif -%}
|
|
82
|
+
|
|
83
|
+
{%- if author_data.github -%}
|
|
84
|
+
<li>
|
|
85
|
+
<a href="https://github.com/{{ author_data.github }}"
|
|
86
|
+
class="author-bio__social-link author-bio__social-link--github"
|
|
87
|
+
target="_blank"
|
|
88
|
+
rel="noopener noreferrer"
|
|
89
|
+
itemprop="sameAs"
|
|
90
|
+
aria-label="{{ author_name }} on GitHub">
|
|
91
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
92
|
+
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
|
|
93
|
+
</svg>
|
|
94
|
+
<span class="visually-hidden">GitHub</span>
|
|
95
|
+
</a>
|
|
96
|
+
</li>
|
|
97
|
+
{%- endif -%}
|
|
98
|
+
|
|
99
|
+
{%- if author_data.twitter -%}
|
|
100
|
+
<li>
|
|
101
|
+
<a href="https://twitter.com/{{ author_data.twitter }}"
|
|
102
|
+
class="author-bio__social-link author-bio__social-link--twitter"
|
|
103
|
+
target="_blank"
|
|
104
|
+
rel="noopener noreferrer"
|
|
105
|
+
itemprop="sameAs"
|
|
106
|
+
aria-label="{{ author_name }} on Twitter">
|
|
107
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
108
|
+
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/>
|
|
109
|
+
</svg>
|
|
110
|
+
<span class="visually-hidden">Twitter</span>
|
|
111
|
+
</a>
|
|
112
|
+
</li>
|
|
113
|
+
{%- endif -%}
|
|
114
|
+
|
|
115
|
+
{%- if author_data.linkedin -%}
|
|
116
|
+
<li>
|
|
117
|
+
<a href="https://linkedin.com/in/{{ author_data.linkedin }}"
|
|
118
|
+
class="author-bio__social-link author-bio__social-link--linkedin"
|
|
119
|
+
target="_blank"
|
|
120
|
+
rel="noopener noreferrer"
|
|
121
|
+
itemprop="sameAs"
|
|
122
|
+
aria-label="{{ author_name }} on LinkedIn">
|
|
123
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
124
|
+
<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
|
|
125
|
+
</svg>
|
|
126
|
+
<span class="visually-hidden">LinkedIn</span>
|
|
127
|
+
</a>
|
|
128
|
+
</li>
|
|
129
|
+
{%- endif -%}
|
|
130
|
+
|
|
131
|
+
{%- if author_data.orcid -%}
|
|
132
|
+
<li>
|
|
133
|
+
<a href="{{ author_data.orcid }}"
|
|
134
|
+
class="author-bio__social-link author-bio__social-link--orcid"
|
|
135
|
+
target="_blank"
|
|
136
|
+
rel="noopener noreferrer"
|
|
137
|
+
itemprop="sameAs"
|
|
138
|
+
aria-label="{{ author_name }} ORCID profile">
|
|
139
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
140
|
+
<path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM7.369 4.378c.525 0 .947.431.947.947s-.422.947-.947.947a.95.95 0 0 1-.947-.947c0-.525.422-.947.947-.947zm-.722 3.038h1.444v10.041H6.647V7.416zm3.562 0h3.9c3.712 0 5.344 2.653 5.344 5.025 0 2.578-2.016 5.016-5.325 5.016h-3.919V7.416zm1.444 1.303v7.444h2.297c2.359 0 4.053-1.666 4.053-3.722 0-2.056-1.694-3.722-4.053-3.722h-2.297z"/>
|
|
141
|
+
</svg>
|
|
142
|
+
<span class="visually-hidden">ORCID</span>
|
|
143
|
+
</a>
|
|
144
|
+
</li>
|
|
145
|
+
{%- endif -%}
|
|
146
|
+
|
|
147
|
+
{%- if author_data.google_scholar -%}
|
|
148
|
+
<li>
|
|
149
|
+
<a href="{{ author_data.google_scholar }}"
|
|
150
|
+
class="author-bio__social-link author-bio__social-link--scholar"
|
|
151
|
+
target="_blank"
|
|
152
|
+
rel="noopener noreferrer"
|
|
153
|
+
itemprop="sameAs"
|
|
154
|
+
aria-label="{{ author_name }} Google Scholar profile">
|
|
155
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
|
|
156
|
+
<path d="M12 24a7 7 0 1 1 0-14 7 7 0 0 1 0 14zm0-24L0 9.5l4.838 3.94A8 8 0 0 1 12 9a8 8 0 0 1 7.162 4.44L24 9.5z"/>
|
|
157
|
+
</svg>
|
|
158
|
+
<span class="visually-hidden">Google Scholar</span>
|
|
159
|
+
</a>
|
|
160
|
+
</li>
|
|
161
|
+
{%- endif -%}
|
|
162
|
+
</ul>
|
|
163
|
+
{%- endif -%}
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
</aside>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Bookmark System - Save posts for later reading
|
|
3
|
+
{%- endcomment -%}
|
|
4
|
+
|
|
5
|
+
<div class="bookmark-system" data-bookmark-system>
|
|
6
|
+
<button type="button"
|
|
7
|
+
class="bookmark-button"
|
|
8
|
+
data-bookmark-toggle
|
|
9
|
+
data-post-id="{{ page.id | slugify }}"
|
|
10
|
+
data-post-title="{{ page.title }}"
|
|
11
|
+
data-post-url="{{ page.url | relative_url }}"
|
|
12
|
+
aria-label="Bookmark this post">
|
|
13
|
+
<svg class="bookmark-button__icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
14
|
+
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
|
|
15
|
+
</svg>
|
|
16
|
+
<span class="bookmark-button__text" data-bookmark-text>Save for later</span>
|
|
17
|
+
</button>
|
|
18
|
+
|
|
19
|
+
<div class="bookmark-panel" data-bookmark-panel hidden>
|
|
20
|
+
<h3>Your Bookmarks</h3>
|
|
21
|
+
<div class="bookmark-list" data-bookmark-list></div>
|
|
22
|
+
<button type="button" data-clear-bookmarks>Clear all</button>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
(function() {
|
|
28
|
+
'use strict';
|
|
29
|
+
const STORAGE_KEY = 'bookmarks';
|
|
30
|
+
|
|
31
|
+
class BookmarkSystem {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.bookmarks = this.loadBookmarks();
|
|
34
|
+
this.init();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
init() {
|
|
38
|
+
const toggleBtn = document.querySelector('[data-bookmark-toggle]');
|
|
39
|
+
if (!toggleBtn) return;
|
|
40
|
+
|
|
41
|
+
const postId = toggleBtn.dataset.postId;
|
|
42
|
+
this.updateButtonState(toggleBtn, postId);
|
|
43
|
+
|
|
44
|
+
toggleBtn.addEventListener('click', () => {
|
|
45
|
+
const {postId, postTitle, postUrl} = toggleBtn.dataset;
|
|
46
|
+
this.toggleBookmark({id: postId, title: postTitle, url: postUrl});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
toggleBookmark(post) {
|
|
51
|
+
const index = this.bookmarks.findIndex(b => b.id === post.id);
|
|
52
|
+
if (index > -1) {
|
|
53
|
+
this.bookmarks.splice(index, 1);
|
|
54
|
+
} else {
|
|
55
|
+
this.bookmarks.push({...post, date: new Date().toISOString()});
|
|
56
|
+
}
|
|
57
|
+
this.saveBookmarks();
|
|
58
|
+
this.updateButtonState(document.querySelector('[data-bookmark-toggle]'), post.id);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
updateButtonState(btn, postId) {
|
|
62
|
+
const isBookmarked = this.bookmarks.some(b => b.id === postId);
|
|
63
|
+
const text = btn.querySelector('[data-bookmark-text]');
|
|
64
|
+
const icon = btn.querySelector('.bookmark-button__icon');
|
|
65
|
+
|
|
66
|
+
if (isBookmarked) {
|
|
67
|
+
btn.classList.add('bookmark-button--active');
|
|
68
|
+
if (text) text.textContent = 'Saved';
|
|
69
|
+
if (icon) icon.style.fill = 'currentColor';
|
|
70
|
+
} else {
|
|
71
|
+
btn.classList.remove('bookmark-button--active');
|
|
72
|
+
if (text) text.textContent = 'Save for later';
|
|
73
|
+
if (icon) icon.style.fill = 'none';
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
loadBookmarks() {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(localStorage.getItem(STORAGE_KEY) || '[]');
|
|
80
|
+
} catch (e) {
|
|
81
|
+
return [];
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
saveBookmarks() {
|
|
86
|
+
try {
|
|
87
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(this.bookmarks));
|
|
88
|
+
} catch (e) {
|
|
89
|
+
console.error('Failed to save bookmarks:', e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
new BookmarkSystem();
|
|
95
|
+
})();
|
|
96
|
+
</script>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{%- comment -%}
|
|
2
|
+
Breadcrumb navigation for better orientation
|
|
3
|
+
Automatically generates breadcrumbs based on page location and categories
|
|
4
|
+
Parameters:
|
|
5
|
+
- show_current: Show current page in breadcrumbs (default: true)
|
|
6
|
+
- separator: Custom separator (default: / )
|
|
7
|
+
{%- endcomment -%}
|
|
8
|
+
|
|
9
|
+
{%- assign show_current = include.show_current | default: true -%}
|
|
10
|
+
{%- assign separator = include.separator | default: " / " -%}
|
|
11
|
+
|
|
12
|
+
<nav class="breadcrumbs" aria-label="Breadcrumb">
|
|
13
|
+
<ol class="breadcrumbs__list" itemscope itemtype="https://schema.org/BreadcrumbList">
|
|
14
|
+
{%- comment -%} Home link {%- endcomment -%}
|
|
15
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
16
|
+
<a href="{{ '/' | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
17
|
+
<span itemprop="name">Home</span>
|
|
18
|
+
</a>
|
|
19
|
+
<meta itemprop="position" content="1" />
|
|
20
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
21
|
+
</li>
|
|
22
|
+
|
|
23
|
+
{%- comment -%} Collection/Section {%- endcomment -%}
|
|
24
|
+
{%- if page.collection -%}
|
|
25
|
+
{%- assign position = 2 -%}
|
|
26
|
+
{%- case page.collection -%}
|
|
27
|
+
{%- when 'posts' -%}
|
|
28
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
29
|
+
<a href="{{ '/blog' | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
30
|
+
<span itemprop="name">Blog</span>
|
|
31
|
+
</a>
|
|
32
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
33
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
34
|
+
</li>
|
|
35
|
+
{%- when 'portfolio' -%}
|
|
36
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
37
|
+
<a href="{{ '/portfolio' | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
38
|
+
<span itemprop="name">Portfolio</span>
|
|
39
|
+
</a>
|
|
40
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
41
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
42
|
+
</li>
|
|
43
|
+
{%- when 'datasets' -%}
|
|
44
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
45
|
+
<a href="{{ '/datasets' | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
46
|
+
<span itemprop="name">Datasets</span>
|
|
47
|
+
</a>
|
|
48
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
49
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
50
|
+
</li>
|
|
51
|
+
{%- when 'notebooks' -%}
|
|
52
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
53
|
+
<a href="{{ '/notebooks' | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
54
|
+
<span itemprop="name">Notebooks</span>
|
|
55
|
+
</a>
|
|
56
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
57
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
58
|
+
</li>
|
|
59
|
+
{%- endcase -%}
|
|
60
|
+
{%- assign position = position | plus: 1 -%}
|
|
61
|
+
{%- endif -%}
|
|
62
|
+
|
|
63
|
+
{%- comment -%} Category (if exists) {%- endcomment -%}
|
|
64
|
+
{%- if page.categories and page.categories.size > 0 -%}
|
|
65
|
+
{%- assign main_category = page.categories | first -%}
|
|
66
|
+
{%- assign category_slug = main_category | slugify -%}
|
|
67
|
+
{%- unless position -%}{%- assign position = 2 -%}{%- endunless -%}
|
|
68
|
+
<li class="breadcrumbs__item" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
|
|
69
|
+
<a href="{{ site.category_archive.path | default: '/categories/' | append: '#' | append: category_slug | relative_url }}" class="breadcrumbs__link" itemprop="item">
|
|
70
|
+
<span itemprop="name">{{ main_category }}</span>
|
|
71
|
+
</a>
|
|
72
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
73
|
+
<span class="breadcrumbs__separator" aria-hidden="true">{{ separator }}</span>
|
|
74
|
+
</li>
|
|
75
|
+
{%- assign position = position | plus: 1 -%}
|
|
76
|
+
{%- endif -%}
|
|
77
|
+
|
|
78
|
+
{%- comment -%} Current page {%- endcomment -%}
|
|
79
|
+
{%- if show_current -%}
|
|
80
|
+
{%- unless position -%}{%- assign position = 2 -%}{%- endunless -%}
|
|
81
|
+
<li class="breadcrumbs__item breadcrumbs__item--current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem" aria-current="page">
|
|
82
|
+
<span class="breadcrumbs__current" itemprop="item">
|
|
83
|
+
<span itemprop="name">{{ page.title | truncate: 50 }}</span>
|
|
84
|
+
</span>
|
|
85
|
+
<meta itemprop="position" content="{{ position }}" />
|
|
86
|
+
</li>
|
|
87
|
+
{%- endif -%}
|
|
88
|
+
</ol>
|
|
89
|
+
</nav>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{% assign citation_title = include.title | default: page.title | default: site.title %}
|
|
2
|
+
{% assign citation_url = include.url | default: page.url | default: '/' | absolute_url %}
|
|
3
|
+
{% assign citation_date = include.date | default: page.date %}
|
|
4
|
+
{% assign citation_year = citation_date | date: '%Y' %}
|
|
5
|
+
{% assign authors_source = include.authors | default: page.authors | default: page.author | default: site.author.name %}
|
|
6
|
+
{% assign authors_array = authors_source | arrayify %}
|
|
7
|
+
{% assign publisher = include.publisher | default: site.author.affiliation | default: site.title %}
|
|
8
|
+
{% assign doi = include.doi | default: page.doi %}
|
|
9
|
+
{% assign citation_type = include.citation_type | default: include.type | default: 'article' %}
|
|
10
|
+
{% assign citation_key = include.citation_key | default: page.citation_key | default: page.slug | default: citation_title | slugify %}
|
|
11
|
+
{% capture author_line %}
|
|
12
|
+
{% for author in authors_array %}
|
|
13
|
+
{% if author.name %}
|
|
14
|
+
{{ author.name | strip }}{% unless forloop.last %} and {% endunless %}
|
|
15
|
+
{% else %}
|
|
16
|
+
{{ author | strip }}{% unless forloop.last %} and {% endunless %}
|
|
17
|
+
{% endif %}
|
|
18
|
+
{% endfor %}
|
|
19
|
+
{% endcapture %}
|
|
20
|
+
{% capture ris_authors %}
|
|
21
|
+
{% for author in authors_array %}
|
|
22
|
+
{% assign author_name = author.name | default: author %}
|
|
23
|
+
AU - {{ author_name | strip }}
|
|
24
|
+
{% endfor %}
|
|
25
|
+
{% endcapture %}
|
|
26
|
+
{% capture bibtex_entry %}@{{ citation_type }}{ {{ citation_key }},
|
|
27
|
+
title = { {{ citation_title | strip }} },
|
|
28
|
+
author = { {{ author_line | strip }} },
|
|
29
|
+
{% if citation_year %}year = { {{ citation_year }} },{% endif %}
|
|
30
|
+
{% if publisher %}publisher = { {{ publisher | strip }} },{% endif %}
|
|
31
|
+
{% if doi %}doi = { {{ doi }} },{% endif %}
|
|
32
|
+
url = { {{ citation_url }} }
|
|
33
|
+
}
|
|
34
|
+
{% endcapture %}
|
|
35
|
+
{% capture ris_entry %}TY - {{ citation_type | upcase }}
|
|
36
|
+
TI - {{ citation_title | strip }}
|
|
37
|
+
{% if citation_year %}PY - {{ citation_year }}
|
|
38
|
+
{% endif %}{{ ris_authors | strip }}
|
|
39
|
+
{% if publisher %}PB - {{ publisher | strip }}
|
|
40
|
+
{% endif %}
|
|
41
|
+
{% if doi %}DO - {{ doi }}
|
|
42
|
+
{% endif %}UR - {{ citation_url }}
|
|
43
|
+
ER -
|
|
44
|
+
{% endcapture %}
|
|
45
|
+
{% capture endnote_entry %}%0 {{ citation_type | capitalize }}
|
|
46
|
+
%T {{ citation_title | strip }}
|
|
47
|
+
{{ ris_authors | strip | replace: 'AU', '%A' }}
|
|
48
|
+
{% if citation_year %}%D {{ citation_year }}
|
|
49
|
+
{% endif %}
|
|
50
|
+
{% if publisher %}%I {{ publisher | strip }}
|
|
51
|
+
{% endif %}
|
|
52
|
+
{% if doi %}%R {{ doi }}
|
|
53
|
+
{% endif %}
|
|
54
|
+
%U {{ citation_url }}
|
|
55
|
+
{% endcapture %}
|
|
56
|
+
{% capture authors_plain %}
|
|
57
|
+
{% for author in authors_array %}
|
|
58
|
+
{% assign author_name = author.name | default: author %}
|
|
59
|
+
{{ author_name | strip }}{% unless forloop.last %}, {% endunless %}
|
|
60
|
+
{% endfor %}
|
|
61
|
+
{% endcapture %}
|
|
62
|
+
{% capture citation_text %}
|
|
63
|
+
{{ authors_plain | strip }}{% if citation_year %} ({{ citation_year }}){% endif %}. {{ citation_title | strip }}. {{ publisher | strip }}. {{ citation_url }}.
|
|
64
|
+
{% endcapture %}
|
|
65
|
+
<section class="citation-tools" aria-labelledby="citation-tools-heading-{{ citation_key }}">
|
|
66
|
+
<div class="citation-tools__header">
|
|
67
|
+
<h2 id="citation-tools-heading-{{ citation_key }}">{% t 'citation_tools.heading' %}</h2>
|
|
68
|
+
<p class="citation-tools__summary">{% t 'citation_tools.summary' %}</p>
|
|
69
|
+
<p class="citation-tools__citation">{{ citation_text | strip }}</p>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="citation-tools__exports">
|
|
72
|
+
<article class="citation-tools__format" data-citation-format="bibtex">
|
|
73
|
+
<header>
|
|
74
|
+
<h3>{% t 'citation_tools.formats.bibtex' %}</h3>
|
|
75
|
+
<button type="button" class="btn btn--ghost" data-copy-citation data-target="bibtex-{{ citation_key }}">{% t 'citation_tools.copy' %}</button>
|
|
76
|
+
</header>
|
|
77
|
+
<textarea id="bibtex-{{ citation_key }}" readonly aria-label="{% t 'citation_tools.aria.bibtex' %}">{{ bibtex_entry | strip }}</textarea>
|
|
78
|
+
</article>
|
|
79
|
+
<article class="citation-tools__format" data-citation-format="ris">
|
|
80
|
+
<header>
|
|
81
|
+
<h3>{% t 'citation_tools.formats.ris' %}</h3>
|
|
82
|
+
<button type="button" class="btn btn--ghost" data-copy-citation data-target="ris-{{ citation_key }}">{% t 'citation_tools.copy' %}</button>
|
|
83
|
+
</header>
|
|
84
|
+
<textarea id="ris-{{ citation_key }}" readonly aria-label="{% t 'citation_tools.aria.ris' %}">{{ ris_entry | strip }}</textarea>
|
|
85
|
+
</article>
|
|
86
|
+
<article class="citation-tools__format" data-citation-format="endnote">
|
|
87
|
+
<header>
|
|
88
|
+
<h3>{% t 'citation_tools.formats.endnote' %}</h3>
|
|
89
|
+
<button type="button" class="btn btn--ghost" data-copy-citation data-target="endnote-{{ citation_key }}">{% t 'citation_tools.copy' %}</button>
|
|
90
|
+
</header>
|
|
91
|
+
<textarea id="endnote-{{ citation_key }}" readonly aria-label="{% t 'citation_tools.aria.endnote' %}">{{ endnote_entry | strip }}</textarea>
|
|
92
|
+
</article>
|
|
93
|
+
</div>
|
|
94
|
+
</section>
|