Browse Source

Finish porting CSS to SASS

master
Chris Smith 4 years ago
parent
commit
749a9feacc
Signed by: Chris Smith <chris@chameth.com> GPG Key ID: 3A2D4BBDC4A3C9A9

+ 2
- 1
.gitignore View File

@@ -1,5 +1,6 @@
1 1
 .DS_Store
2 2
 .idea
3 3
 
4
-# When running outside of docker, Hugo writes content here
4
+# Hugo generated content 
5 5
 /site/public
6
+/site/resources

+ 0
- 14
site/assets/style.sass View File

@@ -1,14 +0,0 @@
1
-@import style/fonts
2
-@import style/reset
3
-@import style/colours
4
-@import style/headings
5
-@import style/text
6
-
7
-@import style/modules/code
8
-@import style/modules/figures
9
-@import style/modules/header
10
-@import style/modules/updates
11
-
12
-@import style/font-awesome
13
-@import style/font-awesome.min
14
-@import style/legacy

+ 6
- 1
site/assets/style/_colours.sass View File

@@ -1,7 +1,9 @@
1 1
 // Site-wide colour definitions
2 2
 
3 3
 $dark-gray: #565656
4
-$light-gray: #787878
4
+$gray: #787878
5
+$light-gray: #efefef
6
+$lightest-gray: #f7f7f7
5 7
 $cyan: #49bf9d
6 8
 
7 9
 $light-green: #eeffee
@@ -9,3 +11,6 @@ $green: #669966
9 11
 
10 12
 $update-border: $green
11 13
 $update-background: $light-green
14
+
15
+$code-border: $light-gray
16
+$code-background: $lightest-gray

+ 48
- 0
site/assets/style/_general.sass View File

@@ -0,0 +1,48 @@
1
+body
2
+  background: #ffffff
3
+  min-width: 400px
4
+
5
+p
6
+  margin: 0 0 2em 0
7
+
8
+hr
9
+  border: 0
10
+  border-bottom: solid 2px $light-gray
11
+  margin: 2em 0
12
+
13
+summary
14
+  cursor: pointer
15
+
16
+#main
17
+  margin-left: calc(60% - 27em)
18
+  max-width: 54em
19
+  padding: 8em 4em 4em 4em
20
+  width: calc(100% - 20%)
21
+
22
+  @media screen and (max-width: 1280px)
23
+    margin-left: 30%
24
+    max-width: none
25
+    padding: 6em 3em 3em 3em
26
+    width: calc(100% - 30%)
27
+
28
+  @media screen and (max-width: 980px)
29
+    margin: 0
30
+    padding: 6em 4em
31
+    width: 100%
32
+
33
+  @media screen and (max-width: 736px), screen and (max-height: 700px)
34
+    padding: 2.25em 1.5em 0.25em 1.5em
35
+
36
+  & > section
37
+    border-top: solid 2px $light-gray
38
+    margin: 4em 0 0 0
39
+    padding: 4em 0 0 0
40
+
41
+    @media screen and (max-width: 736px), screen and (max-height: 700px)
42
+      margin: 2.25em 0 0 0
43
+      padding: 2.25em 0 0 0
44
+
45
+    &:first-child
46
+      border-top: 0
47
+      margin-top: 0
48
+      padding-top: 0

+ 14
- 1
site/assets/style/_text.sass View File

@@ -6,13 +6,17 @@ body
6 6
   font-size: 16pt
7 7
   font-weight: 400
8 8
   line-height: 1.75em
9
+  -webkit-text-size-adjust: none
10
+
11
+  @media screen and (max-width: 1800px)
12
+    font-size: 12pt
9 13
 
10 14
 a
11 15
   color: $cyan
12 16
   text-decoration-skip-ink: auto
13 17
 
14 18
 strong, b
15
-  color: $light-gray
19
+  color: $gray
16 20
   font-weight: 400
17 21
 
18 22
 em, i
