website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


0c2e618pyrossh 2026-07-07T15:11:53+05:30
refactor: move CSS to external stylesheet in assets, remove inline CSS
assets/css/styles.css ADDED
@@ -0,0 +1,921 @@
1
+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
2
+ html { -webkit-text-size-adjust: 100%; }
3
+ body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
4
+ img, picture, video, canvas, svg { display: block; max-width: 100%; }
5
+ input, button, textarea, select { font: inherit; }
6
+ p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
7
+ a { color: inherit; text-decoration: none; }
8
+ ul, ol { list-style: none; }
9
+ table { border-collapse: collapse; }
10
+
11
+ @view-transition {
12
+ navigation: auto; /* enabled! */
13
+ }
14
+
15
+ :root {
16
+ --color-black: hsl(0, 0%, 0%);
17
+ --color-white: hsl(0, 0%, 100%);
18
+ --color-accent: hsl(57.25deg 100% 70%);
19
+ --color-body-bg: hsl(0, 0%, 100%);
20
+ --color-box-bg: hsl(0, 0%, 95%);
21
+ --color-text: hsl(0, 0%, 13%);
22
+ --color-link: hsl(211, 100%, 45%);
23
+ --color-post-link: hsl(0, 0%, 0%);
24
+ --color-highlight-bg: hsl(183, 80%, 88%);
25
+ --color-code-fg: hsl(348, 86%, 43%);
26
+ --color-code-bg: hsl(0, 0%, 95%);
27
+ --color-pre-bg: hsl(0, 0%, 95%);
28
+ --color-tag: hsl(152, 96%, 35%);
29
+ --btn-light: none;
30
+ --btn-dark: block;
31
+
32
+ .astro-code,
33
+ :root .astro-code span {
34
+ background: var(--color-pre-bg) !important;
35
+ }
36
+ }
37
+
38
+ [data-theme="dark"] {
39
+ --btn-light: block;
40
+ --btn-dark: none;
41
+
42
+ [data-theme="dark"] .expressive-code .frame pre {
43
+ background: var(--color-pre-bg) !important;
44
+ }
45
+ }
46
+
47
+ [data-tooltip] {
48
+ position: relative;
49
+ cursor: help;
50
+ }
51
+
52
+ [data-tooltip]::after {
53
+ position: absolute;
54
+ opacity: 0;
55
+ pointer-events: none;
56
+ content: attr(data-tooltip);
57
+ left: 0;
58
+ top: calc(100% + 10px);
59
+ border-radius: 3px;
60
+ box-shadow: 0 0 1px 1px var(--color-text);
61
+ background-color: var(--color-box-bg);
62
+ z-index: 10;
63
+ padding: 8px;
64
+ width: 300px;
65
+ transform: translateY(-20px);
66
+ transition: all 150ms cubic-bezier(0.25, 0.8, 0.25, 1);
67
+ }
68
+
69
+ [data-tooltip]:hover::after {
70
+ opacity: 1;
71
+ transform: translateY(0);
72
+ transition-duration: 300ms;
73
+ }
74
+
75
+ body {
76
+ display: flex;
77
+ flex-direction: column;
78
+ flex: 1;
79
+ background-color: var(--color-body-bg);
80
+ color: var(--color-text);
81
+ font-family: system-ui;
82
+ text-rendering: optimizeLegibility;
83
+ font-variant-ligatures: common-ligatures;
84
+ font-kerning: normal;
85
+ font-size: 1.25rem;
86
+ line-height: 1.5;
87
+ min-height: 100vh;
88
+
89
+ @media (max-width: 720px) {
90
+ font-size: 1.1rem;
91
+ }
92
+ }
93
+
94
+ main {
95
+ margin-top: 1rem;
96
+ margin-bottom: 1rem;
97
+ padding-bottom: 1em;
98
+ }
99
+
100
+ header {
101
+ background: #131618;
102
+ }
103
+
104
+ .safe-area {
105
+ background: #131618;
106
+ position: sticky;
107
+ top: 0;
108
+ padding-top: env(safe-area-inset-top);
109
+ }
110
+
111
+ .logo {
112
+ display: flex;
113
+ font-size: 22px;
114
+ line-height: 56px;
115
+ font-weight: 400;
116
+ margin-bottom: 0;
117
+ float: left;
118
+ color: var(--color-accent);
119
+ margin-right: 8px;
120
+
121
+ &.active,
122
+ &:hover {
123
+ color: var(--color-accent);
124
+ text-decoration: underline;
125
+ text-decoration-color: var(--color-accent);
126
+ text-underline-offset: 8px;
127
+ }
128
+ }
129
+
130
+ .links {
131
+ display: flex;
132
+ flex-direction: row;
133
+ float: right;
134
+ font-size: 1.4rem;
135
+ line-height: 56px;
136
+ color: white;
137
+
138
+ .links #astro-color-scheme-switch {
139
+ display: flex;
140
+ align-items: center;
141
+ font-size: 1.3rem;
142
+
143
+ .links #astro-color-scheme-switch button {
144
+ padding-right: 12px;
145
+ cursor: pointer;
146
+ margin-bottom: -2px;
147
+ }
148
+ }
149
+
150
+ a {
151
+ display: inline-block;
152
+ text-decoration: none;
153
+ font-size: 22px;
154
+ line-height: 56px;
155
+ color: white;
156
+ font-weight: 400;
157
+ padding-left: 12px;
158
+ padding-right: 12px;
159
+
160
+ &:last-child {
161
+ padding-right: 0px;
162
+ }
163
+
164
+ &.active,
165
+ &:hover {
166
+ color: var(--color-gray-200);
167
+ text-decoration: underline;
168
+ text-decoration-color: var(--color-accent);
169
+ text-underline-offset: 8px;
170
+ }
171
+ }
172
+ }
173
+
174
+ footer {
175
+ background: #131618;
176
+ }
177
+
178
+ .safe-area {
179
+ background: #131618;
180
+ position: sticky;
181
+ bottom: 0;
182
+ padding-bottom: env(safe-area-inset-bottom);
183
+ }
184
+
185
+ .container {
186
+ display: flex;
187
+ flex-direction: row;
188
+ flex: 1;
189
+ padding: 16px 0px;
190
+ }
191
+
192
+ .spacer {
193
+ flex: 1;
194
+ }
195
+
196
+ .copyright-container {
197
+ display: flex;
198
+ align-items: center;
199
+ justify-content: center;
200
+ margin-left: 0.5rem;
201
+ margin-right: 0.5rem;
202
+ color: var(--color-white);
203
+ font-size: 1rem;
204
+ }
205
+
206
+ .link {
207
+ font-size: 1rem;
208
+ line-height: 1.5rem;
209
+ margin-left: 0.5rem;
210
+ color: var(--color-white);
211
+ font-weight: 500;
212
+ text-underline-offset: 2px;
213
+ text-decoration-thickness: 2px;
214
+ text-decoration-line: underline;
215
+ text-decoration-color: white;
216
+
217
+ &:hover {
218
+ color: var(--color-gray-200);
219
+ text-decoration-color: var(--color-gray-200);
220
+ }
221
+ }
222
+
223
+ div {
224
+ flex: 1;
225
+ width: min(70ch, 100% - 4rem); /* To make the website more readable */
226
+ margin-right: auto;
227
+ margin-left: auto;
228
+ padding-left: 1em;
229
+ padding-right: 1em;
230
+ }
231
+
232
+ @media (max-width: 720px) {
233
+ div {
234
+ width: 100%;
235
+ }
236
+ }
237
+
238
+ .description {
239
+ font-size: 1.1rem;
240
+ @media (max-width: 720px) {
241
+ font-size: 1rem;
242
+ }
243
+ }
244
+
245
+ h2 {
246
+ font-size: 1.4rem;
247
+ font-weight: 600;
248
+ @media (max-width: 720px) {
249
+ font-size: 1.15rem;
250
+ }
251
+ }
252
+
253
+ section {
254
+ display: flex;
255
+ flex-direction: column;
256
+ margin-top: 1.5rem;
257
+ margin-bottom: 1rem;
258
+
259
+ @media (max-width: 720px) {
260
+ margin-top: 1.5rem;
261
+ margin-bottom: 0rem;
262
+ }
263
+ }
264
+
265
+ .rounded-md {
266
+ border-radius: 0.375rem;
267
+ }
268
+
269
+ .repos {
270
+ display: grid;
271
+ grid-template-columns: auto auto;
272
+ gap: 1rem;
273
+ margin-top: 0.5rem;
274
+
275
+ @media (max-width: 720px) {
276
+ gap: 1rem;
277
+ grid-template-columns: auto;
278
+ }
279
+ }
280
+
281
+ .pageContainer {
282
+ margin-left: auto;
283
+ margin-right: auto;
284
+ margin-bottom: 2.5rem;
285
+ /* mb-10 */
286
+ }
287
+
288
+ .title {
289
+ font-size: 1.875rem;
290
+ line-height: 2.25rem;
291
+ font-weight: 700;
292
+ margin-bottom: 1rem;
293
+ @media (max-width: 720px) {
294
+ font-size: 1.6rem;
295
+ }
296
+ }
297
+
298
+ .firstSection {
299
+ display: flex;
300
+ flex-direction: column;
301
+ }
302
+
303
+ .firstPara {
304
+ display: flex;
305
+ flex-direction: row;
306
+ }
307
+
308
+ .linkUnderline {
309
+ text-decoration-line: underline;
310
+ }
311
+
312
+ .gridContainer {
313
+ display: grid;
314
+ grid-template-columns: repeat(1, minmax(0, 1fr));
315
+ gap: 1rem;
316
+
317
+ @media (max-width: 720px) {
318
+ gap: 0rem;
319
+ }
320
+ }
321
+
322
+ @media (min-width: 640px) {
323
+ /* sm: */
324
+ .gridContainer {
325
+ grid-template-columns: repeat(2, minmax(0, 1fr));
326
+ /* sm:grid-cols-2 */
327
+ gap: 2rem;
328
+ /* sm:gap-8 */
329
+ }
330
+ }
331
+
332
+ .repo {
333
+ text-overflow: ellipsis;
334
+ overflow: hidden;
335
+ padding: 0.5rem;
336
+ background: var(--color-box-bg);
337
+ color: var(--color-text);
338
+ font-size: 0.95rem;
339
+
340
+ .repo a {
341
+ color: var(--color-link);
342
+ }
343
+
344
+ h4 {
345
+ font-size: 1.05rem;
346
+ font-weight: 500;
347
+ line-height: 1.2;
348
+ border-bottom: 1px solid #495057;
349
+ text-overflow: ellipsis;
350
+ white-space: nowrap;
351
+ overflow: hidden;
352
+ margin-bottom: 0;
353
+ padding: 0;
354
+ }
355
+
356
+ .tags {
357
+ margin-top: 0.5rem;
358
+ display: flex;
359
+ flex-wrap: wrap;
360
+ gap: 0.25rem;
361
+ }
362
+
363
+ .tag {
364
+ color: var(--color-tag);
365
+ padding: 0.15rem 0.5rem 0.5rem 0rem;
366
+ border-radius: 0.25rem;
367
+ font-size: 0.95rem;
368
+ font-weight: 500;
369
+ }
370
+ }
371
+
372
+ .interests {
373
+ .interests ul {
374
+ display: grid;
375
+ gap: 0.5rem;
376
+ grid-template-columns: auto auto auto;
377
+ text-align: center;
378
+ margin-top: 0.5rem;
379
+ font-size: 1.1rem;
380
+
381
+ .interests ul li {
382
+ background-color: var(--color-box-bg);
383
+ padding: 0.25rem;
384
+ }
385
+ }
386
+ }
387
+
388
+ .contact {
389
+ .contact ul {
390
+ display: grid;
391
+ gap: 0.5rem;
392
+ grid-template-columns: auto;
393
+ margin-top: 0.5rem;
394
+
395
+ .contact ul li {
396
+ display: flex;
397
+ flex-direction: row;
398
+ align-items: baseline;
399
+ padding: 0.25rem;
400
+ background-color: var(--color-box-bg);
401
+ font-size: 1.1rem;
402
+
403
+ @media (max-width: 720px) {
404
+ font-size: 1rem;
405
+ flex-direction: column;
406
+ }
407
+ }
408
+
409
+ .contact a {
410
+ color: var(--color-link);
411
+ }
412
+
413
+ strong {
414
+ font-weight: 500;
415
+ margin-left: 0.25rem;
416
+ margin-right: 0.5rem;
417
+ }
418
+ }
419
+ }
420
+
421
+ .tools {
422
+ .tools img {
423
+ width: 36px;
424
+ height: 36px;
425
+ }
426
+
427
+ ul {
428
+ display: grid;
429
+ gap: 0.5rem;
430
+ grid-template-columns: auto auto auto auto;
431
+ text-align: center;
432
+ margin-top: 0.5rem;
433
+
434
+ @media (max-width: 720px) {
435
+ grid-template-columns: auto auto auto;
436
+ }
437
+
438
+ li {
439
+ display: flex;
440
+ align-items: center;
441
+ background-color: var(--color-box-bg);
442
+ padding: 0.25rem;
443
+ font-size: 1rem;
444
+
445
+ li a {
446
+ display: flex;
447
+ flex: 1;
448
+ flex-direction: row;
449
+ align-items: center;
450
+ text-align: left;
451
+ margin-left: 0.25rem;
452
+ margin-right: 0.25rem;
453
+
454
+ li a div {
455
+ flex: 1;
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
461
+
462
+ .repo {
463
+ text-overflow: ellipsis;
464
+ overflow: hidden;
465
+ padding: 0.5rem;
466
+ background: var(--color-box-bg);
467
+ color: var(--color-text);
468
+ font-size: 0.95rem;
469
+
470
+ .repo a {
471
+ color: var(--color-link);
472
+ }
473
+ }
474
+
475
+ .header {
476
+ display: flex;
477
+ flex-direction: row;
478
+ align-items: baseline;
479
+
480
+ @media (max-width: 720px) {
481
+ flex-direction: column;
482
+ align-items: start;
483
+ }
484
+ }
485
+
486
+ h4 {
487
+ font-size: 1.05rem;
488
+ font-weight: 500;
489
+ line-height: 1.2;
490
+ border-bottom: 1px solid #495057;
491
+ text-overflow: ellipsis;
492
+ white-space: nowrap;
493
+ overflow: hidden;
494
+ margin-bottom: 0;
495
+ padding: 0;
496
+ }
497
+
498
+ .tags {
499
+ margin-top: 0.5rem;
500
+ display: flex;
501
+ flex-wrap: wrap;
502
+ gap: 0.25rem;
503
+ }
504
+
505
+ .tag {
506
+ color: var(--color-tag);
507
+ padding: 0.15rem 0.5rem 0.5rem 0rem;
508
+ border-radius: 0.25rem;
509
+ font-size: 0.95rem;
510
+ font-weight: 500;
511
+ }
512
+
513
+ h1 {
514
+ font-size: 1.6rem;
515
+ font-weight: 500;
516
+ line-height: 1;
517
+ margin-bottom: 0.1rem;
518
+ flex: 1;
519
+
520
+ h1 a {
521
+ color: var(--color-link);
522
+ }
523
+ }
524
+
525
+ h2 {
526
+ display: flex;
527
+ flex: 1;
528
+ padding-top: 0.3rem;
529
+ font-size: 0.95rem;
530
+ }
531
+
532
+ h3 {
533
+ font-size: 1rem;
534
+ font-weight: 500;
535
+
536
+ h3 a {
537
+ /* color: var(--color-tag) !important; */
538
+ }
539
+
540
+ span {
541
+ font-size: 0.8rem;
542
+ }
543
+
544
+ svg {
545
+ display: inline;
546
+ /* color: var(--color-code-fg); */
547
+ /* vertical-align: sub; */
548
+ margin-bottom: 4px;
549
+ }
550
+ }
551
+
552
+ hr {
553
+ margin-top: 0.5rem;
554
+ border-color: var(--color-text);
555
+ }
556
+
557
+ .nav {
558
+ display: flex;
559
+ align-items: center;
560
+ margin-top: 0.5rem;
561
+
562
+ @media (max-width: 720px) {
563
+ margin-top: 0.5rem;
564
+ }
565
+
566
+ div {
567
+ padding-right: 0.5rem;
568
+ }
569
+
570
+ a {
571
+ font-size: 1rem;
572
+ font-weight: 500;
573
+ padding-right: 0.5rem;
574
+ cursor: pointer;
575
+ color: var(--color-link);
576
+
577
+ a[aria-current="true"] {
578
+ text-underline-offset: 4px;
579
+ text-decoration: underline;
580
+ }
581
+ }
582
+ }
583
+
584
+ .nav {
585
+ display: flex;
586
+ align-items: center;
587
+ margin-bottom: 0.5rem;
588
+
589
+ @media (max-width: 720px) {
590
+ margin-top: 0.5rem;
591
+ }
592
+
593
+ div {
594
+ padding-right: 0.5rem;
595
+ }
596
+
597
+ a {
598
+ font-size: 1rem;
599
+ font-weight: 500;
600
+ padding-right: 0.5rem;
601
+ cursor: pointer;
602
+ color: var(--color-link);
603
+
604
+ a[aria-current="true"] {
605
+ text-underline-offset: 4px;
606
+ text-decoration: underline;
607
+ }
608
+ }
609
+ }
610
+
611
+ .title {
612
+ display: flex;
613
+ align-items: center;
614
+ margin-top: 0.75rem;
615
+ margin-bottom: 0.5rem;
616
+ font-size: 1.1rem;
617
+ font-weight: 500;
618
+ }
619
+
620
+ h1 {
621
+ display: flex;
622
+ align-items: flex-start;
623
+ font-weight: 800;
624
+ font-size: 2rem;
625
+ }
626
+
627
+ .container {
628
+ display: flex;
629
+ float: left;
630
+ }
631
+
632
+ ul {
633
+ display: flex;
634
+ flex-direction: column;
635
+
636
+ ul li {
637
+ display: grid;
638
+ grid-template-columns: repeat(1, minmax(0, 1fr));
639
+ gap: 0.4rem;
640
+ justify-items: start;
641
+ align-items: end;
642
+ margin-top: 1.25rem;
643
+ line-height: 1.5rem;
644
+
645
+ @media (min-width: 640px) {
646
+ grid-template-columns: repeat(2, minmax(0, 1fr));
647
+ gap: 0.75rem;
648
+ }
649
+
650
+ ul a {
651
+ font-size: 1.1rem;
652
+ color: var(--color-post-link);
653
+ text-decoration-line: underline;
654
+ text-underline-offset: 4px;
655
+ }
656
+
657
+ time {
658
+ font-size: 1.1rem;
659
+ }
660
+
661
+ .content {
662
+ display: flex;
663
+ flex-direction: column;
664
+ }
665
+
666
+ .description {
667
+ font-size: 13pt;
668
+
669
+ &:hover {
670
+ cursor: default;
671
+ }
672
+ }
673
+
674
+ .date-wrapper {
675
+ display: flex;
676
+ flex: 1;
677
+ justify-content: flex-end;
678
+ font-size: 1rem;
679
+ line-height: 1.5rem;
680
+ @media (min-width: 640px) {
681
+ margin-left: 1rem;
682
+ }
683
+ }
684
+ }
685
+ }
686
+
687
+ article {
688
+ article h1 {
689
+ text-align: left;
690
+ font-size: 1.8rem;
691
+ font-weight: bold;
692
+ line-height: 1;
693
+ margin-top: 0.5rem;
694
+ margin-bottom: 0.1rem;
695
+ }
696
+
697
+ time {
698
+ font-size: 1.1rem;
699
+ text-align: left;
700
+ color: light-dark(
701
+ hsl(from var(--color-text) h s 40%),
702
+ hsl(from var(--color-text) h s 80%)
703
+ );
704
+ }
705
+
706
+ hr {
707
+ margin: 0.5rem 0;
708
+ border-color: hsl(var(--color-text));
709
+ }
710
+
711
+ h2 {
712
+ font-size: 1.1rem;
713
+ font-weight: 500;
714
+ }
715
+
716
+ h3 {
717
+ font-size: 1.25rem;
718
+ font-weight: 700;
719
+ margin-top: 0.5rem;
720
+ margin-bottom: 0.1rem;
721
+ }
722
+
723
+ p {
724
+ font-size: 1.1rem;
725
+ padding-bottom: 1rem;
726
+ }
727
+
728
+ p,
729
+ li {
730
+ font-size: 1.1rem;
731
+ li code {
732
+ color: var(--color-code-fg) !important;
733
+ background: var(--color-code-bg) !important;
734
+ word-wrap: break-word;
735
+ box-decoration-break: clone;
736
+ padding: 2px 4px;
737
+ border-radius: 0.2rem;
738
+ font-weight: 400;
739
+ font-size: 0.8rem;
740
+ }
741
+ }
742
+
743
+ blockquote {
744
+ font-size: 1.2rem;
745
+ font-weight: 600;
746
+ background: var(--color-highlight-bg);
747
+ padding: 0.4rem;
748
+ margin: 16px 0px;
749
+
750
+ blockquote p {
751
+ padding: 0;
752
+ }
753
+ }
754
+ }
755
+
756
+ .issues {
757
+ margin-top: 0.5rem;
758
+ }
759
+
760
+ .summary {
761
+ display: flex;
762
+ flex-wrap: wrap;
763
+ gap: 0.5rem;
764
+ align-items: baseline;
765
+ padding: 0.5rem;
766
+ background: var(--color-box-bg);
767
+ color: var(--color-text);
768
+ font-size: 0.95rem;
769
+ }
770
+
771
+ .empty {
772
+ margin-top: 0.5rem;
773
+ padding: 0.5rem;
774
+ background: var(--color-box-bg);
775
+ color: var(--color-text);
776
+ }
777
+
778
+ .new-issue {
779
+ display: grid;
780
+ gap: 0.5rem;
781
+ margin: 0.5rem 0;
782
+ padding: 0.5rem;
783
+ background: var(--color-box-bg);
784
+
785
+ input,
786
+ .new-issue textarea {
787
+ width: 100%;
788
+ border: 1px solid var(--color-text);
789
+ background: var(--color-body-bg);
790
+ color: var(--color-text);
791
+ padding: 0.35rem 0.5rem;
792
+ font: inherit;
793
+ }
794
+
795
+ textarea {
796
+ min-height: 6rem;
797
+ resize: vertical;
798
+ }
799
+
800
+ button {
801
+ border: 1px solid var(--color-text);
802
+ background: var(--color-box-bg);
803
+ color: var(--color-link);
804
+ padding: 0.35rem 0.75rem;
805
+ font: inherit;
806
+ cursor: pointer;
807
+ }
808
+ }
809
+
810
+ .form-row {
811
+ display: grid;
812
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
813
+ gap: 0.5rem;
814
+
815
+ @media (max-width: 720px) {
816
+ grid-template-columns: 1fr;
817
+ }
818
+ }
819
+
820
+ .state-form,
821
+ .comment-form {
822
+ margin-top: 0.5rem;
823
+ }
824
+
825
+ button {
826
+ border: 1px solid var(--color-text);
827
+ background: var(--color-box-bg);
828
+ color: var(--color-link);
829
+ padding: 0.35rem 0.75rem;
830
+ font: inherit;
831
+ cursor: pointer;
832
+ }
833
+
834
+ .body,
835
+ .comments {
836
+ margin-top: 0.5rem;
837
+ }
838
+
839
+ .body,
840
+ .comment {
841
+ background-color: var(--color-box-bg);
842
+ color: var(--color-text);
843
+ padding: 0.5rem;
844
+ }
845
+
846
+ h3 {
847
+ margin: 0.5rem 0;
848
+ font-size: 1.05rem;
849
+ font-weight: 500;
850
+ }
851
+
852
+ .comment {
853
+ margin: 0.5rem 0;
854
+ }
855
+
856
+ .comment-meta {
857
+ display: flex;
858
+ flex-wrap: wrap;
859
+ gap: 0.5rem;
860
+ margin-bottom: 0.35rem;
861
+ font-size: 0.85rem;
862
+ }
863
+
864
+ pre {
865
+ white-space: pre-wrap;
866
+ overflow-x: auto;
867
+ margin: 0;
868
+ font-family: inherit;
869
+ }
870
+
871
+ .comment-form {
872
+ display: grid;
873
+ gap: 0.5rem;
874
+ padding: 0.5rem;
875
+ background: var(--color-box-bg);
876
+
877
+ textarea,
878
+ .comment-form input {
879
+ width: 100%;
880
+ border: 1px solid var(--color-text);
881
+ background: var(--color-body-bg);
882
+ color: var(--color-text);
883
+ padding: 0.35rem 0.5rem;
884
+ font: inherit;
885
+ }
886
+
887
+ textarea {
888
+ min-height: 6rem;
889
+ resize: vertical;
890
+ }
891
+ }
892
+
893
+ .comment-actions {
894
+ display: grid;
895
+ grid-template-columns: minmax(0, 1fr) auto;
896
+ gap: 0.5rem;
897
+
898
+ @media (max-width: 720px) {
899
+ grid-template-columns: 1fr;
900
+ }
901
+
902
+ @media (prefers-color-scheme: dark) {
903
+ :root { color-scheme: dark; }
904
+ }
905
+
906
+ [data-theme="dark"] {
907
+ --color-body-bg: hsl(210, 13%, 15%);
908
+ --color-box-bg: hsl(210, 13%, 9%);
909
+ --color-text: hsl(210, 17%, 98%);
910
+ --color-link: hsl(211, 100%, 60%);
911
+ --color-post-link: hsl(211, 100%, 60%);
912
+ --color-highlight-bg: hsl(183, 80%, 18%);
913
+ --color-code-fg: hsl(348, 86%, 60%);
914
+ --color-code-bg: hsl(0, 0%, 0%);
915
+ --color-pre-bg: hsl(0, 0%, 0%);
916
+ --color-tag: hsl(152, 96%, 44%);
917
+ --btn-light: block;
918
+ --btn-dark: none;
919
+ color-scheme: dark;
920
+ }
921
+ }
packages/shared/ui/src/layout.tsx CHANGED
@@ -1,4 +1,3 @@
1
- import { globalCSS } from "./css";
2
1
  import { Header } from "./header";
3
2
  import { Footer } from "./footer";
4
3
  import { SITE_TITLE, SITE_DESCRIPTION, SITE_URL } from "@pyrossh/config";
@@ -22,6 +21,7 @@ export function Layout({ title, description, request, children }: LayoutProps) {
22
21
  <link rel="icon" type="image/svg+xml" href="/assets/icons/icon.svg" />
23
22
  <link rel="alternate" type="application/rss+xml" title={title} href="/rss.xml" />
24
23
  <link rel="canonical" href={canonicalURL} />
24
+ <link rel="stylesheet" href="/assets/css/styles.css" />
25
25
  <title>{title}</title>
26
26
  <meta name="title" content={title} />
27
27
  <meta name="description" content={description || SITE_DESCRIPTION} />
@@ -38,7 +38,6 @@ export function Layout({ title, description, request, children }: LayoutProps) {
38
38
  <meta property="twitter:title" content={title} />
39
39
  <meta property="twitter:description" content={description || SITE_DESCRIPTION} />
40
40
  <meta property="twitter:image" content="/assets/icons/icon.svg" />
41
- <style>{globalCSS}</style>
42
41
  <script src="https://unpkg.com/[email protected]"></script>
43
42
  </head>
44
43
  <body>
packages/workers/assets/src/index.ts CHANGED
@@ -1,7 +1,935 @@
1
+ const ASSETS: Record<string, { data: string; type: string }> = {
2
+ "css/styles.css": { data: `*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
3
+ html { -webkit-text-size-adjust: 100%; }
4
+ body { line-height: 1.5; -webkit-font-smoothing: antialiased; }
5
+ img, picture, video, canvas, svg { display: block; max-width: 100%; }
6
+ input, button, textarea, select { font: inherit; }
7
+ p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
8
+ a { color: inherit; text-decoration: none; }
9
+ ul, ol { list-style: none; }
10
+ table { border-collapse: collapse; }
11
+
12
+ @view-transition {
13
+ navigation: auto; /* enabled! */
14
+ }
15
+
16
+ :root {
17
+ --color-black: hsl(0, 0%, 0%);
18
+ --color-white: hsl(0, 0%, 100%);
19
+ --color-accent: hsl(57.25deg 100% 70%);
20
+ --color-body-bg: hsl(0, 0%, 100%);
21
+ --color-box-bg: hsl(0, 0%, 95%);
22
+ --color-text: hsl(0, 0%, 13%);
23
+ --color-link: hsl(211, 100%, 45%);
24
+ --color-post-link: hsl(0, 0%, 0%);
25
+ --color-highlight-bg: hsl(183, 80%, 88%);
26
+ --color-code-fg: hsl(348, 86%, 43%);
27
+ --color-code-bg: hsl(0, 0%, 95%);
28
+ --color-pre-bg: hsl(0, 0%, 95%);
29
+ --color-tag: hsl(152, 96%, 35%);
30
+ --btn-light: none;
31
+ --btn-dark: block;
32
+
33
+ .astro-code,
34
+ :root .astro-code span {
35
+ background: var(--color-pre-bg) !important;
36
+ }
37
+ }
38
+
39
+ [data-theme="dark"] {
40
+ --btn-light: block;
41
+ --btn-dark: none;
42
+
43
+ [data-theme="dark"] .expressive-code .frame pre {
44
+ background: var(--color-pre-bg) !important;
45
+ }
46
+ }
47
+
48
+ [data-tooltip] {
49
+ position: relative;
50
+ cursor: help;
51
+ }
52
+
53
+ [data-tooltip]::after {
54
+ position: absolute;
55
+ opacity: 0;
56
+ pointer-events: none;
57
+ content: attr(data-tooltip);
58
+ left: 0;
59
+ top: calc(100% + 10px);
60
+ border-radius: 3px;
61
+ box-shadow: 0 0 1px 1px var(--color-text);
62
+ background-color: var(--color-box-bg);
63
+ z-index: 10;
64
+ padding: 8px;
65
+ width: 300px;
66
+ transform: translateY(-20px);
67
+ transition: all 150ms cubic-bezier(0.25, 0.8, 0.25, 1);
68
+ }
69
+
70
+ [data-tooltip]:hover::after {
71
+ opacity: 1;
72
+ transform: translateY(0);
73
+ transition-duration: 300ms;
74
+ }
75
+
76
+ body {
77
+ display: flex;
78
+ flex-direction: column;
79
+ flex: 1;
80
+ background-color: var(--color-body-bg);
81
+ color: var(--color-text);
82
+ font-family: system-ui;
83
+ text-rendering: optimizeLegibility;
84
+ font-variant-ligatures: common-ligatures;
85
+ font-kerning: normal;
86
+ font-size: 1.25rem;
87
+ line-height: 1.5;
88
+ min-height: 100vh;
89
+
90
+ @media (max-width: 720px) {
91
+ font-size: 1.1rem;
92
+ }
93
+ }
94
+
95
+ main {
96
+ margin-top: 1rem;
97
+ margin-bottom: 1rem;
98
+ padding-bottom: 1em;
99
+ }
100
+
101
+ header {
102
+ background: #131618;
103
+ }
104
+
105
+ .safe-area {
106
+ background: #131618;
107
+ position: sticky;
108
+ top: 0;
109
+ padding-top: env(safe-area-inset-top);
110
+ }
111
+
112
+ .logo {
113
+ display: flex;
114
+ font-size: 22px;
115
+ line-height: 56px;
116
+ font-weight: 400;
117
+ margin-bottom: 0;
118
+ float: left;
119
+ color: var(--color-accent);
120
+ margin-right: 8px;
121
+
122
+ &.active,
123
+ &:hover {
124
+ color: var(--color-accent);
125
+ text-decoration: underline;
126
+ text-decoration-color: var(--color-accent);
127
+ text-underline-offset: 8px;
128
+ }
129
+ }
130
+
131
+ .links {
132
+ display: flex;
133
+ flex-direction: row;
134
+ float: right;
135
+ font-size: 1.4rem;
136
+ line-height: 56px;
137
+ color: white;
138
+
139
+ .links #astro-color-scheme-switch {
140
+ display: flex;
141
+ align-items: center;
142
+ font-size: 1.3rem;
143
+
144
+ .links #astro-color-scheme-switch button {
145
+ padding-right: 12px;
146
+ cursor: pointer;
147
+ margin-bottom: -2px;
148
+ }
149
+ }
150
+
151
+ a {
152
+ display: inline-block;
153
+ text-decoration: none;
154
+ font-size: 22px;
155
+ line-height: 56px;
156
+ color: white;
157
+ font-weight: 400;
158
+ padding-left: 12px;
159
+ padding-right: 12px;
160
+
161
+ &:last-child {
162
+ padding-right: 0px;
163
+ }
164
+
165
+ &.active,
166
+ &:hover {
167
+ color: var(--color-gray-200);
168
+ text-decoration: underline;
169
+ text-decoration-color: var(--color-accent);
170
+ text-underline-offset: 8px;
171
+ }
172
+ }
173
+ }
174
+
175
+ footer {
176
+ background: #131618;
177
+ }
178
+
179
+ .safe-area {
180
+ background: #131618;
181
+ position: sticky;
182
+ bottom: 0;
183
+ padding-bottom: env(safe-area-inset-bottom);
184
+ }
185
+
186
+ .container {
187
+ display: flex;
188
+ flex-direction: row;
189
+ flex: 1;
190
+ padding: 16px 0px;
191
+ }
192
+
193
+ .spacer {
194
+ flex: 1;
195
+ }
196
+
197
+ .copyright-container {
198
+ display: flex;
199
+ align-items: center;
200
+ justify-content: center;
201
+ margin-left: 0.5rem;
202
+ margin-right: 0.5rem;
203
+ color: var(--color-white);
204
+ font-size: 1rem;
205
+ }
206
+
207
+ .link {
208
+ font-size: 1rem;
209
+ line-height: 1.5rem;
210
+ margin-left: 0.5rem;
211
+ color: var(--color-white);
212
+ font-weight: 500;
213
+ text-underline-offset: 2px;
214
+ text-decoration-thickness: 2px;
215
+ text-decoration-line: underline;
216
+ text-decoration-color: white;
217
+
218
+ &:hover {
219
+ color: var(--color-gray-200);
220
+ text-decoration-color: var(--color-gray-200);
221
+ }
222
+ }
223
+
224
+ div {
225
+ flex: 1;
226
+ width: min(70ch, 100% - 4rem); /* To make the website more readable */
227
+ margin-right: auto;
228
+ margin-left: auto;
229
+ padding-left: 1em;
230
+ padding-right: 1em;
231
+ }
232
+
233
+ @media (max-width: 720px) {
234
+ div {
235
+ width: 100%;
236
+ }
237
+ }
238
+
239
+ .description {
240
+ font-size: 1.1rem;
241
+ @media (max-width: 720px) {
242
+ font-size: 1rem;
243
+ }
244
+ }
245
+
246
+ h2 {
247
+ font-size: 1.4rem;
248
+ font-weight: 600;
249
+ @media (max-width: 720px) {
250
+ font-size: 1.15rem;
251
+ }
252
+ }
253
+
254
+ section {
255
+ display: flex;
256
+ flex-direction: column;
257
+ margin-top: 1.5rem;
258
+ margin-bottom: 1rem;
259
+
260
+ @media (max-width: 720px) {
261
+ margin-top: 1.5rem;
262
+ margin-bottom: 0rem;
263
+ }
264
+ }
265
+
266
+ .rounded-md {
267
+ border-radius: 0.375rem;
268
+ }
269
+
270
+ .repos {
271
+ display: grid;
272
+ grid-template-columns: auto auto;
273
+ gap: 1rem;
274
+ margin-top: 0.5rem;
275
+
276
+ @media (max-width: 720px) {
277
+ gap: 1rem;
278
+ grid-template-columns: auto;
279
+ }
280
+ }
281
+
282
+ .pageContainer {
283
+ margin-left: auto;
284
+ margin-right: auto;
285
+ margin-bottom: 2.5rem;
286
+ /* mb-10 */
287
+ }
288
+
289
+ .title {
290
+ font-size: 1.875rem;
291
+ line-height: 2.25rem;
292
+ font-weight: 700;
293
+ margin-bottom: 1rem;
294
+ @media (max-width: 720px) {
295
+ font-size: 1.6rem;
296
+ }
297
+ }
298
+
299
+ .firstSection {
300
+ display: flex;
301
+ flex-direction: column;
302
+ }
303
+
304
+ .firstPara {
305
+ display: flex;
306
+ flex-direction: row;
307
+ }
308
+
309
+ .linkUnderline {
310
+ text-decoration-line: underline;
311
+ }
312
+
313
+ .gridContainer {
314
+ display: grid;
315
+ grid-template-columns: repeat(1, minmax(0, 1fr));
316
+ gap: 1rem;
317
+
318
+ @media (max-width: 720px) {
319
+ gap: 0rem;
320
+ }
321
+ }
322
+
323
+ @media (min-width: 640px) {
324
+ /* sm: */
325
+ .gridContainer {
326
+ grid-template-columns: repeat(2, minmax(0, 1fr));
327
+ /* sm:grid-cols-2 */
328
+ gap: 2rem;
329
+ /* sm:gap-8 */
330
+ }
331
+ }
332
+
333
+ .repo {
334
+ text-overflow: ellipsis;
335
+ overflow: hidden;
336
+ padding: 0.5rem;
337
+ background: var(--color-box-bg);
338
+ color: var(--color-text);
339
+ font-size: 0.95rem;
340
+
341
+ .repo a {
342
+ color: var(--color-link);
343
+ }
344
+
345
+ h4 {
346
+ font-size: 1.05rem;
347
+ font-weight: 500;
348
+ line-height: 1.2;
349
+ border-bottom: 1px solid #495057;
350
+ text-overflow: ellipsis;
351
+ white-space: nowrap;
352
+ overflow: hidden;
353
+ margin-bottom: 0;
354
+ padding: 0;
355
+ }
356
+
357
+ .tags {
358
+ margin-top: 0.5rem;
359
+ display: flex;
360
+ flex-wrap: wrap;
361
+ gap: 0.25rem;
362
+ }
363
+
364
+ .tag {
365
+ color: var(--color-tag);
366
+ padding: 0.15rem 0.5rem 0.5rem 0rem;
367
+ border-radius: 0.25rem;
368
+ font-size: 0.95rem;
369
+ font-weight: 500;
370
+ }
371
+ }
372
+
373
+ .interests {
374
+ .interests ul {
375
+ display: grid;
376
+ gap: 0.5rem;
377
+ grid-template-columns: auto auto auto;
378
+ text-align: center;
379
+ margin-top: 0.5rem;
380
+ font-size: 1.1rem;
381
+
382
+ .interests ul li {
383
+ background-color: var(--color-box-bg);
384
+ padding: 0.25rem;
385
+ }
386
+ }
387
+ }
388
+
389
+ .contact {
390
+ .contact ul {
391
+ display: grid;
392
+ gap: 0.5rem;
393
+ grid-template-columns: auto;
394
+ margin-top: 0.5rem;
395
+
396
+ .contact ul li {
397
+ display: flex;
398
+ flex-direction: row;
399
+ align-items: baseline;
400
+ padding: 0.25rem;
401
+ background-color: var(--color-box-bg);
402
+ font-size: 1.1rem;
403
+
404
+ @media (max-width: 720px) {
405
+ font-size: 1rem;
406
+ flex-direction: column;
407
+ }
408
+ }
409
+
410
+ .contact a {
411
+ color: var(--color-link);
412
+ }
413
+
414
+ strong {
415
+ font-weight: 500;
416
+ margin-left: 0.25rem;
417
+ margin-right: 0.5rem;
418
+ }
419
+ }
420
+ }
421
+
422
+ .tools {
423
+ .tools img {
424
+ width: 36px;
425
+ height: 36px;
426
+ }
427
+
428
+ ul {
429
+ display: grid;
430
+ gap: 0.5rem;
431
+ grid-template-columns: auto auto auto auto;
432
+ text-align: center;
433
+ margin-top: 0.5rem;
434
+
435
+ @media (max-width: 720px) {
436
+ grid-template-columns: auto auto auto;
437
+ }
438
+
439
+ li {
440
+ display: flex;
441
+ align-items: center;
442
+ background-color: var(--color-box-bg);
443
+ padding: 0.25rem;
444
+ font-size: 1rem;
445
+
446
+ li a {
447
+ display: flex;
448
+ flex: 1;
449
+ flex-direction: row;
450
+ align-items: center;
451
+ text-align: left;
452
+ margin-left: 0.25rem;
453
+ margin-right: 0.25rem;
454
+
455
+ li a div {
456
+ flex: 1;
457
+ }
458
+ }
459
+ }
460
+ }
461
+ }
462
+
463
+ .repo {
464
+ text-overflow: ellipsis;
465
+ overflow: hidden;
466
+ padding: 0.5rem;
467
+ background: var(--color-box-bg);
468
+ color: var(--color-text);
469
+ font-size: 0.95rem;
470
+
471
+ .repo a {
472
+ color: var(--color-link);
473
+ }
474
+ }
475
+
476
+ .header {
477
+ display: flex;
478
+ flex-direction: row;
479
+ align-items: baseline;
480
+
481
+ @media (max-width: 720px) {
482
+ flex-direction: column;
483
+ align-items: start;
484
+ }
485
+ }
486
+
487
+ h4 {
488
+ font-size: 1.05rem;
489
+ font-weight: 500;
490
+ line-height: 1.2;
491
+ border-bottom: 1px solid #495057;
492
+ text-overflow: ellipsis;
493
+ white-space: nowrap;
494
+ overflow: hidden;
495
+ margin-bottom: 0;
496
+ padding: 0;
497
+ }
498
+
499
+ .tags {
500
+ margin-top: 0.5rem;
501
+ display: flex;
502
+ flex-wrap: wrap;
503
+ gap: 0.25rem;
504
+ }
505
+
506
+ .tag {
507
+ color: var(--color-tag);
508
+ padding: 0.15rem 0.5rem 0.5rem 0rem;
509
+ border-radius: 0.25rem;
510
+ font-size: 0.95rem;
511
+ font-weight: 500;
512
+ }
513
+
514
+ h1 {
515
+ font-size: 1.6rem;
516
+ font-weight: 500;
517
+ line-height: 1;
518
+ margin-bottom: 0.1rem;
519
+ flex: 1;
520
+
521
+ h1 a {
522
+ color: var(--color-link);
523
+ }
524
+ }
525
+
526
+ h2 {
527
+ display: flex;
528
+ flex: 1;
529
+ padding-top: 0.3rem;
530
+ font-size: 0.95rem;
531
+ }
532
+
533
+ h3 {
534
+ font-size: 1rem;
535
+ font-weight: 500;
536
+
537
+ h3 a {
538
+ /* color: var(--color-tag) !important; */
539
+ }
540
+
541
+ span {
542
+ font-size: 0.8rem;
543
+ }
544
+
545
+ svg {
546
+ display: inline;
547
+ /* color: var(--color-code-fg); */
548
+ /* vertical-align: sub; */
549
+ margin-bottom: 4px;
550
+ }
551
+ }
552
+
553
+ hr {
554
+ margin-top: 0.5rem;
555
+ border-color: var(--color-text);
556
+ }
557
+
558
+ .nav {
559
+ display: flex;
560
+ align-items: center;
561
+ margin-top: 0.5rem;
562
+
563
+ @media (max-width: 720px) {
564
+ margin-top: 0.5rem;
565
+ }
566
+
567
+ div {
568
+ padding-right: 0.5rem;
569
+ }
570
+
571
+ a {
572
+ font-size: 1rem;
573
+ font-weight: 500;
574
+ padding-right: 0.5rem;
575
+ cursor: pointer;
576
+ color: var(--color-link);
577
+
578
+ a[aria-current="true"] {
579
+ text-underline-offset: 4px;
580
+ text-decoration: underline;
581
+ }
582
+ }
583
+ }
584
+
585
+ .nav {
586
+ display: flex;
587
+ align-items: center;
588
+ margin-bottom: 0.5rem;
589
+
590
+ @media (max-width: 720px) {
591
+ margin-top: 0.5rem;
592
+ }
593
+
594
+ div {
595
+ padding-right: 0.5rem;
596
+ }
597
+
598
+ a {
599
+ font-size: 1rem;
600
+ font-weight: 500;
601
+ padding-right: 0.5rem;
602
+ cursor: pointer;
603
+ color: var(--color-link);
604
+
605
+ a[aria-current="true"] {
606
+ text-underline-offset: 4px;
607
+ text-decoration: underline;
608
+ }
609
+ }
610
+ }
611
+
612
+ .title {
613
+ display: flex;
614
+ align-items: center;
615
+ margin-top: 0.75rem;
616
+ margin-bottom: 0.5rem;
617
+ font-size: 1.1rem;
618
+ font-weight: 500;
619
+ }
620
+
621
+ h1 {
622
+ display: flex;
623
+ align-items: flex-start;
624
+ font-weight: 800;
625
+ font-size: 2rem;
626
+ }
627
+
628
+ .container {
629
+ display: flex;
630
+ float: left;
631
+ }
632
+
633
+ ul {
634
+ display: flex;
635
+ flex-direction: column;
636
+
637
+ ul li {
638
+ display: grid;
639
+ grid-template-columns: repeat(1, minmax(0, 1fr));
640
+ gap: 0.4rem;
641
+ justify-items: start;
642
+ align-items: end;
643
+ margin-top: 1.25rem;
644
+ line-height: 1.5rem;
645
+
646
+ @media (min-width: 640px) {
647
+ grid-template-columns: repeat(2, minmax(0, 1fr));
648
+ gap: 0.75rem;
649
+ }
650
+
651
+ ul a {
652
+ font-size: 1.1rem;
653
+ color: var(--color-post-link);
654
+ text-decoration-line: underline;
655
+ text-underline-offset: 4px;
656
+ }
657
+
658
+ time {
659
+ font-size: 1.1rem;
660
+ }
661
+
662
+ .content {
663
+ display: flex;
664
+ flex-direction: column;
665
+ }
666
+
667
+ .description {
668
+ font-size: 13pt;
669
+
670
+ &:hover {
671
+ cursor: default;
672
+ }
673
+ }
674
+
675
+ .date-wrapper {
676
+ display: flex;
677
+ flex: 1;
678
+ justify-content: flex-end;
679
+ font-size: 1rem;
680
+ line-height: 1.5rem;
681
+ @media (min-width: 640px) {
682
+ margin-left: 1rem;
683
+ }
684
+ }
685
+ }
686
+ }
687
+
688
+ article {
689
+ article h1 {
690
+ text-align: left;
691
+ font-size: 1.8rem;
692
+ font-weight: bold;
693
+ line-height: 1;
694
+ margin-top: 0.5rem;
695
+ margin-bottom: 0.1rem;
696
+ }
697
+
698
+ time {
699
+ font-size: 1.1rem;
700
+ text-align: left;
701
+ color: light-dark(
702
+ hsl(from var(--color-text) h s 40%),
703
+ hsl(from var(--color-text) h s 80%)
704
+ );
705
+ }
706
+
707
+ hr {
708
+ margin: 0.5rem 0;
709
+ border-color: hsl(var(--color-text));
710
+ }
711
+
712
+ h2 {
713
+ font-size: 1.1rem;
714
+ font-weight: 500;
715
+ }
716
+
717
+ h3 {
718
+ font-size: 1.25rem;
719
+ font-weight: 700;
720
+ margin-top: 0.5rem;
721
+ margin-bottom: 0.1rem;
722
+ }
723
+
724
+ p {
725
+ font-size: 1.1rem;
726
+ padding-bottom: 1rem;
727
+ }
728
+
729
+ p,
730
+ li {
731
+ font-size: 1.1rem;
732
+ li code {
733
+ color: var(--color-code-fg) !important;
734
+ background: var(--color-code-bg) !important;
735
+ word-wrap: break-word;
736
+ box-decoration-break: clone;
737
+ padding: 2px 4px;
738
+ border-radius: 0.2rem;
739
+ font-weight: 400;
740
+ font-size: 0.8rem;
741
+ }
742
+ }
743
+
744
+ blockquote {
745
+ font-size: 1.2rem;
746
+ font-weight: 600;
747
+ background: var(--color-highlight-bg);
748
+ padding: 0.4rem;
749
+ margin: 16px 0px;
750
+
751
+ blockquote p {
752
+ padding: 0;
753
+ }
754
+ }
755
+ }
756
+
757
+ .issues {
758
+ margin-top: 0.5rem;
759
+ }
760
+
761
+ .summary {
762
+ display: flex;
763
+ flex-wrap: wrap;
764
+ gap: 0.5rem;
765
+ align-items: baseline;
766
+ padding: 0.5rem;
767
+ background: var(--color-box-bg);
768
+ color: var(--color-text);
769
+ font-size: 0.95rem;
770
+ }
771
+
772
+ .empty {
773
+ margin-top: 0.5rem;
774
+ padding: 0.5rem;
775
+ background: var(--color-box-bg);
776
+ color: var(--color-text);
777
+ }
778
+
779
+ .new-issue {
780
+ display: grid;
781
+ gap: 0.5rem;
782
+ margin: 0.5rem 0;
783
+ padding: 0.5rem;
784
+ background: var(--color-box-bg);
785
+
786
+ input,
787
+ .new-issue textarea {
788
+ width: 100%;
789
+ border: 1px solid var(--color-text);
790
+ background: var(--color-body-bg);
791
+ color: var(--color-text);
792
+ padding: 0.35rem 0.5rem;
793
+ font: inherit;
794
+ }
795
+
796
+ textarea {
797
+ min-height: 6rem;
798
+ resize: vertical;
799
+ }
800
+
801
+ button {
802
+ border: 1px solid var(--color-text);
803
+ background: var(--color-box-bg);
804
+ color: var(--color-link);
805
+ padding: 0.35rem 0.75rem;
806
+ font: inherit;
807
+ cursor: pointer;
808
+ }
809
+ }
810
+
811
+ .form-row {
812
+ display: grid;
813
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
814
+ gap: 0.5rem;
815
+
816
+ @media (max-width: 720px) {
817
+ grid-template-columns: 1fr;
818
+ }
819
+ }
820
+
821
+ .state-form,
822
+ .comment-form {
823
+ margin-top: 0.5rem;
824
+ }
825
+
826
+ button {
827
+ border: 1px solid var(--color-text);
828
+ background: var(--color-box-bg);
829
+ color: var(--color-link);
830
+ padding: 0.35rem 0.75rem;
831
+ font: inherit;
832
+ cursor: pointer;
833
+ }
834
+
835
+ .body,
836
+ .comments {
837
+ margin-top: 0.5rem;
838
+ }
839
+
840
+ .body,
841
+ .comment {
842
+ background-color: var(--color-box-bg);
843
+ color: var(--color-text);
844
+ padding: 0.5rem;
845
+ }
846
+
847
+ h3 {
848
+ margin: 0.5rem 0;
849
+ font-size: 1.05rem;
850
+ font-weight: 500;
851
+ }
852
+
853
+ .comment {
854
+ margin: 0.5rem 0;
855
+ }
856
+
857
+ .comment-meta {
858
+ display: flex;
859
+ flex-wrap: wrap;
860
+ gap: 0.5rem;
861
+ margin-bottom: 0.35rem;
862
+ font-size: 0.85rem;
863
+ }
864
+
865
+ pre {
866
+ white-space: pre-wrap;
867
+ overflow-x: auto;
868
+ margin: 0;
869
+ font-family: inherit;
870
+ }
871
+
872
+ .comment-form {
873
+ display: grid;
874
+ gap: 0.5rem;
875
+ padding: 0.5rem;
876
+ background: var(--color-box-bg);
877
+
878
+ textarea,
879
+ .comment-form input {
880
+ width: 100%;
881
+ border: 1px solid var(--color-text);
882
+ background: var(--color-body-bg);
883
+ color: var(--color-text);
884
+ padding: 0.35rem 0.5rem;
885
+ font: inherit;
886
+ }
887
+
888
+ textarea {
889
+ min-height: 6rem;
890
+ resize: vertical;
891
+ }
892
+ }
893
+
894
+ .comment-actions {
895
+ display: grid;
896
+ grid-template-columns: minmax(0, 1fr) auto;
897
+ gap: 0.5rem;
898
+
899
+ @media (max-width: 720px) {
900
+ grid-template-columns: 1fr;
901
+ }
902
+
903
+ @media (prefers-color-scheme: dark) {
904
+ :root { color-scheme: dark; }
905
+ }
906
+
907
+ [data-theme="dark"] {
908
+ --color-body-bg: hsl(210, 13%, 15%);
909
+ --color-box-bg: hsl(210, 13%, 9%);
910
+ --color-text: hsl(210, 17%, 98%);
911
+ --color-link: hsl(211, 100%, 60%);
912
+ --color-post-link: hsl(211, 100%, 60%);
913
+ --color-highlight-bg: hsl(183, 80%, 18%);
914
+ --color-code-fg: hsl(348, 86%, 60%);
915
+ --color-code-bg: hsl(0, 0%, 0%);
916
+ --color-pre-bg: hsl(0, 0%, 0%);
917
+ --color-tag: hsl(152, 96%, 44%);
918
+ --btn-light: block;
919
+ --btn-dark: none;
920
+ color-scheme: dark;
921
+ }
922
+ }`, type: "text/css" },
923
+ };
924
+
1
925
  export default {
2
- async fetch(request: Request, env: any): Promise<Response> {
926
+ async fetch(request: Request): Promise<Response> {
3
927
  const url = new URL(request.url);
4
-
928
+ const key = url.pathname.replace("/assets/", "");
929
+ const asset = ASSETS[key];
5
- return new Response("Not found", { status: 404 });
930
+ if (!asset) return new Response("Not found", { status: 404 });
931
+ return new Response(asset.data, {
932
+ headers: { "content-type": asset.type, "cache-control": "public, max-age=3600" },
933
+ });
6
934
  },
7
935
  };