Index

joshstock.in / 5f6c164

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

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
16015 Jan 2023 00:08a5f5e02Move media in articleJosh Stockin102G

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

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