@@ -27,3 +31,12 @@ sup
27 31
   font-size: 0.8em
28 32
   position: relative
29 33
   top: -0.5em
34
+
35
+p code
36
+  background: $code-background
37
+  border-radius: .35em
38
+  border: solid 2px $code-border
39
+  font-family: "Courier New", monospace
40
+  font-size: .9em
41
+  margin: 0 .25em
42
+  padding: .25em .65em

+ 0
- 3
site/assets/style/font-awesome.css View File

@@ -1,3 +0,0 @@
1
-.fa-key:before { content: '\e800' !important; }
2
-.fa-twitter:before { content: '\f099' !important; }
3
-.fa-github:before { content: '\f09b' !important; }

+ 0
- 4
site/assets/style/font-awesome.min.css
File diff suppressed because it is too large
View File


+ 0
- 594
site/assets/style/legacy.css View File

@@ -1,594 +0,0 @@
1
-body {
2
-  -webkit-text-size-adjust: none
3
-}
4
-
5
-/* hire */
6
-.hire {
7
-  background-color: #afb6d9;
8
-  border-radius: 10px;
9
-  padding: 1em 1.5em;
10
-  margin-bottom: 2em;
11
-}
12
-
13
-.hire h3, .hire p {
14
-  margin: 0;
15
-}
16
-
17
-.hire a, .hire a:hover, .hire a:active {
18
-  color: #4565ad !important;
19
-}
20
-
21
-summary {
22
-  cursor: pointer;
23
-}
24
-
25
-
26
-/* Basic */
27
-
28
-  body {
29
-    background: #ffffff;
30
-    min-width: 400px;
31
-  }
32
-
33
-p { margin: 0 0 2em 0; }
34
-
35
-
36
-hr {
37
-    border: 0;
38
-    border-bottom: solid 2px #efefef;
39
-    margin: 2em 0;
40
-  }
41
-
42
-  blockquote {
43
-    border-left: solid 6px #efefef;
44
-    font-style: italic;
45
-    margin: 0 0 2em 0;
46
-    padding: 0.5em 0 0.5em 1.5em;
47
-  }
48
-
49
-  blockquote p {
50
-    margin-bottom: 0.5em;
51
-  }
52
-
53
-  blockquote p:last-child {
54
-    margin-bottom: 0;
55
-  }
56
-
57
-  .align-left {
58
-    text-align: left;
59
-  }
60
-
61
-  .align-center {
62
-    text-align: center;
63
-  }
64
-
65
-  .align-right {
66
-    text-align: right;
67
-  }
68
-
69
-/* Section/Article */
70
-
71
-  article + article {
72
-    padding-top: 100px;
73
-    border-top: 10px solid rgba(200, 200, 200, 0.3);
74
-    margin-top: 100px;
75
-  }
76
-
77
-  header p {
78
-    color: #d2d2d2;
79
-    position: relative;
80
-    margin: 0 0 1.5em 0;
81
-  }
82
-
83
-  header h2 + p {
84
-    color: #939393;
85
-    font-size: 1.25em;
86
-    margin-top: -1em;
87
-    line-height: 1.5em;
88
-  }
89
-
90
-  header h3 + p {
91
-    font-size: 1.1em;
92
-    margin-top: -0.8em;
93
-    line-height: 1.5em;
94
-  }
95
-
96
-  header h4 + p,
97
-  header h5 + p,
98
-  header h6 + p {
99
-    font-size: 0.9em;
100
-    margin-top: -0.6em;
101
-    line-height: 1.5em;
102
-  }
103
-
104
-/* Image */
105
-
106
-article img {
107
-  max-width: 100%;
108
-}
109
-
110
-.image {
111
-  border-radius: 0.35em;
112
-  border: 0;
113
-  display: inline-block;
114
-  position: relative;
115
-}
116
-
117
-    .image:before {
118
-      -moz-transition: opacity 0.2s ease-in-out;
119
-      -webkit-transition: opacity 0.2s ease-in-out;
120
-      -ms-transition: opacity 0.2s ease-in-out;
121
-      transition: opacity 0.2s ease-in-out;
122
-      background: url("/res/images/overlay.png");
123
-      border-radius: 0.35em;
124
-      content: '';
125
-      display: block;
126
-      height: 100%;
127
-      left: 0;
128
-      opacity: 0.5;
129
-      position: absolute;
130
-      top: 0;
131
-      width: 100%;
132
-    }
133
-
134
-    .image.thumb {
135
-      text-align: center;
136
-    }
137
-
138
-      .image.thumb:after {
139
-        -moz-transition: opacity 0.2s ease-in-out;
140
-        -webkit-transition: opacity 0.2s ease-in-out;
141
-        -ms-transition: opacity 0.2s ease-in-out;
142
-        transition: opacity 0.2s ease-in-out;
143
-        border-radius: 0.35em;
144
-        border: solid 3px rgba(255, 255, 255, 0.5);
145
-        color: #fff;
146
-        content: 'View';
147
-        display: inline-block;
148
-        font-size: 0.8em;
149
-        font-weight: 400;
150
-        left: 50%;
151
-        line-height: 2.25em;
152
-        margin: -1.25em 0 0 -3em;
153
-        opacity: 0;
154
-        padding: 0 1.5em;
155
-        position: absolute;
156
-        text-align: center;
157
-        text-decoration: none;
158
-        top: 50%;
159
-        white-space: nowrap;
160
-      }
161
-
162
-      .image.thumb:hover:after {
163
-        opacity: 1.0;
164
-      }
165
-
166
-      .image.thumb:hover:before {
167
-        background: url("/res/images/overlay.png"), url("/res/images/overlay.png");
168
-        opacity: 1.0;
169
-      }
170
-
171
-    .image img {
172
-      border-radius: 0.35em;
173
-      display: block;
174
-    }
175
-
176
-    .image.left, figure.left {
177
-      float: left;
178
-      margin: 0 1.5em 1em 0;
179
-      top: 0.25em;
180
-    }
181
-
182
-    .image.right, figure.right {
183
-      float: right;
184
-      margin: 0 0 1em 1.5em;
185
-      top: 0.25em;
186
-    }
187
-
188
-    .image.left, .image.right, figure.left, figure.right {
189
-      max-width: 40%;
190
-    }
191
-
192
-      .image.left img, .image.right img, figure.left img, figure.right img {
193
-        width: 100%;
194
-      }
195
-
196
-    .image.fit {
197
-      display: block;
198
-      margin: 0 0 2em 0;
199
-      width: 100%;
200
-    }
201
-
202
-      .image.fit img {
203
-        width: 100%;
204
-      }
205
-
206
-/* List */
207
-
208
-  ol {
209
-    list-style: decimal;
210
-    margin: 0 0 2em 0;
211
-    padding-left: 1.25em;
212
-  }
213
-
214
-    ol li {
215
-      padding-left: 0.25em;
216
-    }
217
-
218
-  ul {
219
-    list-style: disc;
220
-    margin: 0 0 2em 0;
221
-    padding-left: 1em;
222
-  }
223
-
224
-    ul li {
225
-      padding-left: 0.5em;
226
-    }
227
-
228
-/* Table */
229
-
230
-  .table-wrapper {
231
-    -webkit-overflow-scrolling: touch;
232
-    overflow-x: auto;
233
-  }
234
-
235
-  table {
236
-    margin: 0 0 2em 0;
237
-    width: 100%;
238
-  }
239
-
240
-    table tbody tr {
241
-      border: solid 1px #efefef;
242
-      border-left: 0;
243
-      border-right: 0;
244
-    }
245
-
246
-      table tbody tr:nth-child(2n + 1) {
247
-        background-color: #f7f7f7;
248
-      }
249
-
250
-    table td {
251
-      padding: 0.75em 0.75em;
252
-    }
253
-
254
-    table th {
255
-      color: #787878;
256
-      font-size: 0.9em;
257
-      font-weight: 400;
258
-      padding: 0 0.75em 0.75em 0.75em;
259
-      text-align: left;
260
-    }
261
-
262
-    table thead {
263
-      border-bottom: solid 2px #efefef;
264
-    }
265
-
266
-    table tfoot {
267
-      border-top: solid 2px #efefef;
268
-    }
269
-
270
-    table.alt {
271
-      border-collapse: separate;
272
-    }
273
-
274
-      table.alt tbody tr td {
275
-        border: solid 2px #efefef;
276
-        border-left-width: 0;
277
-        border-top-width: 0;
278
-      }
279
-
280
-        table.alt tbody tr td:first-child {
281
-          border-left-width: 2px;
282
-        }
283
-
284
-      table.alt tbody tr:first-child td {
285
-        border-top-width: 2px;
286
-      }
287
-
288
-      table.alt thead {
289
-        border-bottom: 0;
290
-      }
291
-
292
-      table.alt tfoot {
293
-        border-top: 0;
294
-      }
295
-
296
-/* Main */
297
-
298
-  #main {
299
-    margin-left: calc(60% - 27em);
300
-    max-width: 54em;
301
-    padding: 8em 4em 4em 4em;
302
-    width: calc(100% - 20%);
303
-  }
304
-
305
-    #main > section {
306
-      border-top: solid 2px #efefef;
307
-      margin: 4em 0 0 0;
308
-      padding: 4em 0 0 0;
309
-    }
310
-
311
-      #main > section:first-child {
312
-        border-top: 0;
313
-        margin-top: 0;
314
-        padding-top: 0;
315
-      }
316
-
317
-/* Touch */
318
-
319
-  body.is-touch .image.thumb:before {
320
-    opacity: 0.5 !important;
321
-  }
322
-
323
-  body.is-touch .image.thumb:after {
324
-    display: none !important;
325
-  }
326
-
327
-  body.is-touch #header {
328
-    background-attachment: scroll;
329
-    background-size: auto, cover;
330
-  }
331
-
332
-/* XLarge */
333
-
334
-  @media screen and (max-width: 1800px) {
335
-
336
-    /* Basic */
337
-
338
-      body, input, select, textarea {
339
-        font-size: 12pt;
340
-      }
341
-
342
-  }
343
-
344
-/* Large */
345
-
346
-  @media screen and (max-width: 1280px) {
347
-
348
-    /* Header */
349
-
350
-      #header {
351
-        padding: 6em 3em 3em 3em;
352
-        width: 30%;
353
-      }
354
-
355
-        #header h1 {
356
-          font-size: 1.25em;
357
-        }
358
-
359
-          #header h1 br {
360
-            display: none;
361
-          }
362
-
363
-    /* Main */
364
-
365
-      #main {
366
-        margin-left: 30%;
367
-        max-width: none;
368
-        padding: 6em 3em 3em 3em;
369
-        width: calc(100% - 30%);
370
-      }
371
-
372
-  }
373
-
374
-/* Medium */
375
-
376
-  @media screen and (max-width: 980px) {
377
-
378
-    /* Basic */
379
-
380
-      h1 br, h2 br, h3 br, h4 br, h5 br, h6 br {
381
-        display: none;
382
-      }
383
-
384
-    /* List */
385
-
386
-      ul.icons li .icon {
387
-        font-size: 1.25em;
388
-      }
389
-
390
-    /* Header */
391
-
392
-      #header {
393
-        background-attachment: scroll;
394
-        background-position: top left, center center;
395
-        background-size: auto,    cover;
396
-        left: auto;
397
-        padding: 6em 4em;
398
-        position: relative;
399
-        text-align: center;
400
-        top: auto;
401
-        width: 100%;
402
-        display: block;
403
-      }
404
-
405
-        #header h1 {
406
-          font-size: 1.75em;
407
-        }
408
-
409
-          #header h1 br, #posts .recent *, #posts .recent a {
410
-            display: inline;
411
-            padding: 0;
412
-            width: auto;
413
-          }
414
-
415
-          #posts ul {
416
-            padding-left: 0;
417
-          }
418
-
419
-          #posts ul li {
420
-            text-align: left;
421
-            margin: 0;
422
-          }
423
-
424
-    /* Main */
425
-
426
-      #main {
427
-        margin: 0;
428
-        padding: 6em 4em;
429
-        width: 100%;
430
-      }
431
-
432
-  }
433
-
434
-/* Small */
435
-
436
-  @media screen and (max-width: 736px), screen and (max-height: 700px) {
437
-
438
-    /* Basic */
439
-
440
-      h1 {
441
-        font-size: 1.5em;
442
-      }
443
-
444
-      h2 {
445
-        font-size: 1.2em;
446
-      }
447
-
448
-      h3 {
449
-        font-size: 1em;
450
-      }
451
-
452
-    /* Section/Article */
453
-
454
-      section.special, article.special {
455
-        text-align: center;
456
-      }
457
-
458
-      header.major h2 {
459
-        font-size: 1.35em;
460
-      }
461
-
462
-    /* List */
463
-
464
-      ul.labeled-icons li {
465
-        padding-left: 2em;
466
-      }
467
-
468
-        ul.labeled-icons li h3 {
469
-          line-height: 1.75em;
470
-        }
471
-
472
-    /* Header */
473
-
474
-      #header {
475
-        padding: 2.25em 1.5em;
476
-        min-height: 18em;
477
-      }
478
-
479
-      #header section {
480
-        padding: 10px 0;
481
-      }
482
-
483
-        #header h1 {
484
-          font-size: 1.35em;
485
-        }
486
-
487
-
488
-        #header ul {
489
-          margin-bottom: 20px;
490
-        }
491
-
492
-        #posts {
493
-          position: absolute;
494
-          bottom: 20px;
495
-          right: 20px;
496
-        }
497
-
498
-        #posts li.recent {
499
-          display: none;
500
-        }
501
-
502
-        #posts ul li {
503
-          margin: 0 0;
504
-          font-size: 0.9em;
505
-          line-height: 1.3em;
506
-        }
507
-
508
-    /* Main */
509
-
510
-      #main {
511
-        padding: 2.25em 1.5em 0.25em 1.5em;
512
-      }
513
-
514
-        #main > section {
515
-          margin: 2.25em 0 0 0;
516
-          padding: 2.25em 0 0 0;
517
-        }
518
-
519
-  }
520
-
521
-/* XSmall */
522
-
523
-  @media screen and (max-width: 480px), screen and (max-height: 700px)  {
524
-
525
-    /* List */
526
-
527
-      ul.actions {
528
-        margin: 0 0 2em 0;
529
-      }
530
-
531
-        ul.actions li {
532
-          display: block;
533
-          padding: 1em 0 0 0;
534
-          text-align: center;
535
-          width: 100%;
536
-        }
537
-
538
-          ul.actions li:first-child {
539
-            padding-top: 0;
540
-          }
541
-
542
-          ul.actions li > * {
543
-            margin: 0 !important;
544
-            width: 100%;
545
-          }
546
-
547
-            ul.actions li > *.icon:before {
548
-              margin-left: -2em;
549
-            }
550
-
551
-        ul.actions.small li {
552
-          padding: 0.5em 0 0 0;
553
-        }
554
-
555
-          ul.actions.small li:first-child {
556
-            padding-top: 0;
557
-          }
558
-
559
-    /* Header */
560
-
561
-      #header {
562
-        padding: 2.25em 1.5em 2em;
563
-        min-height: 18em;
564
-      }
565
-
566
-      #header section {
567
-        padding: 0;
568
-      }
569
-
570
-        #header h1 br {
571
-          display: none;
572
-        }
573
-
574
-        #posts li.recent {
575
-          display: none;
576
-        }
577
-
578
-        #header ul {
579
-          margin-bottom: 20px;
580
-        }
581
-
582
-        #posts {
583
-          position: absolute;
584
-          bottom: 20px;
585
-          right: 20px;
586
-        }
587
-
588
-        #posts ul li {
589
-          margin: 0 0;
590
-          font-size: 0.9em;
591
-          line-height: 1.3em;
592
-        }
593
-
594
-  }

