-
Notifications
You must be signed in to change notification settings - Fork 1
/
outline.js
378 lines (376 loc) · 10.3 KB
/
outline.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
export const outline = [
{
text: 'Welcome and orientation',
collapsed: true,
link: '/lectures/welcome-orientation.html',
items: [],
},
{
text: 'Markdown and GitHub',
collapsed: true,
lecturer: 'Joseph Muller',
items: [
{
text: 'Prep',
link: '/lectures/markdown-and-github-prep.html',
},
{
text: 'Live coding',
link: '/lectures/markdown-live-coding.html',
},
{
text: 'Workshop on Markdown and GitHub',
link: '/workshops/markdown/index.html',
}
]
},
{
text: 'HTML',
collapsed: true,
lecturer: 'Joseph Muller',
items: [
{
text: 'Prep',
link: '/lectures/html-prep.html',
},
{
text: 'Live coding',
link: '/lectures/html-live-coding.html',
},
{
text: 'Workshop on HTML',
link: '/workshops/html/index.html',
}
]
},
{
text: 'Introduction to CSS',
collapsed: true,
lecturer: 'Helena Wee',
// concepts: 'stylesheets, style and content, internal and external CSS, selector, declaration, property, value, cascade, fonts, box model, margins, padding, borders, alignment, hover, display',
// code: '{ } . # ; " class id color background-color width height text-align text-decoration font-family margin padding border :hover display'
items: [
{
text: 'Prep',
link: '/lectures/intro-css.html',
},
{
text: 'Workshop on Intro to CSS',
link: '/workshops/intro-css/index.html',
}
]
},
{
text: 'Responsive CSS and flexbox',
collapsed: true,
lecturer: 'Helena Wee',
// concepts: 'responsive design, media queries, flexible layouts, grid layouts',
// code: 'media flex grid'
items: [
{
text: 'Prep',
link: '/lectures/responsive-css-flexbox.html',
},
{
text: 'Workshop: Responsive CSS and flexbox',
link: '/workshops/responsive/index.html',
}
]
},
{
text: 'Accessibility in HTML and CSS',
collapsed: true,
lecturer: 'Joseph Muller',
items: [
{
text: 'Prep',
link: '/lectures/accessibility-prep.html',
},
{
text: 'Live coding',
link: '/lectures/accessibility-live-coding.html',
},
// {
// text: 'Will it work? Using sandboxes to run code experiments',
// link: '/lectures/will-it-work-using-sandboxes-to-test-code.html',
// concepts: 'sandboxes'
// },
// {
// text: 'Accessibility',
// link: '/lectures/accessibility.html',
// concepts: 'digital accessibility, disability, mainstream and assistive technology, standards',
// code: ':focus outline header nav main section footer aria-label aria-labelledby'
// },
// {
// text: 'Forms',
// link: '/lectures/html-forms.html',
// concepts: 'HTTP request methods, front end and back end',
// code: 'form method action type label for input textarea name button'
// },
{
text: 'Workshop: Accessiblity',
link: '/workshops/accessibility/index.html',
}
]
},
{
text: 'Grids and other CSS concepts',
collapsed: true,
lecturer: 'Helena Wee',
// // concepts: 'grids, positioning, z-index, navigation',
// // code: 'grids positioning navigation'
items: [
{
text: 'Prep',
link: '/lectures/grids-other-css-concepts.html',
},
{
text: 'Workshop: Grids and other CSS concepts',
link: '/workshops/grid/index.html',
}
]
},
{
text: 'Advanced work with images',
collapsed: false,
lecturer: 'Helena Wee',
// // concepts: 'grids, positioning, z-index, navigation',
// // code: 'grids positioning navigation'
items: [
{
text: 'Prep',
link: '/lectures/advanced-images.html',
},
{
text: 'Workshop: Advanced work with images',
link: '/workshops/advanced-images/index.html',
},
// {
// text: 'Workshop: Grids and other CSS concepts',
// link: '/workshops/grid/index.html',
// }
]
},
{
text: 'Organizing your CSS',
collapsed: false,
lecturer: 'Joseph Muller',
items: [
{
text: 'Prep',
link: '/lectures/organizing-css-prep.html',
},
{
text: 'Live coding',
link: '/lectures/organizing-css-live-coding.html',
},
{
text: 'Workshop: Organizing your CSS',
link: '/workshops/organizing-css/index.html',
}
]
},
// {
// text: 'Command line, Git and GitHub',
// collapsed: true,
// lecturer: 'Joseph Muller',
// items: [
// {
// text: 'The command line',
// link: '/lectures/command-line.html',
// concepts: 'command line interface, Unix shell',
// code: 'pwd ls cat touch mkdir mv cp rm ""'
// },
// {
// text: 'Git',
// link: '/lectures/git.html',
// concepts: 'distributed version control, free and open source software, remote repository, local repository, staging area, working directory',
// code: 'clone status add commit -m Esc+:wq push diff fetch pull merge rebase branch switch -u origin'
// },
// {
// text: 'GitHub',
// link: '/lectures/github.html',
// concepts: 'GitHub, pull request, code review, merge, conflict, GitHub Pages',
// },
// {
// text: 'Workshop on Git and GitHub',
// link: '/workshops/git/index.html',
// },
// ]
// },
// {
// text: 'Intro to JavaScript',
// collapsed: true,
// lecturer: 'Joseph Muller',
// items: [
// {
// text: 'Introduction',
// link: '/lectures/intro-javascript.html',
// concepts: 'programming language, JavaScript history, running JavaScript code, comments',
// code: 'script node console.log() // /* */'
// },
// {
// text: 'Values',
// link: '/lectures/javascript-values.html',
// concepts: 'values, data types, strings, escaping',
// code: '" \\ numbers booleans true false undefined null typeof'
// },
// {
// text: 'Operators',
// link: '/lectures/javascript-operators.html',
// concepts: 'operators',
// code: '+ == != < > - / *'
// },
// {
// text: 'Variables',
// link: '/lectures/javascript-variables.html',
// concepts: 'statements, constants, variables',
// code: 'let const var = ;'
// },
// {
// text: 'Workshop: Intro JavaScript',
// link: '/workshops/intro-javascript/index.html',
// },
// ]
// },
// {
// text: 'Conditions and functions',
// collapsed: true,
// lecturer: 'Helena Wee',
// items: [
// {
// text: 'Conditionals and Functions: Pre-sessional activities',
// link: '/lectures/conditionals-and-functions.html',
// },
// {
// text: 'Conditionals',
// link: '/lectures/conditionals.html',
// concepts: 'conditionals, block scope',
// code: 'if else while {}'
// },
// {
// text: 'Functions',
// link: '/lectures/functions.html',
// concepts: 'functions, function scope',
// code: 'function return {}'
// },
// {
// text: 'Workshop: Conditionals and Functions',
// link: '/workshops/conditionals-functions/index.html',
// },
// ]
// },
// {
// text: 'Objects, loops, and files',
// collapsed: true,
// lecturer: 'Joseph Muller',
// items: [
// {
// text: 'Prep',
// link: '/lectures/objects-loops-files.html',
// },
// {
// text: 'Live coding',
// link: '/lectures/objects-loops-files-live-coding.html',
// },
// {
// text: 'Workshop',
// link: '/workshops/objects/index.html',
// },
// ]
// },
// {
// text: 'JavaScript in the browser',
// collapsed: true,
// lecturer: 'Joseph Muller',
// items: [
// {
// text: 'Prep',
// link: '/lectures/events.html',
// },
// {
// text: 'Live coding',
// link: '/lectures/events-live-coding.html',
// },
// {
// text: 'Workshop',
// link: '/workshops/events/index.html',
// },
// ]
// },
// {
// text: 'Visualising Data with JavaScript',
// collapsed: true,
// lecturer: 'Helena Wee',
// items: [
// {
// text: 'Visualising Data with JavaScript: Pre-sessional activities',
// link: '/lectures/visualising-data-js.html',
// },
// {
// text: 'Visualising Data with JavaScript',
// link: '/lectures/visualising-data-js-1.html',
// },
// {
// text: 'APIs and Fetching Data',
// link: '/lectures/visualising-data-js-2.html',
// },
// {
// text: 'Drawing shapes and text',
// link: '/lectures/visualising-data-js-3.html',
// },
// {
// text: 'Workshop',
// link: '/workshops/data-vis/index.html',
// },
// ]
// },
// {
// text: 'Timeouts, Debugging and Packages',
// lecturer: 'Helena Wee and Joseph Muller',
// items: [
// {
// text: 'Prep',
// link: '/lectures/debugging.html',
// },
// {
// text: 'Live Coding',
// link: '/lectures/debugging-live-coding.html',
// },
// {
// text: 'Workshop',
// link: '/workshops/web-project-prep/index.html',
// },
// ]
// },
// {
// text: 'Getting started with Vue.js',
// lecturer: 'Helena Wee',
// items: [
// {
// text: 'Prep',
// link: '/lectures/vue-intro.html',
// },
// ]
// },
// {
// text: 'Going further with Vue.js',
// lecturer: 'Joseph Muller',
// items: [
// {
// text: 'Prep',
// link: '/lectures/vue-components.html',
// },
// ]
// },
]
export function filterClassMeeting (meetings, pathStart) {
const filteredItems = []
meetings.forEach(meeting => {
meeting.items = meeting.items.filter(lecturePart => {
return lecturePart.link.startsWith(pathStart)
})
if (meeting.items.length) filteredItems.push(meeting)
})
return filteredItems
}