jekyll-theme-open-course 0.0.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/_config.yml +35 -2
  4. data/_data/utility.yml +1 -1
  5. data/_layouts/calendar.html +68 -17
  6. data/_layouts/default.html +39 -22
  7. data/_layouts/error.html +10 -0
  8. data/_layouts/policies.html +17 -0
  9. data/_layouts/projects.html +71 -0
  10. data/_sass/_base.scss +108 -0
  11. data/_sass/_colors.scss +190 -0
  12. data/_sass/_fonts.scss +10 -0
  13. data/_sass/_typography.scss +358 -0
  14. data/assets/css/print.css +26 -24
  15. data/assets/css/screen.scss +22 -0
  16. data/assets/js/site.js +289 -0
  17. data/assets/js/sw.js +220 -0
  18. data/exe/jtoc +76 -0
  19. data/lib/jtoc.rb +177 -0
  20. data/lib/starter_files/_config.yml.erb +84 -0
  21. data/lib/starter_files/_data/calendar.yml.erb +6 -0
  22. data/lib/starter_files/_data/utility.yml +35 -0
  23. data/lib/starter_files/index.md.erb +5 -0
  24. data/lib/starter_files/offline/index.md +7 -0
  25. data/lib/starter_files/syllabus/_policies/academic-integrity.md +3 -0
  26. data/lib/starter_files/syllabus/_policies/assignment-submission.md +3 -0
  27. data/lib/starter_files/syllabus/_policies/books.md +17 -0
  28. data/lib/starter_files/syllabus/_policies/description.md +3 -0
  29. data/lib/starter_files/syllabus/_policies/goals.md +3 -0
  30. data/lib/starter_files/syllabus/_policies/grading-criteria.md +3 -0
  31. data/lib/starter_files/syllabus/_policies/grading-policy.md +3 -0
  32. data/lib/starter_files/syllabus/_policies/late-work.md +3 -0
  33. data/lib/starter_files/syllabus/_policies/materials.md +17 -0
  34. data/lib/starter_files/syllabus/_policies/objectives.md +3 -0
  35. data/lib/starter_files/syllabus/_policies/outcomes.md +3 -0
  36. data/lib/starter_files/syllabus/_policies/participation.md +3 -0
  37. data/lib/starter_files/syllabus/_policies/special-needs.md +3 -0
  38. data/lib/starter_files/syllabus/_policies/technology-policy.md +3 -0
  39. data/lib/starter_files/syllabus/_projects/project-00.md.erb +23 -0
  40. data/lib/starter_files/syllabus/_weeks/week-00.md.erb +11 -0
  41. data/projects/index.md +1 -30
  42. metadata +39 -26
  43. data/_data/weeks/01.yml +0 -21
  44. data/_data/weeks/02.yml +0 -1
  45. data/_data/weeks/03.yml +0 -1
  46. data/_data/weeks/04.yml +0 -1
  47. data/_data/weeks/05.yml +0 -1
  48. data/_data/weeks/06.yml +0 -1
  49. data/_data/weeks/07.yml +0 -1
  50. data/_data/weeks/08.yml +0 -1
  51. data/_data/weeks/09.yml +0 -1
  52. data/_data/weeks/10.yml +0 -1
  53. data/_data/weeks/11.yml +0 -1
  54. data/_data/weeks/12.yml +0 -1
  55. data/_data/weeks/13.yml +0 -1
  56. data/_data/weeks/14.yml +0 -1
  57. data/_data/weeks/15.yml +0 -1
  58. data/_data/weeks/16.yml +0 -1
  59. data/_projects/project-01.md +0 -25
  60. data/_projects/project-02.md +0 -25
  61. data/_projects/project-03.md +0 -25
  62. data/assets/.keep +0 -0
  63. data/assets/css/screen.css +0 -408