+ 0
- 1
site/assets/style/lightbox.min.css.disabled View File

@@ -1 +0,0 @@
1
-.lb-loader,.lightbox{text-align:center;line-height:0}body:after{content:url(/res/images/close.png) url(/res/images/loading.gif) url(/res/images/prev.png) url(/res/images/next.png);display:none}.lb-dataContainer:after,.lb-outerContainer:after{content:"";clear:both}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{position:absolute;left:0;width:100%;z-index:10000;font-weight:400}.lightbox .lb-image{display:block;height:auto;max-width:inherit;border-radius:3px}.lightbox a img{border:none}.lb-outerContainer{position:relative;background-color:#fff;width:250px;height:250px;margin:0 auto;border-radius:4px}.lb-loader,.lb-nav{position:absolute;left:0}.lb-outerContainer:after{display:table}.lb-container{padding:4px}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(/res/images/loading.gif) no-repeat}.lb-nav{top:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(/res/images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(/res/images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{display:table}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(/res/images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}

+ 22
- 0
site/assets/style/modules/_articles.sass View File

@@ -0,0 +1,22 @@
1
+// Deals with article-specific layouts
2
+
3
+article
4
+
5
+  & + article
6
+    padding-top: 100px
7
+    border-top: 10px solid rgba(200, 200, 200, 0.3)
8
+    margin-top: 100px
9
+
10
+    @media screen and (max-width: 1800px)
11
+      padding-top: 50px
12
+      margin-top: 50px
13
+
14
+  header p
15
+    position: relative
16
+    margin: -1em 0 1.5em 0
17
+    color: #939393
18
+    font-size: 1.25em
19
+    line-height: 1.5em
20
+
21
+  img
22
+    max-width: 100%

+ 13
- 0
site/assets/style/modules/_blockquotes.sass View File

@@ -0,0 +1,13 @@
1
+// Blockquotes
2
+
3
+blockquote
4
+  border-left: solid 6px $light-gray
5
+  font-style: italic
6
+  margin: 0 0 2em 0
7
+  padding: 0.5em 0 0.5em 1.5em
8
+
9
+  p
10
+    margin-bottom: 0.5em
11
+
12
+    &:last-child
13
+      margin-bottom: 0

+ 2
- 0
site/assets/style/modules/_figures.sass View File

@@ -22,10 +22,12 @@ figure
22 22
 
23 23
   &.left
24 24
     float: left
25
+    margin-left: 0
25 26
     margin-right: 1.5em
26 27
     max-width: 40%
27 28
 
28 29
   &.right
29 30
     float: right
30 31
     margin-left: 1.5em
32
+    margin-right: 0
31 33
     max-width: 40%

+ 34
- 0
site/assets/style/modules/_fontawesome.sass View File

@@ -0,0 +1,34 @@
1
+// Font awesome, used for icons in the header
2
+
3
+.fa-key:before
4
+  content: '\e800'
5
+
6
+.fa-twitter:before
7
+  content: '\f099'
8
+
9
+.fa-github:before
10
+  content: '\f09b'
11
+
12
+.fa-ul
13
+  padding-left: 0
14
+  margin-left: 2.14285714em
15
+  list-style-type: none
16
+
17
+  & > li
18
+    position: relative
19
+
20
+.fa
21
+  display: inline-block
22
+  font: normal normal normal 14px/1 FontAwesome
23
+  text-rendering: auto
24
+  -webkit-font-smoothing: antialiased
25
+  -moz-osx-font-smoothing: grayscale
26
+  font-size: 1.33333333em
27
+  line-height: .75em
28
+
29
+  position: absolute
30
+  vertical-align: -15%
31
+  left: -1.85714286em
32
+  width: 2.14285714em
33
+  top: .14285714em
34
+  text-align: center

+ 56
- 1
site/assets/style/modules/_header.sass View File

@@ -21,8 +21,38 @@
21 21
   top: 0
22 22
 
23 23
   position: fixed
24
-  padding: 8em 2em 8em 1em
25 24
   text-align: right
25
+  padding: 8em 2em 8em 1em
26
+
27
+  @media screen and (max-width: 1280px)
28
+    padding: 6em 3em 3em 3em
29
+    width: 30%
30
+
31
+  @media screen and (max-width: 980px)
32
+    background-attachment: scroll
33
+    background-position: top left, center center
34
+    background-size: auto, cover
35
+    left: auto
36
+    padding: 6em 4em
37
+    position: relative
38
+    text-align: center
39
+    top: auto
40
+    width: 100%
41
+    display: block
42
+
43
+  @media screen and (max-width: 736px), screen and (max-height: 700px)
44
+    padding: 2.25em 1.5em
45
+    min-height: 18em
46
+
47
+    ul
48
+      margin-bottom: 0
49
+
50
+  @media screen and (max-width: 480px), screen and (max-height: 700px)
51
+    padding: 2.25em 1.5em 2em
52
+    min-height: 18em
53
+
54
+  ul
55
+    margin-bottom: 0
26 56
 
27 57
   & > *
28 58
     flex-shrink: 0
@@ -35,6 +65,9 @@
35 65
   section
36 66
     padding: 20px 0
37 67
 
68
+    @media screen and (max-width: 980px)
69
+      padding: 0
70
+
38 71
   a
39 72
     text-decoration: none
40 73
 
@@ -45,17 +78,39 @@
45 78
     text-transform: uppercase
46 79
     color: #3c3c3c
47 80
 
81
+    @media screen and (max-width: 1280px)
82
+      font-size: 1.25em
83
+
84
+    @media screen and (max-width: 980px)
85
+      font-size: 1.75em
86
+
87
+  p
88
+    color: #d2d2d2
89
+    position: relative
90
+    margin: 0 0 1.5em 0
91
+
48 92
 
49 93
 // Recent posts list
50 94
 
51 95
 #posts ul
52 96
   list-style-type: none
53 97
 
98
+  @media screen and (max-width: 980px)
99
+    position: absolute
100
+    bottom: 20px
101
+    right: 20px
102
+
103
+    .recent
104
+      display: none
105
+
54 106
   li
55 107
     margin: 20px 0
56 108
     font-size: 0.9em
57 109
     line-height: 1.3em
58 110
 
111
+    @media screen and (max-width: 980px)
112
+      margin: 0.4em
113
+
59 114
     &.recent a
60 115
       background: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.2) 30%)
