15 |
404
16 |
Oops, page not found…
17 |
18 | Home
19 | Archives
20 |
21 | {% endblock main %}
22 |
23 | {% block footer %}
24 | {% endblock footer %}
25 |
--------------------------------------------------------------------------------
/templates/index.html:
--------------------------------------------------------------------------------
1 | {% import "macros.html" as macros %}
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
18 |
22 |
23 | {% if page.title %}
24 |
{{page.title}}
25 | {% else %}
26 |
{{config.title}}
27 | {% endif %}
28 |
29 | {% if config.generate_feed %}
30 |
31 | {% endif %}
32 |
33 |
34 |
35 | {% block header %}
36 | {% endblock header %}
37 |
38 | {% block title %}
39 |
40 |
41 |
{{config.title}}
42 |
{{config.extra.home_subtitle}}
43 |
44 | {{macros::render_social_icons()}}
45 |
46 | {% endblock title %}
47 | {% block main %}
48 |
53 | {% endblock main %}
54 |
55 |
56 | {% if config.extra.footer.index %}
57 | {% block footer %}
58 |
68 | {% endblock footer %}
69 | {% endif %}
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
79 |
80 | {% if config.extra.highlightjs.enable %}
81 |
82 |
83 |
84 |
85 |
91 | {% if config.extra.highlightjs.clipboard %}
92 |
93 |
100 | {% endif %}
101 |
102 | {% endif %}
103 |
104 | {% if not config.extra.highlightjs.enable %}
105 |
106 | {% endif %}
107 |
108 |
109 | {% block js_footer %}
110 | {% endblock js_footer %}
111 |
112 | {% if config.extra.google_analytics.enable %}
113 |
114 |
115 |
121 | {% endif %}
122 |
123 |
124 |
--------------------------------------------------------------------------------
/sass/_normalize.scss:
--------------------------------------------------------------------------------
1 | /*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
2 |
3 | /* Document
4 | ========================================================================== */
5 |
6 | /**
7 | * 1. Correct the line height in all browsers.
8 | * 2. Prevent adjustments of font size after orientation changes in iOS.
9 | */
10 |
11 | html {
12 | line-height: 1.15; /* 1 */
13 | -webkit-text-size-adjust: 100%; /* 2 */
14 | }
15 |
16 | /* Sections
17 | ========================================================================== */
18 |
19 | /**
20 | * Remove the margin in all browsers.
21 | */
22 |
23 | body {
24 | margin: 0;
25 | }
26 |
27 | /**
28 | * Correct the font size and margin on `h1` elements within `section` and
29 | * `article` contexts in Chrome, Firefox, and Safari.
30 | */
31 |
32 | h1 {
33 | font-size: 2em;
34 | margin: 0.67em 0;
35 | }
36 |
37 | /* Grouping content
38 | ========================================================================== */
39 |
40 | /**
41 | * 1. Add the correct box sizing in Firefox.
42 | * 2. Show the overflow in Edge and IE.
43 | */
44 |
45 | hr {
46 | box-sizing: content-box; /* 1 */
47 | height: 0; /* 1 */
48 | overflow: visible; /* 2 */
49 | }
50 |
51 | /**
52 | * 1. Correct the inheritance and scaling of font size in all browsers.
53 | * 2. Correct the odd `em` font sizing in all browsers.
54 | */
55 |
56 | pre {
57 | font-family: monospace, monospace; /* 1 */
58 | font-size: 1em; /* 2 */
59 | }
60 |
61 | /* Text-level semantics
62 | ========================================================================== */
63 |
64 | /**
65 | * Remove the gray background on active links in IE 10.
66 | */
67 |
68 | a {
69 | background-color: transparent;
70 | }
71 |
72 | /**
73 | * 1. Remove the bottom border in Chrome 57-
74 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
75 | */
76 |
77 | abbr[title] {
78 | border-bottom: none; /* 1 */
79 | text-decoration: underline; /* 2 */
80 | text-decoration: underline dotted; /* 2 */
81 | }
82 |
83 | /**
84 | * Add the correct font weight in Chrome, Edge, and Safari.
85 | */
86 |
87 | b,
88 | strong {
89 | font-weight: bolder;
90 | }
91 |
92 | /**
93 | * 1. Correct the inheritance and scaling of font size in all browsers.
94 | * 2. Correct the odd `em` font sizing in all browsers.
95 | */
96 |
97 | code,
98 | kbd,
99 | samp {
100 | font-family: monospace, monospace; /* 1 */
101 | font-size: 1em; /* 2 */
102 | }
103 |
104 | /**
105 | * Add the correct font size in all browsers.
106 | */
107 |
108 | small {
109 | font-size: 80%;
110 | }
111 |
112 | /**
113 | * Prevent `sub` and `sup` elements from affecting the line height in
114 | * all browsers.
115 | */
116 |
117 | sub,
118 | sup {
119 | font-size: 75%;
120 | line-height: 0;
121 | position: relative;
122 | vertical-align: baseline;
123 | }
124 |
125 | sub {
126 | bottom: -0.25em;
127 | }
128 |
129 | sup {
130 | top: -0.5em;
131 | }
132 |
133 | /* Embedded content
134 | ========================================================================== */
135 |
136 | /**
137 | * Remove the border on images inside links in IE 10.
138 | */
139 |
140 | img {
141 | border-style: none;
142 | }
143 |
144 | /* Forms
145 | ========================================================================== */
146 |
147 | /**
148 | * 1. Change the font styles in all browsers.
149 | * 2. Remove the margin in Firefox and Safari.
150 | */
151 |
152 | button,
153 | input,
154 | optgroup,
155 | select,
156 | textarea {
157 | font-family: inherit; /* 1 */
158 | font-size: 100%; /* 1 */
159 | line-height: 1.15; /* 1 */
160 | margin: 0; /* 2 */
161 | }
162 |
163 | /**
164 | * Show the overflow in IE.
165 | * 1. Show the overflow in Edge.
166 | */
167 |
168 | button,
169 | input { /* 1 */
170 | overflow: visible;
171 | }
172 |
173 | /**
174 | * Remove the inheritance of text transform in Edge, Firefox, and IE.
175 | * 1. Remove the inheritance of text transform in Firefox.
176 | */
177 |
178 | button,
179 | select { /* 1 */
180 | text-transform: none;
181 | }
182 |
183 | /**
184 | * Correct the inability to style clickable types in iOS and Safari.
185 | */
186 |
187 | button,
188 | [type="button"],
189 | [type="reset"],
190 | [type="submit"] {
191 | -webkit-appearance: button;
192 | }
193 |
194 | /**
195 | * Remove the inner border and padding in Firefox.
196 | */
197 |
198 | button::-moz-focus-inner,
199 | [type="button"]::-moz-focus-inner,
200 | [type="reset"]::-moz-focus-inner,
201 | [type="submit"]::-moz-focus-inner {
202 | border-style: none;
203 | padding: 0;
204 | }
205 |
206 | /**
207 | * Restore the focus styles unset by the previous rule.
208 | */
209 |
210 | button:-moz-focusring,
211 | [type="button"]:-moz-focusring,
212 | [type="reset"]:-moz-focusring,
213 | [type="submit"]:-moz-focusring {
214 | outline: 1px dotted ButtonText;
215 | }
216 |
217 | /**
218 | * Correct the padding in Firefox.
219 | */
220 |
221 | fieldset {
222 | padding: 0.35em 0.75em 0.625em;
223 | }
224 |
225 | /**
226 | * 1. Correct the text wrapping in Edge and IE.
227 | * 2. Correct the color inheritance from `fieldset` elements in IE.
228 | * 3. Remove the padding so developers are not caught out when they zero out
229 | * `fieldset` elements in all browsers.
230 | */
231 |
232 | legend {
233 | box-sizing: border-box; /* 1 */
234 | color: inherit; /* 2 */
235 | display: table; /* 1 */
236 | max-width: 100%; /* 1 */
237 | padding: 0; /* 3 */
238 | white-space: normal; /* 1 */
239 | }
240 |
241 | /**
242 | * Add the correct vertical alignment in Chrome, Firefox, and Opera.
243 | */
244 |
245 | progress {
246 | vertical-align: baseline;
247 | }
248 |
249 | /**
250 | * Remove the default vertical scrollbar in IE 10+.
251 | */
252 |
253 | textarea {
254 | overflow: auto;
255 | }
256 |
257 | /**
258 | * 1. Add the correct box sizing in IE 10.
259 | * 2. Remove the padding in IE 10.
260 | */
261 |
262 | [type="checkbox"],
263 | [type="radio"] {
264 | box-sizing: border-box; /* 1 */
265 | padding: 0; /* 2 */
266 | }
267 |
268 | /**
269 | * Correct the cursor style of increment and decrement buttons in Chrome.
270 | */
271 |
272 | [type="number"]::-webkit-inner-spin-button,
273 | [type="number"]::-webkit-outer-spin-button {
274 | height: auto;
275 | }
276 |
277 | /**
278 | * 1. Correct the odd appearance in Chrome and Safari.
279 | * 2. Correct the outline style in Safari.
280 | */
281 |
282 | [type="search"] {
283 | -webkit-appearance: textfield; /* 1 */
284 | outline-offset: -2px; /* 2 */
285 | }
286 |
287 | /**
288 | * Remove the inner padding in Chrome and Safari on macOS.
289 | */
290 |
291 | [type="search"]::-webkit-search-decoration {
292 | -webkit-appearance: none;
293 | }
294 |
295 | /**
296 | * 1. Correct the inability to style clickable types in iOS and Safari.
297 | * 2. Change font properties to `inherit` in Safari.
298 | */
299 |
300 | ::-webkit-file-upload-button {
301 | -webkit-appearance: button; /* 1 */
302 | font: inherit; /* 2 */
303 | }
304 |
305 | /* Interactive
306 | ========================================================================== */
307 |
308 | /*
309 | * Add the correct display in Edge, IE 10+, and Firefox.
310 | */
311 |
312 | details {
313 | display: block;
314 | }
315 |
316 | /*
317 | * Add the correct display in all browsers.
318 | */
319 |
320 | summary {
321 | display: list-item;
322 | }
323 |
324 | /* Misc
325 | ========================================================================== */
326 |
327 | /**
328 | * Add the correct display in IE 10+.
329 | */
330 |
331 | template {
332 | display: none;
333 | }
334 |
335 | /**
336 | * Add the correct display in IE 10.
337 | */
338 |
339 | [hidden] {
340 | display: none;
341 | }
--------------------------------------------------------------------------------
/templates/page.html:
--------------------------------------------------------------------------------
1 | {% extends "index.html" %}
2 |
3 | {% import "macros.html" as macros %}
4 |
5 | {% block header %}
6 |
44 |
51 | {% endblock header %}
52 |
53 | {% block title %}
54 | {% endblock title %}
55 |
56 | {% block main %}
57 |
58 |
59 |
83 |
84 |
85 |
86 | {{ page.content | safe }}
87 |
88 |
89 |
105 |
106 | {% if page.extra.toc %}
107 |
128 | {% endif %}
129 |
130 |
148 |
149 | {% if config.extra.disqus.enable and not page.extra.disable_comments%}
150 |
151 |
167 |
168 | {% endif %}
169 |
170 | {% endblock main %}
171 |
172 | {% block footer %}
173 |
174 | {{ macros::footer() }}
175 |
176 | {% endblock footer %}
177 |
--------------------------------------------------------------------------------
/sass/style.scss:
--------------------------------------------------------------------------------
1 | @import "predefined.scss";
2 | @import "normalize.scss";
3 | @import "syntax.scss";
4 | @import "animate.scss";
5 | @import "icons.scss";
6 |
7 | /* Webkit Scrollbar Customize */
8 | ::-webkit-scrollbar {
9 | width: 8px;
10 | height: 8px;
11 | background: $midnightblue;
12 | }
13 |
14 | ::-webkit-scrollbar-thumb {
15 | background: #888;
16 |
17 | &:hover {
18 | background: $text;
19 | }
20 | }
21 |
22 | html {
23 | background: $light-grey;
24 | line-height: 1.6;
25 | letter-spacing: 0.06em;
26 | }
27 |
28 | body,
29 | button,
30 | input,
31 | select,
32 | textarea {
33 | color: $text;
34 | font-family: $fonts;
35 | }
36 |
37 | pre,
38 | code,
39 | pre tt {
40 | font-family: $code-fonts;
41 | }
42 |
43 | pre {
44 | max-height: 40em;
45 | padding: 0.7em 1.1em;
46 | overflow: auto;
47 | font-size: 0.9em;
48 | line-height: 1.5;
49 | letter-spacing: normal;
50 | white-space: pre-wrap;
51 | word-wrap: break-word;
52 | color: #eee;
53 | border-radius: 4px;
54 | // -webkit-overflow-scrolling: touch;
55 |
56 | code {
57 | padding: 0;
58 | margin: 0;
59 | background: $midnightblue;
60 | }
61 | }
62 |
63 | code {
64 | color: #eee;
65 | background: $highlight-grey;
66 | border-radius: 3px;
67 | padding: 0 3px;
68 | margin: 0 4px;
69 | word-break: break-all;
70 | letter-spacing: normal;
71 | }
72 |
73 | blockquote {
74 | border-left: 0.25em solid;
75 | margin: 1em;
76 | padding: 0 1em;
77 | font-style: italic;
78 |
79 | cite {
80 | font-weight: bold;
81 | font-style: normal;
82 |
83 | &::before {
84 | content: "—— ";
85 | }
86 | }
87 | }
88 |
89 | a {
90 | color: $text;
91 | text-decoration: none;
92 | border: none;
93 | transition-property: color;
94 | transition-duration: 0.4s;
95 | transition-timing-function: ease-out;
96 |
97 | &:hover {
98 | color: #fff;
99 | }
100 |
101 | &:focus {
102 | outline: none;
103 | }
104 | }
105 |
106 | hr {
107 | opacity: 0.2;
108 | border-width: 0 0 5px 0;
109 | border-style: dashed;
110 | background: transparent;
111 | width: 50%;
112 | margin: 1.8em auto;
113 | }
114 |
115 | table {
116 | border-collapse: collapse;
117 | border-spacing: 0;
118 | empty-cells: show;
119 | width: 100%;
120 | max-width: 100%;
121 |
122 | th,
123 | td {
124 | padding: 1.5%;
125 | border: 1px solid;
126 | }
127 |
128 | th {
129 | font-weight: 700;
130 | vertical-align: bottom;
131 | }
132 | }
133 |
134 | .section-inner {
135 | margin: 0 auto;
136 | max-width: 1200px;
137 | width: 93%;
138 | }
139 |
140 | .thin {
141 | max-width: 720px;
142 | margin: auto;
143 | }
144 |
145 | .feather {
146 | display: inline-block;
147 | vertical-align: -0.125em;
148 | width: 1em;
149 | height: 1em;
150 | }
151 |
152 | .desktop-only,
153 | .desktop-only-ib {
154 | display: none;
155 | }
156 |
157 | // Accessibility
158 | //
159 | .screen-reader-text {
160 | border: 0;
161 | clip: rect(1px, 1px, 1px, 1px);
162 | clip-path: inset(50%);
163 | height: 1px;
164 | margin: -1px;
165 | overflow: hidden;
166 | padding: 0;
167 | position: absolute !important;
168 | width: 1px;
169 | word-wrap: normal !important;
170 | }
171 |
172 | .screen-reader-text:focus {
173 | background-color: #f1f1f1;
174 | border-radius: 3px;
175 | box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
176 | clip: auto !important;
177 | clip-path: none;
178 | color: #21759b;
179 | display: block;
180 | font-size: 14px;
181 | font-size: 0.875rem;
182 | font-weight: bold;
183 | height: auto;
184 | left: 5px;
185 | line-height: normal;
186 | padding: 15px 23px 14px;
187 | text-decoration: none;
188 | top: 5px;
189 | width: auto;
190 | z-index: 100000;
191 | }
192 |
193 | // Header & Footer
194 | //
195 | #site-header {
196 | position: fixed;
197 | z-index: 1;
198 | bottom: 0;
199 | width: 100%;
200 | box-sizing: border-box;
201 | box-shadow: -1px -2px 3px rgba(0, 0, 0, 0.45);
202 | background-color: $dark-grey;
203 | }
204 |
205 | .hdr-wrapper {
206 | display: flex;
207 | justify-content: space-between;
208 | align-items: center;
209 | padding: 0.5em 0;
210 | font-size: 1.2rem;
211 |
212 | .site-branding {
213 | display: inline-block;
214 | margin-right: 0.8em;
215 | font-size: 1.2em;
216 | }
217 |
218 | .site-nav {
219 | display: inline-block;
220 | font-size: 1.1em;
221 | opacity: 0.8;
222 |
223 | a {
224 | margin-left: 0.8em;
225 | }
226 | }
227 | }
228 |
229 | .hdr-icons {
230 | font-size: 1.2em;
231 | }
232 |
233 | .hdr-social {
234 | display: inline-block;
235 | margin-left: 0.6em;
236 |
237 | & > a {
238 | margin-left: 0.4em;
239 | }
240 | }
241 |
242 | .hdr-btn {
243 | border: none;
244 | background: none;
245 | padding: 0;
246 | margin-left: 0.4em;
247 | cursor: pointer;
248 | }
249 |
250 | #menu-btn {
251 | display: none;
252 | margin-left: 0.6em;
253 | cursor: pointer;
254 | }
255 |
256 | #mobile-menu {
257 | position: fixed;
258 | bottom: 4.8em;
259 | right: 1.5em;
260 | display: none;
261 | padding: 0.6em 1.8em;
262 | z-index: 1;
263 | box-sizing: border-box;
264 | box-shadow: -1px -2px 3px 0px rgba(0, 0, 0, 0.45);
265 | background-color: $dark-grey;
266 |
267 | ul {
268 | list-style: none;
269 | margin: 0;
270 | padding: 0;
271 | line-height: 2;
272 | font-size: 1.2em;
273 | }
274 | }
275 |
276 | #site-footer {
277 | text-align: center;
278 | font-size: 0.9em;
279 | margin-bottom: 96px;
280 | margin-top: 64px;
281 |
282 | p {
283 | margin: 0;
284 | }
285 | }
286 |
287 | // Spotlight
288 | //
289 | #spotlight {
290 | display: flex;
291 | height: 100vh;
292 | flex-direction: column;
293 | align-items: center;
294 | justify-content: center;
295 | max-width: 93%;
296 | margin: auto;
297 | font-size: 1.5rem;
298 |
299 | &.error-404 {
300 | flex-direction: row;
301 | line-height: normal;
302 | }
303 | }
304 |
305 | p.img-404 {
306 | margin: 0;
307 |
308 | svg {
309 | width: 180px;
310 | max-width: 100%;
311 | height: auto;
312 | }
313 | }
314 |
315 | .banner-404 {
316 | margin-left: 2em;
317 |
318 | h1 {
319 | font-size: 3em;
320 | margin: 0.5rem 0;
321 | }
322 |
323 | p {
324 | margin-top: 0;
325 | margin-bottom: 0.6em;
326 | }
327 |
328 | .btn-404 {
329 | font-size: 0.8em;
330 |
331 | a {
332 | display: inline-block;
333 | border: 2px solid $text;
334 | border-radius: 5px;
335 | padding: 5px;
336 | transition-property: color, border-color;
337 | word-break: break-all;
338 |
339 | &:first-child {
340 | margin-right: 1em;
341 | }
342 |
343 | &:hover {
344 | border-color: #fff;
345 | }
346 |
347 | svg {
348 | margin-right: 0.5em;
349 | }
350 | }
351 | }
352 | }
353 |
354 | #home-center {
355 | display: flex;
356 | flex-grow: 1;
357 | flex-direction: column;
358 | justify-content: center;
359 | }
360 |
361 | #home-title {
362 | margin: 0;
363 | text-align: center;
364 | }
365 |
366 | #home-subtitle {
367 | margin-top: 0;
368 | margin-bottom: 1.5em;
369 | text-align: center;
370 | line-height: normal;
371 | font-size: 0.7em;
372 | font-style: italic;
373 | opacity: 0.9;
374 | }
375 |
376 | #home-social {
377 | font-size: 1.4em;
378 | text-align: center;
379 | opacity: 0.8;
380 |
381 | a {
382 | margin: 0 0.2em;
383 | }
384 | }
385 |
386 | #home-nav {
387 | opacity: 0.8;
388 |
389 | a {
390 | display: block;
391 | text-align: center;
392 | margin-top: 0.5em;
393 | }
394 | }
395 |
396 | #home-footer {
397 | text-align: center;
398 | font-size: 0.6em;
399 | line-height: normal;
400 | @include dimmed;
401 |
402 | p {
403 | margin-top: 0;
404 | }
405 | }
406 |
407 | // list.html
408 | //
409 | .posts-group {
410 | display: flex;
411 | margin-bottom: 1.9em;
412 | line-height: normal;
413 |
414 | .post-year {
415 | padding-top: 6px;
416 | margin-right: 1.8em;
417 | font-size: 1.6em;
418 | @include dimmed;
419 | }
420 |
421 | .posts-list {
422 | flex-grow: 1;
423 | margin: 0;
424 | padding: 0;
425 | list-style: none;
426 | }
427 |
428 | .post-item {
429 | border-bottom: 1px $highlight-grey dashed;
430 |
431 | a {
432 | display: flex;
433 | justify-content: space-between;
434 | align-items: baseline;
435 | padding: 12px 0;
436 | }
437 | }
438 |
439 | .post-day {
440 | flex-shrink: 0;
441 | margin-left: 1em;
442 | @include dimmed;
443 | }
444 | }
445 |
446 | // single.html
447 | //
448 | .bg-img {
449 | width: 100vw;
450 | height: 100vh;
451 | opacity: 0.03;
452 | z-index: -1;
453 | position: fixed;
454 | top: 0;
455 | background-attachment: fixed;
456 | background-repeat: no-repeat;
457 | background-size: cover;
458 | background-position: center;
459 | transition: opacity 0.5s;
460 | }
461 |
462 | .show-bg-img {
463 | z-index: 100;
464 | opacity: 1;
465 | cursor: pointer;
466 | }
467 |
468 | .post-header {
469 | margin-top: 1.2em;
470 | line-height: normal;
471 |
472 | .post-meta {
473 | font-size: 0.9em;
474 | letter-spacing: normal;
475 | @include dimmed;
476 | }
477 |
478 | h1 {
479 | margin-top: 0.1em;
480 | }
481 | }
482 |
483 | hr.post-end {
484 | width: 50%;
485 | margin-top: 1.6em;
486 | margin-bottom: 0.8em;
487 | margin-left: 0;
488 | border-style: solid;
489 | border-bottom-width: 4px;
490 | }
491 |
492 | .content {
493 | text-align: justify;
494 | text-justify: inter-ideograph; //For IE/Edge
495 |
496 | @include aTag;
497 |
498 | figure {
499 | max-width: 100%;
500 | height: auto;
501 | margin: 0;
502 | text-align: center;
503 |
504 | p {
505 | font-size: 0.8em;
506 | font-style: italic;
507 | @include dimmed;
508 | }
509 | }
510 |
511 | figure.left {
512 | float: left;
513 | margin-right: 1.5em;
514 | max-width: 50%;
515 | }
516 |
517 | figure.right {
518 | float: right;
519 | margin-left: 1.5em;
520 | max-width: 50%;
521 | }
522 |
523 | figure.big {
524 | max-width: 100vw;
525 | }
526 |
527 | img {
528 | display: block;
529 | max-width: 100%;
530 | height: auto;
531 | margin: auto;
532 | border-radius: 4px;
533 | }
534 |
535 | ul,
536 | ol {
537 | padding: 0;
538 | margin-left: 1.8em;
539 | }
540 | }
541 |
542 | .footnote-definition {
543 | font-size: 0.85em;
544 |
545 | a {
546 | box-shadow: none;
547 | text-decoration: underline;
548 | transition-property: color;
549 |
550 | &:hover {
551 | background: transparent;
552 | }
553 |
554 | &.footnote-return {
555 | text-decoration: none;
556 | }
557 | }
558 |
559 | ol {
560 | line-height: 1.8;
561 | }
562 | p {
563 | display: inline;
564 | }
565 | }
566 |
567 | .footnote-ref a {
568 | box-shadow: none;
569 | text-decoration: none;
570 | padding: 2px;
571 | border-radius: 2px;
572 | background-color: $midnightblue;
573 | }
574 |
575 | .post-info {
576 | font-size: 0.8rem;
577 | line-height: normal;
578 | @include dimmed;
579 |
580 | p {
581 | margin: 0.8em 0;
582 | }
583 |
584 | a:hover {
585 | border-bottom: 1px solid $theme;
586 | }
587 |
588 | svg {
589 | margin-right: 0.8em;
590 | }
591 |
592 | .tag {
593 | margin-right: 0.5em;
594 |
595 | &::before {
596 | content: "#";
597 | }
598 | }
599 | }
600 |
601 | #toc {
602 | position: fixed;
603 | left: 50%;
604 | top: 0;
605 | display: none;
606 | }
607 |
608 | .toc-title {
609 | margin-left: 1em;
610 | margin-bottom: 0.5em;
611 | font-size: 0.8em;
612 | font-weight: bold;
613 | }
614 |
615 | #TableOfContents {
616 | font-size: 0.8em;
617 | @include dimmed;
618 |
619 | ul {
620 | padding-left: 1em;
621 | margin: 0;
622 | }
623 |
624 | & > ul {
625 | list-style-type: none;
626 |
627 | ul ul {
628 | font-size: 0.9em;
629 | }
630 | }
631 |
632 | a:hover {
633 | border-bottom: $theme 1px solid;
634 | }
635 | }
636 |
637 | .post-nav {
638 | display: flex;
639 | justify-content: space-between;
640 | margin-top: 1.5em;
641 | margin-bottom: 2.5em;
642 | font-size: 1.2em;
643 |
644 | a {
645 | flex-basis: 50%;
646 | flex-grow: 1;
647 | }
648 |
649 | .next-post {
650 | text-align: left;
651 | padding-right: 5px;
652 | }
653 | .prev-post {
654 | text-align: right;
655 | padding-left: 5px;
656 | }
657 |
658 | .post-nav-label {
659 | font-size: 0.8em;
660 | opacity: 0.8;
661 | text-transform: uppercase;
662 | }
663 | }
664 |
665 | // Media Queries
666 | //
667 | @media (min-width: 800px) {
668 | .site-main {
669 | margin-top: 3em;
670 | }
671 |
672 | hr.post-end {
673 | width: 40%;
674 | }
675 | }
676 |
677 | @media (min-width: 960px) {
678 | .site-main {
679 | margin-top: 6em;
680 | }
681 | }
682 |
683 | @media (min-width: 1300px) {
684 | .site-main {
685 | margin-top: 8em;
686 | }
687 |
688 | .desktop-only,
689 | #toc.show-toc {
690 | display: block;
691 | }
692 |
693 | .desktop-only-ib {
694 | display: inline-block;
695 | }
696 |
697 | figure.left {
698 | margin-left: -240px;
699 | p {
700 | text-align: left;
701 | }
702 | }
703 |
704 | figure.right {
705 | margin-right: -240px;
706 | p {
707 | text-align: right;
708 | }
709 | }
710 |
711 | figure.big {
712 | width: 1200px;
713 | margin-left: -240px;
714 | }
715 |
716 | hr.post-end {
717 | width: 30%;
718 | }
719 |
720 | #toc {
721 | top: 13em;
722 | margin-left: 370px;
723 | max-width: 220px;
724 | }
725 | }
726 |
727 | @media (min-width: 1800px) {
728 | .site-main {
729 | margin-top: 10em;
730 | }
731 |
732 | .section-inner {
733 | max-width: 1600px;
734 | }
735 |
736 | .thin {
737 | max-width: 960px;
738 | }
739 |
740 | figure.left {
741 | max-width: 75%;
742 | margin-left: -320px;
743 | }
744 |
745 | figure.right {
746 | max-width: 75%;
747 | margin-right: -320px;
748 | }
749 |
750 | figure.big {
751 | width: 1600px;
752 | margin-left: -320px;
753 | }
754 |
755 | hr.post-end {
756 | width: 30%;
757 | }
758 |
759 | #toc {
760 | top: 15em;
761 | margin-left: 490px;
762 | max-width: 300px;
763 | }
764 | }
765 |
766 | @media (max-width: 760px) {
767 | .hide-in-mobile,
768 | .site-nav.hide-in-mobile {
769 | display: none;
770 | }
771 |
772 | #menu-btn {
773 | display: inline-block;
774 | }
775 |
776 | .posts-group {
777 | display: block;
778 |
779 | .post-year {
780 | margin: -6px 0 4px;
781 | }
782 | }
783 |
784 | #spotlight.error-404 {
785 | flex-direction: column;
786 | text-align: center;
787 |
788 | .banner-404 {
789 | margin: 0;
790 | }
791 | }
792 | }
793 |
794 | @media (max-width: 520px) {
795 | .content figure.left,
796 | .content figure.right {
797 | float: unset;
798 | max-width: 100%;
799 | margin: 0;
800 | }
801 |
802 | hr.post-end {
803 | width: 60%;
804 | }
805 |
806 | #mobile-menu {
807 | right: 1.2em;
808 | }
809 | }
810 |
811 | .code-badge {
812 | margin: 0.4em 0em;
813 | }
814 |
815 | .highlight-copy-btn {
816 | margin-right: 7px;
817 | float: right;
818 | border: 0;
819 | border-radius: 4px;
820 | padding: 1px;
821 | font-size: 0.7em;
822 | line-height: 1.8;
823 | color: #fff;
824 | background-color: #777;
825 | opacity: 0.6;
826 | min-width: 55px;
827 | text-align: center;
828 | }
829 |
--------------------------------------------------------------------------------
/templates/macros.html:
--------------------------------------------------------------------------------
1 | {% macro read_time(words) %}
2 |
3 | {% if words < 530 %}
4 | 1 min read
5 | {% else %}
6 | {{ words / 265 | round }} min read
7 | {% endif %}
8 |
9 | {% endmacro read_time %}
10 |
11 | {% macro footer() %}
12 |
13 |
21 |
22 | {% endmacro footer %}
23 |
24 |
25 |
26 | {% macro render_social_icons() %}
27 | {% for icon in config.extra.hermit_social %}
28 |
30 | {% if icon.name == "codepen" %}
31 |
32 | {% elif icon.name == "facebook" %}
33 |
34 | {% elif icon.name == "github" %}
35 |
36 | {% elif icon.name == "gitlab" %}
37 |
38 | {% elif icon.name == "instagram" %}
39 |
40 | {% elif icon.name == "linkedin" %}
41 |
42 | {% elif icon.name == "slack" %}
43 |
44 | {% elif icon.name == "stackoverflow" %}
45 |
46 | {% elif icon.name == "telegram" %}
47 |
48 | {% elif icon.name == "mastodon" %}
49 |
50 | {% elif icon.name == "twitter" %}
51 |
52 | {% elif icon.name == "twitter_x" %}
53 |
54 | {% elif icon.name == "bluesky" %}
55 |
56 | {% elif icon.name == "youtube" %}
57 |
58 | {% elif icon.name == "email" %}
59 |
60 | {% elif icon.name == "dribbble" %}
61 |
62 | {% elif icon.name == "behance" %}
63 |
64 | {% elif icon.name == "freepik" %}
65 |
66 | {% elif icon.name == "adobestock" %}
67 |
68 | {% elif icon.name == "shutterstock" %}
69 |
70 | {% elif icon.name == "123rf" %}
71 |
72 | {% elif icon.name == "dreamstime" %}
73 |
74 | {% elif icon.name == "paypal" %}
75 |
76 | {% elif icon.name == "orcid" %}
77 |
78 | {% elif icon.name == "vsco" %}
79 |
80 | {% elif icon.name == "substack" %}
81 |
82 | {% else %}
83 |
84 | {% endif %}
85 |
86 | {% endfor %}
87 | {% endmacro render_social_icons %}
88 |
--------------------------------------------------------------------------------