@allons-y/course-kit 0.0.0-stage → 0.2.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/LICENSE +373 -0
- package/README.md +90 -2
- package/assets/fonts/instrument-sans-italic-var.woff2 +0 -0
- package/assets/fonts/instrument-sans-var.woff2 +0 -0
- package/assets/fonts/pt-mono.woff2 +0 -0
- package/assets/scripts/copy.js +99 -0
- package/assets/scripts/deck.js +161 -0
- package/assets/scripts/email.js +19 -0
- package/assets/scripts/practice.js +545 -0
- package/assets/scripts/theme-panel.js +647 -0
- package/assets/scripts/theme-restore.js +17 -0
- package/assets/styles/base.css +2091 -0
- package/assets/styles/deck.css +968 -0
- package/assets/styles/font.css +36 -0
- package/assets/styles/notes.css +137 -0
- package/assets/styles/print.css +428 -0
- package/assets/styles/semantics.css +101 -0
- package/components/practice/check-controls.webc +50 -0
- package/components/practice/choice-list.webc +86 -0
- package/components/practice/cite-panel.webc +108 -0
- package/components/practice/practice-figure.webc +47 -0
- package/components/practice/practice-fill.webc +154 -0
- package/components/practice/practice-grid.webc +82 -0
- package/components/practice/practice-judge.webc +165 -0
- package/components/practice/practice-match.webc +178 -0
- package/components/practice/practice-question.webc +141 -0
- package/components/practice/practice-selfcheck.webc +40 -0
- package/components/practice/practice-terms.webc +95 -0
- package/components/practice/practice-tree.webc +91 -0
- package/components/practice/practice-worksheet.webc +369 -0
- package/components/site/copyright.webc +13 -0
- package/components/site/course-documents.webc +27 -0
- package/components/site/course-now.webc +393 -0
- package/components/site/course-summary.webc +136 -0
- package/components/site/demo-weeks.webc +91 -0
- package/components/site/glossary-entry.webc +31 -0
- package/components/site/glossary-panel.webc +1482 -0
- package/components/site/glossary.webc +45 -0
- package/components/site/grading.webc +50 -0
- package/components/site/instructor.webc +432 -0
- package/components/site/masthead.webc +147 -0
- package/components/site/nav-links.webc +174 -0
- package/components/site/policies.webc +17 -0
- package/components/site/practice-index.webc +31 -0
- package/components/site/schedule-overview.webc +145 -0
- package/components/site/schedule-weeks.webc +589 -0
- package/components/site/site-footer.webc +119 -0
- package/components/site/slide-timetable.webc +152 -0
- package/components/site/syllabus.webc +370 -0
- package/components/ui/arrow-link.webc +19 -0
- package/components/ui/assigned-list.webc +101 -0
- package/components/ui/callout.webc +11 -0
- package/components/ui/card-list.webc +124 -0
- package/components/ui/codepen-embed.webc +123 -0
- package/components/ui/download-button.webc +49 -0
- package/components/ui/eyebrow.webc +18 -0
- package/components/ui/icons/github.webc +6 -0
- package/components/ui/icons/google.webc +9 -0
- package/components/ui/link-list.webc +130 -0
- package/components/ui/link-section.webc +40 -0
- package/components/ui/meeting-card.webc +73 -0
- package/components/ui/meeting-decks.webc +38 -0
- package/components/ui/table-rubric.webc +251 -0
- package/components/ui/today-link.webc +43 -0
- package/components/ui/today-marker.webc +149 -0
- package/components/ui/week-block.webc +53 -0
- package/examples/starter/_data/course.json +20 -0
- package/examples/starter/_data/dates.json +16 -0
- package/examples/starter/_data/grading.json +6 -0
- package/examples/starter/_data/instructor.json +7 -0
- package/examples/starter/_data/policies.json +9 -0
- package/examples/starter/_data/scale.json +8 -0
- package/examples/starter/_data/schedule.json +22 -0
- package/examples/starter/_data/theme.json +17 -0
- package/examples/starter/content/index.webc +12 -0
- package/examples/starter/content/schedule.webc +12 -0
- package/examples/starter/content/slides/index.11tydata.js +5 -0
- package/examples/starter/content/slides/index.webc +12 -0
- package/examples/starter/content/slides/week-1-day-1.md +40 -0
- package/examples/starter/eleventy.config.js +8 -0
- package/glue/deck-notes.data.js +41 -0
- package/glue/deck-notes.webc +32 -0
- package/glue/lesson-day.data.js +17 -0
- package/glue/lesson-day.webc +0 -0
- package/glue/lesson-plans.data.js +13 -0
- package/glue/lesson-plans.webc +2 -0
- package/index.js +6 -0
- package/layouts/base.webc +79 -0
- package/layouts/deck.webc +46 -0
- package/layouts/demo.webc +16 -0
- package/layouts/document.webc +10 -0
- package/layouts/lesson-detail.webc +109 -0
- package/layouts/lesson.webc +71 -0
- package/layouts/notes.webc +23 -0
- package/layouts/worksheet.webc +52 -0
- package/lib/assets.js +42 -0
- package/lib/bundles.js +79 -0
- package/lib/check.js +110 -0
- package/lib/components.js +19 -0
- package/lib/copy.js +656 -0
- package/lib/data/build.js +22 -0
- package/lib/data/fonts.js +16 -0
- package/lib/data/glossary.js +304 -0
- package/lib/data/index.js +8 -0
- package/lib/data/lessons.js +173 -0
- package/lib/data/project.js +22 -0
- package/lib/data/read.js +61 -0
- package/lib/data/site.js +70 -0
- package/lib/data/term.js +80 -0
- package/lib/extensions.js +70 -0
- package/lib/files.js +14 -0
- package/lib/filters.js +584 -0
- package/lib/fit.js +106 -0
- package/lib/glue.js +26 -0
- package/lib/lesson-materials.js +66 -0
- package/lib/markdown.js +568 -0
- package/lib/minify.js +53 -0
- package/lib/paths.js +5 -0
- package/lib/pdf.js +134 -0
- package/lib/plugin.js +231 -0
- package/lib/plugins.js +34 -0
- package/lib/postcss.js +93 -0
- package/lib/theme-server.js +88 -0
- package/lib/theme.js +185 -0
- package/lib/worksheet-dialect.js +415 -0
- package/lib/worksheets.js +276 -0
- package/package.json +119 -4
- package/schemas/course.schema.json +161 -0
- package/schemas/dates.schema.json +165 -0
- package/schemas/grading.schema.json +59 -0
- package/schemas/instructor.schema.json +76 -0
- package/schemas/policies.schema.json +90 -0
- package/schemas/project.schema.json +209 -0
- package/schemas/scale.schema.json +68 -0
- package/schemas/schedule.schema.json +260 -0
- package/schemas/theme.schema.json +704 -0
- package/schemas/worksheet.schema.json +449 -0
|
@@ -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>
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* A grading rubric as a table: criteria down, performance levels or a due date and points across.
|
|
4
|
+
* @prop {object[]} criteria rubric criteria
|
|
5
|
+
* @prop {string[]} [levels] level names across the top
|
|
6
|
+
* @prop {string} [caption] a screen-reader caption
|
|
7
|
+
* @prop {number} [total] the points the rubric adds up to, shown in the footer
|
|
8
|
+
* @prop {Record<string, string>} copy the table's wording: `copy.tableRubric` (`criteria`, `points`, `pointsEach`, `totalPointsPossible`, `milestone`, `due`, `whatIsGraded`)
|
|
9
|
+
*/
|
|
10
|
+
</script>
|
|
11
|
+
<table webc:root="override" webc:if="criteria?.length" role="table">
|
|
12
|
+
<caption webc:if="caption" @text="caption" class="sr-only"></caption>
|
|
13
|
+
|
|
14
|
+
<thead webc:if="criteria[0]?.levels?.length" role="rowgroup">
|
|
15
|
+
<tr role="row">
|
|
16
|
+
<th scope="col" role="columnheader" class="criteria" @text="copy.criteria"></th>
|
|
17
|
+
<th scope="col" role="columnheader" webc:for="level of levels" @text="level"></th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody webc:if="criteria[0]?.levels?.length" role="rowgroup">
|
|
21
|
+
<template webc:for="criterion of criteria" webc:nokeep>
|
|
22
|
+
<tr role="row">
|
|
23
|
+
<th scope="row" role="rowheader" @text="criterion.title" rowspan="2"></th>
|
|
24
|
+
<td role="cell" webc:for="(index, level) in criterion.levels"><span class="cell-label" aria-hidden="true" @text="levels[index]"></span><span @text="level.description"></span></td>
|
|
25
|
+
</tr>
|
|
26
|
+
<tr role="row" class="points"><td role="cell" webc:for="(index, level) in criterion.levels"><span class="cell-label" aria-hidden="true" @text="levels[index]"></span><span @text="copy.pointsEach.replace('{points}', level.points)"></span></td></tr>
|
|
27
|
+
</template>
|
|
28
|
+
</tbody>
|
|
29
|
+
<tfoot webc:if="criteria[0]?.levels?.length" role="rowgroup">
|
|
30
|
+
<tr role="row">
|
|
31
|
+
<th scope="row" role="rowheader" :colspan="levels?.length ?? 1" @text="copy.totalPointsPossible"></th>
|
|
32
|
+
<td role="cell" class="num" @text="total"></td>
|
|
33
|
+
</tr>
|
|
34
|
+
</tfoot>
|
|
35
|
+
|
|
36
|
+
<thead webc:if="!criteria[0]?.levels?.length" role="rowgroup">
|
|
37
|
+
<tr role="row">
|
|
38
|
+
<th scope="col" role="columnheader" @text="copy.milestone"></th>
|
|
39
|
+
<th scope="col" role="columnheader" @text="copy.due"></th>
|
|
40
|
+
<th scope="col" role="columnheader" class="num" @text="copy.points"></th>
|
|
41
|
+
<th scope="col" role="columnheader" @text="copy.whatIsGraded"></th>
|
|
42
|
+
</tr>
|
|
43
|
+
</thead>
|
|
44
|
+
<tbody webc:if="!criteria[0]?.levels?.length" role="rowgroup">
|
|
45
|
+
<tr role="row" webc:for="criterion of criteria">
|
|
46
|
+
<th scope="row" role="rowheader">
|
|
47
|
+
<span class="id" webc:if="criterion.id" @text="criterion.id"></span>
|
|
48
|
+
<span @text="criterion.title"></span>
|
|
49
|
+
</th>
|
|
50
|
+
<td role="cell" class="due"><span class="cell-label" aria-hidden="true" @text="copy.due"></span><span @text="criterion.due ? fullDate(criterion.due) + (criterion.dueTime ? `, ${criterion.dueTime}` : '') : ''"></span></td>
|
|
51
|
+
<td role="cell" class="num"><span class="cell-label" aria-hidden="true" @text="copy.points"></span><span @text="criterion.points"></span></td>
|
|
52
|
+
<td role="cell"><span class="cell-label" aria-hidden="true" @text="copy.whatIsGraded"></span><span @text="criterion.description"></span></td>
|
|
53
|
+
</tr>
|
|
54
|
+
</tbody>
|
|
55
|
+
<tfoot webc:if="!criteria[0]?.levels?.length" role="rowgroup">
|
|
56
|
+
<tr role="row">
|
|
57
|
+
<th scope="row" role="rowheader" colspan="2" @text="copy.totalPointsPossible"></th>
|
|
58
|
+
<td role="cell" class="num"><span class="cell-label" aria-hidden="true" @text="copy.points"></span><span @text="total"></span></td>
|
|
59
|
+
<td role="cell" class="blank"></td>
|
|
60
|
+
</tr>
|
|
61
|
+
</tfoot>
|
|
62
|
+
</table>
|
|
63
|
+
|
|
64
|
+
<style webc:scoped>
|
|
65
|
+
/* Two rubric shapes share this component, told apart by the data: a
|
|
66
|
+
criterion carrying a `levels` array renders the classic matrix
|
|
67
|
+
(criteria × performance levels, points row under each); a flat
|
|
68
|
+
criterion (title, due, points, description) renders the milestone
|
|
69
|
+
table. Only one thead/tbody/tfoot set survives per render. */
|
|
70
|
+
:host {
|
|
71
|
+
width: 100%;
|
|
72
|
+
border-block-end: var(--thin-border-width) solid var(--color-border);
|
|
73
|
+
|
|
74
|
+
:is(td, th) {
|
|
75
|
+
border: none;
|
|
76
|
+
border-block-start: var(--thin-border-width) solid var(--color-border);
|
|
77
|
+
padding: 0.6em;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
thead th {
|
|
81
|
+
background-color: var(--color-surface-accent);
|
|
82
|
+
font-weight: var(--font-weight--medium);
|
|
83
|
+
text-wrap: balance;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
thead th.criteria {
|
|
87
|
+
inline-size: 22%;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
tbody {
|
|
91
|
+
vertical-align: top;
|
|
92
|
+
|
|
93
|
+
th {
|
|
94
|
+
background: none;
|
|
95
|
+
font-weight: var(--font-weight--medium);
|
|
96
|
+
text-wrap: balance;
|
|
97
|
+
|
|
98
|
+
.id {
|
|
99
|
+
display: block;
|
|
100
|
+
color: var(--color-accent-text);
|
|
101
|
+
font-size: max(var(--base-font-size), 0.85em);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.points > td {
|
|
107
|
+
border-block-start: none;
|
|
108
|
+
padding-block-start: 0;
|
|
109
|
+
font-weight: var(--font-weight--medium);
|
|
110
|
+
color: var(--color-text-muted);
|
|
111
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.due {
|
|
115
|
+
color: var(--color-text-muted);
|
|
116
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.num {
|
|
120
|
+
text-align: end;
|
|
121
|
+
font-variant-numeric: tabular-nums;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
tfoot {
|
|
125
|
+
th {
|
|
126
|
+
background: none;
|
|
127
|
+
text-align: end;
|
|
128
|
+
font-weight: var(--font-weight--medium);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
:is(th, td) {
|
|
132
|
+
border-block-start: var(--border-width) solid var(--color-border);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Below 40em neither table fits, so each row stacks: its cells one under another, each with its column's name beside it as
|
|
138
|
+
text. The elements keep their roles (set in the markup, since `display: block` can drop them) and the header row stays
|
|
139
|
+
in the accessibility tree, so a screen reader still reads the table; the visible label is aria-hidden to avoid saying it twice. */
|
|
140
|
+
.cell-label {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (width < 40em) {
|
|
145
|
+
:host,
|
|
146
|
+
:host :is(thead, tbody, tfoot, tr, th, td) {
|
|
147
|
+
display: block;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:host {
|
|
151
|
+
inline-size: 100%;
|
|
152
|
+
max-inline-size: 100%;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* The header row is for assistive technology only: the labels sit in the cells. */
|
|
156
|
+
:host thead {
|
|
157
|
+
position: absolute;
|
|
158
|
+
inline-size: 1px;
|
|
159
|
+
block-size: 1px;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
clip-path: inset(50%);
|
|
162
|
+
white-space: nowrap;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:host tr {
|
|
166
|
+
background: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host tbody tr {
|
|
170
|
+
padding-block: 0.4em;
|
|
171
|
+
border-block-start: var(--thin-border-width) solid var(--color-border);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:host :is(td, th) {
|
|
175
|
+
border: none;
|
|
176
|
+
padding: 0.25em 0.6em;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
:host td.num {
|
|
180
|
+
text-align: start;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
:host tbody th {
|
|
184
|
+
padding-block-end: 0.25em;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
:host td:empty,
|
|
188
|
+
:host td.blank {
|
|
189
|
+
display: none;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* A cell: its column's name, then its value, side by side, the value wrapping under itself. */
|
|
193
|
+
:host td {
|
|
194
|
+
display: grid;
|
|
195
|
+
grid-template-columns: minmax(6rem, 30%) minmax(0, 1fr);
|
|
196
|
+
gap: 0 0.75em;
|
|
197
|
+
text-align: start;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
:host .cell-label {
|
|
201
|
+
display: block;
|
|
202
|
+
color: var(--color-text-muted);
|
|
203
|
+
font-size: max(var(--base-font-size), 0.85em);
|
|
204
|
+
font-weight: var(--font-weight--medium);
|
|
205
|
+
overflow-wrap: anywhere;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* The levels matrix: a level's points sit with the level's name on the line below its description, not in a block of their own. */
|
|
209
|
+
:host .points {
|
|
210
|
+
padding-block-start: 0;
|
|
211
|
+
border-block-start: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:host tbody tr:has(+ .points) {
|
|
215
|
+
padding-block-end: 0;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
:host .points > td {
|
|
219
|
+
padding-block: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* The footer: the total beside its name, one row. */
|
|
223
|
+
:host tfoot tr {
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-wrap: wrap;
|
|
226
|
+
align-items: baseline;
|
|
227
|
+
justify-content: space-between;
|
|
228
|
+
gap: 0 1em;
|
|
229
|
+
border-block-start: var(--border-width) solid var(--color-border);
|
|
230
|
+
padding-block: 0.4em;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
:host tfoot :is(th, td) {
|
|
234
|
+
border: none;
|
|
235
|
+
padding-inline: 0.6em;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
:host tfoot th {
|
|
239
|
+
text-align: start;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
:host tfoot td {
|
|
243
|
+
display: block;
|
|
244
|
+
text-align: end;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host tfoot .cell-label {
|
|
248
|
+
display: none;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* The page's Today shortcut: a button that jumps to the `#today` element
|
|
4
|
+
* `<today-marker>` picks. Hidden until there is one, and in print.
|
|
5
|
+
* @prop {string} label the link's text, `copy.schedule.today`
|
|
6
|
+
*/
|
|
7
|
+
</script>
|
|
8
|
+
<a webc:root="override" href="#today" class="today-link" @text="label"></a>
|
|
9
|
+
|
|
10
|
+
<style>
|
|
11
|
+
/* The primary action, shown only once a #today exists. The :not(:has())
|
|
12
|
+
form outranks a host's own `a` rules; without :has() the plain rule
|
|
13
|
+
hides it. */
|
|
14
|
+
.today-link,
|
|
15
|
+
:root:not(:has(#today)) .today-link {
|
|
16
|
+
display: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:root:has(#today) .today-link {
|
|
20
|
+
display: grid;
|
|
21
|
+
place-items: center;
|
|
22
|
+
min-inline-size: var(--target-min);
|
|
23
|
+
min-block-size: var(--target-min);
|
|
24
|
+
padding-inline: 1em;
|
|
25
|
+
border: var(--thin-border-width) solid var(--color-accent);
|
|
26
|
+
border-radius: var(--standard-border-radius);
|
|
27
|
+
background-color: var(--color-accent);
|
|
28
|
+
color: var(--color-on-accent);
|
|
29
|
+
font-weight: var(--font-weight--semi-bold);
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
|
|
32
|
+
&:is(:hover, :focus-visible) {
|
|
33
|
+
border-color: var(--color-text);
|
|
34
|
+
text-decoration: underline;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media print {
|
|
39
|
+
:root:has(#today) .today-link {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* <today-marker> marks today's class meeting. A host renders it once, adds
|
|
4
|
+
* `data-today-host="<name>"` to its root, and puts `data-date` on what it
|
|
5
|
+
* lists; the page's `<today-link>` jumps to the result.
|
|
6
|
+
*
|
|
7
|
+
* A script flags every [data-date] element listing today's campus date
|
|
8
|
+
* (the site's `institution.timezone`): data-today, aria-current="date" and
|
|
9
|
+
* a visible "Today" flag (data-today-label overrides the text; a table row
|
|
10
|
+
* gets it in its first cell). One element gets id="today" for the link:
|
|
11
|
+
* today's, else the next meeting, else the first (before the term) or last
|
|
12
|
+
* (after it); never a no-class day. A host puts data-today-scope on the
|
|
13
|
+
* element that should carry the id and the highlight (the schedule's
|
|
14
|
+
* .meeting), otherwise the dated element itself does. An element that
|
|
15
|
+
* already has an id gets an empty <span id="today"> inside it instead, and
|
|
16
|
+
* an existing #today wins.
|
|
17
|
+
*/
|
|
18
|
+
</script>
|
|
19
|
+
<template webc:root="override" webc:nokeep></template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
/**
|
|
23
|
+
* <today-marker>: flag today's [data-date] elements and give one of them
|
|
24
|
+
* id="today". See the notes in this component's setup script.
|
|
25
|
+
*/
|
|
26
|
+
(() => {
|
|
27
|
+
try {
|
|
28
|
+
/** Today in the campus zone, as "YYYY-MM-DD". */
|
|
29
|
+
const campusToday = () => new Date().toLocaleDateString("en-CA", { timeZone: document.documentElement.dataset.timezone });
|
|
30
|
+
const { t } = window.ckCopy;
|
|
31
|
+
const today = campusToday();
|
|
32
|
+
|
|
33
|
+
/** The node that can hold a flag or an anchor: a table row can't, its first cell can. */
|
|
34
|
+
const holder = (el) => (el instanceof HTMLTableRowElement ? el.cells[0] : el);
|
|
35
|
+
|
|
36
|
+
const dated = [...document.querySelectorAll("[data-date]")].map((el) => ({
|
|
37
|
+
el,
|
|
38
|
+
dates: (el.dataset.date ?? "").split(/\s+/).filter(Boolean).sort(),
|
|
39
|
+
}));
|
|
40
|
+
|
|
41
|
+
for (const { el, dates } of dated) {
|
|
42
|
+
if (!dates.includes(today) || el.hasAttribute("data-today")) continue;
|
|
43
|
+
el.dataset.today = "";
|
|
44
|
+
el.setAttribute("aria-current", "date");
|
|
45
|
+
const flag = document.createElement("strong");
|
|
46
|
+
flag.className = "today-flag";
|
|
47
|
+
flag.textContent = el.dataset.todayLabel ?? t("schedule", "today");
|
|
48
|
+
holder(el)?.prepend(flag);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (document.getElementById("today")) return;
|
|
52
|
+
|
|
53
|
+
/** Jump target: today's, else the next; the first before the term, the last after it. */
|
|
54
|
+
const candidates = dated
|
|
55
|
+
.filter(({ dates }) => dates.length)
|
|
56
|
+
.map((item) => ({ ...item, scope: item.el.closest("[data-today-scope]") ?? item.el }))
|
|
57
|
+
.filter(({ scope }) => !scope.matches(".no-class") && !scope.querySelector(".no-class"))
|
|
58
|
+
.map((item) => ({ ...item, when: item.dates.find((d) => d >= today) ?? item.dates.at(-1) }));
|
|
59
|
+
if (!candidates.length) return;
|
|
60
|
+
|
|
61
|
+
const upcoming = candidates.filter(({ when }) => when >= today);
|
|
62
|
+
const pool = upcoming.length ? upcoming : candidates;
|
|
63
|
+
const target = pool.reduce((best, item) =>
|
|
64
|
+
(upcoming.length ? item.when < best.when : item.when > best.when) ? item : best,
|
|
65
|
+
).scope;
|
|
66
|
+
|
|
67
|
+
if (target.id) {
|
|
68
|
+
const anchor = document.createElement("span");
|
|
69
|
+
anchor.id = "today";
|
|
70
|
+
holder(target)?.prepend(anchor);
|
|
71
|
+
} else {
|
|
72
|
+
target.id = "today";
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Opened as /page/#today before the target existed: the browser has already missed it.
|
|
76
|
+
if (location.hash === "#today") document.getElementById("today")?.scrollIntoView({ behavior: matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth" });
|
|
77
|
+
} catch {
|
|
78
|
+
// Never let the marker break the scripts bundled after it.
|
|
79
|
+
}
|
|
80
|
+
})();
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
/* The single source of the "today" look. Hosts own the dated elements and
|
|
85
|
+
name themselves with `data-today-host`; the rules below vary the base
|
|
86
|
+
look per host. */
|
|
87
|
+
|
|
88
|
+
[data-today] {
|
|
89
|
+
background-color: var(--color-surface-accent-secondary);
|
|
90
|
+
box-shadow: inset var(--border-width) 0 0 var(--color-accent-secondary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* A table row can't carry a shadow of its own: wash its cells, edge the first. */
|
|
94
|
+
tr[data-today] {
|
|
95
|
+
background-color: transparent;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
|
|
98
|
+
> :is(th, td) {
|
|
99
|
+
background-color: var(--color-surface-accent-secondary);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
> :first-child {
|
|
103
|
+
box-shadow: inset var(--border-width) 0 0 var(--color-accent-secondary);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.today-flag {
|
|
108
|
+
display: block;
|
|
109
|
+
color: var(--color-accent-secondary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* host: a list of meetings (schedule-weeks, demo-weeks). The meeting holds
|
|
113
|
+
the highlight, not the date line inside it. */
|
|
114
|
+
[data-today-host="meetings"] {
|
|
115
|
+
[data-today] {
|
|
116
|
+
background-color: transparent;
|
|
117
|
+
box-shadow: none;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-today-scope]:has([data-today]) {
|
|
121
|
+
background-color: var(--color-surface-accent-secondary);
|
|
122
|
+
box-shadow: inset var(--border-width) 0 0 var(--color-accent-secondary);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.today-flag {
|
|
126
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* host: a grid of day cells (slide-timetable). The edge runs along the top. */
|
|
131
|
+
[data-today-host="timetable"] {
|
|
132
|
+
[data-today] {
|
|
133
|
+
box-shadow: inset 0 var(--border-width) 0 var(--color-accent-secondary);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.today-flag {
|
|
137
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Without color (forced colors, mono print), the flag's text still says "Today"; add an outline. */
|
|
142
|
+
@media (forced-colors: active) {
|
|
143
|
+
[data-today],
|
|
144
|
+
[data-today-scope]:has([data-today]) {
|
|
145
|
+
outline: var(--border-width) solid Highlight;
|
|
146
|
+
outline-offset: calc(var(--border-width) * -1);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* One bordered block per week: a tinted header band, then the slot.
|
|
4
|
+
* @prop {number} number the week number, for the anchor (not `week`: slot content sees a component's props, and a host loops over `week`)
|
|
5
|
+
* @prop {string} label the heading, "Week 3" (`copy.schedule.weekHeading` filled in)
|
|
6
|
+
* @prop {string} dates the week's date range, shown beside the heading
|
|
7
|
+
* @prop {2 | 3} [level=3] the heading level
|
|
8
|
+
*/
|
|
9
|
+
</script>
|
|
10
|
+
<section webc:root="override" class="week" :id="`week-${number}`" :aria-labelledby="`week-${number}-heading`">
|
|
11
|
+
<header class="week-head">
|
|
12
|
+
<h2 webc:if="level == 2" class="week-title" :id="`week-${number}-heading`" @text="label"></h2>
|
|
13
|
+
<h3 webc:if="level != 2" class="week-title" :id="`week-${number}-heading`" @text="label"></h3>
|
|
14
|
+
<p class="week-of" @text="dates"></p>
|
|
15
|
+
</header>
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</section>
|
|
18
|
+
|
|
19
|
+
<style webc:scoped>
|
|
20
|
+
:host {
|
|
21
|
+
margin: 0;
|
|
22
|
+
padding: 0;
|
|
23
|
+
border: var(--thin-border-width) solid var(--color-border);
|
|
24
|
+
border-radius: var(--standard-border-radius);
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.week-head {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
align-items: baseline;
|
|
32
|
+
gap: 0.25em 1em;
|
|
33
|
+
padding: 0.55em 1em;
|
|
34
|
+
background-color: var(--color-surface);
|
|
35
|
+
border-block-end: var(--border-width) solid var(--color-accent);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.week-title {
|
|
39
|
+
margin: 0;
|
|
40
|
+
font-size: var(--font-size-4);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* An h3 without a class gets the medium weight; the h2 kept the browser's bold. */
|
|
44
|
+
h3.week-title {
|
|
45
|
+
font-weight: var(--font-weight--medium);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.week-of {
|
|
49
|
+
margin: 0;
|
|
50
|
+
color: var(--color-text-muted);
|
|
51
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@allons-y/course-kit/schemas/course.schema.json",
|
|
3
|
+
"code": "CS101",
|
|
4
|
+
"name": "Introduction to Web Publishing",
|
|
5
|
+
"status": "active",
|
|
6
|
+
"term": { "year": 2026, "season": "fall" },
|
|
7
|
+
"description": "An introduction to publishing on the web: writing pages in HTML, styling them with CSS, and putting them online.",
|
|
8
|
+
"approach": "Every class mixes a short talk with time to build. You learn by making a small site that grows all term.",
|
|
9
|
+
"prerequisites": ["None"],
|
|
10
|
+
"outcomes": [
|
|
11
|
+
"Write well-structured HTML pages.",
|
|
12
|
+
"Style a page with CSS so it works on a phone and a laptop.",
|
|
13
|
+
"Publish a small site and keep it up to date."
|
|
14
|
+
],
|
|
15
|
+
"textbook": {
|
|
16
|
+
"required": "None. Every reading is free and online.",
|
|
17
|
+
"access": ["Each week's readings are linked from the schedule."]
|
|
18
|
+
},
|
|
19
|
+
"requirements": ["You need a reliable internet connection and a free GitHub account."]
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@allons-y/course-kit/schemas/dates.schema.json",
|
|
3
|
+
"LABELS": { "2026-11-26": "Thanksgiving Recess" },
|
|
4
|
+
"2026": {
|
|
5
|
+
"fall": {
|
|
6
|
+
"start": "2026-08-25",
|
|
7
|
+
"end": "2026-12-10",
|
|
8
|
+
"deadlines": {
|
|
9
|
+
"addDrop": { "date": "2026-09-01", "label": "Last day to add or drop", "audience": "students" }
|
|
10
|
+
},
|
|
11
|
+
"holidays": ["2026-11-26"],
|
|
12
|
+
"midTerm": "2026-10-16",
|
|
13
|
+
"finalExams": { "start": "2026-12-14", "end": "2026-12-18" }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@allons-y/course-kit/schemas/grading.schema.json",
|
|
3
|
+
"homework": { "title": "Homework", "weight": "40%", "body": "Weekly practice, posted in your course site and due before the next class." },
|
|
4
|
+
"tests": { "title": "Tests", "weight": "40%", "body": "Two tests during the term." },
|
|
5
|
+
"final": { "title": "Final exam", "weight": "20%", "body": "A short exam in the College's exam period." }
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "../node_modules/@allons-y/course-kit/schemas/policies.schema.json",
|
|
3
|
+
"attendance": { "title": "Attendance", "body": "Replace this with your attendance policy: what is expected and what happens when you miss class." },
|
|
4
|
+
"honorCode": { "title": "Honor Code", "body": "Replace this with your college's approved honor code statement, or link to it." },
|
|
5
|
+
"dei": { "title": "Diversity, Equity, and Inclusion", "body": "Replace this with your college's approved statement." },
|
|
6
|
+
"disabilities": { "title": "Accessibility", "body": "Replace this with your college's approved statement and the disability services contact." },
|
|
7
|
+
"titleIX": { "title": "Title IX", "body": "Replace this with your college's approved statement." },
|
|
8
|
+
"inclementWeather": { "title": "Inclement Weather", "body": "Replace this with your college's inclement weather policy." }
|
|
9
|
+
}
|