@abreen/tada 1.6.4 → 1.7.1

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 (51) hide show
  1. package/bin/tada.ts +4 -11
  2. package/build/apply-base-path-plugin.ts +11 -19
  3. package/build/colors.ts +19 -22
  4. package/build/content-watch.ts +3 -16
  5. package/build/copy.ts +42 -20
  6. package/build/deflist-id-plugin.ts +3 -16
  7. package/build/features.ts +3 -6
  8. package/build/generate-content-assets.ts +9 -5
  9. package/build/generate-favicon.ts +5 -15
  10. package/build/generate-web-app-manifest.ts +19 -57
  11. package/build/globals.ts +19 -24
  12. package/build/log.ts +30 -46
  13. package/build/pagefind.ts +2 -2
  14. package/build/reachability.ts +1 -1
  15. package/build/serve.ts +1 -5
  16. package/build/site-variables.ts +2 -2
  17. package/build/templates.ts +2 -2
  18. package/build/text-to-id.ts +6 -0
  19. package/build/types.d.ts +1 -7
  20. package/build/utils/code.ts +3 -7
  21. package/build/utils/front-matter.ts +28 -0
  22. package/build/utils/link.ts +8 -0
  23. package/build/utils/literate-java.ts +42 -33
  24. package/build/utils/markdown.ts +13 -17
  25. package/build/utils/paths.ts +3 -11
  26. package/build/utils/render.ts +25 -34
  27. package/build/utils/trace-layout.ts +308 -246
  28. package/build/utils/trace-svg.ts +1 -6
  29. package/build/utils/trace.ts +22 -47
  30. package/build/validate-internal-links-plugin.ts +2 -9
  31. package/build/watch-reload-client.ts +4 -6
  32. package/build/watch.ts +67 -116
  33. package/init/content/index.md +2 -0
  34. package/init/content/labs/00/VowelCounter.java.md +2 -0
  35. package/init/content/labs/00/index.md +2 -0
  36. package/init/content/labs/01/index.md +2 -0
  37. package/init/content/labs/index.md +2 -0
  38. package/init/content/lectures/01/Pair.java.md +2 -0
  39. package/init/content/lectures/01/index.md +2 -0
  40. package/init/content/lectures/02/index.md +2 -0
  41. package/init/content/lectures/index.md +2 -0
  42. package/init/content/markdown.md +5 -1
  43. package/init/content/problem_sets/index.html +2 -0
  44. package/package.json +2 -2
  45. package/src/_alerts.scss +1 -1
  46. package/src/_base.scss +9 -10
  47. package/src/_mixins.scss +4 -0
  48. package/src/literate/style.scss +1 -0
  49. package/src/print/style.scss +37 -20
  50. package/src/toc/style.scss +4 -3
  51. package/templates/_theme.scss +1 -1
@@ -60,6 +60,7 @@ body.literate .literate-code-output {
60
60
 
61
61
  @media (width >= 924px) {
62
62
  grid-template-columns: 1fr 1fr;
63
+ align-items: start;
63
64
 
64
65
  > pre:last-child {
65
66
  min-width: 150px;
@@ -1,13 +1,10 @@
1
- :root {
2
- --print-font-size: 15px;
3
- }
1
+ @use '../mixins' as *;
4
2
 
5
3
  @media print {
6
4
  html,
7
- body,
8
- main,
9
- section {
5
+ body {
10
6
  background: none !important;
7
+ color: #000;
11
8
  }
12
9
 
13
10
  hr {
@@ -27,15 +24,37 @@
27
24
  margin-top: 0;
28
25
  }
29
26
 
30
- body {
31
- font-size: var(--print-font-size);
32
- color: #000;
27
+ main a:not(.heading-anchor):not(.footnote-ref):not(.line-number) {
28
+ @include link-underline;
29
+ }
30
+
31
+ pre,
32
+ tt,
33
+ code {
34
+ border: 1px solid #ccc;
33
35
  }
34
36
 
35
37
  pre {
36
- font-size: var(--print-font-size);
38
+ white-space: pre-wrap;
39
+ }
40
+
41
+ pre code {
37
42
  border: none;
38
- padding: 0;
43
+ }
44
+
45
+ .code-body pre,
46
+ .code-prose-content code,
47
+ .file-header tt,
48
+ .file-header code {
49
+ border: none;
50
+ }
51
+
52
+ // .alert strips the default padding from inline code (since it also
53
+ // strips the background). In print we add a border, so restore the
54
+ // padding so the border doesn't hug the text.
55
+ .alert .content tt,
56
+ .alert .content code {
57
+ padding: var(--mono-padding);
39
58
  }
40
59
 
41
60
  .footnotes {
@@ -50,18 +69,15 @@
50
69
  display: none !important;
51
70
  }
52
71
 
53
- main details {
54
- border: 2px solid #000;
55
- }
56
-
57
- main details .alert {
58
- border: none;
59
- padding: 0;
72
+ details,
73
+ .alert {
74
+ border-color: #000 !important;
60
75
  }
61
76
 
62
77
  section {
63
78
  border: none;
64
79
  padding: 0;
80
+ margin: 0;
65
81
  width: 100%;
66
82
  }
67
83
 
@@ -69,7 +85,8 @@
69
85
  display: none;
70
86
  }
71
87
 
72
- a.external::after {
73
- display: none;
88
+ .external-link-tail::after,
89
+ a.external:not(:has(.external-link-tail))::after {
90
+ content: none;
74
91
  }
75
92
  }
@@ -61,10 +61,11 @@ body.code .toc ol a {
61
61
  .toc ol li:has(a):hover a {
62
62
  color: var(--fg2-color);
63
63
  }
64
+ }
64
65
 
65
- .toc ol li a:active {
66
- color: var(--link-active-color);
67
- }
66
+ .toc ol li:has(a):active,
67
+ .toc ol li:has(a):active a {
68
+ color: var(--link-active-color);
68
69
  }
69
70
 
70
71
  @media (min-width: 900px) {
@@ -53,10 +53,10 @@
53
53
  --font-weight: 400;
54
54
  --line-height: 1.7;
55
55
 
56
- // Use em units to specify a size relative to normal body text
57
56
  --mono-font-size: 0.94em;
58
57
  --mono-line-height: 1.5;
59
58
  --mono-border-radius: 0.375em;
59
+ --mono-padding: 0.12em 0.25em;
60
60
 
61
61
  // SVG icons
62
62
  // Mask icons (color-agnostic, painted via background-color: currentColor)