jekyll-theme-simplix 0.1.0 → 0.2.0

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.
data/_sass/main.scss ADDED
@@ -0,0 +1,767 @@
1
+ @import url("https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.min.css");
2
+ @import url("https://cdn.jsdelivr.net/npm/katex@0.16.33/dist/katex.min.css");
3
+
4
+ // Fonts
5
+ $font-title: Carlito;
6
+ $font-body: Barlow;
7
+ $font-pre: "Source Code Pro";
8
+
9
+ @function font-query($list...) {
10
+ $query: "";
11
+ @each $arr in $list {
12
+ @each $font in $arr {
13
+ @if str-index($query, $font) == null {
14
+ $query: $query + "family=" + $font + "&";
15
+ }
16
+ }
17
+ }
18
+ @return $query;
19
+ }
20
+
21
+ @import url("https://fonts.googleapis.com/css2?#{font-query($font-title, $font-body, $font-pre)}display=swap");
22
+ $font-title: $font-title, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, Phosphor, system-ui, sans-serif;
23
+ $font-body: $font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, Cantarell, Phosphor, system-ui, sans-serif;
24
+ $font-pre: $font-pre, "Roboto Mono", Consolas, "Courier New", Courier, monospace;
25
+
26
+ :root {
27
+ scroll-behavior: smooth;
28
+ }
29
+
30
+ // Adjust appearance for various screen sizes
31
+ $screenw-large: 1280px;
32
+ $screenw-medium: 768px;
33
+
34
+ @mixin size-l {
35
+ @media screen and (min-width: #{$screenw-large}) {
36
+ @content;
37
+ }
38
+ }
39
+
40
+ @mixin size-m {
41
+ @media screen and (min-width: #{$screenw-medium}) and (max-width: #{$screenw-large - 1}) {
42
+ @content;
43
+ }
44
+ }
45
+
46
+ @mixin size-s {
47
+ @media screen and (max-width: #{$screenw-medium - 1}) {
48
+ @content;
49
+ }
50
+ }
51
+
52
+ @mixin side-padding($large: 18vw, $medium: 12vw, $small: 24px, $top: 24px, $bottom: 24px, $name: margin) {
53
+ #{$name}: #{$top} #{$large} #{$bottom};
54
+
55
+ @include size-m {
56
+ #{$name}: #{$top} #{$medium} #{$bottom};
57
+ }
58
+
59
+ @include size-s {
60
+ #{$name}: #{$top} #{$small} #{$bottom};
61
+ }
62
+ }
63
+
64
+ // Main stylesheet
65
+ * {
66
+ box-sizing: border-box;
67
+ }
68
+
69
+ body {
70
+ min-height: 100vh;
71
+ padding: 0;
72
+ margin: 0;
73
+ font-family: $font-body;
74
+ overflow-wrap: anywhere;
75
+ word-wrap: break-word;
76
+
77
+ &.main__bg-fill .main__bg {
78
+ position: fixed;
79
+ left: 0;
80
+ top: 0;
81
+ width: 100vw;
82
+ height: 100vh;
83
+ background-size: cover;
84
+ z-index: -1;
85
+ }
86
+
87
+ &.main__empty-content {
88
+ .btn__scroll-down, .btn__scroll-up, [role="main"]:not(.page__content) > :not(.post__switch) {
89
+ display: none;
90
+ }
91
+ }
92
+
93
+ @include size-s {
94
+ &:has(nav.nav__open) {
95
+ overflow: hidden;
96
+ }
97
+ }
98
+
99
+ a[target="_blank"]::after {
100
+ content: " \e5de";
101
+ }
102
+ }
103
+
104
+ $theme-btn-label-height: 32px;
105
+ $theme-btn-label-width: 64px;
106
+ $theme-btn-label-gap: 4px;
107
+
108
+ .btn__theme-toggle {
109
+ display: flex;
110
+ position: fixed;
111
+ align-items: stretch;
112
+ height: $theme-btn-label-height;
113
+ top: calc(24px - $theme-btn-label-height / 2);
114
+ right: calc(24px - $theme-btn-label-height / 2);
115
+ padding: 0;
116
+ column-gap: $theme-btn-label-gap;
117
+ background: #fcfcfc;
118
+ font-family: $font-body;
119
+ border-radius: calc($theme-btn-label-height / 2 + 2px);
120
+ z-index: 2;
121
+ cursor: pointer;
122
+ transition: border .4s ease;
123
+
124
+ > span {
125
+ display: flex;
126
+ align-items: center;
127
+ padding: 4px 5px;
128
+ border-radius: calc($theme-btn-label-height / 2);
129
+ transition: background .4s ease;
130
+
131
+ i {
132
+ font-size: 18px;
133
+ }
134
+
135
+ span {
136
+ white-space: nowrap;
137
+ overflow: hidden;
138
+ text-overflow: clip;
139
+ font-size: 16px;
140
+ }
141
+ }
142
+
143
+ body#main__theme-light & > span.btn__theme-toggle-light span, body#main__theme-dark & > span.btn__theme-toggle-dark span {
144
+ width: $theme-btn-label-width;
145
+ height: calc($theme-btn-label-height - 12px);
146
+ animation: theme-btn-label-switch-l .4s ease 1;
147
+ }
148
+
149
+ body#main__theme-light & > span.btn__theme-toggle-dark span, body#main__theme-dark & > span.btn__theme-toggle-light span {
150
+ width: 0;
151
+ height: calc($theme-btn-label-height - 12px);
152
+ animation: theme-btn-label-switch-r .4s ease 1;
153
+ }
154
+
155
+ @keyframes theme-btn-label-switch-l {
156
+ 0%, 20% {
157
+ width: 0;
158
+ opacity: 0;
159
+ }
160
+
161
+ 80% {
162
+ width: $theme-btn-label-width;
163
+ opacity: 0;
164
+ }
165
+
166
+ 100% {
167
+ width: $theme-btn-label-width;
168
+ opacity: 1;
169
+ }
170
+ }
171
+
172
+ @keyframes theme-btn-label-switch-r {
173
+ 0% {
174
+ width: $theme-btn-label-width;
175
+ opacity: 1;
176
+ }
177
+
178
+ 20% {
179
+ width: $theme-btn-label-width;
180
+ opacity: 0;
181
+ }
182
+
183
+ 80%, 100% {
184
+ width: 0;
185
+ opacity: 0;
186
+ }
187
+ }
188
+
189
+ @media print {
190
+ display: none !important;
191
+ }
192
+ }
193
+
194
+ nav {
195
+ display: none;
196
+ position: fixed;
197
+ top: 0;
198
+ width: 100%;
199
+ background: #0006;
200
+ border-bottom: 1px solid #f0f0ff40;
201
+ z-index: 1;
202
+
203
+ .nav__toggle {
204
+ display: none;
205
+ border: none;
206
+
207
+ button {
208
+ padding: 12px;
209
+ background: none;
210
+ border: none;
211
+ font: 1.25rem $font-title;
212
+ text-align: left;
213
+ flex-grow: 1;
214
+ cursor: pointer;
215
+ }
216
+ }
217
+
218
+ .nav__links {
219
+ display: flex;
220
+ padding: 12px;
221
+ margin-right: calc(108px + $theme-btn-label-gap + $theme-btn-label-height);
222
+ font: 1.25rem $font-title;
223
+ overflow-x: auto;
224
+ overflow-y: hidden;
225
+ flex-grow: 1;
226
+
227
+ a {
228
+ text-decoration: none;
229
+ white-space: nowrap;
230
+ margin-right: 14px;
231
+ }
232
+
233
+ &::-webkit-scrollbar {
234
+ display: none;
235
+ }
236
+ }
237
+
238
+ button, a, a:visited {
239
+ color: white;
240
+ }
241
+
242
+ i {
243
+ font-size: 16px;
244
+ }
245
+
246
+ @include size-s {
247
+ &.nav__multi {
248
+ flex-direction: column;
249
+ border-bottom: 0;
250
+ display: block;
251
+
252
+ .nav__toggle {
253
+ display: flex;
254
+ width: 100vw;
255
+ border-bottom: 1px solid #f0f0ff40;
256
+
257
+ button {
258
+ margin-right: calc(108px + $theme-btn-label-gap + $theme-btn-label-height);
259
+ }
260
+ }
261
+
262
+ .nav__links {
263
+ max-width: 100vw;
264
+ padding-top: 20px;
265
+ display: none;
266
+
267
+ a {
268
+ margin-bottom: 12px;
269
+ width: fit-content;
270
+
271
+ &.nav__links__no-icon {
272
+ padding-left: 16px;
273
+ }
274
+ }
275
+ }
276
+
277
+ &.nav__open {
278
+ width: 100vh;
279
+ height: 100vh;
280
+
281
+ .nav__links {
282
+ display: flex;
283
+ flex-direction: column;
284
+ margin-right: 0;
285
+ padding: 12px 24px 24px 32px;
286
+ height: calc(100vh - 48px);
287
+ overflow-y: auto;
288
+ }
289
+ }
290
+ }
291
+ }
292
+
293
+ @media print {
294
+ display: none !important;
295
+ }
296
+ }
297
+
298
+ .btn__scroll-up {
299
+ position: fixed;
300
+ width: 100%;
301
+ bottom: 0;
302
+ opacity: 0;
303
+ transition: opacity .2s ease, bottom .2s ease;
304
+
305
+ button {
306
+ pointer-events: none;
307
+ }
308
+
309
+ body.main__scroll-down & {
310
+ bottom: 12px;
311
+ opacity: 1;
312
+ visibility: visible;
313
+
314
+ button {
315
+ cursor: pointer;
316
+ pointer-events: auto;
317
+ }
318
+ }
319
+ }
320
+
321
+ header {
322
+ font-family: $font-title;
323
+
324
+ &.home__header {
325
+ display: flex;
326
+ flex-direction: column;
327
+ align-items: stretch;
328
+ height: 100vh;
329
+
330
+ .text {
331
+ @include side-padding(16vw, 10vw, $top: 0, $name: padding);
332
+ display: flex;
333
+ flex-direction: column;
334
+ justify-content: center;
335
+ flex-grow: 1;
336
+ color: white;
337
+
338
+ @media print {
339
+ padding: 0;
340
+ }
341
+
342
+ h1 {
343
+ font-size: 4em;
344
+ margin: 0 0 20px;
345
+ }
346
+
347
+ h2 {
348
+ font-size: 2em;
349
+ margin: 0;
350
+ }
351
+ }
352
+
353
+ .btn__scroll-down {
354
+ position: sticky;
355
+ bottom: 18px;
356
+ margin-bottom: 18px;
357
+ transition: opacity .2s ease;
358
+
359
+ button {
360
+ cursor: pointer;
361
+ }
362
+
363
+ body.main__scroll-down & {
364
+ opacity: 0;
365
+
366
+ button {
367
+ pointer-events: none;
368
+ }
369
+ }
370
+ }
371
+ }
372
+
373
+ &.post__header {
374
+ @include side-padding($top: 80px, $bottom: 20px, $name: padding);
375
+
376
+ .text {
377
+ align-items: center;
378
+ text-align: center;
379
+ color: white;
380
+
381
+ h1 {
382
+ font-size: 36px;
383
+ margin: 0 0 16px;
384
+ }
385
+
386
+ h2 {
387
+ font-size: 24px;
388
+ margin: 0;
389
+ }
390
+ }
391
+
392
+ p {
393
+ font-family: $font-body;
394
+ margin: 8px 0 0;
395
+ }
396
+ }
397
+
398
+ &.page__header {
399
+ @include side-padding($top: 72px, $bottom: 0, $name: margin);
400
+
401
+ p {
402
+ font-family: $font-body;
403
+ font-style: italic;
404
+ }
405
+
406
+ &.page__header-blank {
407
+ border-bottom: none;
408
+ }
409
+ }
410
+
411
+ @media print {
412
+ height: fit-content !important;
413
+ padding: 0 0 36px !important;
414
+ background: none !important;
415
+
416
+ .text {
417
+ text-align: left !important;
418
+ color: black !important;
419
+ }
420
+ }
421
+ }
422
+
423
+ [role="main"] {
424
+ @include side-padding($bottom: 32px, $name: padding);
425
+
426
+ h1, h2, h3, h4, h5, h6 {
427
+ font-family: $font-title;
428
+ }
429
+
430
+ a {
431
+ &:hover {
432
+ text-decoration: none;
433
+ }
434
+
435
+ &.footnote, &.reversefootnote {
436
+ text-decoration: none !important;
437
+ }
438
+ }
439
+
440
+ img {
441
+ max-width: 100%;
442
+ }
443
+
444
+ blockquote {
445
+ @include side-padding(40px, 24px, 0, 1em);
446
+ border-left-width: 8px !important;
447
+ padding: 0 16px;
448
+ font-style: italic;
449
+
450
+ $quote-alert: note tip important warning caution;
451
+ @each $i in $quote-alert {
452
+ &.quote__alert-#{$i} > p:first-of-type {
453
+ font-style: normal;
454
+
455
+ b {
456
+ font-size: 1.16em;
457
+ }
458
+ }
459
+ }
460
+ }
461
+
462
+ table {
463
+ display: block;
464
+ margin: 1em 0;
465
+ border-collapse: collapse;
466
+ table-layout: fixed;
467
+ overflow-x: auto;
468
+
469
+ th, td {
470
+ padding: 4px;
471
+
472
+ ol, ul {
473
+ margin: 0;
474
+ }
475
+ }
476
+
477
+ pre {
478
+ margin: 0;
479
+ }
480
+ }
481
+
482
+ details {
483
+ margin: 1em 0;
484
+
485
+ summary {
486
+ display: block;
487
+ cursor: pointer;
488
+
489
+ i {
490
+ display: inline-block;
491
+ font-size: 16px;
492
+ margin-right: 8px;
493
+ transform: rotate(0deg);
494
+ transition: transform .2s ease;
495
+ }
496
+ }
497
+
498
+ &[open] summary i:first-of-type {
499
+ transform: rotate(90deg);
500
+ }
501
+
502
+ &:not([open]) > :not(summary) {
503
+ display: none;
504
+ }
505
+ }
506
+
507
+ hr {
508
+ height: 16px;
509
+ width: 70%;
510
+ border: none;
511
+ }
512
+
513
+ code {
514
+ font: 16px $font-pre;
515
+ }
516
+
517
+ pre {
518
+ margin: 1em 0;
519
+ font: 16px $font-pre;
520
+
521
+ .code__top {
522
+ display: flex;
523
+ padding: 4px;
524
+ justify-content: space-between;
525
+ font: 16px $font-body;
526
+
527
+ span {
528
+ flex-grow: 1;
529
+ }
530
+
531
+ button {
532
+ align-items: center;
533
+ margin-left: 4px;
534
+ padding: 2px;
535
+ border: none;
536
+ background: none;
537
+ font: 18px Phosphor;
538
+ border-radius: 2px;
539
+
540
+ &:not(.code__copy-na) {
541
+ cursor: pointer;
542
+ }
543
+
544
+ @media print {
545
+ display: none;
546
+ }
547
+ }
548
+ }
549
+
550
+ code {
551
+ display: block;
552
+ padding: 4px;
553
+ overflow-x: auto;
554
+
555
+ @media print {
556
+ border-bottom: 1px solid #ddd;
557
+ overflow-x: visible;
558
+ white-space: pre-wrap;
559
+ }
560
+ }
561
+
562
+ &:not(.code__preview) > .code__preview-container, &.code__preview code {
563
+ display: none;
564
+ }
565
+
566
+ .code__preview-container {
567
+ margin: 4px;
568
+ border: none;
569
+ font-family: $font-body;
570
+
571
+ :first-child {
572
+ margin-top: 0;
573
+ }
574
+
575
+ :last-child {
576
+ margin-bottom: 0;
577
+ }
578
+
579
+ h1, h2 {
580
+ border-bottom: none !important;
581
+ }
582
+ }
583
+
584
+ iframe.code__preview-container {
585
+ height: 280px;
586
+ width: calc(100% - 8px);
587
+ }
588
+
589
+ img.code__preview-container {
590
+ max-width: calc(100% - 8px);
591
+ background: white;
592
+ }
593
+
594
+ @media print {
595
+ code, .code__preview-container {
596
+ display: block !important;
597
+ visibility: visible !important;
598
+ }
599
+ }
600
+ }
601
+
602
+ figure.highlight {
603
+ margin: 0;
604
+
605
+ code {
606
+ padding: 0 !important;
607
+ }
608
+
609
+ table.rouge-table {
610
+ margin: 0;
611
+
612
+ tbody {
613
+ display: block;
614
+ width: 100%;
615
+ }
616
+
617
+ tr {
618
+ display: flex !important;
619
+ width: 100%;
620
+ }
621
+
622
+ td {
623
+ padding: 0;
624
+
625
+ &.gutter.gl {
626
+ text-align: right;
627
+ }
628
+
629
+ &.code {
630
+ display: block;
631
+ width: 100%;
632
+ overflow-x: auto;
633
+ }
634
+
635
+ pre {
636
+ margin: 0;
637
+ border: none !important;
638
+ padding: 4px;
639
+ background: none !important;
640
+ font: 16px $font-pre;
641
+ }
642
+ }
643
+
644
+ @media print {
645
+ td.gutter.gl {
646
+ display: none;
647
+ }
648
+
649
+ td.code pre {
650
+ white-space: pre-wrap;
651
+ }
652
+ }
653
+ }
654
+ }
655
+
656
+ dt {
657
+ font-weight: bold;
658
+
659
+ + dd {
660
+ margin-bottom: 1em;
661
+ font-style: italic;
662
+ }
663
+ }
664
+
665
+ span.katex-display {
666
+ font-size: 18px;
667
+ overflow: auto hidden;
668
+ }
669
+
670
+ .post__switch {
671
+ display: flex;
672
+ justify-content: center;
673
+ align-items: stretch;
674
+ margin-top: 12px;
675
+
676
+ > div {
677
+ display: flex;
678
+ flex-grow: 1;
679
+ flex-basis: 0;
680
+ align-items: flex-start;
681
+
682
+ i {
683
+ font-size: 1.4em;
684
+ margin-right: 8px;
685
+ }
686
+
687
+ .text {
688
+ display: flex;
689
+ flex-direction: column;
690
+
691
+ span {
692
+ font-size: 14px;
693
+ }
694
+
695
+ a {
696
+ font-size: 24px;
697
+
698
+ @include size-s {
699
+ font-size: 20px;
700
+ }
701
+ }
702
+ }
703
+
704
+ &.post__switch-right {
705
+ flex-direction: row-reverse;
706
+ margin-left: 16px;
707
+
708
+ i {
709
+ margin-left: 8px;
710
+ }
711
+
712
+ .text {
713
+ text-align: right;
714
+ }
715
+
716
+ @include size-s {
717
+ margin-left: 0;
718
+ }
719
+ }
720
+ }
721
+
722
+ @include size-s {
723
+ flex-direction: column;
724
+ }
725
+
726
+ @media print {
727
+ display: none;
728
+ }
729
+ }
730
+
731
+ @media print {
732
+ padding: 0;
733
+ }
734
+ }
735
+
736
+ footer {
737
+ @include side-padding($top: 0, $bottom: 64px);
738
+ padding-top: 1em;
739
+ text-align: right;
740
+
741
+ @media print {
742
+ display: none;
743
+ }
744
+ }
745
+
746
+ .btn__scroll-down, .btn__scroll-up {
747
+ display: flex;
748
+ align-items: center;
749
+ justify-content: center;
750
+
751
+ button {
752
+ border: none;
753
+ padding: 8px;
754
+ background: #f8f9fabf;
755
+ color: black !important;
756
+ font: 18px $font-body;
757
+ border-radius: 8px;
758
+
759
+ i {
760
+ font-size: 16px;
761
+ }
762
+ }
763
+
764
+ @media print {
765
+ display: none;
766
+ }
767
+ }