datalog-theme 0.8.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 (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +63 -0
  3. data/CITATION.cff +2 -2
  4. data/README.md +4 -2
  5. data/_data/i18n/en.yml +297 -0
  6. data/_data/i18n/es.yml +297 -0
  7. data/_data/i18n/pt.yml +297 -0
  8. data/_data/js_manifest.json +16 -0
  9. data/_includes/components/author-bio.html +21 -11
  10. data/_includes/components/author-list.html +32 -0
  11. data/_includes/components/citation-tools.html +33 -25
  12. data/_includes/components/comments-thread.html +90 -0
  13. data/_includes/components/contact-form.html +120 -0
  14. data/_includes/components/correction-report.html +82 -0
  15. data/_includes/components/enhanced-toc.html +6 -7
  16. data/_includes/components/license-link.html +13 -0
  17. data/_includes/components/license-notice.html +28 -0
  18. data/_includes/components/moderation-inbox.html +139 -0
  19. data/_includes/components/reactions.html +49 -0
  20. data/_includes/components/reading-list.html +31 -0
  21. data/_includes/components/reading-mode-toggle.html +65 -0
  22. data/_includes/components/reading-state-bookmark.html +27 -0
  23. data/_includes/components/reading-state-panel.html +71 -0
  24. data/_includes/components/reproducibility.html +61 -0
  25. data/_includes/components/responsive-image.html +3 -3
  26. data/_includes/components/revision-history.html +39 -0
  27. data/_includes/components/revision-notice.html +35 -0
  28. data/_includes/components/series-nav.html +64 -0
  29. data/_includes/components/subscribe-form.html +88 -0
  30. data/_includes/components/subscription-manage.html +68 -0
  31. data/_includes/components/webmentions.html +48 -0
  32. data/_includes/csp-meta.html +21 -1
  33. data/_includes/footer.html +3 -0
  34. data/_includes/head.html +51 -40
  35. data/_includes/layouts/default/article.html +4 -6
  36. data/_includes/meta/dynamic-services-config.html +14 -0
  37. data/_includes/meta/math-config.html +9 -5
  38. data/_includes/meta/person-json.html +27 -0
  39. data/_includes/meta/publisher.html +45 -0
  40. data/_includes/meta/schema.html +62 -28
  41. data/_includes/meta/scholarly.html +121 -0
  42. data/_includes/meta/scripts-loader.html +2 -0
  43. data/_includes/meta/webmention-discovery.html +14 -0
  44. data/_includes/scripts.html +57 -0
  45. data/_layouts/dataset.html +4 -3
  46. data/_layouts/default.html +1 -1
  47. data/_layouts/package.html +3 -2
  48. data/_layouts/page.html +15 -0
  49. data/_layouts/post.html +82 -18
  50. data/_layouts/project.html +2 -2
  51. data/_layouts/research.html +20 -8
  52. data/_plugins/authors.rb +133 -0
  53. data/_plugins/config_validator.rb +223 -20
  54. data/_plugins/critical_css_check.rb +42 -0
  55. data/_plugins/i18n.rb +6 -4
  56. data/_plugins/image_optimizer.rb +224 -172
  57. data/_plugins/licenses.rb +135 -0
  58. data/_plugins/math_preprocessor.rb +32 -10
  59. data/_plugins/references.rb +238 -0
  60. data/_plugins/reproducibility.rb +150 -0
  61. data/_plugins/revisions.rb +101 -0
  62. data/_plugins/scholarly.rb +50 -0
  63. data/_plugins/series.rb +104 -0
  64. data/_plugins/statements.rb +87 -0
  65. data/_sass/_base.scss +8 -1
  66. data/_sass/_comments-thread.scss +159 -0
  67. data/_sass/_layout.scss +384 -0
  68. data/_sass/_mathematical.scss +27 -0
  69. data/_sass/_moderation.scss +222 -0
  70. data/_sass/_post-components.scss +4 -2
  71. data/_sass/_print.scss +291 -0
  72. data/_sass/_reactions.scss +89 -0
  73. data/_sass/_reading-state.scss +290 -0
  74. data/_sass/_service-forms.scss +204 -0
  75. data/_sass/_subscriptions.scss +140 -0
  76. data/_sass/_syntax-highlighting.scss +2 -2
  77. data/_sass/_theme.scss +11 -0
  78. data/_sass/_typography.scss +116 -0
  79. data/_sass/_utilities.scss +5 -0
  80. data/_sass/_variables.scss +6 -0
  81. data/_sass/_webmentions.scss +125 -0
  82. data/assets/js/dist/academic.js +1 -1
  83. data/assets/js/dist/analytics-dashboard.js +1 -1
  84. data/assets/js/dist/chunks/chunk-2DYDWUFX.js +1 -0
  85. data/assets/js/dist/chunks/chunk-PATLC23F.js +1 -0
  86. data/assets/js/dist/chunks/chunk-V7734B2G.js +1 -0
  87. data/assets/js/dist/comments.js +2 -0
  88. data/assets/js/dist/contact.js +1 -0
  89. data/assets/js/dist/core.js +1 -1
  90. data/assets/js/dist/corrections.js +1 -0
  91. data/assets/js/dist/loader.js +1 -1
  92. data/assets/js/dist/math.js +1 -1
  93. data/assets/js/dist/moderation.js +1 -0
  94. data/assets/js/dist/notebook.js +1 -1
  95. data/assets/js/dist/reactions.js +1 -0
  96. data/assets/js/dist/reading-state.js +1 -0
  97. data/assets/js/dist/search.js +1 -1
  98. data/assets/js/dist/sources.json +52 -0
  99. data/assets/js/dist/subscriptions.js +1 -0
  100. data/assets/js/dist/webmentions.js +1 -0
  101. data/assets/js/loader.js +34 -0
  102. data/datalog-theme.gemspec +1 -2
  103. data/lib/datalog/cli.rb +9 -1
  104. data/lib/datalog/critical_css.rb +168 -0
  105. data/lib/datalog/plugins/comments.rb +33 -3
  106. data/lib/datalog/theme/installed_files.rb +113 -0
  107. data/lib/datalog/theme/repository_checkout.rb +6 -2
  108. data/lib/datalog/theme/version.rb +5 -1
  109. data/lib/datalog-theme.rb +1 -0
  110. metadata +57 -23
  111. data/assets/js/dist/chunks/chunk-225H5YXE.js +0 -1
@@ -0,0 +1,204 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'variables' as *;
4
+ @use 'mixins' as *;
5
+
6
+ // The forms that post to the site's dynamic services (docs/dynamic-services.md):
7
+ // the correction report on posts and the contact form. Their states come from
8
+ // assets/js/dynamic-services/form-state.js as data-state on the form.
9
+
10
+ .correction-report {
11
+ @include callout($color-accent-secondary);
12
+ margin-top: map.get($spacing, 5);
13
+ font-size: map.get($font-size-scale, sm);
14
+ max-width: $max-width-reading;
15
+ }
16
+
17
+ .correction-report__summary {
18
+ cursor: pointer;
19
+ font-weight: 600;
20
+ color: $color-ink-900;
21
+ }
22
+
23
+ .contact-form {
24
+ margin-top: map.get($spacing, 5);
25
+ max-width: $max-width-reading;
26
+ }
27
+
28
+ .contact-form__fallback {
29
+ margin: 0;
30
+ padding: map.get($spacing, 3) map.get($spacing, 4);
31
+ border-radius: map.get($radius, sm);
32
+ background: rgba($color-neutral-500, 0.08);
33
+ }
34
+
35
+ .service-form {
36
+ margin-top: map.get($spacing, 3);
37
+ }
38
+
39
+ .service-form__intro,
40
+ .service-form__hint {
41
+ margin: 0 0 map.get($spacing, 2);
42
+ color: $color-ink-500;
43
+ }
44
+
45
+ .service-form__hint {
46
+ margin: map.get($spacing, 1) 0 0;
47
+ font-size: map.get($font-size-scale, xs);
48
+ }
49
+
50
+ .service-form__quote {
51
+ margin: 0 0 map.get($spacing, 3);
52
+ padding: 0 0 0 map.get($spacing, 3);
53
+ border-left: 3px solid rgba($color-neutral-500, 0.5);
54
+ font-style: italic;
55
+ }
56
+
57
+ .service-form__fields {
58
+ display: grid;
59
+ gap: map.get($spacing, 3);
60
+ margin: 0 0 map.get($spacing, 3);
61
+ padding: 0;
62
+ border: 0;
63
+ min-width: 0;
64
+ }
65
+
66
+ .service-form__row {
67
+ display: grid;
68
+ gap: map.get($spacing, 3);
69
+
70
+ @include respond-to(md) {
71
+ grid-template-columns: 1fr 1fr;
72
+ }
73
+ }
74
+
75
+ .service-form__privacy {
76
+ margin: 0 0 map.get($spacing, 3);
77
+ font-size: map.get($font-size-scale, xs);
78
+ color: $color-ink-500;
79
+
80
+ a {
81
+ text-decoration: underline;
82
+ }
83
+ }
84
+
85
+ .service-form__field {
86
+ display: grid;
87
+ gap: map.get($spacing, 1);
88
+
89
+ label {
90
+ font-weight: 600;
91
+ }
92
+
93
+ input,
94
+ select,
95
+ textarea {
96
+ width: 100%;
97
+ padding: 0.45rem 0.6rem;
98
+ border: 1px solid rgba($color-neutral-200, 0.9);
99
+ border-radius: map.get($radius, sm);
100
+ background: $color-surface-50;
101
+ color: $color-ink-700;
102
+ font: inherit;
103
+ font-size: map.get($font-size-scale, sm);
104
+ }
105
+
106
+ [aria-invalid='true'] {
107
+ border-color: $color-danger-600;
108
+ }
109
+ }
110
+
111
+ .service-form__error {
112
+ margin: 0;
113
+ font-size: map.get($font-size-scale, xs);
114
+ font-weight: 600;
115
+ color: $color-danger-700;
116
+ }
117
+
118
+ // The honeypot: readers never see it, bots fill it.
119
+ .service-form__trap {
120
+ position: absolute;
121
+ left: -10000px;
122
+ width: 1px;
123
+ height: 1px;
124
+ overflow: hidden;
125
+ }
126
+
127
+ .service-form__actions {
128
+ display: flex;
129
+ flex-wrap: wrap;
130
+ gap: map.get($spacing, 2);
131
+ }
132
+
133
+ .service-form__status {
134
+ margin: map.get($spacing, 3) 0 0;
135
+ padding: map.get($spacing, 2) map.get($spacing, 3);
136
+ border-radius: map.get($radius, sm);
137
+ background: rgba($color-neutral-500, 0.1);
138
+ color: $color-ink-700;
139
+
140
+ form[data-state='success'] & {
141
+ background: rgba($color-success, 0.12);
142
+ }
143
+
144
+ form[data-state='error'] &,
145
+ form[data-state='invalid'] & {
146
+ background: rgba($color-danger-500, 0.1);
147
+ color: $color-danger-700;
148
+ }
149
+ }
150
+
151
+ form[data-state='pending'] .service-form__actions {
152
+ opacity: 0.7;
153
+ }
154
+
155
+ form[data-state='disabled'] .service-form__fields {
156
+ opacity: 0.6;
157
+ }
158
+
159
+ body.dark-mode {
160
+ .correction-report {
161
+ border-left-color: $dark-accent-secondary;
162
+ }
163
+
164
+ .correction-report__summary {
165
+ color: $dark-ink-900;
166
+ }
167
+
168
+ .service-form__intro,
169
+ .service-form__hint,
170
+ .service-form__privacy {
171
+ color: $dark-ink-500;
172
+ }
173
+
174
+ .contact-form__fallback {
175
+ background: rgba($dark-ink-500, 0.15);
176
+ }
177
+
178
+ .service-form__field {
179
+ input,
180
+ select,
181
+ textarea {
182
+ border-color: rgba($dark-ink-500, 0.35);
183
+ background: $dark-surface-300;
184
+ color: $dark-ink-700;
185
+ }
186
+ }
187
+
188
+ .service-form__error,
189
+ form[data-state='error'] .service-form__status,
190
+ form[data-state='invalid'] .service-form__status {
191
+ color: $color-danger-300;
192
+ }
193
+
194
+ .service-form__status {
195
+ background: rgba($dark-ink-500, 0.15);
196
+ color: $dark-ink-700;
197
+ }
198
+ }
199
+
200
+ @media print {
201
+ .correction-report {
202
+ display: none !important;
203
+ }
204
+ }
@@ -0,0 +1,140 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'variables' as *;
4
+
5
+ // Newsletter subscriptions (components/subscribe-form.html and
6
+ // subscription-manage.html). The forms are .service-form (_service-forms.scss).
7
+
8
+ .subscribe {
9
+ max-width: $max-width-reading;
10
+ margin-top: map.get($spacing, 6);
11
+ }
12
+
13
+ .subscribe__heading {
14
+ margin: 0 0 map.get($spacing, 2);
15
+ font-size: map.get($font-size-scale, lg);
16
+ }
17
+
18
+ .subscribe__description {
19
+ margin: 0 0 map.get($spacing, 3);
20
+ font-size: map.get($font-size-scale, sm);
21
+ }
22
+
23
+ // In the footer the form sits in a column next to the feeds: smaller, no top gap.
24
+ .subscribe--footer {
25
+ max-width: none;
26
+ margin-top: map.get($spacing, 4);
27
+
28
+ .subscribe__heading {
29
+ font-size: map.get($font-size-scale, md);
30
+ }
31
+ }
32
+
33
+ // The footer is dark in both themes, so the form's inks are the footer's.
34
+ .site-footer .subscribe {
35
+ .subscribe__heading {
36
+ color: #fff;
37
+ }
38
+
39
+ .service-form__privacy,
40
+ .service-form__hint {
41
+ color: rgba(#fff, 0.75);
42
+ }
43
+
44
+ .service-form__privacy a {
45
+ color: #fff;
46
+ }
47
+
48
+ .service-form__error,
49
+ form[data-state='error'] .service-form__status,
50
+ form[data-state='invalid'] .service-form__status {
51
+ color: $color-danger-300;
52
+ }
53
+
54
+ .service-form__status {
55
+ background: rgba(#fff, 0.1);
56
+ color: #fff;
57
+ }
58
+ }
59
+
60
+ .subscribe__topics {
61
+ display: flex;
62
+ flex-wrap: wrap;
63
+ gap: map.get($spacing, 1) map.get($spacing, 4);
64
+ margin: 0;
65
+ padding: 0;
66
+ border: 0;
67
+ min-width: 0;
68
+ font-size: map.get($font-size-scale, sm);
69
+
70
+ legend {
71
+ width: 100%;
72
+ margin-bottom: map.get($spacing, 1);
73
+ padding: 0;
74
+ font-weight: 600;
75
+ }
76
+
77
+ .service-form__error {
78
+ width: 100%;
79
+ }
80
+ }
81
+
82
+ .subscribe__topic {
83
+ display: inline-flex;
84
+ align-items: center;
85
+ gap: map.get($spacing, 2);
86
+ font-weight: 400;
87
+
88
+ input {
89
+ width: auto;
90
+ }
91
+ }
92
+
93
+ .subscription-manage {
94
+ max-width: $max-width-reading;
95
+ margin-top: map.get($spacing, 5);
96
+ }
97
+
98
+ .subscription-manage__status {
99
+ margin: 0 0 map.get($spacing, 3);
100
+ padding: map.get($spacing, 2) map.get($spacing, 3);
101
+ border-radius: map.get($radius, sm);
102
+ background: rgba($color-neutral-500, 0.1);
103
+
104
+ .subscription-manage[data-state='error'] & {
105
+ background: rgba($color-danger-500, 0.1);
106
+ color: $color-danger-700;
107
+ }
108
+
109
+ .subscription-manage[data-state='confirmed'] &,
110
+ .subscription-manage[data-state='saved'] & {
111
+ background: rgba($color-success, 0.12);
112
+ }
113
+ }
114
+
115
+ .subscription-manage__panel {
116
+ display: grid;
117
+ gap: map.get($spacing, 3);
118
+ justify-items: start;
119
+ }
120
+
121
+ // display: grid would override the hidden attribute.
122
+ .subscription-manage__panel[hidden] {
123
+ display: none;
124
+ }
125
+
126
+ body.dark-mode {
127
+ .subscription-manage__status {
128
+ background: rgba($dark-ink-500, 0.15);
129
+ }
130
+
131
+ .subscription-manage[data-state='error'] .subscription-manage__status {
132
+ color: $color-danger-300;
133
+ }
134
+ }
135
+
136
+ @media print {
137
+ .subscribe {
138
+ display: none !important;
139
+ }
140
+ }
@@ -80,7 +80,7 @@ pre.highlight {
80
80
  .nb,
81
81
  .bp,
82
82
  .gi {
83
- color: $color-success;
83
+ color: $color-success-text;
84
84
  }
85
85
 
86
86
  .o,
@@ -117,7 +117,7 @@ pre.highlight {
117
117
  .sr,
118
118
  .gr,
119
119
  .gt {
120
- color: $color-warning;
120
+ color: $color-warning-text;
121
121
  }
122
122
 
123
123
  .gh,
data/_sass/_theme.scss CHANGED
@@ -34,6 +34,15 @@
34
34
  @if features.$packages {
35
35
  @include meta.load-css('package-docs');
36
36
  }
37
+ @include meta.load-css('reading-state');
38
+ @include meta.load-css('service-forms');
39
+ @include meta.load-css('comments-thread');
40
+ @include meta.load-css('reactions');
41
+ @include meta.load-css('webmentions');
42
+ @include meta.load-css('subscriptions');
43
+ @include meta.load-css('moderation');
44
+ // Reading mode and print come last, so their rules win.
45
+ @include meta.load-css('print');
37
46
 
38
47
  // 2) CSS rules AFTER the partials
39
48
  :root {
@@ -52,6 +61,7 @@
52
61
 
53
62
  // Accent colors
54
63
  --color-accent: #{$color-accent-primary};
64
+ --color-accent-text: #{$color-accent-primary-text};
55
65
  --color-accent-secondary: #{$color-accent-secondary};
56
66
  --color-accent-dark: #{color.adjust($color-accent-primary, $lightness: -10%)};
57
67
 
@@ -90,6 +100,7 @@ body.dark-mode {
90
100
 
91
101
  // Accent colors
92
102
  --color-accent: #{$dark-accent-primary};
103
+ --color-accent-text: #{$dark-accent-primary};
93
104
  --color-accent-secondary: #{$dark-accent-secondary};
94
105
  --color-accent-dark: #{color.adjust($dark-accent-primary, $lightness: -10%)};
95
106
 
@@ -95,6 +95,122 @@ figcaption {
95
95
  margin-top: map.get($spacing, 2);
96
96
  }
97
97
 
98
+ // Numbered figures and tables, and the references to them (_plugins/references.rb).
99
+ .datalog-figure img {
100
+ display: block;
101
+ max-width: 100%;
102
+ height: auto;
103
+ margin: 0 auto;
104
+ }
105
+
106
+ table > caption {
107
+ caption-side: top;
108
+ text-align: left;
109
+ font-size: map.get($font-size-scale, sm);
110
+ color: $color-ink-500;
111
+ margin-bottom: map.get($spacing, 2);
112
+ }
113
+
114
+ body.dark-mode table > caption {
115
+ color: rgba($dark-ink-500, 0.85);
116
+ }
117
+
118
+ .datalog-ref-label {
119
+ font-weight: 600;
120
+ }
121
+
122
+ // A reference scrolls its target clear of the sticky header.
123
+ [data-ref-target] {
124
+ scroll-margin-top: calc(var(--header-height, 96px) + #{map.get($spacing, 4)});
125
+ }
126
+
127
+ @media print {
128
+ [data-ref-target] {
129
+ break-inside: avoid;
130
+ }
131
+ }
132
+
133
+ // Theorems, definitions and the other statements, and proofs (_plugins/statements.rb).
134
+ .datalog-statement {
135
+ @include callout($color-accent-primary);
136
+ margin: map.get($spacing, 5) 0;
137
+ max-width: $max-width-reading;
138
+ }
139
+
140
+ .datalog-statement--definition,
141
+ .datalog-statement--assumption {
142
+ @include callout($color-accent-secondary);
143
+ }
144
+
145
+ .datalog-statement--example,
146
+ .datalog-statement--remark {
147
+ @include callout($color-neutral-500);
148
+ }
149
+
150
+ .datalog-statement__heading,
151
+ .datalog-proof__heading {
152
+ margin: 0 0 map.get($spacing, 2);
153
+ }
154
+
155
+ .datalog-statement__body > :last-child,
156
+ .datalog-proof__body > :last-child {
157
+ margin-bottom: 0;
158
+ }
159
+
160
+ .datalog-proof {
161
+ margin: map.get($spacing, 5) 0;
162
+ max-width: $max-width-reading;
163
+ }
164
+
165
+ .datalog-proof__heading {
166
+ font-style: italic;
167
+ }
168
+
169
+ .datalog-proof__end {
170
+ margin: 0;
171
+ text-align: right;
172
+ }
173
+
174
+ // On the tinted background, a link is a shade darker to keep its contrast, and
175
+ // a code block sits on the page background, which the highlighter's colours
176
+ // are set for.
177
+ .datalog-statement a {
178
+ color: $color-accent-primary-text;
179
+
180
+ &:hover,
181
+ &:focus {
182
+ color: $color-accent-secondary-text;
183
+ }
184
+ }
185
+
186
+ .datalog-statement pre.highlight,
187
+ .datalog-statement pre[class*='language-'] {
188
+ background: $color-surface-50;
189
+ }
190
+
191
+ body.dark-mode {
192
+ .datalog-statement {
193
+ border-left-color: $dark-accent-primary;
194
+ }
195
+
196
+ .datalog-statement--definition,
197
+ .datalog-statement--assumption {
198
+ border-left-color: $dark-accent-secondary;
199
+ }
200
+
201
+ .datalog-statement--example,
202
+ .datalog-statement--remark {
203
+ border-left-color: $dark-ink-500;
204
+ }
205
+ }
206
+
207
+ @media print {
208
+ .datalog-statement {
209
+ border-left-color: currentColor;
210
+ background: none;
211
+ }
212
+ }
213
+
98
214
  body.dark-mode figcaption {
99
215
  color: rgba($dark-ink-500, 0.85);
100
216
  }
@@ -328,6 +328,11 @@ body.dark-mode .analytics-alert {
328
328
  background: rgba($color-surface, 0.65);
329
329
  }
330
330
 
331
+ // The intro's colour is the light ink; on the dark background it was invisible (1.02:1).
332
+ body.dark-mode .post-comments-intro {
333
+ color: $dark-ink-700;
334
+ }
335
+
331
336
  body.dark-mode .datalog-comments {
332
337
  background: rgba($color-surface-dark, 0.35);
333
338
  border-color: rgba($color-border-dark, 0.6);
@@ -45,9 +45,15 @@ $color-accent-secondary: #0d9488; // teal — fills, borders and other non-text
45
45
  // #0d9488 reaches only 3.1:1 to 3.7:1 against white and against its own
46
46
  // tinted backgrounds, so it fails WCAG AA wherever it is used as text.
47
47
  $color-accent-secondary-text: #115e59; // teal — the same accent as readable text
48
+ // #2563eb reaches only 4.4:1 against its own 8% tint on the page background,
49
+ // where a theorem's links sit.
50
+ $color-accent-primary-text: #1d4ed8; // blue — links on a tinted background
48
51
  $color-accent-tertiary: #7c3aed; // purple — charts, visual accents
49
52
  $color-success: #16a34a;
53
+ $color-success-text: #166534; // green — the success colour as readable text
50
54
  $color-warning: #d97706;
55
+ $color-warning-text: #92400e; // amber — the warning colour as readable text
56
+ $dark-warning: #fbbf24; // lighter amber for dark bg
51
57
  $color-critical: #dc2626;
52
58
  $color-neutral-50: #fafaf9 !default;
53
59
  $color-neutral-100: #f5f5f4;
@@ -0,0 +1,125 @@
1
+ @use 'sass:map';
2
+
3
+ @use 'variables' as *;
4
+
5
+ // "Mentioned elsewhere" (components/webmentions.html, assets/js/webmentions/list.js):
6
+ // what other websites said about the article, apart from the comments hosted here.
7
+
8
+ .webmentions {
9
+ max-width: $max-width-reading;
10
+ margin-top: map.get($spacing, 6);
11
+ padding-top: map.get($spacing, 4);
12
+ border-top: 1px solid rgba($color-neutral-500, 0.25);
13
+ }
14
+
15
+ .webmentions__heading {
16
+ margin: 0 0 map.get($spacing, 2);
17
+ font-size: map.get($font-size-scale, lg);
18
+ }
19
+
20
+ .webmentions__intro,
21
+ .webmentions__status {
22
+ margin: 0 0 map.get($spacing, 3);
23
+ font-size: map.get($font-size-scale, sm);
24
+ color: $color-ink-500;
25
+ }
26
+
27
+ .webmentions[data-state='error'] .webmentions__status {
28
+ color: $color-danger-700;
29
+ }
30
+
31
+ .webmentions__list {
32
+ list-style: none;
33
+ margin: 0;
34
+ padding: 0;
35
+ display: grid;
36
+ gap: map.get($spacing, 3);
37
+ }
38
+
39
+ // display: grid would override the hidden attribute.
40
+ .webmentions__list[hidden] {
41
+ display: none;
42
+ }
43
+
44
+ .webmention {
45
+ padding-left: map.get($spacing, 4);
46
+ border-left: 3px solid rgba($color-neutral-500, 0.35);
47
+ font-size: map.get($font-size-scale, sm);
48
+ }
49
+
50
+ .webmention--reply {
51
+ border-left-color: $color-accent-secondary;
52
+ }
53
+
54
+ .webmention__type {
55
+ display: inline-block;
56
+ margin-right: map.get($spacing, 2);
57
+ padding: 0 map.get($spacing, 2);
58
+ border-radius: map.get($radius, sm);
59
+ background: rgba($color-neutral-500, 0.15);
60
+ color: $color-ink-700;
61
+ font-size: map.get($font-size-scale, xs);
62
+ text-transform: uppercase;
63
+ letter-spacing: 0.04em;
64
+ }
65
+
66
+ .webmention__title {
67
+ font-weight: 600;
68
+ overflow-wrap: anywhere;
69
+ }
70
+
71
+ .webmention__meta {
72
+ display: block;
73
+ margin-top: map.get($spacing, 1);
74
+ color: $color-ink-500;
75
+
76
+ > * + *::before {
77
+ content: '·';
78
+ margin: 0 map.get($spacing, 1);
79
+ }
80
+ }
81
+
82
+ .webmention__excerpt {
83
+ margin: map.get($spacing, 2) 0 0;
84
+ color: $color-ink-700;
85
+ overflow-wrap: anywhere;
86
+ }
87
+
88
+ body.dark-mode {
89
+ .webmentions {
90
+ border-top-color: rgba($dark-ink-500, 0.35);
91
+ }
92
+
93
+ .webmentions__intro,
94
+ .webmentions__status,
95
+ .webmention__meta {
96
+ color: $dark-ink-500;
97
+ }
98
+
99
+ .webmentions[data-state='error'] .webmentions__status {
100
+ color: $color-danger-300;
101
+ }
102
+
103
+ .webmention {
104
+ border-left-color: rgba($dark-ink-500, 0.45);
105
+ }
106
+
107
+ .webmention--reply {
108
+ border-left-color: $dark-accent-secondary;
109
+ }
110
+
111
+ .webmention__type {
112
+ background: rgba($dark-ink-500, 0.2);
113
+ color: $dark-ink-700;
114
+ }
115
+
116
+ .webmention__excerpt {
117
+ color: $dark-ink-700;
118
+ }
119
+ }
120
+
121
+ @media print {
122
+ .webmentions {
123
+ display: none !important;
124
+ }
125
+ }
@@ -1 +1 @@
1
- import"./chunks/chunk-225H5YXE.js";function d(){let a=window.DatalogAcademic||{},c=window.DatalogPublications||{},t=c.metrics||(a.citations?a.citations.metrics:{})||{},o=c.yearly_totals||(a.citations?a.citations.yearly_totals:{})||{};document.querySelectorAll("[data-citation-metric]").forEach(e=>{let n=e.getAttribute("data-citation-metric");if(!n)return;let i;switch(n){case"total":i=t.total;break;case"h_index":case"h-index":i=t.h_index;break;case"i10_index":case"i10-index":i=t.i10_index;break;case"since_total":i=t.since_2019?t.since_2019.total:void 0;break;case"since_h_index":i=t.since_2019?t.since_2019.h_index:void 0;break;case"since_i10":i=t.since_2019?t.since_2019.i10_index:void 0;break;default:if(n.startsWith("year_")){let s=n.replace("year_","");i=o[s]}break}typeof i=="number"?e.textContent=i.toLocaleString():i&&(e.textContent=i)})}function u(){let a=window.DatalogAcademic||{},t=(window.DatalogPublications||{}).citation_totals||(a.citations?a.citations.per_publication:{})||{};document.querySelectorAll("[data-publication-citations]").forEach(o=>{let e=o.getAttribute("data-publication-citations");if(!e)return;let n=e.toLowerCase(),i;t[e]?i=t[e].total||t[e]:t[n]&&(i=t[n].total||t[n]),typeof i=="number"&&(o.textContent=i.toLocaleString())})}function f(){let a=window.DatalogAcademic||{},t=(window.DatalogPublications||{}).yearly_totals||(a.citations?a.citations.yearly_totals:{})||{},o=document.querySelector("[data-citation-timeline]");o&&t&&o.querySelectorAll("li[data-year]").forEach(n=>{let i=n.getAttribute("data-year");if(!i)return;let s=n.querySelector("[data-year-total]"),r=t[i];s&&typeof r!="undefined"&&(s.textContent=Number(r).toLocaleString(),n.style.setProperty("--timeline-value",Math.min(Number(r)/5,100)))})}function y(){let a=document.querySelector("[data-submission-filter]");if(a){let c=document.querySelectorAll(".submission-card"),t=()=>{let o=a.value;c.forEach(e=>{if(!o){e.hidden=!1;return}let n=e.getAttribute("data-submission-status");e.hidden=n!==o})};a.addEventListener("change",t),t()}}function p(){let a=document.querySelector("[data-calendar-filter]"),c=document.querySelector("[data-academic-calendar]");if(a&&c){let t=c.querySelectorAll("li[data-event-type]"),o=()=>{let e=a.value;t.forEach(n=>{if(!e){n.hidden=!1;return}let i=n.getAttribute("data-event-type");n.hidden=i!==e})};a.addEventListener("change",o),o()}}function b(){document.querySelectorAll(".open-science-badge").forEach(c=>{let t=c.querySelector(".open-science-badge__description"),o=c.querySelector(".open-science-badge__criteria"),e=[];t&&e.push(t.textContent.trim()),o&&e.push(o.textContent.trim()),e.length&&c.setAttribute("title",e.join(" \u2022 "))})}function l(){d(),u(),f(),y(),p(),b()}typeof window!="undefined"&&document.readyState!=="loading"?l():typeof window!="undefined"&&document.addEventListener("DOMContentLoaded",l);export{l as initAcademicFeatures,p as initCalendarFilter,b as initOpenScienceBadges,y as initSubmissionFilter,d as populateCitationMetrics,f as populateCitationTimeline,u as populatePublicationCitations};
1
+ import"./chunks/chunk-PATLC23F.js";function d(){let a=window.DatalogAcademic||{},c=window.DatalogPublications||{},t=c.metrics||(a.citations?a.citations.metrics:{})||{},o=c.yearly_totals||(a.citations?a.citations.yearly_totals:{})||{};document.querySelectorAll("[data-citation-metric]").forEach(e=>{let n=e.getAttribute("data-citation-metric");if(!n)return;let i;switch(n){case"total":i=t.total;break;case"h_index":case"h-index":i=t.h_index;break;case"i10_index":case"i10-index":i=t.i10_index;break;case"since_total":i=t.since_2019?t.since_2019.total:void 0;break;case"since_h_index":i=t.since_2019?t.since_2019.h_index:void 0;break;case"since_i10":i=t.since_2019?t.since_2019.i10_index:void 0;break;default:if(n.startsWith("year_")){let s=n.replace("year_","");i=o[s]}break}typeof i=="number"?e.textContent=i.toLocaleString():i&&(e.textContent=i)})}function u(){let a=window.DatalogAcademic||{},t=(window.DatalogPublications||{}).citation_totals||(a.citations?a.citations.per_publication:{})||{};document.querySelectorAll("[data-publication-citations]").forEach(o=>{let e=o.getAttribute("data-publication-citations");if(!e)return;let n=e.toLowerCase(),i;t[e]?i=t[e].total||t[e]:t[n]&&(i=t[n].total||t[n]),typeof i=="number"&&(o.textContent=i.toLocaleString())})}function f(){let a=window.DatalogAcademic||{},t=(window.DatalogPublications||{}).yearly_totals||(a.citations?a.citations.yearly_totals:{})||{},o=document.querySelector("[data-citation-timeline]");o&&t&&o.querySelectorAll("li[data-year]").forEach(n=>{let i=n.getAttribute("data-year");if(!i)return;let s=n.querySelector("[data-year-total]"),r=t[i];s&&typeof r!="undefined"&&(s.textContent=Number(r).toLocaleString(),n.style.setProperty("--timeline-value",Math.min(Number(r)/5,100)))})}function y(){let a=document.querySelector("[data-submission-filter]");if(a){let c=document.querySelectorAll(".submission-card"),t=()=>{let o=a.value;c.forEach(e=>{if(!o){e.hidden=!1;return}let n=e.getAttribute("data-submission-status");e.hidden=n!==o})};a.addEventListener("change",t),t()}}function p(){let a=document.querySelector("[data-calendar-filter]"),c=document.querySelector("[data-academic-calendar]");if(a&&c){let t=c.querySelectorAll("li[data-event-type]"),o=()=>{let e=a.value;t.forEach(n=>{if(!e){n.hidden=!1;return}let i=n.getAttribute("data-event-type");n.hidden=i!==e})};a.addEventListener("change",o),o()}}function b(){document.querySelectorAll(".open-science-badge").forEach(c=>{let t=c.querySelector(".open-science-badge__description"),o=c.querySelector(".open-science-badge__criteria"),e=[];t&&e.push(t.textContent.trim()),o&&e.push(o.textContent.trim()),e.length&&c.setAttribute("title",e.join(" \u2022 "))})}function l(){d(),u(),f(),y(),p(),b()}typeof window!="undefined"&&document.readyState!=="loading"?l():typeof window!="undefined"&&document.addEventListener("DOMContentLoaded",l);export{l as initAcademicFeatures,p as initCalendarFilter,b as initOpenScienceBadges,y as initSubmissionFilter,d as populateCitationMetrics,f as populateCitationTimeline,u as populatePublicationCitations};