61 116
       display: inline-block

site/assets/style/_headings.sass → site/assets/style/modules/_headings.sass View File

@@ -31,3 +31,14 @@ h5
31 31
 
32 32
 h6
33 33
   font-size: 0.7em
34
+
35
+@media screen and (max-width: 736px), screen and (max-height: 700px)
36
+
37
+  h1
38
+    font-size: 1.5em
39
+
40
+  h2
41
+    font-size: 1.2em
42
+
43
+  h3
44
+    font-size: 1em

+ 13
- 0
site/assets/style/modules/_hire.sass View File

@@ -0,0 +1,13 @@
1
+// "Hire me" block at the bottom of articles
2
+
3
+.hire
4
+  background-color: #afb6d9
5
+  border-radius: 10px
6
+  padding: 1em 1.5em
7
+  margin-bottom: 2em
8
+
9
+  h3, p
10
+    margin: 0
11
+
12
+  a, a:hover, a:active
13
+    color: #4565ad !important

+ 17
- 0
site/assets/style/modules/_lists.sass View File

@@ -0,0 +1,17 @@
1
+// Unordered and ordered lists
2
+
3
+ol
4
+  list-style: decimal
5
+  margin: 0 0 2em 0
6
+  padding-left: 1.25em
7
+
8
+  li
9
+    padding-left: 0.25em
10
+
11
+ul
12
+  list-style: disc
13
+  margin: 0 0 2em 0
14
+  padding-left: 1em
15
+
16
+  li
17
+    padding-left: 0.5em

