datalog-theme 0.7.0 → 0.9.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 (203) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +188 -0
  3. data/CITATION.cff +2 -2
  4. data/README.md +25 -17
  5. data/_data/cdn-integrity.yml +0 -30
  6. data/_data/i18n/en.yml +297 -0
  7. data/_data/i18n/es.yml +297 -0
  8. data/_data/i18n/pt.yml +297 -0
  9. data/_data/js_manifest.json +16 -0
  10. data/_includes/analytics/dashboard.html +3 -1
  11. data/_includes/components/api-function.html +20 -1
  12. data/_includes/components/author-bio.html +21 -11
  13. data/_includes/components/author-list.html +32 -0
  14. data/_includes/components/citation-tools.html +33 -25
  15. data/_includes/components/comments-thread.html +90 -0
  16. data/_includes/components/contact-form.html +120 -0
  17. data/_includes/components/correction-report.html +82 -0
  18. data/_includes/components/enhanced-code-block.html +1 -1
  19. data/_includes/components/enhanced-toc.html +6 -7
  20. data/_includes/components/license-link.html +13 -0
  21. data/_includes/components/license-notice.html +28 -0
  22. data/_includes/components/moderation-inbox.html +139 -0
  23. data/_includes/components/reactions.html +49 -0
  24. data/_includes/components/reading-list.html +31 -0
  25. data/_includes/components/reading-mode-toggle.html +65 -0
  26. data/_includes/components/reading-state-bookmark.html +27 -0
  27. data/_includes/components/reading-state-panel.html +71 -0
  28. data/_includes/components/reproducibility.html +61 -0
  29. data/_includes/components/responsive-image.html +3 -3
  30. data/_includes/components/revision-history.html +39 -0
  31. data/_includes/components/revision-notice.html +35 -0
  32. data/_includes/components/series-nav.html +64 -0
  33. data/_includes/components/subscribe-form.html +88 -0
  34. data/_includes/components/subscription-manage.html +68 -0
  35. data/_includes/components/webmentions.html +48 -0
  36. data/_includes/csp-meta.html +135 -11
  37. data/_includes/footer.html +22 -20
  38. data/_includes/head.html +111 -63
  39. data/_includes/header/navigation.html +12 -15
  40. data/_includes/header.html +28 -19
  41. data/_includes/layouts/default/article.html +9 -7
  42. data/_includes/meta/dynamic-services-config.html +14 -0
  43. data/_includes/meta/math-config.html +18 -10
  44. data/_includes/meta/person-json.html +27 -0
  45. data/_includes/meta/publisher.html +45 -0
  46. data/_includes/meta/schema.html +67 -30
  47. data/_includes/meta/scholarly.html +121 -0
  48. data/_includes/meta/scripts-loader.html +18 -32
  49. data/_includes/meta/webmention-discovery.html +14 -0
  50. data/_includes/post/related-posts.html +4 -7
  51. data/_includes/scripts.html +57 -0
  52. data/_includes/search/index-data.json +9 -34
  53. data/_layouts/dataset.html +5 -3
  54. data/_layouts/default.html +16 -8
  55. data/_layouts/notebook.html +1 -0
  56. data/_layouts/package.html +4 -2
  57. data/_layouts/page.html +15 -0
  58. data/_layouts/portfolio.html +1 -0
  59. data/_layouts/post.html +102 -23
  60. data/_layouts/project.html +4 -3
  61. data/_layouts/research.html +20 -8
  62. data/_plugins/analytics_dashboard.rb +9 -3
  63. data/_plugins/authors.rb +133 -0
  64. data/_plugins/config_validator.rb +231 -23
  65. data/_plugins/critical_css_check.rb +42 -0
  66. data/_plugins/csp_generator.rb +18 -28
  67. data/_plugins/datalog_bibliography.rb +9 -7
  68. data/_plugins/datalog_comments.rb +8 -5
  69. data/_plugins/datalog_slides.rb +9 -8
  70. data/_plugins/i18n.rb +13 -12
  71. data/_plugins/image_optimizer.rb +241 -178
  72. data/_plugins/licenses.rb +135 -0
  73. data/_plugins/math_preprocessor.rb +59 -7
  74. data/_plugins/notebook_converter.rb +23 -4
  75. data/_plugins/plugin_loader.rb +3 -1
  76. data/_plugins/publications_generator.rb +8 -2
  77. data/_plugins/references.rb +238 -0
  78. data/_plugins/reproducibility.rb +150 -0
  79. data/_plugins/revisions.rb +101 -0
  80. data/_plugins/rouge_highlight_filter.rb +42 -0
  81. data/_plugins/scholarly.rb +50 -0
  82. data/_plugins/search_code_blocks.rb +30 -0
  83. data/_plugins/search_normalizer.rb +15 -53
  84. data/_plugins/search_pages.rb +3 -4
  85. data/_plugins/series.rb +104 -0
  86. data/_plugins/statements.rb +87 -0
  87. data/_sass/_academic-dashboard.scss +262 -0
  88. data/_sass/_base.scss +20 -1
  89. data/_sass/_comments-thread.scss +159 -0
  90. data/_sass/_components.scss +64 -1153
  91. data/_sass/_features.scss +17 -0
  92. data/_sass/_layout.scss +385 -1
  93. data/_sass/_mathematical.scss +27 -0
  94. data/_sass/_moderation.scss +222 -0
  95. data/_sass/_notebooks.scss +322 -0
  96. data/_sass/_open-science-badges.scss +56 -0
  97. data/_sass/{_phase1-enhancements.scss → _post-components.scss} +5 -3
  98. data/_sass/_print.scss +291 -0
  99. data/_sass/_reactions.scss +89 -0
  100. data/_sass/_reading-state.scss +290 -0
  101. data/_sass/_search-page.scss +530 -0
  102. data/_sass/_search.scss +46 -0
  103. data/_sass/_service-forms.scss +204 -0
  104. data/_sass/_subscriptions.scss +140 -0
  105. data/_sass/_syntax-highlighting.scss +212 -97
  106. data/_sass/_theme.scss +40 -19
  107. data/_sass/_typography.scss +130 -0
  108. data/_sass/_utilities.scss +5 -0
  109. data/_sass/_variables.scss +6 -0
  110. data/_sass/_webmentions.scss +125 -0
  111. data/assets/css/main.scss +14 -0
  112. data/assets/js/dist/academic.js +1 -1
  113. data/assets/js/dist/analytics-dashboard.js +1 -1
  114. data/assets/js/dist/chunks/chunk-2DYDWUFX.js +1 -0
  115. data/assets/js/dist/chunks/chunk-PATLC23F.js +1 -0
  116. data/assets/js/dist/chunks/chunk-V7734B2G.js +1 -0
  117. data/assets/js/dist/comments.js +2 -0
  118. data/assets/js/dist/contact.js +1 -0
  119. data/assets/js/dist/core.js +1 -1
  120. data/assets/js/dist/corrections.js +1 -0
  121. data/assets/js/dist/loader.js +1 -1
  122. data/assets/js/dist/math.js +1 -1
  123. data/assets/js/dist/moderation.js +1 -0
  124. data/assets/js/dist/notebook.js +1 -1
  125. data/assets/js/dist/reactions.js +1 -0
  126. data/assets/js/dist/reading-state.js +1 -0
  127. data/assets/js/dist/search.js +1 -1
  128. data/assets/js/dist/sources.json +52 -0
  129. data/assets/js/dist/subscriptions.js +1 -0
  130. data/assets/js/dist/visualizations.js +11 -2
  131. data/assets/js/dist/webmentions.js +1 -0
  132. data/assets/js/loader.js +37 -1
  133. data/datalog-theme.gemspec +35 -23
  134. data/lib/datalog/cli.rb +43 -15
  135. data/lib/datalog/critical_css.rb +168 -0
  136. data/lib/datalog/plugin_system/dependency_resolver.rb +0 -2
  137. data/lib/datalog/plugins/comments.rb +33 -3
  138. data/lib/datalog/theme/installed_files.rb +113 -0
  139. data/lib/datalog/theme/package.rb +57 -0
  140. data/lib/datalog/theme/repository_checkout.rb +94 -0
  141. data/lib/datalog/theme/version.rb +5 -1
  142. data/lib/datalog/warning_filter.rb +5 -11
  143. data/lib/datalog-theme.rb +6 -0
  144. metadata +96 -147
  145. data/_data/academic.yml +0 -217
  146. data/_data/config/author.yml +0 -121
  147. data/_data/datasets.yml +0 -28
  148. data/_data/js_meta.json +0 -371
  149. data/_data/navigation.yml +0 -145
  150. data/_data/projects.yml +0 -41
  151. data/_data/publications.yml +0 -28
  152. data/_data/social.yml +0 -73
  153. data/_data/visualizations.yml +0 -51
  154. data/_includes/components/advanced-search.html +0 -682
  155. data/_includes/components/bookmark-system.html +0 -96
  156. data/_includes/components/comments.html +0 -244
  157. data/_includes/components/content-recommendations.html +0 -228
  158. data/_includes/components/email-preferences.html +0 -200
  159. data/_includes/components/enhanced-metadata.html +0 -228
  160. data/_includes/components/language-switcher.html +0 -396
  161. data/_includes/components/navigation-enhancements.html +0 -454
  162. data/_includes/components/newsletter-signup.html +0 -178
  163. data/_includes/components/popular-posts.html +0 -233
  164. data/_includes/components/reading-progress.html +0 -133
  165. data/_includes/components/reading-time.html +0 -121
  166. data/_includes/components/series-navigation.html +0 -124
  167. data/_includes/components/social-proof.html +0 -34
  168. data/_includes/components/user-preferences.html +0 -566
  169. data/_includes/meta/syntax-config.html +0 -19
  170. data/_layouts/archive.html +0 -282
  171. data/_layouts/post-sidebar.html +0 -183
  172. data/_sass/_phase3-enhancements.scss +0 -874
  173. data/_sass/_phase4-enhancements.scss +0 -1214
  174. data/_sass/_phase5-enhancements.scss +0 -414
  175. data/assets/js/academic.js +0 -262
  176. data/assets/js/analytics-dashboard.js +0 -382
  177. data/assets/js/core/dark-mode.js +0 -79
  178. data/assets/js/core/github-cards.js +0 -123
  179. data/assets/js/core/language-filter.js +0 -69
  180. data/assets/js/core/navigation.js +0 -184
  181. data/assets/js/core/scroll-progress.js +0 -45
  182. data/assets/js/core/search-hotkeys.js +0 -62
  183. data/assets/js/core/skip-links.js +0 -62
  184. data/assets/js/dist/manifest.json +0 -22
  185. data/assets/js/dist/meta.json +0 -371
  186. data/assets/js/main.js +0 -23
  187. data/assets/js/math.js +0 -818
  188. data/assets/js/notebook.js +0 -158
  189. data/assets/js/search/analytics.js +0 -91
  190. data/assets/js/search/app.js +0 -271
  191. data/assets/js/search/autocomplete.js +0 -120
  192. data/assets/js/search/engine.js +0 -260
  193. data/assets/js/search/filters.js +0 -45
  194. data/assets/js/search/render.js +0 -217
  195. data/assets/js/search/utils.js +0 -99
  196. data/assets/js/search.js +0 -354
  197. data/assets/js/visualizations.js +0 -816
  198. data/assets/publications/datalog-publications.bib +0 -8
  199. data/assets/publications/datalog-publications.ris +0 -9
  200. data/assets/publications/publications.bib +0 -30
  201. data/assets/templates/diogo-ribeiro-cv.md +0 -31
  202. data/assets/templates/diogo-ribeiro-cv.tex +0 -32
  203. data/lib/datalog/theme/theme.rb +0 -18
