@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.
- 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 +17 -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 +2090 -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 +269 -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 +217 -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 +653 -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 +46 -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 +228 -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 +118 -4
- package/schemas/course.schema.json +156 -0
- package/schemas/dates.schema.json +165 -0
- package/schemas/grading.schema.json +59 -0
- package/schemas/instructor.schema.json +68 -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,17 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* The policies section: one disclosure per entry in `policies.json`, open by
|
|
4
|
+
* default, each with an optional link to the full policy. Renders nothing
|
|
5
|
+
* without `policies`.
|
|
6
|
+
*/
|
|
7
|
+
</script>
|
|
8
|
+
<section webc:root="override" class="content-column" aria-labelledby="policies-heading" webc:if="$data.policies">
|
|
9
|
+
<h2 id="policies-heading" @text="$data.copy.policies.policies"></h2>
|
|
10
|
+
<div class="disclosures">
|
|
11
|
+
<details webc:for="entry of Object.entries($data.policies).filter(([key]) => key !== '$schema')" :id="`policy-${entry[0]}`" open>
|
|
12
|
+
<summary @text="entry[1].title"></summary>
|
|
13
|
+
<p @text="expandTokens(entry[1].body, $data)"></p>
|
|
14
|
+
<p webc:if="entry[1].href"><a :href="entry[1].href" @text="entry[1].hrefText ?? $data.copy.policies.readTheFullPolicy"></a></p>
|
|
15
|
+
</details>
|
|
16
|
+
</div>
|
|
17
|
+
</section>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* The practice page's table: every practice sheet in `collections.practice`,
|
|
4
|
+
* by its worksheet `order` (then its URL), with what each is for. Says so when
|
|
5
|
+
* there are none. The page's own intro stays page content. Wording comes
|
|
6
|
+
* from `copy.practice`.
|
|
7
|
+
*/
|
|
8
|
+
const sheets = (collection) => [...(collection ?? [])].sort((a, b) => (a.data.worksheet?.order ?? 99) - (b.data.worksheet?.order ?? 99) || a.url.localeCompare(b.url));
|
|
9
|
+
</script>
|
|
10
|
+
<div webc:root="override" class="practice-index">
|
|
11
|
+
<p class="muted" webc:if="!$data.collections?.practice?.length" @text="$data.copy.practice.empty"></p>
|
|
12
|
+
<table class="table-light" webc:if="$data.collections?.practice?.length" data-practice>
|
|
13
|
+
<caption class="sr-only" @text="$data.copy.practice.caption"></caption>
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th scope="col" @text="$data.copy.practice.colSheet"></th>
|
|
17
|
+
<th scope="col" @text="$data.copy.practice.colFor"></th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr webc:for="entry of sheets($data.collections.practice)">
|
|
22
|
+
<th scope="row">
|
|
23
|
+
<a :href="entry.url" @text="entry.data.worksheet?.heading ?? entry.data.title"></a>
|
|
24
|
+
</th>
|
|
25
|
+
<td>
|
|
26
|
+
<span @text="entry.data.worksheet?.lede"></span>
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</tbody>
|
|
30
|
+
</table>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
<script webc:setup>
|
|
2
|
+
/**
|
|
3
|
+
* The schedule page's header: the meeting line, the key dates, and a row
|
|
4
|
+
* of jump links (Today, then one per month). Props are read in the
|
|
5
|
+
* template, since a setup script cannot see them.
|
|
6
|
+
* @prop {{ title: string, items: object[] }[]} [groups] `scheduleKeyDates`
|
|
7
|
+
* output; built from the page's lessons, project and exam slot when left out
|
|
8
|
+
* @prop {object[]} [weeks] `scheduleWeeks` output, for the month links;
|
|
9
|
+
* built from the page when left out
|
|
10
|
+
*/
|
|
11
|
+
const defaultGroups = scheduleKeyDates($data.lessons, $data.project, $data.schedule?.finalExam, $data.copy);
|
|
12
|
+
const defaultWeeks = scheduleWeeks($data.lessons, $data.schedule?.weeks, $data.collections?.deck, $data.demos);
|
|
13
|
+
</script>
|
|
14
|
+
<header webc:root="override" class="schedule-overview">
|
|
15
|
+
<today-marker></today-marker>
|
|
16
|
+
<eyebrow class="separators">
|
|
17
|
+
<span @text="$data.term.label"></span>
|
|
18
|
+
<span @text="$data.course.code"></span>
|
|
19
|
+
</eyebrow>
|
|
20
|
+
<h1 @text="$data.copy.scheduleOverview.schedule"></h1>
|
|
21
|
+
<p class="meets" webc:if="$data.schedule?.meetings?.days?.length">
|
|
22
|
+
<span @text="$data.schedule.meetings.days.length > 1 ? `${$data.schedule.meetings.days.slice(0, -1).join(', ')} & ${$data.schedule.meetings.days.at(-1)}` : $data.schedule.meetings.days[0]"></span>
|
|
23
|
+
<span webc:if="$data.schedule.meetings.time" @text="$data.schedule.meetings.time"></span>
|
|
24
|
+
<span webc:if="$data.instructor?.office" @text="$data.instructor.office"></span>
|
|
25
|
+
</p>
|
|
26
|
+
|
|
27
|
+
<section class="key-dates" aria-labelledby="schedule-key-dates" webc:if="(groups ?? defaultGroups)?.length">
|
|
28
|
+
<h2 id="schedule-key-dates" @text="$data.copy.scheduleOverview.keyDates"></h2>
|
|
29
|
+
<div class="group" webc:for="group of (groups ?? defaultGroups)">
|
|
30
|
+
<h3 @text="group.title"></h3>
|
|
31
|
+
<ul role="list">
|
|
32
|
+
<li webc:for="item of group.items">
|
|
33
|
+
<strong @text="item.label"></strong>
|
|
34
|
+
<span class="when" @text="item.date"></span>
|
|
35
|
+
<span class="note" webc:if="item.note" @text="item.note"></span>
|
|
36
|
+
</li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<nav class="schedule-jump" :aria-label="$data.copy.scheduleOverview.jumpTo" webc:if="scheduleMonths(weeks ?? defaultWeeks).length">
|
|
42
|
+
<h2 @text="$data.copy.scheduleOverview.jumpTo"></h2>
|
|
43
|
+
<ul role="list">
|
|
44
|
+
<li><today-link :@label="$data.copy.schedule.today"></today-link></li>
|
|
45
|
+
<li webc:for="entry of scheduleMonths(weeks ?? defaultWeeks)"><a :href="`#week-${entry.week}`" @text="entry.name"></a></li>
|
|
46
|
+
</ul>
|
|
47
|
+
</nav>
|
|
48
|
+
</header>
|
|
49
|
+
|
|
50
|
+
<style webc:scoped>
|
|
51
|
+
/* The page header: key dates as stacked groups of label/date rows (they
|
|
52
|
+
wrap, so nothing scrolls sideways on a phone) and a "Jump to" row of
|
|
53
|
+
tap-sized links (Today, then one per month). */
|
|
54
|
+
:host > :where(.meets) {
|
|
55
|
+
max-inline-size: 70ch;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.meets {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-wrap: wrap;
|
|
61
|
+
gap: 0 1em;
|
|
62
|
+
color: var(--color-text-muted);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.key-dates {
|
|
66
|
+
display: grid;
|
|
67
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, 18em), 1fr));
|
|
68
|
+
gap: var(--content-space) calc(var(--content-space) * 1.5);
|
|
69
|
+
max-inline-size: none;
|
|
70
|
+
|
|
71
|
+
> h2 {
|
|
72
|
+
grid-column: 1 / -1;
|
|
73
|
+
margin-block-end: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* A group's name is a label for the rows under it, in the text face. */
|
|
77
|
+
h3 {
|
|
78
|
+
margin-block: 0 0.25em;
|
|
79
|
+
font-family: var(--sans-font);
|
|
80
|
+
font-size: var(--font-size-6);
|
|
81
|
+
font-weight: var(--font-weight--semi-bold);
|
|
82
|
+
letter-spacing: 0.06em;
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
color: var(--color-text-muted);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
ul {
|
|
88
|
+
list-style: none;
|
|
89
|
+
margin: 0;
|
|
90
|
+
padding: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
li {
|
|
94
|
+
display: flex;
|
|
95
|
+
flex-direction: column;
|
|
96
|
+
padding-block: 0.4em;
|
|
97
|
+
border-block-start: var(--thin-border-width) solid var(--color-border);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.when,
|
|
101
|
+
.note {
|
|
102
|
+
color: var(--color-text-muted);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.note {
|
|
106
|
+
font-size: max(var(--base-font-size), 0.9em);
|
|
107
|
+
font-style: italic;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.schedule-jump {
|
|
112
|
+
ul {
|
|
113
|
+
display: flex;
|
|
114
|
+
flex-wrap: wrap;
|
|
115
|
+
gap: 0.4rem;
|
|
116
|
+
list-style: none;
|
|
117
|
+
margin: 0;
|
|
118
|
+
padding: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
a {
|
|
122
|
+
display: flex;
|
|
123
|
+
align-items: center;
|
|
124
|
+
justify-content: center;
|
|
125
|
+
min-block-size: 2.75rem;
|
|
126
|
+
min-inline-size: 2.75rem;
|
|
127
|
+
padding-inline: 1em;
|
|
128
|
+
border: var(--thin-border-width) solid var(--color-border);
|
|
129
|
+
border-radius: var(--standard-border-radius);
|
|
130
|
+
font-weight: var(--font-weight--semi-bold);
|
|
131
|
+
text-decoration: none;
|
|
132
|
+
|
|
133
|
+
&:is(:hover, :focus-visible) {
|
|
134
|
+
background-color: var(--color-surface);
|
|
135
|
+
border-color: var(--color-accent);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@media print {
|
|
141
|
+
.schedule-jump {
|
|
142
|
+
display: none;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|