@@ -0,0 +1,190 @@
1
+ $text-color: #222;
2
+ $back-color: #F2F2F2;
3
+ $spot-color: #900;
4
+ $gray-color: #7F7F7F;
5
+ $gray-alter: darken($gray-color, 10%);
6
+ $link-under: transparentize($spot-color, 0.65);
7
+ $curr-color: lighten($gray-color, 40%);
8
+
9
+ // Dark mode
10
+ $dk-text-color: #AFAFAF;
11
+ $dk-back-color: #111;
12
+ $dk-spot-color: #9C0000;
13
+ $dk-gray-color: #777;
14
+ $dk-link-under: transparentize($dk-spot-color, 0.25);
15
+ $dk-curr-color: darken($dk-gray-color, 45%);
16
+
17
+
18
+ // CSS Variables
19
+ html,
20
+ html.light {
21
+ --color-text: #{$text-color};
22
+ --color-back: #{$back-color};
23
+ --color-spot: #{$spot-color};
24
+ --color-gray: #{$gray-color};
25
+ --color-curr: #{$curr-color};
26
+ --color-altg: #{$gray-alter};
27
+ --color-link: #{$link-under};
28
+ --color-navi: #{$gray-color};
29
+ --color-nava: #{$back-color};
30
+ }
31
+ html.dark {
32
+ --color-text: #{$dk-text-color};
33
+ --color-back: #{$dk-back-color};
34
+ --color-spot: #{$dk-spot-color};
35
+ --color-gray: #{$dk-gray-color};
36
+ --color-curr: #{$dk-curr-color};
37
+ --color-altg: #{$dk-gray-color};
38
+ --color-link: #{$dk-link-under};
39
+ --color-navi: #{$dk-gray-color};
40
+ --color-nava: #{$dk-text-color};
41
+ }
42
+ @media screen and (prefers-color-scheme: dark) {
43
+ html {
44
+ --color-text: #{$dk-text-color};
45
+ --color-back: #{$dk-back-color};
46
+ --color-spot: #{$dk-spot-color};
47
+ --color-gray: #{$dk-gray-color};
48
+ --color-curr: #{$dk-curr-color};
49
+ --color-altg: #{$dk-gray-color};
50
+ --color-link: #{$dk-link-under};
51
+ --color-navi: #{$dk-gray-color};
52
+ --color-nava: #{$dk-text-color};
53
+ }
54
+ }
55
+
56
+ html {
57
+ transition: color 0.5s, background-color 0.5s;
58
+ color: $text-color;
59
+ color: var(--color-text);
60
+ background-color: $back-color;
61
+ background-color: var(--color-back);
62
+ }
63
+ ol > li::before,
64
+ ul li::before {
65
+ color: $spot-color;
66
+ color: var(--color-spot);
67
+ }
68
+ a {
69
+ color: $spot-color;
70
+ color: var(--color-spot);
71
+ }
72
+ @supports (text-decoration-color: red) {
73
+ a {
74
+ color: inherit;
75
+ text-decoration-color: $link-under;
76
+ text-decoration-color: var(--color-link);
77
+ }
78
+ }
79
+ #header h1 a {
80
+ color: $spot-color;
81
+ color: var(--color-spot);
82
+ }
83
+ .nav a {
84
+ border: 1px solid $spot-color;
85
+ border: 1px solid var(--color-spot);
86
+ color: $gray-color;
87
+ color: var(--color-navi);
88
+ }
89
+ .nav a:hover,
90
+ .nav a:focus,
91
+ .nav a:active,
92
+ #calendar #nav-cal a,
93
+ #policies #nav-pol a,
94
+ #projects #nav-pro a {
95
+ background-color: $spot-color;
96
+ background-color: var(--color-spot);
97
+ color: $back-color;
98
+ color: var(--color-nava);
99
+ }
100
+
101
+ .recommended,
102
+ .project .description,
103
+ .project .goals,
104
+ .week .agenda,
105
+ .fine-print {
106
+ color: $gray-color;
107
+ color: var(--color-gray);
108
+ }
109
+ .current {
110
+ transition: background-color 0.5s;
111
+ background-color: $curr-color;
112
+ background-color: var(--color-curr);
113
+ }
114
+ .week.current .agenda {
115
+ color: $gray-alter;
116
+ color: var(--color-altg);
117
+ }
118
+ #btn-show-calendar,
119
+ .agenda h3 a {
120
+ color: $back-color;
121
+ color: var(--color-back);
122
+ background-color: $spot-color;
123
+ background-color: var(--color-spot);
124
+ }
125
+ #btn-show-calendar {
126
+ background-color: $back-color;
127
+ background-color: var(--color-back);
128
+ color: $gray-color;
129
+ color: var(--color-gray);
130
+ border: 1px solid $gray-color;
131
+ border: 1px solid var(--color-gray);
132
+ }
133
+ #btn-show-calendar:active,
134
+ #btn-show-calendar:focus,
135
+ #btn-show-calendar:hover {
136
+ background-color: $gray-color;
137
+ background-color: var(--color-gray);
138
+ color: $back-color;
139
+ color: var(--color-back);
140
+ }
141
+ .agenda h3 a {
142
+ background-color: $back-color;
143
+ background-color: var(--color-back);
144
+ border: 1px solid $spot-color;
145
+ border: 1px solid var(--color-spot);
146
+ color: $spot-color;
147
+ color: var(--color-spot);
148
+ }
149
+ .agenda h3 a:active,
150
+ .agenda h3 a:focus,
151
+ .agenda h3 a:hover {
152
+ background-color: $spot-color;
153
+ background-color: var(--color-spot);
154
+ color: $back-color;
155
+ color: var(--color-back);
156
+ }
157
+ .agenda h3 a::before {
158
+ color: $gray-color;
159
+ color: var(--color-gray);
160
+ }
161
+ header small {
162
+ color: $spot-color;
163
+ color: var(--color-spot);
164
+ }
165
+ .week > header small {
166
+ color: $gray-color;
167
+ color: var(--color-gray);
168
+ }
169
+ #header,
170
+ #footer,
171
+ #instructor {
172
+ color: $gray-color;
173
+ color: var(--color-gray);
174
+ }
175
+ #header .nav {
176
+ color: $text-color;
177
+ color: var(--color-text);
178
+ }
179
+ #header #theme-button {
180
+ background-color: $text-color;
181
+ background-color: var(--color-text);
182
+ border-color: $text-color;
183
+ border-color: var(--color-text);
184
+ color: $back-color;
185
+ color: var(--color-back);
186
+ }
187
+ #header #theme-button svg {
188
+ fill: $back-color;
189
+ fill: var(--color-back);
190
+ }
@@ -0,0 +1,10 @@
1
+ $font-url: "https://use.typekit.net/pig5ein.css";
2
+
3
+ $primary-font-family: "Parka", serif;
4
+ $secondary-font-family: "moderno-fb-compressed";
5
+ $tertiary-font-family: "moderno-fb-condensed";
6
+
7
+ // Font-Weight Reference
8
+ // Parka: 300 (retina); 400 (normal); 500 (medium); 700 (bold)
9
+ // Moderno FB Compressed: 600 (semibold)
10
+ // Moderno FB Condensed: 700 (bold)
@@ -0,0 +1,358 @@
1
+ $base-size-px: 19;
2
+ $base-line-px: 24;
3
+ $base-size: ($base-size-px / 16) * 100%;
4
+ $base-line: ($base-line-px / $base-size-px) * 1rem;
5
+ $mod-scale: 1.25;
6
+
7
+
8
+ html {
9
+ -webkit-text-size-adjust: none;
10
+ font-family: $primary-font-family;
11
+ font-size: 19px;
12
+ }
13
+
14
+ @media (min-resolution: 192dpi) {
15
+ html {
16
+ font-weight: 300;
17
+ }
18
+ }
19
+
20
+ h2 {
21
+ font-family: $secondary-font-family;
22
+ font-weight: 600;
23
+ font-size: $base-size * $mod-scale * $mod-scale * $mod-scale;
24
+ line-height: $base-line * 2;
25
+ }
26
+
27
+ #content b,
28
+ #content strong {
29
+ font-weight: 500;
30
+ }
31
+
32
+ #full-nav.hidden {
33
+ display: none;
34
+ }
35
+ #quick-nav {
36
+ align-items: baseline;
37
+ display: flex;
38
+ justify-content: space-between;
39
+ }
40
+ #quick-nav .nav {
41
+ display: flex;
42
+ flex: 1 0 auto;
43
+ flex-flow: row wrap;
44
+ justify-content: flex-end;
45
+ }
46
+ #quick-nav li {
47
+ padding: 0;
48
+ margin-left: $base-line / 2;
49
+ }
50
+ .navbar #quick-nav li::before {
51
+ content: "";
52
+ }
53
+ #nav-con a {
54
+ text-decoration: none;
55
+ }
56
+ .nav a {
57
+ border-radius: $base-line / 4;
58
+ display: block;
59
+ padding: $base-line / 4;
60
+ text-decoration: none;
61
+ }
62
+
63
+ .nav li::before {
64
+ content: "";
65
+ }
66
+
67
+ #header h1 a {
68
+ text-decoration: none;
69
+ }
70
+
71
+ #header #theme-button {
72
+ opacity: 0.55;
73
+ line-height: 0;
74
+ }
75
+
76
+ /* ~ 370px */
77
+ @media screen and (min-width: 23.125em) {
78
+ #header h1 {
79
+ position: relative;
80
+ }
81
+ }
82
+
83
+ /* ~ 620px */
84
+ @media screen and (min-width: 38.75em) {
85
+ h2 {
86
+ font-family: $tertiary-font-family;
87
+ font-weight: 700;
88
+ }
89
+ }
90
+
91
+ #header h3,
92
+ #footer h3,
93
+ #instructor h3,
94
+ .agenda h3 {
95
+ text-transform: none;
96
+ font-weight: 500;
97
+ padding-bottom: $base-line / 2;
98
+ }
99
+ .agenda h3 {
100
+ padding-bottom: $base-line / 4;
101
+ }
102
+ .assigned h3,
103
+ .project h3 {
104
+ font-weight: bold;
105
+ }
106
+
107
+ #btn-show-calendar,
108
+ .agenda h3 a {
109
+ border-radius: $base-line / 4;
110
+ display: block;
111
+ padding: $base-line / 4;
112
+ text-decoration: none;
113
+ display: inline-block;
114
+ }
115
+ #btn-show-calendar {
116
+ margin-bottom: $base-line * 2;
117
+ text-decoration: none;
118
+ }
119
+
120
+ .agenda h3 a {
121
+ padding: $base-line / 8 $base-line / 4;
122
+ margin-top: -($base-line / 8);
123
+ }
124
+ .agenda h3 a::before {
125
+ content: "▸ ";
126
+ }
127
+ #content header {
128
+ padding-bottom: $base-line;
129
+ }
130
+ header small {
131
+ display: block;
132
+ font-weight: 500;
133
+ // padding-top: $base-line * 0.25;
134
+ }
135
+ .week > header small {
136
+ font-weight: normal;
137
+ }
138
+
139
+ #content article {
140
+ padding-bottom: $base-line * 3;
141
+ }
142
+
143
+ .current {
144
+ padding: $base-line * 1.5;
145
+ margin: ($base-line * 1.5) (-($base-line * 1.5));
146
+ }
147
+
148
+ .assigned {
149
+ padding-top: $base-line;
150
+ }
151
+
152
+ #header {
153
+ padding: $base-line * 0.5;
154
+ }
155
+ #header p {
156
+ min-height: $base-line * 4;
157
+ padding-top: $base-line * 0.5;
158
+ }
159
+ #header,
160
+ #content,
161
+ #footer,
162
+ #instructor {
163
+ padding-left: $base-line * 1.5;
164
+ padding-right: $base-line * 1.5;
165
+ }
166
+
167
+ /* ~ 690px */
168
+ @media screen and (min-width: 43.125em) {
169
+ #header,
170
+ .policy,
171
+ .project,
172
+ .week,
173
+ #instructor,
174
+ #footer {
175
+ display: grid;
176
+ grid-template-columns: repeat(5,1fr);
177
+ grid-column-gap: $base-line;
178
+ }
179
+ .week {
180
+ grid-template-rows: auto ($base-line * 3.25);
181
+ align-content: stretch;
182
+ }
183
+ .policy header,
184
+ .project header,
185
+ .week header {
186
+ grid-column: 1 / 6;
187
+ }
188
+ .week .agendas {
189
+ grid-column: 1 / 3;
190
+ grid-row-start: 3;
191
+ }
192
+ .week .assigned {
193
+ padding-top: 0;
194
+ grid-column: 3 / 6;
195
+ grid-row: 2 / 4;
196
+ }
197
+
198
+ .policy > * {
199
+ grid-column: 1 / 5;
200
+ }
201
+ #books.policy section,
202
+ #materials.policy .required {
203
+ grid-column: 1 / 4;
204
+ }
205
+ #books.policy .fine-print,
206
+ #materials.policy .recommended {
207
+ grid-column: 4 / 6;
208
+ grid-row: 3 / 5;
209
+ }
210
+ #books.policy .fine-print,
211
+ #materials.policy .recommended {
212
+ grid-row: 2 / 5;
213
+ }
214
+ .project .description {
215
+ grid-column: 1 / 3;
216
+ grid-row: 2 / 3;
217
+ }
218
+ .project .goals {
219
+ grid-column: 1 / 3;
220
+ grid-row: 3 / 4;
221
+ }
222
+ .project .deliverables,
223
+ .project .requirements {
224
+ grid-column: 3 / 6;
225
+ }
226
+ .project .preview {
227
+ grid-column: 1 / 6;
228
+ }
229
+ #header h1 {
230
+ grid-column: 1 / 6;
231
+ }
232
+ #header p {
233
+ grid-column: 1 / 4;
234
+ }
235
+ #header #quick-nav {
236
+ grid-column: 1 / 6;
237
+ }
238
+
239
+ #instructor > * {
240
+ grid-column: 2 / 6;
241
+ }
242
+ #footer #full-nav {
243
+ grid-column: 1 / 2;
244
+ }
245
+ #footer #colophon {
246
+ grid-column: 2 / 6;
247
+ }
248
+ .navbar #instructor > *,
249
+ .navbar #footer #colophon {
250
+ grid-column: 1 / 4;
251
+ }
252
+ }
253
+
254
+ /* ~ 770px */
255
+ @media screen and (min-width: 48.125em) {
256
+ body::after {
257
+ content: 'navbar';
258
+ display: none;
259
+ }
260
+ }
261
+
262
+ /* ~ 855px */
263
+ @media screen and (min-width: 53.4375em) {
264
+ #header,
265
+ #content,
266
+ #footer,
267
+ #instructor {
268
+ padding: ($base-line * 1.5) 10%;
269
+ }
270
+ #footer {
271
+ padding-top: 0;
272
+ }
273
+ #instructor {
274
+ padding-bottom: 0;
275
+ }
276
+ h2 {
277
+ font-size: $base-size * $mod-scale * $mod-scale * $mod-scale * $mod-scale;
278
+ line-height: $base-line * 2.5;
279
+ }
280
+ .project .description {
281
+ grid-column: 1 / 4;
282
+ grid-row: 2 / 3;
283
+ }
284
+ .project .goals {
285
+ grid-column: 4 / 6;
286
+ grid-row: 2 / 3;
287
+ }
288
+ .project .deliverables,
289
+ .project .requirements {
290
+ grid-row: 3 / 6;
291
+ }
292
+ .project .deliverables {
293
+ grid-column: 1 / 3;
294
+ }
295
+ .project .requirements {
296
+ grid-column: 3 / 6;
297
+ }
298
+ .project .preview {
299
+ grid-column: 1 / 4;
300
+ }
301
+ }
302
+
303
+ /* ~ 1100px */
304
+ @media screen and (min-width: 68.75em) {
305
+ #header,
306
+ #content,
307
+ #footer,
308
+ #instructor {
309
+ padding-top: ($base-line * 3);
310
+ }
311
+ #footer {
312
+ padding-top: 0;
313
+ }
314
+ #instructor {
315
+ padding-bottom: 0;
316
+ }
317
+ .policy,
318
+ .project,
319
+ .week {
320
+ grid-column-gap: $base-line * 1.5;
321
+ }
322
+ h2 {
323
+ font-size: $base-size * $mod-scale * $mod-scale * $mod-scale * $mod-scale * $mod-scale;
324
+ line-height: $base-line * 3;
325
+ }
326
+ }
327
+
328
+ /* States */
329
+ .js .past {
330
+ display: none;
331
+ }
332
+
333
+ /**
334
+ * A quick baseline grid overlay using css+svg.
335
+ * Inspired by [Basehold.it](https://basehold.it/).
336
+ * @author leshido
337
+ */
338
+
339
+ .g body {
340
+ position: relative;
341
+ }
342
+
343
+ .g body::after {
344
+ background: url('data:image/svg+xml;utf8,<svg height="24" width="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="0.5" style="fill:rgba(255, 0, 0, 0.3)" /></svg>') repeat top left;
345
+ content: "";
346
+ display: block;
347
+ pointer-events: none;
348
+ top: 0;
349
+ right: 0;
350
+ bottom: 0;
351
+ left: 0;
352
+ z-index: 9999;
353
+ position: absolute;
354
+ }
355
+
356
+ .g body:active::after {
357
+ display: none;
358
+ }