@allons-y/course-kit 0.0.0-stage → 0.1.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 (137) hide show
  1. package/LICENSE +373 -0
  2. package/README.md +90 -2
  3. package/assets/fonts/instrument-sans-italic-var.woff2 +0 -0
  4. package/assets/fonts/instrument-sans-var.woff2 +0 -0
  5. package/assets/fonts/pt-mono.woff2 +0 -0
  6. package/assets/scripts/copy.js +99 -0
  7. package/assets/scripts/deck.js +161 -0
  8. package/assets/scripts/email.js +17 -0
  9. package/assets/scripts/practice.js +545 -0
  10. package/assets/scripts/theme-panel.js +647 -0
  11. package/assets/scripts/theme-restore.js +17 -0
  12. package/assets/styles/base.css +2090 -0
  13. package/assets/styles/deck.css +968 -0
  14. package/assets/styles/font.css +36 -0
  15. package/assets/styles/notes.css +137 -0
  16. package/assets/styles/print.css +428 -0
  17. package/assets/styles/semantics.css +101 -0
  18. package/components/practice/check-controls.webc +50 -0
  19. package/components/practice/choice-list.webc +86 -0
  20. package/components/practice/cite-panel.webc +108 -0
  21. package/components/practice/practice-figure.webc +47 -0
  22. package/components/practice/practice-fill.webc +154 -0
  23. package/components/practice/practice-grid.webc +82 -0
  24. package/components/practice/practice-judge.webc +165 -0
  25. package/components/practice/practice-match.webc +178 -0
  26. package/components/practice/practice-question.webc +141 -0
  27. package/components/practice/practice-selfcheck.webc +40 -0
  28. package/components/practice/practice-terms.webc +95 -0
  29. package/components/practice/practice-tree.webc +91 -0
  30. package/components/practice/practice-worksheet.webc +369 -0
  31. package/components/site/copyright.webc +13 -0
  32. package/components/site/course-documents.webc +27 -0
  33. package/components/site/course-now.webc +393 -0
  34. package/components/site/course-summary.webc +136 -0
  35. package/components/site/demo-weeks.webc +91 -0
  36. package/components/site/glossary-entry.webc +31 -0
  37. package/components/site/glossary-panel.webc +1482 -0
  38. package/components/site/glossary.webc +45 -0
  39. package/components/site/grading.webc +50 -0
  40. package/components/site/instructor.webc +269 -0
  41. package/components/site/masthead.webc +147 -0
  42. package/components/site/nav-links.webc +174 -0
  43. package/components/site/policies.webc +17 -0
  44. package/components/site/practice-index.webc +31 -0
  45. package/components/site/schedule-overview.webc +145 -0
  46. package/components/site/schedule-weeks.webc +589 -0
  47. package/components/site/site-footer.webc +119 -0
  48. package/components/site/slide-timetable.webc +152 -0
  49. package/components/site/syllabus.webc +217 -0
  50. package/components/ui/arrow-link.webc +19 -0
  51. package/components/ui/assigned-list.webc +101 -0
  52. package/components/ui/callout.webc +11 -0
  53. package/components/ui/card-list.webc +124 -0
  54. package/components/ui/codepen-embed.webc +123 -0
  55. package/components/ui/download-button.webc +49 -0
  56. package/components/ui/eyebrow.webc +18 -0
  57. package/components/ui/icons/github.webc +6 -0
  58. package/components/ui/icons/google.webc +9 -0
  59. package/components/ui/link-list.webc +130 -0
  60. package/components/ui/link-section.webc +40 -0
  61. package/components/ui/meeting-card.webc +73 -0
  62. package/components/ui/meeting-decks.webc +38 -0
  63. package/components/ui/table-rubric.webc +251 -0
  64. package/components/ui/today-link.webc +43 -0
  65. package/components/ui/today-marker.webc +149 -0
  66. package/components/ui/week-block.webc +53 -0
  67. package/examples/starter/_data/course.json +20 -0
  68. package/examples/starter/_data/dates.json +16 -0
  69. package/examples/starter/_data/grading.json +6 -0
  70. package/examples/starter/_data/instructor.json +7 -0
  71. package/examples/starter/_data/policies.json +9 -0
  72. package/examples/starter/_data/scale.json +8 -0
  73. package/examples/starter/_data/schedule.json +22 -0
  74. package/examples/starter/_data/theme.json +17 -0
  75. package/examples/starter/content/index.webc +12 -0
  76. package/examples/starter/content/schedule.webc +12 -0
  77. package/examples/starter/content/slides/index.11tydata.js +5 -0
  78. package/examples/starter/content/slides/index.webc +12 -0
  79. package/examples/starter/content/slides/week-1-day-1.md +40 -0
  80. package/examples/starter/eleventy.config.js +8 -0
  81. package/glue/deck-notes.data.js +41 -0
  82. package/glue/deck-notes.webc +32 -0
  83. package/glue/lesson-day.data.js +17 -0
  84. package/glue/lesson-day.webc +0 -0
  85. package/glue/lesson-plans.data.js +13 -0
  86. package/glue/lesson-plans.webc +2 -0
  87. package/index.js +6 -0
  88. package/layouts/base.webc +79 -0
  89. package/layouts/deck.webc +46 -0
  90. package/layouts/demo.webc +16 -0
  91. package/layouts/document.webc +10 -0
  92. package/layouts/lesson-detail.webc +109 -0
  93. package/layouts/lesson.webc +71 -0
  94. package/layouts/notes.webc +23 -0
  95. package/layouts/worksheet.webc +52 -0
  96. package/lib/assets.js +42 -0
  97. package/lib/bundles.js +79 -0
  98. package/lib/check.js +110 -0
  99. package/lib/components.js +19 -0
  100. package/lib/copy.js +653 -0
  101. package/lib/data/build.js +22 -0
  102. package/lib/data/fonts.js +16 -0
  103. package/lib/data/glossary.js +304 -0
  104. package/lib/data/index.js +8 -0
  105. package/lib/data/lessons.js +173 -0
  106. package/lib/data/project.js +22 -0
  107. package/lib/data/read.js +46 -0
  108. package/lib/data/site.js +70 -0
  109. package/lib/data/term.js +80 -0
  110. package/lib/extensions.js +70 -0
  111. package/lib/files.js +14 -0
  112. package/lib/filters.js +584 -0
  113. package/lib/fit.js +106 -0
  114. package/lib/glue.js +26 -0
  115. package/lib/lesson-materials.js +66 -0
  116. package/lib/markdown.js +568 -0
  117. package/lib/minify.js +53 -0
  118. package/lib/paths.js +5 -0
  119. package/lib/pdf.js +134 -0
  120. package/lib/plugin.js +228 -0
  121. package/lib/plugins.js +34 -0
  122. package/lib/postcss.js +93 -0
  123. package/lib/theme-server.js +88 -0
  124. package/lib/theme.js +185 -0
  125. package/lib/worksheet-dialect.js +415 -0
  126. package/lib/worksheets.js +276 -0
  127. package/package.json +118 -4
  128. package/schemas/course.schema.json +156 -0
  129. package/schemas/dates.schema.json +165 -0
  130. package/schemas/grading.schema.json +59 -0
  131. package/schemas/instructor.schema.json +68 -0
  132. package/schemas/policies.schema.json +90 -0
  133. package/schemas/project.schema.json +209 -0
  134. package/schemas/scale.schema.json +68 -0
  135. package/schemas/schedule.schema.json +260 -0
  136. package/schemas/theme.schema.json +704 -0
  137. package/schemas/worksheet.schema.json +449 -0