+ 33
- 0
site/assets/style/modules/_tables.sass View File

@@ -0,0 +1,33 @@
1
+// Basic tables
2
+
3
+.table-wrapper
4
+  -webkit-overflow-scrolling: touch
5
+  overflow-x: auto
6
+
7
+table
8
+  margin: 0 0 2em 0
9
+  width: 100%
10
+
11
+  tbody tr
12
+    border: solid 1px $light-gray
13
+    border-left: 0
14
+    border-right: 0
15
+
16
+    &:nth-child(2n + 1)
17
+      background-color: $lightest-gray
18
+
19
+  td
20
+    padding: 0.75em 0.75em
21
+
22
+  th
23
+    color: $gray
24
+    font-size: 0.9em
25
+    font-weight: 400
26
+    padding: 0 0.75em 0.75em 0.75em
27
+    text-align: left
28
+
29
+  thead
30
+    border-bottom: solid 2px $light-gray
31
+
32
+  tfoot
33
+    border-top: solid 2px $light-gray

+ 17
- 0
site/assets/style/style.sass View File

@@ -0,0 +1,17 @@
1
+@import fonts
2
+@import reset
3
+@import colours
4
+@import general
5
+@import text
6
+
7
+@import modules/articles
8
+@import modules/blockquotes
9
+@import modules/code
10
+@import modules/figures
11
+@import modules/fontawesome
12
+@import modules/header
13
+@import modules/headings
14
+@import modules/hire
15
+@import modules/lists
16
+@import modules/tables
17
+@import modules/updates

