fenton-jekyll-boilerplate 0.0.1

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 (61) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.md +31 -0
  4. data/_authors/steve-fenton.md +21 -0
  5. data/_data/language.yaml +49 -0
  6. data/_includes/analytics.html +3 -0
  7. data/_includes/breadcrumbs.html +19 -0
  8. data/_includes/footer.html +3 -0
  9. data/_includes/head.html +27 -0
  10. data/_includes/header.html +18 -0
  11. data/_includes/javascripts.html +1 -0
  12. data/_includes/navigation.html +36 -0
  13. data/_includes/skiplinks.html +5 -0
  14. data/_layouts/author.html +39 -0
  15. data/_layouts/default.html +15 -0
  16. data/_layouts/page.html +11 -0
  17. data/_layouts/post.html +37 -0
  18. data/_layouts/search.html +24 -0
  19. data/_plugins/breadcrumbs/breadcrumb_item.rb +29 -0
  20. data/_plugins/breadcrumbs.rb +82 -0
  21. data/_plugins/jekyll-paginate/pager.rb +141 -0
  22. data/_plugins/jekyll-paginate/pagination.rb +85 -0
  23. data/_plugins/liquid_language.rb +38 -0
  24. data/_plugins/liquid_regex.rb +17 -0
  25. data/_plugins/markdown.rb +17 -0
  26. data/_plugins/paging.rb +7 -0
  27. data/articles/index.html +70 -0
  28. data/assets/css/code.css +188 -0
  29. data/assets/css/main.css +552 -0
  30. data/assets/css/vars.css +81 -0
  31. data/assets/icons/android-chrome-192x192.png +0 -0
  32. data/assets/icons/android-chrome-512x512.png +0 -0
  33. data/assets/icons/apple-touch-icon.png +0 -0
  34. data/assets/icons/favicon-16x16.png +0 -0
  35. data/assets/icons/favicon-32x32.png +0 -0
  36. data/assets/icons/favicon.ico +0 -0
  37. data/assets/img/2022/09/surface-accessories-700.webp +0 -0
  38. data/assets/img/2022/09/surface-accessories.webp +0 -0
  39. data/assets/img/authors/steve-fenton.webp +0 -0
  40. data/assets/img/jekyll-and-hyde.webp +0 -0
  41. data/assets/img/lighthouse-scores.webp +0 -0
  42. data/assets/js/main.js +18 -0
  43. data/assets/js/modules/animation.js +41 -0
  44. data/assets/js/modules/click-blocks.js +35 -0
  45. data/assets/js/modules/events.js +19 -0
  46. data/assets/js/modules/focus.js +76 -0
  47. data/assets/js/modules/nav-expand.js +51 -0
  48. data/assets/js/modules/nav-mobile.js +104 -0
  49. data/assets/js/modules/nav-sticky.js +54 -0
  50. data/assets/js/modules/query.js +42 -0
  51. data/assets/js/modules/resizing.js +43 -0
  52. data/assets/js/modules/string.js +49 -0
  53. data/assets/js/search.js +154 -0
  54. data/assets/svg/down.svg +38 -0
  55. data/feed/atom.xml +39 -0
  56. data/search.json +38 -0
  57. data/sitemap/authors.xml +15 -0
  58. data/sitemap/pages.xml +15 -0
  59. data/sitemap/posts.xml +15 -0
  60. data/sitemap.xml +15 -0
  61. metadata +130 -0