@@ -0,0 +1,124 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A list of cards, each linking to a page. A card shows the page's code, name and description unless the slot supplies its own content.
4
+ * Instead of `items` you can write the cards yourself as a `<ul>` of `<li>` cards in the `cards` slot (the default slot is taken: it is each card's
5
+ * own content); the array wins when it has items, and when it is missing or empty the `cards` slot is rendered instead. A card written in the slot
6
+ * must name its overlay link, as the items form does: `<li><a href="/x/" aria-labelledby="x-name"></a><h3 id="x-name">Name</h3></li>`.
7
+ * @prop {object[]} items pages, each with `data` and `page.url`
8
+ * @slot cards the cards as a `<ul>`, used when `items` is missing or empty
9
+ * @slot default each card's own content, in place of its code, name and description
10
+ */
11
+ </script>
12
+ <ul role="list" webc:root="override" webc:if="items?.length">
13
+ <li webc:for="item of items">
14
+ <a :href="item.page.url" webc:if="item.page.url" :aria-labelledby="slugify(item.data.name)"></a>
15
+ <slot :@item="item">
16
+ <eyebrow @text="item.data.code"></eyebrow>
17
+ <h3 @text="item.data.name" :id="slugify(item.data.name)"></h3>
18
+ <p @text="item.data.description" webc:if="item.data.description"></p>
19
+ </slot>
20
+ </li>
21
+ </ul>
22
+ <div webc:root="override" webc:else><slot name="cards"></slot></div>
23
+
24
+ <style webc:scoped>
25
+ :host:not(:has(li)) {
26
+ display: none;
27
+ }
28
+
29
+ :host,
30
+ :host > ul {
31
+ list-style: none;
32
+ margin: 0;
33
+ padding: 0;
34
+ display: grid;
35
+ gap: calc(var(--content-space) * 1.5);
36
+
37
+ > li {
38
+ font-size: 1em;
39
+ position: relative;
40
+ background-color: var(--color-surface);
41
+ border: var(--thick-border-width) solid transparent;
42
+ border-radius: var(--standard-border-radius);
43
+ padding-block: calc(var(--content-space) * 1.5);
44
+ padding-inline: calc(var(--content-space) * 1);
45
+
46
+ a {
47
+ display: block;
48
+ position: absolute;
49
+ pointer-events: all;
50
+ inset: calc(-1 * var(--thick-border-width));
51
+ z-index: 1;
52
+ text-decoration: none;
53
+ color: inherit;
54
+ background-color: transparent;
55
+ border: none;
56
+ padding: 0;
57
+ }
58
+
59
+ &::before {
60
+ content: "";
61
+ position: absolute;
62
+ inset: calc(-1 * var(--thick-border-width));
63
+ border-radius: inherit;
64
+ padding: var(--thick-border-width);
65
+ background: linear-gradient(to bottom right, var(--gradient-stops));
66
+ background-size: 200% 200%;
67
+ -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
68
+ -webkit-mask-composite: xor;
69
+ mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
70
+ pointer-events: none;
71
+ }
72
+
73
+ &:has(a) {
74
+ @media (prefers-reduced-motion: reduce) {
75
+ &:is(:hover, :focus, :focus-within) {
76
+ background-color: color-mix(in sRGB, var(--color-surface-overlay) 90%, transparent);
77
+ }
78
+
79
+ &:is(:hover,:focus,:focus-within)::before {
80
+ background-position: 0% 0%;
81
+ }
82
+
83
+ }
84
+
85
+ @media not (prefers-reduced-motion: reduce) {
86
+ &:is(:hover,:focus,:focus-within)::before {
87
+ animation: gradient-drift 2s ease-in-out infinite alternate;
88
+ }
89
+ }
90
+ }
91
+
92
+ @media print {
93
+ background-color: transparent;
94
+ border-color: var(--color-border);
95
+
96
+ &::before {
97
+ display: none;
98
+ }
99
+ }
100
+ }
101
+
102
+ h3 {
103
+ margin-block: 1rem;
104
+ }
105
+
106
+ p {
107
+ text-decoration: none;
108
+
109
+ &:last-child {
110
+ margin-block-end: 0;
111
+ }
112
+ }
113
+ }
114
+
115
+ @keyframes gradient-drift {
116
+ from {
117
+ background-position: 0% 0%;
118
+ }
119
+
120
+ to {
121
+ background-position: 100% 100%;
122
+ }
123
+ }
124
+ </style>
@@ -0,0 +1,123 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A live code sample: a header with actions, then the CodePen embed prefilled with the code.
4
+ * @prop {string} [heading] the header, default `copy.theCode`
5
+ * @prop {string} label the pen's title
6
+ * @prop {string} summary the pen's description
7
+ * @prop {number} [height] embed height in pixels, default 800
8
+ * @prop {string[]} [tags] tags added to the pen
9
+ * @prop {Record<string, string>} copy the pane labels: `copy.codepenEmbed` (`theCode`, `html`, `css`, `javascript`, `htmlSource`, `cssSource`, `javascriptSource`)
10
+ * @slot actions buttons beside the header
11
+ * @slot default extra content under the code
12
+ */
13
+ </script>
14
+ <figure webc:root="override" class="codepen-embed">
15
+ <div class="embed-header">
16
+ <h2 @text="heading ?? copy.theCode"></h2>
17
+ <slot name="actions"></slot>
18
+ </div>
19
+
20
+ <div class="codepen"
21
+ :data-prefill="codepenPrefill({ title: label, description: summary, tags: tags ?? [] })"
22
+ :data-height="height ?? 800"
23
+ data-default-tab="html,result"
24
+ data-editable="true"
25
+ data-preview="true">
26
+ <p class="pane-label" webc:if="markup" @text="copy.html"></p>
27
+ <pre data-lang="html" webc:if="markup" tabindex="0" :aria-label="copy.htmlSource" @text="markup"></pre>
28
+ <p class="pane-label" webc:if="styles" @text="copy.css"></p>
29
+ <pre data-lang="css" webc:if="styles" tabindex="0" :aria-label="copy.cssSource" @text="styles"></pre>
30
+ <p class="pane-label" webc:if="script" @text="copy.javascript"></p>
31
+ <pre data-lang="js" webc:if="script" tabindex="0" :aria-label="copy.javascriptSource" @text="script"></pre>
32
+ </div>
33
+
34
+ <script webc:keep>
35
+ /* Set the editor theme before ei.js builds the iframe. */
36
+ (function () {
37
+ try {
38
+ var forced = document.documentElement.dataset.theme;
39
+ var dark =
40
+ forced === "dark" ||
41
+ (forced !== "light" && matchMedia("(prefers-color-scheme: dark)").matches);
42
+ document.querySelectorAll(".codepen[data-prefill]").forEach(function (embed) {
43
+ embed.dataset.themeId = dark ? "dark" : "light";
44
+ });
45
+ } catch (e) {}
46
+ })();
47
+ </script>
48
+ <script async src="https://cpwebassets.codepen.io/assets/embed/ei.js" webc:keep></script>
49
+
50
+ <figcaption>
51
+ <slot></slot>
52
+ </figcaption>
53
+ </figure>
54
+
55
+ <style webc:scoped>
56
+ :host {
57
+ margin: var(--content-space) 0;
58
+
59
+ iframe {
60
+ block-size: max(600px, 50dvh);
61
+ }
62
+ }
63
+
64
+ .embed-header {
65
+ display: flex;
66
+ flex-wrap: wrap;
67
+ align-items: center;
68
+ justify-content: space-between;
69
+ gap: 0.5em var(--content-space);
70
+ margin-block-end: calc(var(--content-space) * 0.4);
71
+
72
+ > h2 {
73
+ margin: 0;
74
+ font-size: 1.05em;
75
+ }
76
+ }
77
+
78
+ /* Until ei.js swaps it for an iframe this element is the source itself,
79
+ so it has to read as a code listing rather than broken layout. */
80
+ .codepen {
81
+ display: grid;
82
+ gap: var(--thin-border-width);
83
+ border: var(--thin-border-width) solid var(--color-border);
84
+ border-radius: var(--standard-border-radius);
85
+ background-color: var(--color-border);
86
+ overflow: hidden;
87
+ }
88
+
89
+ /* A real element, not a ::before: the labels have to survive the site's
90
+ no-CSS teaching mode. */
91
+ .codepen .pane-label {
92
+ margin: 0;
93
+ padding: calc(var(--content-space) * .4) calc(var(--content-space) * .6);
94
+ background-color: var(--color-page);
95
+ color: var(--color-text-muted);
96
+ font-family: var(--dense-font);
97
+ font-size: var(--font-size-7);
98
+ letter-spacing: .06em;
99
+ text-transform: uppercase;
100
+ }
101
+
102
+ .codepen pre {
103
+ margin: 0;
104
+ max-block-size: 22em;
105
+ overflow: auto;
106
+ padding: calc(var(--content-space) * .6);
107
+ background-color: var(--color-page);
108
+ font-size: 0.85em;
109
+ tab-size: 2;
110
+
111
+ &:focus-visible {
112
+ outline: var(--focus-ring-width) solid var(--color-focus-ring);
113
+ outline-offset: calc(var(--focus-ring-width) * -1);
114
+ }
115
+ }
116
+
117
+ figcaption {
118
+ margin-block-start: calc(var(--content-space) * .5);
119
+ color: var(--color-text-muted);
120
+ font-size: 0.9em;
121
+ text-wrap: pretty;
122
+ }
123
+ </style>
@@ -0,0 +1,49 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A download link with an icon. The label is the slot.
4
+ * @prop {string} url the file to download
5
+ */
6
+ </script>
7
+ <a webc:root="override" :href="url" download>
8
+ <svg aria-hidden="true" width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="download-icon">
9
+ <path d="M8 2v8" />
10
+ <path d="M4.5 7 8 10.5 11.5 7" />
11
+ <path d="M2.5 12.5h11" />
12
+ </svg>
13
+ <slot></slot>
14
+ </a>
15
+
16
+ <style webc:scoped>
17
+ :host {
18
+ --aspect-ratio: auto;
19
+ --image-size: fit-content;
20
+
21
+ display: inline-flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ gap: 0.4em;
25
+ min-block-size: var(--target-min);
26
+ padding: 0.6em 1.4em;
27
+ border: var(--thin-border-width) solid var(--color-border);
28
+ border-radius: var(--pill-border-radius);
29
+ color: var(--color-text);
30
+ font-size: 0.8em;
31
+ font-weight: var(--font-weight--semi-bold);
32
+ text-decoration: none;
33
+
34
+ &:hover,
35
+ &:focus-visible {
36
+ border-color: var(--color-accent);
37
+ background-color: var(--accent-bg);
38
+ color: var(--color-accent-text);
39
+ }
40
+
41
+ .download-icon {
42
+ flex: none;
43
+ inline-size: 1em;
44
+ block-size: 1em;
45
+ min-block-size: 0;
46
+ fill: none;
47
+ }
48
+ }
49
+ </style>
@@ -0,0 +1,18 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A small line above a heading. The content is the slot.
4
+ */
5
+ </script>
6
+ <p webc:root="override"><slot></slot></p>
7
+
8
+ <style webc:scoped="eyebrow">
9
+ :host {
10
+ font-size: var(--font-size-6);
11
+ text-transform: uppercase;
12
+ text-decoration: none;
13
+ letter-spacing: 0.08em;
14
+ font-weight: var(--font-weight--semi-bold);
15
+ color: var(--color-text-muted);
16
+ margin-block: 0;
17
+ }
18
+ </style>
@@ -0,0 +1,6 @@
1
+ <script webc:setup>
2
+ /** An inline SVG icon; it takes its color from the text. */
3
+ </script>
4
+ <svg width="20" height="20" viewBox="0 0 16 16" aria-hidden="true" focusable="false" webc:root="override">
5
+ <path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82a7.4 7.4 0 0 1 2-.27c.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8Z" />
6
+ </svg>
@@ -0,0 +1,9 @@
1
+ <script webc:setup>
2
+ /** An inline SVG icon; it takes its color from the text. */
3
+ </script>
4
+ <svg width="20" height="20" viewBox="0 0 18 18" aria-hidden="true" focusable="false" webc:root="override">
5
+ <path fill="#4285F4" d="M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.92c1.7-1.57 2.68-3.88 2.68-6.62Z" />
6
+ <path fill="#34A853" d="M9 18c2.43 0 4.47-.8 5.96-2.18l-2.92-2.26c-.8.54-1.84.86-3.04.86-2.34 0-4.32-1.58-5.03-3.7H.96v2.33A9 9 0 0 0 9 18Z" />
7
+ <path fill="#FBBC05" d="M3.97 10.72a5.4 5.4 0 0 1 0-3.44V4.95H.96a9 9 0 0 0 0 8.1l3.01-2.33Z" />
8
+ <path fill="#EA4335" d="M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.58C13.46.9 11.43 0 9 0A9 9 0 0 0 .96 4.95l3.01 2.33C4.68 5.16 6.66 3.58 9 3.58Z" />
9
+ </svg>
@@ -0,0 +1,130 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A list of links, each with a name and an optional description. Give it the `items` array, or write the list in the default slot as a
4
+ * `<ul>` of links, or as a `<dl>` (`<dt>` the link, `<dd>` the description). The array wins when it has items; when it is missing or empty
5
+ * the slot is rendered instead.
6
+ * @prop {{ url: string, name: string, description?: string }[]} items the links to list
7
+ */
8
+ </script>
9
+ <ul role="list" webc:root="override" webc:if="items?.length">
10
+ <li webc:for="item of items">
11
+ <h4><a :href="item.url" @text="item.name"></a></h4>
12
+ <p @text="item.description" webc:if="item.description"></p>
13
+ </li>
14
+ </ul>
15
+ <div webc:root="override" webc:else><slot></slot></div>
16
+
17
+ <style webc:scoped>
18
+ :host:not(:has(li, dt)) {
19
+ display: none;
20
+ }
21
+
22
+ :host,
23
+ :host > ul,
24
+ :host > dl {
25
+ list-style: none;
26
+ margin: 0;
27
+ padding: 0;
28
+ display: grid;
29
+ gap: calc(var(--content-space) * .5);
30
+
31
+ > dt {
32
+ font-weight: normal;
33
+ }
34
+
35
+ > dd {
36
+ margin: 0;
37
+ color: var(--color-text-muted);
38
+ }
39
+
40
+ > li {
41
+ font-size: 1em;
42
+
43
+ h4 {
44
+ font-weight: normal;
45
+ }
46
+
47
+ p {
48
+ margin-block-start: 0;
49
+ }
50
+ }
51
+ }
52
+
53
+ /* A link is an operable target: 44px tall (WCAG 2.5.5), and the rows carry the spacing. The cards variant stretches its own link. */
54
+ :host:not([cards]) a {
55
+ display: inline-flex;
56
+ align-items: center;
57
+ min-block-size: var(--target-min);
58
+ }
59
+
60
+ :host:not([cards]),
61
+ :host:not([cards]) > ul,
62
+ :host:not([cards]) > dl {
63
+ gap: 0;
64
+ }
65
+
66
+ :host([cards]),
67
+ :host([cards]) > ul {
68
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 15em), 1fr));
69
+ gap: var(--content-space);
70
+
71
+ @supports (grid-template-rows: subgrid) {
72
+ > li {
73
+ display: grid;
74
+ grid-row: span 2;
75
+ grid-template-rows: subgrid;
76
+ row-gap: 0.3em;
77
+ align-content: start;
78
+ }
79
+ }
80
+
81
+ > li {
82
+ position: relative;
83
+ padding: calc(var(--content-space) * .9) var(--content-space);
84
+
85
+ background-color: var(--color-surface);
86
+ border: var(--thin-border-width) solid var(--color-border);
87
+ border-radius: var(--standard-border-radius);
88
+
89
+ color: var(--color-text-muted);
90
+ font-size: max(var(--base-font-size), 0.92em);
91
+ text-wrap: pretty;
92
+
93
+ &:has(a:hover) {
94
+ border-color: var(--color-accent);
95
+ background-color: color-mix(in sRGB, var(--color-surface-overlay) 92%, transparent);
96
+
97
+ a {
98
+ color: var(--color-link-hover);
99
+ }
100
+ }
101
+
102
+ &:has(a:focus-visible) {
103
+ border-color: var(--color-accent);
104
+ outline: var(--focus-ring-width) solid var(--color-focus-ring);
105
+ outline-offset: var(--focus-ring-offset);
106
+ }
107
+
108
+ a {
109
+ display: block;
110
+ margin-block-end: 0.25em;
111
+
112
+ color: var(--color-text);
113
+ font-size: max(var(--base-font-size), 1.2em);
114
+ font-weight: var(--font-weight--semi-bold);
115
+ text-decoration: none;
116
+
117
+ &::after {
118
+ content: "";
119
+ position: absolute;
120
+ inset: 0;
121
+ border-radius: inherit;
122
+ }
123
+
124
+ &:focus-visible {
125
+ outline: none;
126
+ }
127
+ }
128
+ }
129
+ }
130
+ </style>
@@ -0,0 +1,40 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A titled list of links. Renders nothing when there are no items and no
4
+ * `empty` text.
5
+ * @prop {string} [title] the heading; left out when there are no items
6
+ * @prop {{ title: string, href?: string, note?: string, extra?: { text: string, href: string, after?: string } }[]} items the links to list; an item with no `href` is plain text
7
+ * @prop {string} [empty] shown, muted, when there are no items
8
+ */
9
+ </script>
10
+ <div webc:root="override" class="link-section" webc:if="items?.length || empty">
11
+ <h3 webc:if="title && items?.length" @text="title"></h3>
12
+ <ul webc:if="items?.length">
13
+ <li webc:for="item of items">
14
+ <a webc:if="item.href" :href="item.href" @text="item.title"></a>
15
+ <span webc:if="!item.href" @text="item.title"></span>
16
+ <span class="muted" webc:if="item.note"> — <span @text="item.note"></span></span>
17
+ <template webc:nokeep webc:if="item.extra"> — <a :href="item.extra.href" @text="item.extra.text"></a><template webc:nokeep webc:if="item.extra.after"> <span @text="item.extra.after"></span></template></template>
18
+ </li>
19
+ </ul>
20
+ <p class="muted" webc:if="!items?.length" @text="empty"></p>
21
+ </div>
22
+
23
+ <style webc:scoped>
24
+ /* The page's spacing around a list and its heading, which a wrapper would otherwise reset:
25
+ a heading loses its top margin as the first child, and a list its bottom margin as the last. */
26
+ :host:not(:last-child) {
27
+ margin-block-end: calc(var(--content-space) * 1.5);
28
+ }
29
+
30
+ h3 {
31
+ margin-block-start: calc(var(--content-space) * 1.75);
32
+ }
33
+
34
+ /* A link that is the whole item is an operable target: 44px tall (WCAG 2.5.5). A link inside a sentence keeps the line. */
35
+ li > a:only-child {
36
+ display: inline-flex;
37
+ align-items: center;
38
+ min-block-size: var(--target-min);
39
+ }
40
+ </style>
@@ -0,0 +1,73 @@
1
+ <script webc:setup>
2
+ /**
3
+ * One class meeting in a week's list: the date down the left, the slot
4
+ * beside it. Marks itself as the scope `<today-marker>` highlights.
5
+ * @prop {{ iso: string, weekday: string, date: string }} meeting one meeting from `scheduleWeeks`
6
+ * @slot when extra lines under the date (a note, a link)
7
+ * @slot default what the meeting holds; a child sits beside the date
8
+ */
9
+ </script>
10
+ <li webc:root="override" class="meeting" data-today-scope>
11
+ <p class="when" :data-date="meeting.iso">
12
+ <span class="weekday" @text="meeting.weekday"></span>
13
+ <span class="date" @text="meeting.date"></span>
14
+ <slot name="when"></slot>
15
+ </p>
16
+ <slot></slot>
17
+ </li>
18
+
19
+ <style webc:scoped>
20
+ :host {
21
+ display: grid;
22
+ grid-template-columns: 8.5em minmax(0, 1fr);
23
+ gap: 0.5em 1em;
24
+ padding: 0.8em 1em;
25
+ list-style: none;
26
+
27
+ @media screen and (width <= 520px) {
28
+ grid-template-columns: minmax(0, 1fr);
29
+ gap: 0.25em;
30
+ }
31
+
32
+ /* Whatever the meeting holds sits in the second column, under its topics. */
33
+ > :not(.when) {
34
+ grid-column: 2;
35
+
36
+ @media screen and (width <= 520px) {
37
+ grid-column: auto;
38
+ }
39
+ }
40
+
41
+ > .assigned {
42
+ margin-block-start: 0.6em;
43
+ font-size: max(var(--base-font-size), 0.92em);
44
+ }
45
+ }
46
+
47
+ /* A rule between meetings, not above the first. */
48
+ :host:not(:first-child) {
49
+ border-block-start: var(--thin-border-width) solid var(--color-border);
50
+ }
51
+
52
+ .when {
53
+ display: flex;
54
+ flex-direction: column;
55
+ margin: 0;
56
+
57
+ @media screen and (width <= 520px) {
58
+ flex-direction: row;
59
+ flex-wrap: wrap;
60
+ gap: 0 0.5em;
61
+ align-items: baseline;
62
+ }
63
+ }
64
+
65
+ .weekday {
66
+ font-weight: var(--font-weight--semi-bold);
67
+ }
68
+
69
+ .date {
70
+ color: var(--color-text-muted);
71
+ font-size: max(var(--base-font-size), 0.9em);
72
+ }
73
+ </style>
@@ -0,0 +1,38 @@
1
+ <script webc:setup>
2
+ /**
3
+ * A meeting's deck links, each on its own line: the slides, then any
4
+ * addendum. Renders nothing without either.
5
+ * @prop {{ slides?: string, addendum?: string }} meeting one meeting from `scheduleWeeks`
6
+ * @prop {string} slidesLabel the slides link's text, `copy.schedule.slides`
7
+ * @prop {string} addendumLabel the addendum link's text, `copy.schedule.addendum`
8
+ */
9
+ /* Each link loops over its own href and label: a prop does not reach a nested component's attribute or slot (docs/internals.md). */
10
+ </script>
11
+ <div webc:root="override" class="decks" webc:if="meeting.slides || meeting.addendum">
12
+ <p webc:if="meeting.slides"><arrow-link webc:for="link of [{ href: meeting.slides, label: slidesLabel }]" :href="link.href"><span @text="link.label"></span></arrow-link></p>
13
+ <p webc:if="meeting.addendum"><arrow-link webc:for="link of [{ href: meeting.addendum, label: addendumLabel }]" :href="link.href"><span @text="link.label"></span></arrow-link></p>
14
+ </div>
15
+
16
+ <style webc:scoped>
17
+ /* The row gap a meeting puts between its own items, kept between these lines. */
18
+ :host {
19
+ display: grid;
20
+ gap: 0.5em;
21
+
22
+ @media screen and (width <= 520px) {
23
+ gap: 0.25em;
24
+ }
25
+ }
26
+
27
+ :host p {
28
+ margin: 0;
29
+ font-size: max(var(--base-font-size), 0.92em);
30
+ }
31
+
32
+ /* A link is an operable target: 44px tall (WCAG 2.5.5). */
33
+ :host a {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ min-block-size: var(--target-min);
37
+ }
38
+ </style>