@@ -0,0 +1,322 @@
1
+ // Notebook pages: _layouts/notebook.html and the cell and output markup that
2
+ // _plugins/notebook_converter.rb generates. _components.scss loads this only when
3
+ // the site has notebook pages.
4
+
5
+ @use 'sass:map';
6
+ @use "sass:color";
7
+
8
+ @use 'variables' as *;
9
+ @use 'mixins' as *;
10
+
11
+ .notebook-article {
12
+ display: grid;
13
+ gap: map.get($spacing, 5);
14
+ margin: map.get($spacing, 6) auto;
15
+ max-width: 1200px;
16
+ }
17
+
18
+ .notebook-article__header {
19
+ background: rgba($color-surface-100, 0.8);
20
+ padding: map.get($spacing, 6);
21
+ border-radius: 1.25rem;
22
+ box-shadow: 0 20px 60px rgba($color-ink-900, 0.08);
23
+ position: relative;
24
+ overflow: hidden;
25
+ }
26
+
27
+ .notebook-article__header::after {
28
+ content: '';
29
+ position: absolute;
30
+ inset: auto -30% -45% auto;
31
+ width: 45%;
32
+ height: 45%;
33
+ background: radial-gradient(circle at center, rgba($color-accent-primary, 0.35), transparent 65%);
34
+ pointer-events: none;
35
+ }
36
+
37
+ .notebook-article__label {
38
+ text-transform: uppercase;
39
+ letter-spacing: 0.12em;
40
+ font-size: map.get($font-size-scale, xs);
41
+ color: $color-accent-primary;
42
+ margin-bottom: map.get($spacing, 2);
43
+ }
44
+
45
+ .notebook-article__title {
46
+ font-size: clamp(2.4rem, 4vw, 3.2rem);
47
+ margin: 0 0 map.get($spacing, 3);
48
+ }
49
+
50
+ .notebook-article__summary {
51
+ font-size: map.get($font-size-scale, md);
52
+ color: $color-ink-600;
53
+ max-width: 65ch;
54
+ margin-bottom: map.get($spacing, 4);
55
+ }
56
+
57
+ .notebook-article__meta {
58
+ list-style: none;
59
+ padding: 0;
60
+ margin: 0 0 map.get($spacing, 4);
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ gap: map.get($spacing, 3);
64
+ color: $color-ink-600;
65
+ }
66
+
67
+ .notebook-article__meta li {
68
+ display: flex;
69
+ gap: map.get($spacing, 1);
70
+ align-items: baseline;
71
+ }
72
+
73
+ .notebook-article__meta span {
74
+ font-weight: 600;
75
+ color: $color-ink-800;
76
+ }
77
+
78
+ .notebook-article__actions {
79
+ display: flex;
80
+ flex-wrap: wrap;
81
+ gap: map.get($spacing, 3);
82
+ margin-bottom: map.get($spacing, 4);
83
+ }
84
+
85
+ .notebook-article__actions .btn {
86
+ display: inline-flex;
87
+ align-items: center;
88
+ gap: map.get($spacing, 2);
89
+ }
90
+
91
+ .notebook-article__tags {
92
+ display: flex;
93
+ flex-wrap: wrap;
94
+ gap: map.get($spacing, 2);
95
+ padding: 0;
96
+ margin: 0;
97
+ list-style: none;
98
+ }
99
+
100
+ .notebook-article__tags li {
101
+ background: rgba($color-accent-tertiary, 0.18);
102
+ color: $color-accent-tertiary;
103
+ border-radius: 999px;
104
+ padding: map.get($spacing, 1) map.get($spacing, 3);
105
+ font-size: map.get($font-size-scale, xs);
106
+ letter-spacing: 0.04em;
107
+ }
108
+
109
+ .notebook-article__layout {
110
+ display: grid;
111
+ gap: map.get($spacing, 5);
112
+ }
113
+
114
+ @media (min-width: 960px) {
115
+ .notebook-article__layout {
116
+ grid-template-columns: minmax(0, 2.3fr) minmax(280px, 1fr);
117
+ gap: map.get($spacing, 6);
118
+ }
119
+ }
120
+
121
+ .notebook-article__content {
122
+ display: flex;
123
+ flex-direction: column;
124
+ gap: map.get($spacing, 4);
125
+ }
126
+
127
+ .notebook-article__sidebar {
128
+ position: sticky;
129
+ top: calc(var(--header-height, 96px) + map.get($spacing, 4));
130
+ align-self: start;
131
+ display: flex;
132
+ flex-direction: column;
133
+ gap: map.get($spacing, 4);
134
+ }
135
+
136
+ .notebook-sidebar__section {
137
+ background: rgba($color-surface-100, 0.8);
138
+ border-radius: 1rem;
139
+ padding: map.get($spacing, 4);
140
+ box-shadow: 0 12px 30px rgba($color-ink-900, 0.04);
141
+ }
142
+
143
+ .notebook-sidebar__section h2 {
144
+ font-size: map.get($font-size-scale, sm);
145
+ text-transform: uppercase;
146
+ letter-spacing: 0.08em;
147
+ margin-bottom: map.get($spacing, 3);
148
+ }
149
+
150
+ .notebook-sidebar__stats {
151
+ list-style: none;
152
+ padding: 0;
153
+ margin: 0;
154
+ display: grid;
155
+ gap: map.get($spacing, 2);
156
+ }
157
+
158
+ .notebook-sidebar__stats li {
159
+ font-size: map.get($font-size-scale, sm);
160
+ color: $color-ink-700;
161
+ }
162
+
163
+ .notebook-sidebar__metadata {
164
+ margin: 0;
165
+ display: grid;
166
+ gap: map.get($spacing, 2);
167
+ }
168
+
169
+ .notebook-sidebar__metadata div {
170
+ display: grid;
171
+ gap: map.get($spacing, 1);
172
+ }
173
+
174
+ .notebook-sidebar__metadata dt {
175
+ font-size: map.get($font-size-scale, xs);
176
+ text-transform: uppercase;
177
+ letter-spacing: 0.06em;
178
+ color: $color-ink-500;
179
+ }
180
+
181
+ .notebook-sidebar__metadata dd {
182
+ margin: 0;
183
+ font-size: map.get($font-size-scale, sm);
184
+ color: $color-ink-700;
185
+ word-break: break-word;
186
+ }
187
+
188
+ .notebook-sidebar__clone {
189
+ background: rgba($color-ink-900, 0.08);
190
+ border-radius: 0.75rem;
191
+ padding: map.get($spacing, 3);
192
+ font-family: $font-stack-code;
193
+ overflow-x: auto;
194
+ }
195
+
196
+ .notebook-sidebar__links {
197
+ list-style: none;
198
+ padding: 0;
199
+ margin: 0;
200
+ display: grid;
201
+ gap: map.get($spacing, 2);
202
+ }
203
+
204
+ .notebook-sidebar__link {
205
+ font-weight: 600;
206
+ color: $color-accent-primary;
207
+ }
208
+
209
+ .notebook-cell {
210
+ border-left: 4px solid $color-accent-primary;
211
+ padding: map.get($spacing, 4);
212
+ border-radius: 1rem;
213
+ background: rgba($color-accent-primary, 0.06);
214
+ margin: map.get($spacing, 3) 0;
215
+ box-shadow: inset 0 0 0 1px rgba($color-ink-900, 0.04);
216
+ }
217
+
218
+ .notebook-cell--input {
219
+ border-left-color: $color-accent-secondary;
220
+ }
221
+
222
+ .notebook-cell--output {
223
+ border-left-color: $color-accent-tertiary;
224
+ }
225
+
226
+ .notebook-cell__header {
227
+ display: flex;
228
+ align-items: center;
229
+ justify-content: space-between;
230
+ font-size: map.get($font-size-scale, xs);
231
+ color: $color-ink-500;
232
+ margin-bottom: map.get($spacing, 2);
233
+ text-transform: uppercase;
234
+ letter-spacing: 0.08em;
235
+ }
236
+
237
+ .notebook-cell__code {
238
+ margin: 0;
239
+ overflow: auto;
240
+ border-radius: 0.75rem;
241
+ background: rgba($color-ink-900, 0.08);
242
+ padding: map.get($spacing, 3);
243
+ }
244
+
245
+ .notebook-cell__outputs {
246
+ display: grid;
247
+ gap: map.get($spacing, 3);
248
+ }
249
+
250
+ .notebook-output {
251
+ border-radius: 0.75rem;
252
+ padding: map.get($spacing, 3);
253
+ font-family: $font-stack-code;
254
+ background: rgba($color-ink-900, 0.04);
255
+ overflow-x: auto;
256
+ margin: 0;
257
+ }
258
+
259
+ .notebook-output--stream {
260
+ color: $color-ink-700;
261
+ }
262
+
263
+ .notebook-output--error {
264
+ color: $color-critical-600;
265
+ background: rgba($color-critical-200, 0.35);
266
+ border: 1px solid rgba($color-critical-400, 0.6);
267
+ }
268
+
269
+ .notebook-output__trace {
270
+ margin-top: map.get($spacing, 2);
271
+ white-space: pre-wrap;
272
+ }
273
+
274
+ .notebook-output__figure {
275
+ margin: 0;
276
+ }
277
+
278
+ .notebook-output__figure img {
279
+ width: 100%;
280
+ height: auto;
281
+ border-radius: 0.75rem;
282
+ box-shadow: 0 10px 30px rgba($color-ink-900, 0.15);
283
+ }
284
+
285
+ .notebook-output-plotly,
286
+ .notebook-output-vega {
287
+ min-height: 320px;
288
+ border-radius: 0.75rem;
289
+ background: rgba($color-ink-900, 0.04);
290
+ display: grid;
291
+ place-items: center;
292
+ padding: map.get($spacing, 3);
293
+ }
294
+
295
+ .notebook-output__warning {
296
+ font-size: map.get($font-size-scale, sm);
297
+ color: $color-ink-600;
298
+ text-align: center;
299
+ margin: 0;
300
+ }
301
+
302
+ .notebook-output--widget {
303
+ font-style: italic;
304
+ color: $color-accent-secondary-text;
305
+ }
306
+
307
+ .notebook-segment {
308
+ display: grid;
309
+ gap: map.get($spacing, 2);
310
+ }
311
+
312
+ .notebook-segment__label {
313
+ font-size: map.get($font-size-scale, xs);
314
+ letter-spacing: 0.1em;
315
+ text-transform: uppercase;
316
+ color: $color-ink-400;
317
+ }
318
+
319
+ .notebook-segment__body {
320
+ display: grid;
321
+ gap: map.get($spacing, 3);
322
+ }
@@ -0,0 +1,56 @@
1
+ // Open science badges (_includes/components/open-science-badges.html), which render
2
+ // only when _data/academic.yml defines badges; _components.scss loads this only then.
3
+
4
+ @use 'sass:map';
5
+ @use "sass:color";
6
+
7
+ @use 'variables' as *;
8
+ @use 'mixins' as *;
9
+
10
+ .open-science-badges {
11
+ margin-block: 3rem;
12
+ padding: 1.5rem;
13
+ border-radius: 1rem;
14
+ background: linear-gradient(135deg, rgba(12, 35, 64, 0.05), rgba(50, 119, 246, 0.08));
15
+ }
16
+
17
+ .open-science-badges__intro {
18
+ margin-bottom: 1rem;
19
+ color: var(--muted-foreground, #4a5568);
20
+ }
21
+
22
+ .open-science-badges__list {
23
+ display: flex;
24
+ flex-wrap: wrap;
25
+ gap: 1rem;
26
+ padding: 0;
27
+ margin: 0;
28
+ list-style: none;
29
+ }
30
+
31
+ .open-science-badge {
32
+ display: grid;
33
+ gap: 0.25rem;
34
+ padding: 0.85rem 1rem;
35
+ min-width: 10rem;
36
+ border-radius: 0.75rem;
37
+ background: rgba(12, 35, 64, 0.08);
38
+ border: 1px solid rgba(12, 35, 64, 0.12);
39
+ transition: transform 0.2s ease, box-shadow 0.2s ease;
40
+ }
41
+
42
+ .open-science-badge:focus-within,
43
+ .open-science-badge:hover {
44
+ transform: translateY(-2px);
45
+ box-shadow: 0 8px 24px rgba(12, 35, 64, 0.12);
46
+ }
47
+
48
+ .open-science-badge__label {
49
+ font-weight: 600;
50
+ }
51
+
52
+ .open-science-badge__description,
53
+ .open-science-badge__criteria {
54
+ font-size: 0.85rem;
55
+ color: var(--muted-foreground, #4a5568);
56
+ }
@@ -1,5 +1,5 @@
1
1
  // ============================================================================
2
- // Phase 1 Enhancements - New Features Styles
2
+ // Post components: what _layouts/post.html adds to every post
3
3
  // ============================================================================
4
4
  // - Social sharing buttons
5
5
  // - Breadcrumb navigation
@@ -440,7 +440,8 @@
440
440
  }
441
441
 
442
442
  &.is-active {
443
- color: var(--color-accent, #3277f6);
443
+ // On the tint below the plain accent reaches only 4.12:1.
444
+ color: var(--color-accent-text, #1d4ed8);
444
445
  background-color: rgba(50, 119, 246, 0.1);
445
446
  border-left-color: var(--color-accent, #3277f6);
446
447
  font-weight: 500;
@@ -453,7 +454,8 @@
453
454
  border-top: 1px solid var(--color-border, #e0e4ed);
454
455
  background-color: var(--color-background, #ffffff);
455
456
  font-size: 0.8125rem;
456
- color: var(--color-text-tertiary, #8995a8);
457
+ // The tertiary ink is for decoration: 2.41:1 in the light theme, 3.73:1 in the dark one.
458
+ color: var(--color-text-secondary, #6f6862);
457
459
  }
458
460
 
459
461
  &__reading-progress {
data/_sass/_print.scss ADDED
@@ -0,0 +1,291 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'variables' as *;
4
+ @use 'mixins' as *;
5
+
6
+ // Reading mode and print (_includes/components/reading-mode-toggle.html).
7
+ //
8
+ // Reading mode hides the site's chrome and the panels around an article and
9
+ // leaves the article, its metadata and its table of contents. Print does the
10
+ // same on paper: black on white whatever the theme, the addresses of links,
11
+ // no interactive controls, and no figure, table, code block or equation cut
12
+ // across pages where the browser can help it.
13
+
14
+ // ---------------------------------------------------------------------------
15
+ // The control
16
+ // ---------------------------------------------------------------------------
17
+ .reading-mode-bar {
18
+ display: flex;
19
+ justify-content: flex-end;
20
+ }
21
+
22
+ // Shared by the reading-mode control and the reading-state buttons (_reading-state.scss).
23
+ .post-tool {
24
+ display: inline-flex;
25
+ align-items: center;
26
+ gap: map.get($spacing, 2);
27
+ padding: 0.35rem 0.75rem;
28
+ border: 1px solid rgba($color-neutral-200, 0.9);
29
+ border-radius: map.get($radius, md);
30
+ background: $color-surface-50;
31
+ color: $color-ink-700;
32
+ font: inherit;
33
+ font-size: map.get($font-size-scale, sm);
34
+ font-weight: 600;
35
+ cursor: pointer;
36
+
37
+ &:hover,
38
+ &:focus-visible {
39
+ border-color: $color-accent-primary;
40
+ color: $color-accent-primary-text;
41
+ }
42
+
43
+ &[aria-pressed='true'] {
44
+ border-color: $color-accent-primary;
45
+ background: $color-accent-primary;
46
+ color: #fff;
47
+ }
48
+
49
+ svg {
50
+ flex: none;
51
+ }
52
+ }
53
+
54
+ body.dark-mode .post-tool {
55
+ border-color: rgba($dark-ink-500, 0.35);
56
+ background: $dark-surface-300;
57
+ color: $dark-ink-700;
58
+
59
+ &:hover,
60
+ &:focus-visible {
61
+ border-color: $dark-accent-primary;
62
+ color: $dark-accent-primary;
63
+ }
64
+
65
+ &[aria-pressed='true'] {
66
+ border-color: $dark-accent-primary;
67
+ background: $dark-accent-primary;
68
+ color: $dark-surface-100;
69
+ }
70
+ }
71
+
72
+ // ---------------------------------------------------------------------------
73
+ // Reading mode: the article alone, and the way back
74
+ // ---------------------------------------------------------------------------
75
+ body.reading-mode {
76
+ .site-header,
77
+ .site-footer,
78
+ .breadcrumbs,
79
+ .social-share,
80
+ .post-interactive,
81
+ .post-comments,
82
+ .citation-tools,
83
+ .open-science-badges,
84
+ .author-bio,
85
+ .post-related,
86
+ .post-pagination,
87
+ .back-to-top,
88
+ [data-back-to-top] {
89
+ display: none !important;
90
+ }
91
+
92
+ .site-main {
93
+ padding-top: map.get($spacing, 4);
94
+ }
95
+
96
+ // The tools stay in reach while the article scrolls.
97
+ .post-tools {
98
+ position: sticky;
99
+ top: map.get($spacing, 3);
100
+ z-index: 5;
101
+ }
102
+
103
+ .post-content {
104
+ font-size: 1.0625rem;
105
+ line-height: 1.7;
106
+ }
107
+ }
108
+
109
+ // ---------------------------------------------------------------------------
110
+ // Print
111
+ // ---------------------------------------------------------------------------
112
+ .print-only {
113
+ display: none;
114
+ }
115
+
116
+ @media print {
117
+ @page {
118
+ margin: 2cm;
119
+ }
120
+
121
+ body,
122
+ body.dark-mode {
123
+ background: #fff !important;
124
+ color: #000 !important;
125
+ font-size: 11pt;
126
+ }
127
+
128
+ // The chrome and the controls that only work on a screen
129
+ .site-header,
130
+ .site-footer,
131
+ .skip-link,
132
+ .breadcrumbs,
133
+ .social-share,
134
+ .post-interactive,
135
+ .post-comments,
136
+ .post-slides,
137
+ .open-science-badges,
138
+ .author-bio,
139
+ .post-related,
140
+ .post-pagination,
141
+ .post-tools,
142
+ .reading-mode-bar,
143
+ .back-to-top,
144
+ [data-back-to-top],
145
+ .code-copy,
146
+ .citation-tools__exports,
147
+ .viz-table-toggle,
148
+ [aria-live] {
149
+ display: none !important;
150
+ }
151
+
152
+ .print-only {
153
+ display: block !important;
154
+ }
155
+
156
+ .site-main {
157
+ max-width: none;
158
+ padding: 0;
159
+ }
160
+
161
+ .post-body-wrapper {
162
+ display: block;
163
+ }
164
+
165
+ // Black on white, whatever the theme
166
+ body.dark-mode :where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, td, th, figcaption, blockquote, code, pre, span, a,
167
+ strong, em, time, small, summary, label, caption, kbd) {
168
+ color: #000 !important;
169
+ }
170
+
171
+ body.dark-mode :where(section, aside, div, nav, article, figure, p, li, ul, ol, dl, dt, dd, blockquote, pre, code,
172
+ table, th, td, kbd) {
173
+ background: transparent !important;
174
+ border-color: #999 !important;
175
+ }
176
+
177
+ blockquote {
178
+ background: none !important;
179
+ }
180
+
181
+ a {
182
+ color: #000 !important;
183
+ text-decoration: underline;
184
+ }
185
+
186
+ .datalog-statement,
187
+ .datalog-proof,
188
+ .revision-notice,
189
+ .series-nav,
190
+ .reproduce,
191
+ .content-provenance,
192
+ .content-license,
193
+ .citation-tools,
194
+ .enhanced-toc {
195
+ background: none !important;
196
+ border-color: #000;
197
+ box-shadow: none;
198
+ }
199
+
200
+ // Links keep their addresses, other than anchors within the page
201
+ .post-content a[href^='http']::after {
202
+ content: ' (' attr(href) ')';
203
+ font-size: 0.85em;
204
+ word-break: break-all;
205
+ }
206
+
207
+ // Page breaks
208
+ h1,
209
+ h2,
210
+ h3,
211
+ h4 {
212
+ break-after: avoid;
213
+ page-break-after: avoid;
214
+ }
215
+
216
+ p,
217
+ li {
218
+ orphans: 3;
219
+ widows: 3;
220
+ }
221
+
222
+ pre,
223
+ figure,
224
+ table,
225
+ tr,
226
+ blockquote,
227
+ img,
228
+ svg,
229
+ .code-block-wrapper,
230
+ .highlight,
231
+ .datalog-statement,
232
+ .datalog-proof,
233
+ mjx-container[display='true'],
234
+ .katex-display {
235
+ break-inside: avoid;
236
+ page-break-inside: avoid;
237
+ }
238
+
239
+ img,
240
+ svg,
241
+ mjx-container,
242
+ .katex-display {
243
+ max-width: 100% !important;
244
+ overflow: visible !important;
245
+ }
246
+
247
+ // Code without a dark background, wrapped to the page
248
+ pre,
249
+ pre.highlight,
250
+ .highlight pre,
251
+ pre[class*='language-'],
252
+ .code-block-wrapper {
253
+ background: #fff !important;
254
+ color: #000 !important;
255
+ border: 1px solid #999;
256
+ box-shadow: none;
257
+ }
258
+
259
+ pre {
260
+ white-space: pre-wrap !important;
261
+ word-break: break-word;
262
+ overflow: visible !important;
263
+ }
264
+
265
+ body.dark-mode .highlight span {
266
+ color: #000 !important;
267
+ background: none !important;
268
+ }
269
+
270
+ // Interactive embeds become a note; a visualization's table fallback is shown
271
+ iframe,
272
+ canvas,
273
+ video,
274
+ [data-viz-type] > *,
275
+ .interactive-embed > * {
276
+ display: none !important;
277
+ }
278
+
279
+ [data-viz-type]::before,
280
+ .interactive-embed::before {
281
+ content: 'Interactive content, available in the online article.';
282
+ display: block;
283
+ padding: map.get($spacing, 3);
284
+ border: 1px dashed #999;
285
+ font-style: italic;
286
+ }
287
+
288
+ .viz-table-wrapper[hidden] {
289
+ display: block !important;
290
+ }
291
+ }