+ 1
- 1
site/content/post/2016-08-11-offline-gnupg-master-yubikey-subkeys.md View File

@@ -103,7 +103,7 @@ followed the instructions at the end of Simon's guide to import my public key an
103 103
 of the subkeys on the Yubikey. After that [Enigmail](https://www.enigmail.net/index.php/en/)
104 104
 was able to sign and encrypt e-mail in Thunderbird.
105 105
 
106
-<figure class="image left">
106
+<figure class="left">
107 107
   <img src="/res/images/yubikey/wisdom_of_the_ancients.png" alt="XKCD: Wisdom of the ancients">
108 108
   <figcaption><a href="https://xkcd.com/979/">XKCD #979: Wisdom of the ancients</a></figcaption>
109 109
 </figure>

+ 2
- 2
site/layouts/partials/head.html View File

@@ -1,5 +1,5 @@
1 1
 <!DOCTYPE html>
2
-<html>
2
+<html lang="en">
3 3
   <head>
4 4
     <title>
5 5
       {{ if $.IsPage }}
@@ -16,7 +16,7 @@
16 16
     </title>
17 17
     <meta charset="utf-8">
18 18
     <meta name="viewport" content="width=device-width, initial-scale=1" />
19
-    {{ $style := resources.Get "style.sass" | toCSS (dict "outputStyle" "compressed") | fingerprint }}
19
+    {{ $style := resources.Get "style/style.sass" | toCSS (dict "outputStyle" "compressed") | fingerprint }}
20 20
     <link rel="stylesheet" href="{{ $style.Permalink }}">
21 21
     <link rel="canonical" href="{{ .Permalink }}" />
22 22
     {{ with .Site.GetPage "home" }}

Loading…
Cancel
Save