@abreen/tada 1.16.12 → 1.17.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.
- package/build/utils/markdown.ts +3 -2
- package/init/content/labs/02/index.md +2 -2
- package/init/public/avatars/alex.jpg +0 -0
- package/package.json +1 -1
- package/src/appearance-picker/style.scss +1 -1
- package/src/header/_base.scss +17 -10
- package/src/navigate/style.scss +26 -9
- package/src/question/style.scss +29 -24
- package/templates/_top.html +2 -1
package/build/utils/markdown.ts
CHANGED
|
@@ -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
|
});
|
|
@@ -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
|
-
|
|
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
package/src/header/_base.scss
CHANGED
|
@@ -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
|
-
|
|
123
|
-
|
|
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:
|
|
134
|
+
transform: translate(-3px, 3px) rotate(45deg);
|
|
129
135
|
}
|
|
130
136
|
|
|
131
137
|
header details[open] summary .menu-icon-line-middle {
|
|
132
|
-
|
|
133
|
-
|
|
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:
|
|
144
|
+
transform: translate(3px, -3px) rotate(45deg);
|
|
138
145
|
}
|
|
139
146
|
|
|
140
147
|
@supports selector(details::details-content) and
|
package/src/navigate/style.scss
CHANGED
|
@@ -1,30 +1,39 @@
|
|
|
1
|
-
$shift:
|
|
1
|
+
$shift: 8px;
|
|
2
2
|
$duration: 150ms;
|
|
3
|
+
$movement-easing: cubic-bezier(0.2, 0, 0, 1);
|
|
3
4
|
|
|
4
|
-
@keyframes
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
92
|
+
animation:
|
|
93
|
+
slide-in-left $duration $movement-easing,
|
|
94
|
+
page-fade-in $duration ease-out;
|
|
78
95
|
}
|
package/src/question/style.scss
CHANGED
|
@@ -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-
|
|
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-
|
|
67
|
+
.question-a-content > *:last-child {
|
|
62
68
|
margin-bottom: 0;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
|
-
|
|
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
|
|
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
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
229
|
-
|
|
230
|
-
pointer-events: auto;
|
|
231
|
-
background-color: transparent;
|
|
234
|
+
> .question-a-content {
|
|
235
|
+
transition: none;
|
|
232
236
|
}
|
|
233
237
|
|
|
234
|
-
&:not([data-revealed]) >
|
|
235
|
-
|
|
236
|
-
|
|
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/templates/_top.html
CHANGED
|
@@ -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" />
|