@abreen/tada 1.16.11 → 1.16.13

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.
@@ -218,7 +218,7 @@ export function getSerifMonoFontStack(
218
218
  const custom = fontOverrides?.serifMono
219
219
  ? `'${CUSTOM_FONT_FAMILY_DEFINITIONS.serifMono.cssFamily}', `
220
220
  : '';
221
- return `${custom}'Libertinus Mono', 'Courier New', 'Courier', monospace`;
221
+ return `${custom}'Courier Prime', 'Courier New', 'Courier', monospace`;
222
222
  }
223
223
 
224
224
  function defaultParseFont(contents: Buffer): ParsedFont {
@@ -14,7 +14,7 @@ export const DEFAULT_FONT_PRELOAD_FILES = {
14
14
  ],
15
15
  serif: [
16
16
  'source-serif-4/SourceSerif4-VariableFont_opsz,wght.woff2',
17
- 'libertinus-mono/LibertinusMono-Regular.woff2',
17
+ 'courier-prime/CourierPrime-Regular.woff2',
18
18
  ],
19
19
  } as const;
20
20
 
@@ -517,10 +517,11 @@ export function createMarkdown(
517
517
  '</span></p>' +
518
518
  '<div class="question-a">' +
519
519
  '<p class="question-a-label">A.</p>' +
520
- '<div class="question-a-body" data-pagefind-ignore>\n'
520
+ '<div class="question-a-body" data-pagefind-ignore>\n' +
521
+ '<div class="question-a-content">\n'
521
522
  );
522
523
  } else {
523
- return '</div></div></div>\n';
524
+ return '</div></div></div></div>\n';
524
525
  }
525
526
  },
526
527
  });
