Index

joshstock.in / 7fbb36e

Source for serving and static templating/compiling of https://joshstock.in.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
20815 Sep 2024 13:437fbb36eUpdate index and styleJosh Stockin134G

Blob @ joshstock.in / site / style / core.scss

text/plain14536 bytesdownload raw
1@import 'normalize';
2@import 'fonts';
3@import 'sizes';
4@import 'themes/themes';
5
6
7* {
8 box-sizing: border-box;
9}
10body {
11 display: flex;
12 line-height: $line-height;
13 padding: 0;
14 flex-flow: column;
15 min-height: 100%;
16 color: var(--text-color);
17 overflow-wrap: anywhere;
18 font-family: "Fira Sans", sans-serif;
19 font-size: $base-font-size;
20 text-rendering: optimizeLegibility;
21 background-color: var(--background-color);
22
23 a {
24 color: var(--link-color);
25 text-decoration: none;
26 &:hover {
27 text-decoration: underline;
28 }
29 &:visited {
30 color: var(--link-visited-color);
31 }
32 }
33
34 @media (max-width: $page-compress-width) {
35 & {
36 font-size: $mobile-font-size;
37 }
38 }
39}
40
41@media print {
42 * {
43 color: #000 !important;
44 white-space: pre-wrap;
45 max-width: 100%;
46 box-sizing: border-box !important;
47 }
48 img.svg.icon {
49 filter: none !important;
50 }
51 a {
52 color: #757575 !important;
53 }
54 div.banner-image {
55 display: none;
56 }
57 div.topbar-container {
58 position: unset;
59 }
60 .header::before {
61 height: 0 !important;
62 }
63 .blog-content {
64 h1, h2, h3, h4, h5, h6, p, pre, table {
65 margin: 0;
66 padding: 0;
67 }
68 }
69 .anchor {
70 display: none;
71 }
72 footer {
73 display: none;
74 }
75}
76
77div.banner-image {
78 width: 100%;
79 height: $base-banner-height;
80 background-image: url(/static/images/river.jpg);
81 background-size: cover;
82 background-position: 50% 30%;
83 transition: transform 1s linear;
84}
85.topbar-container {
86 width: 100%;
87 padding: $base-font-size;
88 font-family: 'Chivo', sans-serif !important;
89 /*position: sticky;*/
90 top: 0;
91 background-color: var(--background-color);
92 z-index: 10;
93 padding-bottom: 0;
94 margin-bottom: $base-font-size;
95 a, a:visited {
96 color: var(--text-color);
97 }
98 ul.topbar {
99 display: flex;
100 flex-wrap: wrap;
101 max-width: $topbar-max-width;
102 margin: 0 auto;
103 padding: 5px 0;
104 line-height: 1.15;
105 list-style: none;
106 border-bottom: 2px solid var(--border-color);
107
108 div.wrap-group {
109 @media (max-width: $topbar-reduce-width) {
110 margin-left: 0;
111 margin-right: $topbar-font-size-reduced;
112 display: inline-block;
113 }
114 }
115
116 li {
117 display: inline-block;
118 white-space: nowrap;
119 font-size: $topbar-font-size;
120 &.hfill {
121 flex: 1;
122 @media (max-width: $topbar-reduce-width) {
123 flex: none;
124 }
125 }
126 &.title {
127 margin-right: $topbar-font-size;
128 }
129 &:not(.title) {
130 @media (max-width: $topbar-reduce-width) {
131 font-size: $topbar-font-size-reduced;
132 padding: 4px 0;
133 vertical-align: middle;
134 }
135 }
136 &:not(.hfill):hover {
137 position: relative;
138 top: 1px;
139 transition: transform 0.3s linear;
140 cursor: pointer;
141 }
142 &:not(.title):not(.hfill):not(:last-of-type) {
143 margin-right: $topbar-font-size/2;
144 }
145 svg {
146 display: inline-block;
147 height: $topbar-font-size;
148 vertical-align: middle;
149 }
150 }
151 }
152}
153
154div.content-container {
155 display: flex;
156 flex-flow: column;
157 flex: 1;
158 width: 100%;
159 padding: 0 16px;
160
161 div.content-body {
162 width: 100%;
163 max-width: $page-max-width;
164 margin: 0 auto;
165
166 div.blog-metadata, div.blog-listing {
167 margin-bottom: 1.5em;
168 .title {
169 margin: 0 0 0.25em 0;
170 line-height: 1.25;
171 }
172 p {
173 margin: 0;
174 .readtime {
175 margin-left: 0.5em;
176 }
177 }
178 p.description {
179 margin-bottom: 0.5em;
180 }
181 a, a:visited {
182 color: var(--text-color);
183 &:not(.thumb):hover {
184 text-decoration: none;
185 border-bottom: 1px solid var(--text-color);
186 }
187 }
188 }
189
190 div.blog-listing {
191 display: flex;
192 flex: column;
193 height: fit-content;
194 min-height: 200px;
195 border-top: 1px solid var(--border-color);
196 padding-top: 1.5em;
197 a.blog-banner.thumb {
198 height: 100%;
199 padding-right: 1em;
200 flex: 1;
201 div {
202 width: 100%;
203 min-height: 200px;
204 height: 100%;
205 background-size: cover;
206 background-position: center;
207 }
208 }
209 .blog-listing-container {
210 flex: 2;
211 }
212 @media (max-width: $page-compress-width) {
213 display: block;
214 a.blog-banner.thumb {
215 height: 200px;
216 width: 100%;
217 padding-right: 0;
218 }
219 .blog-listing-container {
220 margin-top: 1em;
221 margin-bottom: 2em;
222 }
223 }
224 }
225
226 div.blog-content {
227 margin: 1em 0;
228 border-bottom: 1px solid var(--border-color);
229 }
230
231 div.blog-end {
232 p {
233 margin-top: 1em;
234 }
235 }
236
237 iframe {
238 width: 100%;
239 height: 600px;
240 border: 1px solid var(--border-color);
241 margin-bottom: 1em;
242 }
243
244 hr {
245 border: 1px solid var(--border-color);
246 margin-bottom: 1.5em;
247 }
248 h1, h2, h3, h4, h5, h6, p, pre {
249 padding: 0;
250 word-wrap: break-word;
251 }
252 p, pre {
253 line-height: 1.6;
254 }
255
256 h1, h2, h3, h4, h5, h6 {
257 margin: 1em 0 0.5em 0;
258 line-height: 1.25;
259 &:first-child {
260 margin: 0;
261 }
262 &.header {
263 position: relative;
264 scroll-margin-top: 1em;
265 .anchor {
266 opacity: 0.3;
267 position: absolute;
268 left: -$base-font-size*2;
269 top: calc(50% - #{$base-font-size/2});
270 .svg {
271 vertical-align: middle;
272 width: $base-font-size;
273 height: $base-font-size;
274 }
275 &:hover {
276 opacity: 0.6;
277 }
278 @media (max-width: $page-compress-width + $base-font-size*8) {
279 position: unset;
280 margin-left: 6px;
281 }
282 }
283 }
284 }
285
286 p {
287 margin: 1em 0 1em 0;
288 &:first-of-type {
289 margin-top: 0;
290 }
291 }
292
293 blockquote {
294 padding: 1em;
295 margin: 0.5em 0;
296 border-left: 8px solid var(--border-color);
297 background-color: var(--blockquote-background-color);
298 p:last-of-type {
299 margin-bottom: 0;
300 }
301 }
302
303 ul, ol {
304 padding-left: 0;
305 display: block;
306 li {
307 position: relative;
308 margin-bottom: 0.5em;
309 margin-left: 0;
310 left: 1.5em;
311 margin-right: 1.5em;
312
313 &::marker {
314 color: var(--list-bullet-color);
315 }
316 }
317 }
318
319 div.codehilite {
320 border: 1px solid var(--border-color);
321 border-radius: 4px;
322 padding: 0;
323 margin: 0 0 1em 0;
324 background-color: var(--code-background-color);
325 pre {
326 padding: 1em;
327 margin: 0;
328 overflow-x: auto;
329 font-size: 0.8em;
330 }
331 }
332
333 code:not(.codehilite *) {
334 border: 1px solid var(--border-color);
335 border-radius: 4px;
336 padding: 0 2px;
337 background-color: var(--code-background-color);
338 color: var(--code-text-color);
339 font-size: 0.85em;
340 }
341
342 img, video {
343 position: relative;
344 z-index: 3;
345 max-width: 100%;
346 &.inline.svg {
347 height: 1em;
348 vertical-align: middle;
349 display: inline-block;
350 top: -1.5px;
351 }
352 &.small {
353 max-height: $content-image-small-height;
354 }
355 &.medium {
356 max-height: $content-image-medium-height;
357 }
358 }
359
360 table:not(#commento table) {
361 table-layout: auto;
362 max-width: 100%;
363 overflow-x: auto;
364 width: 100%;
365 border-spacing: 0;
366 border: 1px solid var(--border-color);
367 border-radius: 4px;
368 margin-bottom: 1em;
369 thead tr {
370 font-weight: bolder;
371 background-color: var(--code-background-color);
372 td:first-child {
373 border-top-left-radius: 4px;
374 }
375 td:last-child {
376 border-top-right-radius: 4px;
377 }
378 th {
379 border-bottom: 1px solid var(--border-color);
380 }
381 }
382 tr {
383 //&:first-child, th {
384 // font-weight: bolder;
385 // background-color: var(--code-background-color);
386 // td:first-child {
387 // border-top-left-radius: 4px;
388 // }
389 // td:last-child {
390 // border-top-right-radius: 4px;
391 // }
392 //}
393 &:not(:last-child) td {
394 border-bottom: 1px solid var(--border-color);
395 }
396 }
397 td, th {
398 vertical-align: top;
399 padding: 8px;
400 margin: 0;
401 &:not(:last-child) {
402 border-right: 1px solid var(--border-color);
403 }
404 *:last-child {
405 margin-bottom: unset;
406 }
407 }
408 }
409
410 iframe.full {
411 width: calc(100% - #{$content-image-float-offset*2 + $base-font-size*2});
412 margin-left: $content-image-float-offset;
413 @media (max-width: $figure-compress-width) {
414 & {
415 width: 100%;
416 margin-left: 0;
417 }
418 }
419 }
420 figure.heading-aligned {
421 margin-top: 1em !important;
422 }
423 figure {
424 display: table;
425 margin: 0;
426 &.float-left {
427 float: left;
428 position: relative;
429 left: $content-image-float-offset;
430 margin: 0 $content-image-float-offset+$base-font-size 8px 0;
431 }
432 &.float-right {
433 float: right;
434 position: relative;
435 right: $content-image-float-offset;
436 margin: 0 0 8px $content-image-float-offset+$base-font-size;
437 }
438 &.full {
439 display: block;
440 width: 100%;
441 img, video {
442 display: block;
443 margin: 0 auto;
444 }
445 figcaption {
446 display: block;
447 }
448
449 &.double {
450 img, video {
451 display: inline;
452 padding-bottom: 8px;
453 width: 50%;
454 object-fit: cover;
455 &:nth-child(2n), &:nth-child(2n) {
456 padding-left: 8px;
457 float: right;
458 }
459 }
460 }
461 }
462 @media (max-width: $page-compress-width) {
463 &:not(.full) {
464 //display: flex;
465 //flex-direction: column;
466 //max-width: 100% !important;
467 //float: none;
468 //width: fit-content;
469 //align-items: center;
470 //margin: 0 auto 8px auto !important;
471 img, video {
472 display: block;
473 max-width: 100%;
474 max-height: 30vh;
475 margin: 0 auto;
476 }
477 figcaption {
478 display: block;
479 margin: 1em auto 0 auto;
480 }
481 }
482 }
483 @media (max-width: $figure-compress-width) {
484 &:not(.full) {
485 max-width: 50%;
486 }
487 &.float-left {
488 position: inherit;
489 left: 0;
490 margin: 0 16px 8px 0;
491 }
492 &.float-right {
493 position: inherit;
494 right: 0;
495 margin: 0 0 8px 16px;
496 }
497 }
498 figcaption {
499 display: table-caption;
500 caption-side: bottom;
501 margin-top: 1em;
502 text-align: center;
503 width: 100%;
504 }
505 }
506 }
507
508 figcaption {
509 font-size: $figure-font-size;
510 margin-top: 4px;
511 color: var(--caption-color);
512 }
513
514 div.vfill {
515 flex: 1;
516 }
517
518 footer {
519 max-width: $page-max-width;
520 width: 100%;
521 margin: 64px auto 32px auto;
522 text-align: center;
523 border-top: 2px solid var(--border-color);
524 padding-top: 16px;
525 &>p {
526 margin: 0;
527 }
528 }
529}
530