@@ -0,0 +1,552 @@
1
+ html {
2
+ box-sizing: border-box;
3
+ }
4
+
5
+ *,
6
+ *::before,
7
+ *::after {
8
+ border: 0 none;
9
+ font-weight: inherit;
10
+ font-family: inherit;
11
+ font-style: inherit;
12
+ font-size: 100%;
13
+ margin: 0;
14
+ outline: 0;
15
+ padding: 0;
16
+ vertical-align: baseline;
17
+ }
18
+
19
+ html {
20
+ scroll-padding-top: 5em;
21
+ }
22
+
23
+ body {
24
+ background-color: var(--aft);
25
+ color: var(--fore);
26
+ font-size: 16px;
27
+ line-height: 1.8em;
28
+ letter-spacing: 0.016em;
29
+ font-family: var(--content-font);
30
+ }
31
+
32
+ a, summary {
33
+ color: var(--fore-link);
34
+ text-decoration: underline;
35
+ }
36
+
37
+ a:hover,
38
+ a:focus,
39
+ summary:hover,
40
+ summary:focus {
41
+ color: var(--fore-link-alt);
42
+ background-color: var(--aft-link-alt);
43
+ }
44
+
45
+ :focus {
46
+ outline: 2px dashed var(--fore-link-alt);
47
+ border-radius: 5px;
48
+ }
49
+
50
+ /* General */
51
+
52
+ @media (prefers-reduced-motion: no-preference) {
53
+ body, html {
54
+ scroll-behavior: smooth;
55
+ }
56
+
57
+ .post-list .list-item, main img, main blockquote, main .note {
58
+ transition: all 0.2s ease-in;
59
+ scale: calc(0.75 + (var(--shown, 1) * 0.25));
60
+ }
61
+ }
62
+
63
+ blockquote {
64
+ color: var(--fore-block);
65
+ background-color: var(--aft-block);
66
+ font-size: 1.3rem;
67
+ font-style: italic;
68
+ padding: 0.1px 1.2em;
69
+ position: relative;
70
+ box-shadow: var(--box-shadow);
71
+
72
+ }
73
+
74
+ blockquote::after {
75
+ content: '“';
76
+ color: var(--icon-block);
77
+ font-size: 5em;
78
+ position: absolute;
79
+ font-family: var(--heading-font);
80
+ transform: translate(-50%, -50%);
81
+ top: 3.4rem;
82
+ }
83
+
84
+ blockquote > *:first-child {
85
+ text-indent: 2em;
86
+ }
87
+
88
+ blockquote cite {
89
+ font-style: initial;
90
+ font-weight: bold;
91
+ display: block;
92
+ margin-top: 1em;
93
+ text-align: right;
94
+ }
95
+
96
+ blockquote cite::before {
97
+ content: ' ―';
98
+ padding-right: 0.5em;
99
+ }
100
+
101
+ em {
102
+ font-style: italic;
103
+ }
104
+
105
+ h1, h2, h3, h4, h5, h6 {
106
+ font-family: var(--heading-font);
107
+ margin: 1.5em 0 0.6em 0;
108
+ color: var(--fore-headings);
109
+ }
110
+
111
+ h1 {
112
+ font-size: 3em;
113
+ font-size: clamp(2em, 4vw, 3em);
114
+ }
115
+
116
+ main h1 {
117
+ margin-top: 0.1em;
118
+ }
119
+
120
+ h2 {
121
+ font-size: 2.6em;
122
+ font-size: clamp(1.8em, 3.5vw, 2.6em);
123
+ }
124
+
125
+ h3 {
126
+ font-size: 2.3em;
127
+ font-size: clamp(1.6em, 3vw, 2.3em);
128
+ }
129
+
130
+ h4, h5, h6 {
131
+ font-size: 2em;
132
+ font-size: clamp(1.4em, 2.5vw, 2em);
133
+ }
134
+
135
+ hr {
136
+ border: 0.5px dotted var(--fore);
137
+ opacity: 0.5;
138
+ width: 80%;
139
+ margin: 0 auto;
140
+ }
141
+
142
+ img {
143
+ max-width: 100%;
144
+ }
145
+
146
+ p, main ul, main ol {
147
+ margin: 1.2em 0;
148
+ }
149
+
150
+ strong {
151
+ font-weight: bold;
152
+ }
153
+
154
+ table {
155
+ border-collapse: collapse;
156
+ border: 0.5px solid var(--fore);
157
+ width: 100%;
158
+ }
159
+
160
+ thead tr {
161
+ background-color: var(--aft-table-head);
162
+ color: var(--fore-table-head);
163
+ }
164
+
165
+ th, td {
166
+ border: 0.5px solid var(--fore);
167
+ padding: 0.2em 0.3em;
168
+ }
169
+
170
+ tbody tr {
171
+ background-color: var(--aft-table-row-even);
172
+ color: var(--fore-table-row-even);
173
+ }
174
+
175
+ tbody tr:nth-child(odd) {
176
+ background-color: var(--aft-table-row-odd);
177
+ color: var(--fore-table-row-odd);
178
+ }
179
+
180
+ /* Skip Links */
181
+ .skip-links {
182
+ position: absolute;
183
+ }
184
+
185
+ .skip-links a {
186
+ clip: rect(0 0 0 0);
187
+ background-color: var(--aft);
188
+ min-width: 20vw;
189
+ overflow: hidden;
190
+ padding: 1rem;
191
+ position: absolute;
192
+ z-index: 15;
193
+ text-align: center;
194
+ display: inline-block;
195
+ height: 1px;
196
+ margin: -1px;
197
+ width: 1px;
198
+ }
199
+
200
+ .skip-links a:focus {
201
+ clip: auto;
202
+ height: auto;
203
+ margin: 0.2em;
204
+ overflow: visible;
205
+ width: auto;
206
+ }
207
+
208
+
209
+ /* Header */
210
+
211
+ body > header {
212
+ color: var(--fore-head);
213
+ background-color: var(--aft-head);
214
+ text-align: center;
215
+ font-size: 2rem;
216
+ font-size: clamp(1.2em, 4vw, 2em);
217
+ padding: 1rem;
218
+ position: sticky;
219
+ top: 0;
220
+ z-index: 10;
221
+ }
222
+
223
+ body > header a {
224
+ color: var(--link-head);
225
+ text-decoration: none;
226
+ }
227
+
228
+ body > header a:hover,
229
+ body > header a:focus {
230
+ color: var(--link-alt-head);
231
+ background-color: unset;
232
+ }
233
+
234
+ .site-title {
235
+ letter-spacing: -1px;
236
+ text-transform: uppercase;
237
+ margin: 0 30px;
238
+ display: block;
239
+ }
240
+
241
+ .navigation-icon {
242
+ display: none;
243
+ position: fixed;
244
+ top: 10px;
245
+ left: 10px;
246
+ stroke: var(--link-head);
247
+ }
248
+
249
+ .search-icon {
250
+ position: fixed;
251
+ top: 10px;
252
+ right: 10px;
253
+ stroke: var(--link-head);
254
+ }
255
+
256
+ /* Footer */
257
+
258
+ body > footer {
259
+ text-align: center;
260
+ padding: 0.5rem 0;
261
+ width: 100%;
262
+ color: var(--fore-head);
263
+ background-color: var(--aft-head);
264
+ margin: var(--block-gap) auto 0 auto;
265
+ }
266
+
267
+ /* Breadcrumbs */
268
+
269
+ .site-breadcrumbs ol {
270
+ font-size: 0.8rem;
271
+ background-color: var(--aft-breadcrumb);
272
+ color: var(--fore-breadcrumb);
273
+ padding: 0 1em;
274
+ }
275
+
276
+ .site-breadcrumbs li {
277
+ display: inline-block;
278
+ padding: 0.2em;
279
+ }
280
+
281
+ .site-breadcrumbs li::before {
282
+ content: '>'
283
+ }
284
+
285
+ .site-breadcrumbs li:first-child::before {
286
+ content: ''
287
+ }
288
+
289
+ /* Content Group */
290
+
291
+ .content-group {
292
+ display: grid;
293
+ grid-template-columns: var(--navigation-width) auto;
294
+ gap: var(--grid-gap);
295
+ max-width: var(--grid-max-width);
296
+ width: var(--grid-width);
297
+ margin: var(--block-gap) auto var(--block-gap) auto;
298
+ min-height: 75vh;
299
+ }
300
+
301
+ /* Navigation */
302
+
303
+ nav.site-nav.sticky {
304
+ align-self: start;
305
+ position: sticky;
306
+ }
307
+
308
+ nav.site-nav h2 {
309
+ margin-top: 0.1em;
310
+ display: none;
311
+ }
312
+
313
+ nav.site-nav li {
314
+ list-style: none;
315
+ }
316
+
317
+ nav.site-nav a {
318
+ text-indent: var(--marker-size);
319
+ width: calc(100% - 2rem);
320
+ display: inline-block;
321
+ padding: 0.5rem 1rem;
322
+ }
323
+
324
+ nav.site-nav li.has-children summary span {
325
+ text-indent: 0;
326
+ width: calc(100% - 2rem - var(--marker-size));
327
+ display: inline-block;
328
+ padding: 0.5rem 1rem;
329
+ text-decoration: underline;
330
+ }
331
+
332
+ nav.site-nav li.has-children ul a {
333
+ width: calc(100% - 2rem);
334
+ text-indent: calc(var(--marker-size) * 2);
335
+ }
336
+
337
+ nav.site-nav .current-item {
338
+ font-weight: bold;
339
+ }
340
+
341
+ details summary {
342
+ cursor: pointer;
343
+ }
344
+
345
+ details summary::-webkit-details-marker,
346
+ details summary::marker {
347
+ font-size: var(--marker-size);
348
+ width: 1em;
349
+ }
350
+
351
+ /* Overlay (Mobile Navigation, Search) */
352
+
353
+ .overlay {
354
+ position: fixed;
355
+ top: 0;
356
+ width: calc(100% - 2em);
357
+ height: calc(100% - 7rem);
358
+ max-height: 100vh;
359
+ background-color: var(--aft);
360
+ padding : 5rem 1em 2rem 1em;
361
+ overflow-y: auto;
362
+ }
363
+
364
+ .overlay a, .overlay summary {
365
+ border-bottom: 1px solid var(--fore-link);
366
+ }
367
+
368
+ /* Content */
369
+
370
+ main {
371
+ max-width: calc(var(--grid-max-width) - var(--navigation-width) - var(--grid-gap));
372
+ width: calc(var(--grid-width) - var(--navigation-width) - var(--grid-gap));
373
+ }
374
+
375
+ main ul, main ol {
376
+ margin-left: 1.2em;
377
+ }
378
+
379
+ main ul li, main ol li {
380
+ line-height: 2em;
381
+ }
382
+
383
+ /* Jekyll Post List */
384
+
385
+ .post-list {
386
+ margin: 0;
387
+ }
388
+
389
+ .post-list .list-item {
390
+ list-style: none;
391
+ color: var(--fore-block);
392
+ background-color: var(--aft-block);
393
+ position: relative;
394
+ box-shadow: var(--box-shadow);
395
+ margin-bottom: 1.5rem;
396
+ }
397
+
398
+ .post-list .list-item-content {
399
+ padding: 1rem;
400
+ }
401
+
402
+ .post-list .list-item-content h2 {
403
+ margin: 0.5rem 0;
404
+ }
405
+
406
+ .post-list .list-item img {
407
+ width: 100%;
408
+ aspect-ratio: 16/9;
409
+ object-fit: cover;
410
+ }
411
+
412
+ .post-paging {
413
+ margin-top: 2rem;
414
+ text-align: center;
415
+ }
416
+
417
+ /* Jekyll Post */
418
+ .post-meta {
419
+ display: flex;
420
+ align-items: center;
421
+ }
422
+
423
+ .post-meta .author-image {
424
+ max-width: 50px;
425
+ margin-right: 1rem;
426
+ }
427
+
428
+ .post-meta > .author-info {
429
+ display: flex;
430
+ align-items: center;
431
+ }
432
+
433
+ .post-meta time {
434
+ display: block;
435
+ }
436
+
437
+ /* Authors */
438
+
439
+ .author-image {
440
+ border-radius: 50%;
441
+ aspect-ratio: 1/1;
442
+ object-fit: cover;
443
+ max-width: 150px;
444
+ float: right
445
+ }
446
+
447
+ /* .author-profile {
448
+ display: flex;
449
+ } */
450
+
451
+ /* Code Block */
452
+
453
+ code {
454
+ background-color: var(--aft-block);
455
+ font-family: var(--code-font);
456
+ font-weight: bold;
457
+ }
458
+
459
+ pre.highlight {
460
+ border-left: 5px solid var(--fore);
461
+ padding: 1rem;
462
+ font-family: var(--code-font);
463
+ overflow: auto;
464
+ margin: 1em 0;
465
+ }
466
+
467
+ pre.highlight code {
468
+ font-weight: unset;
469
+ background-color: unset;
470
+ }
471
+
472
+ /* Site Search */
473
+
474
+ form.site-search {
475
+ padding: 1em;
476
+ }
477
+
478
+ form.site-search div {
479
+ display: grid;
480
+ grid-template-columns: repeat(3, auto);
481
+ gap: 1em;
482
+ }
483
+
484
+ form.site-search label > * {
485
+ padding: 0.2em;
486
+ }
487
+
488
+ form.site-search button {
489
+ display: none;
490
+ }
491
+
492
+ .site-search-results {
493
+ font-size: 1.3rem;
494
+ }
495
+
496
+ .site-search-results a {
497
+ display: block;
498
+ padding: 0.2em;
499
+ }
500
+
501
+ /* Custom Divisions */
502
+
503
+ .note {
504
+ color: var(--fore-block);
505
+ background-color: var(--aft-block);
506
+ font-size: 1.3rem;
507
+ padding: 0.1px 1.2em;
508
+ position: relative;
509
+ box-shadow: var(--box-shadow);
510
+ }
511
+
512
+ /* Smaller Screens */
513
+
514
+ @media (max-width: 860px) {
515
+
516
+ /* Show the Hamburger Icon */
517
+ .navigation-icon {
518
+ display: block;
519
+ }
520
+
521
+ .site-breadcrumbs ol {
522
+ text-align: center;
523
+ }
524
+
525
+ /* Content First on Small Screens */
526
+ .content-group {
527
+ grid-template-columns: auto;
528
+ grid-template-rows: 1fr auto;
529
+ }
530
+
531
+ nav.site-nav {
532
+ grid-row: 2;
533
+ }
534
+
535
+ .content-group > main {
536
+ grid-row: 1;
537
+ }
538
+
539
+ main {
540
+ max-width: unset;
541
+ width: var(--grid-width);
542
+ }
543
+
544
+ nav.site-nav h2 {
545
+ display: block;
546
+ }
547
+
548
+ /* */
549
+ form.site-search div {
550
+ grid-template-columns: repeat(1, auto);
551
+ }
552
+ }
@@ -0,0 +1,81 @@
1
+ /* Recommended Tools
2
+ Check accessibility for colour combinations
3
+ https://toolness.github.io/accessible-color-matrix/
4
+ */
5
+
6
+ :root {
7
+ --fore: #333;
8
+ --fore-headings: #225;
9
+ --aft: #FBFBFC;
10
+
11
+ --fore-link: #2d4295;
12
+ --fore-link-alt: #4D71FF;
13
+ --aft-link-alt: #F3F5FF;
14
+
15
+ --fore-head: #333;
16
+ --aft-head: #E6E8F1;
17
+
18
+ --fore-breadcrumb: #333;
19
+ --aft-breadcrumb: #F3F5FF;
20
+
21
+ --link-head: #2d4295;
22
+ --link-alt-head: #2a4dd8;
23
+
24
+ --fore-block: #333;
25
+ --aft-block: #F3F5FF;
26
+ --icon-block: #4D71FF;
27
+
28
+ --fore-table-head: #FDFDFE;
29
+ --aft-table-head: #2F3141;
30
+ --fore-table-row-odd: #333;
31
+ --aft-table-row-odd: #FDFDFE;
32
+ --fore-table-row-even: #333;
33
+ --aft-table-row-even: #F3F5FF;
34
+
35
+ --heading-font: Georgia, 'Times New Roman', Times, serif;
36
+ --content-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
37
+ --code-font: Consolas, 'Courier New', Courier, monospace;
38
+
39
+ --block-gap: 2rem;
40
+
41
+ --marker-size: 1.2em;
42
+
43
+ --box-shadow: 0 12px 24px -12px rgb(0 0 0 / 80%);
44
+
45
+ --navigation-width: 300px;
46
+ --grid-gap: 1rem;
47
+ --grid-max-width: 60rem;
48
+ --grid-width: 90vw;
49
+ }
50
+
51
+ @media (prefers-color-scheme: dark) {
52
+ :root {
53
+ --fore: #CCC;
54
+ --fore-headings: #CCE;
55
+ --aft: #333;
56
+
57
+ --fore-link: #abb9ef;
58
+ --fore-link-alt: #abb9ef;
59
+ --aft-link-alt: #232323;
60
+
61
+ --fore-head: #CCC;
62
+ --aft-head: #222;
63
+
64
+ --fore-breadcrumb: #CCC;
65
+ --aft-breadcrumb: #2C2C2C;
66
+
67
+ --link-head: #abb9ef;
68
+ --link-alt-head: #6580ed;
69
+
70
+ --fore-block: #CCC;
71
+ --aft-block: #111;
72
+ --icon-block: #abb9ef;
73
+
74
+ --fore-table-head: #CCC;
75
+ --aft-table-head: #222;
76
+ --fore-table-row-odd: #CCC;
77
+ --aft-table-row-odd: #333;
78
+ --fore-table-row-even: #CCC;
79
+ --aft-table-row-even: #444;
80
+ }
81
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/assets/js/main.js ADDED
@@ -0,0 +1,18 @@
1
+ // @ts-check
2
+
3
+ import { setNavigationTree, setNavigationItem } from './modules/nav-expand.js';
4
+ import { setClickableBlocks } from './modules/click-blocks.js';
5
+ import { addResizedEvent } from './modules/resizing.js';
6
+ import { addStickyNavigation } from './modules/nav-sticky.js';
7
+ import { addMobileNavigation } from './modules/nav-mobile.js';
8
+ import { addIntersectionObserver } from './modules/animation.js';
9
+
10
+ setNavigationTree('details.sub-nav');
11
+ setNavigationItem('.site-nav a', 'current-item')
12
+ setClickableBlocks('data-destination');
13
+
14
+ var resizedEventName = addResizedEvent();
15
+
16
+ addStickyNavigation('.site-header', '.site-nav', '.site-nav > ul', resizedEventName);
17
+ addMobileNavigation('.navigation-icon', '.site-nav', resizedEventName);
18
+ addIntersectionObserver('.post-list .list-item, main img, main .note, main blockquote');
@@ -0,0 +1,41 @@
1
+ // @ts-check
2
+
3
+ import { qsa } from './query.js';
4
+
5
+ /**
6
+ * Assists animation by setting "--shown" CSS property
7
+ *
8
+ * When an item is visible in the viewport, it will have --shown: 1
9
+ * Otherwise it will be --shown: 0
10
+ * This allows CSS transitions and calculated properties to animate elements
11
+ *
12
+ * Example
13
+ * transition: all 0.2s ease-in;
14
+ * scale: calc(0.75 + (var(--shown, 1) * 0.25));
15
+ *
16
+ * @param {string} listItemQuery
17
+ */
18
+ function addIntersectionObserver(listItemQuery) {
19
+ function handleIntersection(entries, observer) {
20
+ for (var entry of entries) {
21
+ var value = entry.isIntersecting ? 1 : 0;
22
+ entry.target.style.setProperty('--shown', value);
23
+ }
24
+ }
25
+
26
+ var options = {
27
+ root: null,
28
+ rootMargin: '0px',
29
+ threshold: 0
30
+ };
31
+
32
+ var observer = new IntersectionObserver(handleIntersection, options)
33
+
34
+ var items = qsa(listItemQuery);
35
+
36
+ for (var i = 0; i < items.length; i++) {
37
+ observer.observe(items[i]);
38
+ }
39
+ }
40
+
41
+ export { addIntersectionObserver };