@@ -1,10 +1,4 @@
1
- Copyright 2025 The Libertinus Keyboard Project Authors (https://github.com/googlefonts/libertinus)
2
- Copyright 2025 The Libertinus Math Project Authors (https://github.com/googlefonts/libertinus)
3
- Copyright 2025 The Libertinus Mono Project Authors (https://github.com/googlefonts/libertinus)
4
- Copyright 2025 The Libertinus Sans Project Authors (https://github.com/googlefonts/libertinus)
5
- Copyright 2025 The Libertinus Serif Project Authors (https://github.com/googlefonts/libertinus)
6
- Copyright 2025 The Libertinus Serif Display Project Authors (https://github.com/googlefonts/libertinus)
7
- Copyright 2025 The Libertinus Serif Initials Project Authors (https://github.com/googlefonts/libertinus)
1
+ Copyright 2015 The Courier Prime Project Authors (https://github.com/quoteunquoteapps/CourierPrime).
8
2
 
9
3
  This Font Software is licensed under the SIL Open Font License, Version 1.1.
10
4
  This license is copied below, and is also available with a FAQ at:
@@ -49,11 +49,11 @@ The innermost statement compares `nums[i]` and `nums[curr]`.
49
49
  - when `i` is $n - 3$, the comparison is executed two times
50
50
  - when `i` is $n - 2$, the comparison is executed one time
51
51
 
52
- Therefore the total number of comparisons $C(n)$ is
53
-
52
+ ??? question What is the exact number of comparisons $C(n)$?
54
53
  $$
55
54
  (n-1) + (n-2) + \dots + 1 = \sum_{i=1}^{n-1}i = \frac{n(n-1)}{2}
56
55
  $$
56
+ ???
57
57
 
58
58
  ??? question What complexity class does $C(n)$ belong to?
59
59
  It's a quadratic function. The class is $O(n^2)$.
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abreen/tada",
3
- "version": "1.16.11",
3
+ "version": "1.16.13",
4
4
  "type": "module",
5
5
  "description": "A static site generator",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  transform: translateX(0);
39
39
 
40
40
  @media (prefers-reduced-motion: no-preference) {
41
- transition: transform 0.2s ease;
41
+ transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
42
42
  }
43
43
  }
44
44
 
@@ -114,27 +114,34 @@ header summary .menu-icon-line {
114
114
 
115
115
  @media (prefers-reduced-motion: no-preference) {
116
116
  header summary .menu-icon-line {
117
- transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
118
- }
119
-
120
- header summary .menu-icon-line-middle {
121
117
  transition:
122
- opacity 150ms ease-out,
123
- transform 200ms cubic-bezier(0.2, 0, 0, 1);
118
+ transform 260ms cubic-bezier(0.65, 0, 0.35, 1),
119
+ stroke-dasharray 260ms cubic-bezier(0.65, 0, 0.35, 1),
120
+ stroke-dashoffset 260ms cubic-bezier(0.65, 0, 0.35, 1);
124
121
  }
125
122
  }
126
123
 
124
+ // Change the drawn lengths instead of scaling so round caps keep their shape.
125
+ // Each outer stroke forms half of one diagonal; the middle forms the other.
126
+ // A 12px square matches the hamburger height, with diagonals of 12 * sqrt(2).
127
+ header details[open] summary .menu-icon-line-top,
128
+ header details[open] summary .menu-icon-line-bottom {
129
+ stroke-dasharray: 8.4853 36;
130
+ stroke-dashoffset: -4.7574;
131
+ }
132
+
127
133
  header details[open] summary .menu-icon-line-top {
128
- transform: translateY(6px) rotate(45deg);
134
+ transform: translate(-3px, 3px) rotate(45deg);
129
135
  }
130
136
 
131
137
  header details[open] summary .menu-icon-line-middle {
132
- opacity: 0;
133
- transform: scaleX(0.8);
138
+ stroke-dasharray: 16.9706 36;
139
+ stroke-dashoffset: -0.5147;
140
+ transform: rotate(-45deg);
134
141
  }
135
142
 
136
143
  header details[open] summary .menu-icon-line-bottom {
137
- transform: translateY(-6px) rotate(-45deg);
144
+ transform: translate(3px, -3px) rotate(45deg);
138
145
  }
139
146
 
140
147
  @supports selector(details::details-content) and
@@ -1,30 +1,39 @@
1
- $shift: 12px;
1
+ $shift: 8px;
2
2
  $duration: 150ms;
3
+ $movement-easing: cubic-bezier(0.2, 0, 0, 1);
3
4
 
4
- @keyframes slide-out-left {
5
+ @keyframes page-fade-out {
5
6
  to {
6
7
  opacity: 0;
8
+ }
9
+ }
10
+
11
+ @keyframes page-fade-in {
12
+ from {
13
+ opacity: 0;
14
+ }
15
+ }
16
+
17
+ @keyframes slide-out-left {
18
+ to {
7
19
  transform: translateX(-$shift);
8
20
  }
9
21
  }
10
22
 
11
23
  @keyframes slide-in-right {
12
24
  from {
13
- opacity: 0;
14
25
  transform: translateX($shift);
15
26
  }
16
27
  }
17
28
 
18
29
  @keyframes slide-out-right {
19
30
  to {
20
- opacity: 0;
21
31
  transform: translateX($shift);
22
32
  }
23
33
  }
24
34
 
25
35
  @keyframes slide-in-left {
26
36
  from {
27
- opacity: 0;
28
37
  transform: translateX(-$shift);
29
38
  }
30
39
  }
@@ -61,18 +70,26 @@ $duration: 150ms;
61
70
 
62
71
  // Forward navigation: old content slides left, new content slides in from right
63
72
  .nav-forward::view-transition-old(root) {
64
- animation: slide-out-left $duration ease-in;
73
+ animation:
74
+ slide-out-left $duration $movement-easing,
75
+ page-fade-out $duration ease-in;
65
76
  }
66
77
 
67
78
  .nav-forward::view-transition-new(root) {
68
- animation: slide-in-right $duration ease-out;
79
+ animation:
80
+ slide-in-right $duration $movement-easing,
81
+ page-fade-in $duration ease-out;
69
82
  }
70
83
 
71
84
  // Back navigation: old content slides right, new content slides in from left
72
85
  .nav-back::view-transition-old(root) {
73
- animation: slide-out-right $duration ease-in;
86
+ animation:
87
+ slide-out-right $duration $movement-easing,
88
+ page-fade-out $duration ease-in;
74
89
  }
75
90
 
76
91
  .nav-back::view-transition-new(root) {
77
- animation: slide-in-left $duration ease-out;
92
+ animation:
93
+ slide-in-left $duration $movement-easing,
94
+ page-fade-in $duration ease-out;
78
95
  }
@@ -37,6 +37,7 @@
37
37
  }
38
38
 
39
39
  .js .question-a-body {
40
+ display: grid;
40
41
  cursor: pointer;
41
42
 
42
43
  @include user-select(none);
@@ -54,37 +55,42 @@
54
55
  }
55
56
  }
56
57
 
57
- .question-a-body > *:first-child {
58
+ .question-a-content {
59
+ display: flow-root;
60
+ min-width: 0;
61
+ }
62
+
63
+ .question-a-content > *:first-child {
58
64
  margin-top: 0;
59
65
  }
60
66
 
61
- .question-a-body > *:last-child {
67
+ .question-a-content > *:last-child {
62
68
  margin-bottom: 0;
63
69
  }
64
70
 
65
- .question-a-body > * {
71
+ // Composite the entire answer, including positioned math and explicit colors.
72
+ .js .question-a-body > .question-a-content,
73
+ .js .question-a-body::before {
74
+ grid-area: 1 / 1;
75
+
66
76
  @media (prefers-reduced-motion: no-preference) {
67
- transition:
68
- color 0.25s,
69
- background-color 0.25s,
70
- border-color 0.25s,
71
- box-shadow 0.25s;
77
+ transition: opacity 0.25s;
72
78
  }
73
79
  }
74
80
 
75
- .js .question-a-body:not([data-revealed]) > * {
76
- color: transparent;
81
+ .js .question-a-body::before {
77
82
  pointer-events: none;
83
+ content: '';
78
84
  background-color: var(--bg2-color);
79
- border-color: transparent;
80
- box-shadow: none;
81
85
  }
82
86
 
83
- .js .question-a-body:not([data-revealed]) > * * {
84
- color: transparent;
85
- background-color: var(--bg2-color);
86
- border-color: transparent;
87
- box-shadow: none;
87
+ .js .question-a-body[data-revealed]::before {
88
+ opacity: 0;
89
+ }
90
+
91
+ .js .question-a-body:not([data-revealed]) > .question-a-content {
92
+ pointer-events: none;
93
+ opacity: 0;
88
94
  }
89
95
 
90
96
  .js .question-a-body::after {
@@ -225,17 +231,16 @@
225
231
 
226
232
  @include user-select(text);
227
233
 
228
- &:not([data-revealed]) > * {
229
- color: inherit;
230
- pointer-events: auto;
231
- background-color: transparent;
234
+ > .question-a-content {
235
+ transition: none;
232
236
  }
233
237
 
234
- &:not([data-revealed]) > * * {
235
- color: inherit;
236
- background-color: transparent;
238
+ &:not([data-revealed]) > .question-a-content {
239
+ pointer-events: auto;
240
+ opacity: 1;
237
241
  }
238
242
 
243
+ &::before,
239
244
  &::after {
240
245
  display: none;
241
246
  }
package/src/style.scss CHANGED
@@ -58,11 +58,39 @@
58
58
  }
59
59
 
60
60
  @font-face {
61
- font-family: 'Libertinus Mono';
61
+ font-family: 'Courier Prime';
62
62
  font-style: normal;
63
63
  font-weight: 400;
64
- src: url('libertinus-mono/LibertinusMono-Regular.woff2') format('woff2');
64
+ src: url('courier-prime/CourierPrime-Regular.woff2') format('woff2');
65
65
  font-display: swap;
66
+ size-adjust: 106.383%;
67
+ }
68
+
69
+ @font-face {
70
+ font-family: 'Courier Prime';
71
+ font-style: italic;
72
+ font-weight: 400;
73
+ src: url('courier-prime/CourierPrime-Italic.woff2') format('woff2');
74
+ font-display: swap;
75
+ size-adjust: 106.383%;
76
+ }
77
+
78
+ @font-face {
79
+ font-family: 'Courier Prime';
80
+ font-style: normal;
81
+ font-weight: 700;
82
+ src: url('courier-prime/CourierPrime-Bold.woff2') format('woff2');
83
+ font-display: swap;
84
+ size-adjust: 106.383%;
85
+ }
86
+
87
+ @font-face {
88
+ font-family: 'Courier Prime';
89
+ font-style: italic;
90
+ font-weight: 700;
91
+ src: url('courier-prime/CourierPrime-BoldItalic.woff2') format('woff2');
92
+ font-display: swap;
93
+ size-adjust: 106.383%;
66
94
  }
67
95
 
68
96
  ::selection {
@@ -44,7 +44,7 @@
44
44
  sans: ['Inter', 'Google Sans Code'],
45
45
  serif: [
46
46
  '<%= site.fontOverrides?.serif ? 'Tada Custom Serif' : 'Source Serif 4' %>',
47
- '<%= site.fontOverrides?.serifMono ? 'Tada Custom Serif Mono' : 'Libertinus Mono' %>',
47
+ '<%= site.fontOverrides?.serifMono ? 'Tada Custom Serif Mono' : 'Courier Prime' %>',
48
48
  ],
49
49
  };
50
50
  const fontPreferenceLoader = {
@@ -209,7 +209,8 @@
209
209
  <details>
210
210
  <summary aria-label="Toggle site navigation">
211
211
  <svg class="menu-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"
212
- fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round">
212
+ fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round"
213
+ stroke-dasharray="18 36" stroke-dashoffset="0">
213
214
  <path class="menu-icon-line menu-icon-line-top" d="M3 6h18" />
214
215
  <path class="menu-icon-line menu-icon-line-middle" d="M3 12h18" />
215
216
  <path class="menu-icon-line menu-icon-line-bottom" d="M3 18h18" />