-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlocalstyle.css
More file actions
888 lines (773 loc) · 19.5 KB
/
localstyle.css
File metadata and controls
888 lines (773 loc) · 19.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
/* Import Font */
@font-face {
font-family: 'NarcissusOpenSG';
src: url('./Assets/narcissusopensg.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
/* Light Theme Variables */
:root {
--background-color: #ffffff;
/* Colour under footer */
--text-color: #333;
--header-background-color: #1a4092;
--nav-link-text-color: #f1f1f1;
--nav-link-text-active-color: #fff;
--nav-link-hover-background: #244faa;
--nav-link-text-hover-color: #f3f3f3;
--dropdown-background-color: #ffffff;
--dropdown-hover-background-color: #e0e0e0;
--dropdown-text-color: #5c5c5c;
--dropdown-text-hover-color: #6b5bff;
--dropdown-text-active-color: #6b5bff;
--link-color: #1a73e8;
--link-hover-color: #145dbf;
--hero-background-color: #e7e7e7;
/* No clue. Using it for quotes */
--content-background-color: #ffffff;
--image-border-color: #000000;
--image-hover-border-color: #ffd47d;
--table-header-background-color: #dbdbdb;
--table-border-color: #c0c0c0;
--footer-background-color: #3f3f3f;
--footer-text-color: #fff;
--sidebar-text-color: #5c5c5c;
--code-background-color: #e0e0e0;
--tab-text-color: #333;
--tab-background-color: #ffffff;
--tab-hover-background-color: #e0e0e0;
}
/* Dark Theme Variables */
[data-theme="dark"] {
--background-color: #424242;
--text-color: #ffffff;
--header-background-color: #3f3f3f;
--nav-link-text-color: #f1f1f1;
--nav-link-text-active-color: #fff;
--nav-link-hover-background: #555;
--nav-link-text-hover-color: #f3f3f3;
--dropdown-background-color: #ffffff;
--dropdown-hover-background-color: #e0e0e0;
--dropdown-text-color: #5c5c5c;
--dropdown-text-hover-color: #6b5bff;
--dropdown-text-active-color: #8375fd;
--link-color: #3593ff;
--link-hover-color: #186ad6;
--hero-background-color: #2e2e2e;
--content-background-color: #424242;
--image-border-color: #e9e9e9;
--image-hover-border-color: #000000;
--table-header-background-color: #333333;
--table-border-color: #ffffff;
--footer-background-color: #292929;
--footer-text-color: #fff;
--sidebar-text-color: #e0e0e0;
--code-background-color: #2e2e2e;
--tab-text-color: #ffffff;
--tab-background-color: #414141;
--tab-hover-background-color: #444444;
}
/* Table Toggle Link Styling */
.table-toggle {
color: var(--link-color);
text-decoration: none;
}
.table-toggle:hover {
color: var(--link-hover-color);
text-decoration: underline;
}
/* Details Toggle Styling */
details > summary {
list-style: none;
display: inline-block; /* Prevent full-width clickable area */
pointer-events: none; /* Make brackets non-clickable */
user-select: none;
}
details > summary::-webkit-details-marker {
display: none;
}
details > summary::before {
content: "[";
}
details > summary::after {
content: "]";
}
.details-toggle {
color: var(--link-color);
text-decoration: none;
cursor: pointer;
pointer-events: auto; /* Make ONLY the text inside clickable */
}
.details-toggle:hover {
color: var(--link-hover-color);
text-decoration: underline;
}
.details-toggle::before {
content: "Expand";
}
details[open] > summary .details-toggle::before {
content: "Collapse";
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
body {
font-family: Arial, sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background: var(--background-color);
color: var(--text-color);
display: flex;
flex-direction: column;
min-height: 100vh;
}
h1,
h2 {
font-weight: normal;
font-family: 'NarcissusOpenSG', serif;
color: var(--text-color);
margin-bottom: -0.625rem;
/* Space below the title */
}
h1 {
font-size: 3.125rem;
text-shadow: 0.125rem 0.125rem 0.3125rem rgba(0, 0, 0, 0.5);
/* X-offset, Y-offset, blur radius, color */
}
h2 {
font-size: 2.1875rem;
margin-top: 0;
}
pre {
background-color: var(--code-background-color);
padding: 10px;
border-radius: 5px;
overflow: auto;
font-family: monospace;
tab-size: 4;
-moz-tab-size: 4;
-o-tab-size: 4;
}
header {
background-color: var(--header-background-color);
padding: 0.625rem 0;
}
/* NAV BAR STUFF */
nav {
margin-left: 6.25rem;
/* Matches the padding of the page */
margin-right: 6.25rem;
/* Add right margin to match left */
display: flex;
justify-content: space-between;
/* Space between main nav and right nav */
align-items: center;
/* Vertically center items */
}
.menu-toggle {
display: none;
/* Hidden on desktop */
}
nav>ul {
list-style: none;
display: flex;
margin: 0;
padding: 0;
flex: 1;
/* Take up available space */
}
/* Site options specific styles */
.site-options {
margin-left: auto;
/* Push to the right */
position: relative;
/* Ensure proper dropdown positioning */
}
.site-options>a {
font-family: 'Verdana', sans-serif;
font-size: 0.875rem;
padding: 0.375rem 1.5rem;
color: var(--nav-link-text-color);
text-decoration: none;
}
.site-options .dropdown-content {
right: 0;
/* Align dropdown to the right */
left: auto;
/* Override default left alignment */
min-width: 12.5rem;
/* Make dropdown wider for better readability */
}
/* Ensure site options dropdown shows on hover */
.site-options:hover>.dropdown-content {
display: block;
}
/* Add down arrow for site options */
.site-options>a::after {
content: "▼";
font-size: 0.75rem;
margin-left: 0.5rem;
color: #ffbd5b;
}
/* Theme toggle button */
.theme-toggle {
margin-left: 0.0625rem;
display: flex;
align-items: center;
}
.theme-toggle>a {
padding: 0.375rem 1.5rem;
/* match other top-level items */
font-size: 0.875rem;
/* match nav items */
line-height: 1;
/* prevent extra height */
}
nav ul li {
position: relative;
}
nav ul li a {
/* Top-level items */
font-family: 'Verdana', sans-serif;
font-size: 0.875rem;
padding: 0.375rem 1.25rem;
color: var(--nav-link-text-color);
text-decoration: none;
}
/* Active state for top-level navigation */
nav>ul>li>a.active {
font-weight: bold;
color: var(--nav-link-text-active-color);
}
/* Active state for dropdown items - only for internal links */
.dropdown-content a.active:not([target="_blank"]) {
color: var(--dropdown-text-active-color);
font-weight: bold;
}
/* Active state for parent dropdowns when a child is active */
nav>ul>li.dropdown>a.active {
font-weight: bold;
color: var(--nav-link-text-active-color);
}
/* External links in dropdowns */
.dropdown-content a[target="_blank"] {
color: var(--dropdown-text-color);
}
/* Hover state for external links */
.dropdown-content a[target="_blank"]:hover {
background-color: var(--dropdown-hover-background-color);
color: var(--dropdown-text-hover-color);
}
nav ul li a:hover {
background-color: var(--nav-link-hover-background);
color: var(--nav-link-text-hover-color);
text-decoration: none;
border-radius: 0.3125rem;
}
/* Styles for Sub-dropdown */
.dropdown-content {
display: none;
/* Hide by default */
position: absolute;
background-color: var(--dropdown-background-color);
/* Non-hover BG color */
min-width: 11.25rem;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
z-index: 1;
/* Ensure dropdown appears above other elements */
list-style: none;
/* Remove bullet points */
padding: 0;
/* Remove default padding */
}
/* Sub-dropdown for items with another dropdown */
.dropdown-content ul {
display: none;
/* Hide sub-menu by default */
position: absolute;
top: 0;
left: 100%;
/* Position the sub-menu to the right of the parent menu */
list-style: none;
/* Remove bullet points */
padding: 0;
/* Remove default padding */
}
/* Show the sub-menu when hovering over the parent item - Now handled by JavaScript */
/* .dropdown-content li:hover > ul {
display: block;
} */
/* Down arrow for the main dropdown */
nav ul li.dropdown>a::after {
content: "▼";
/* Down arrow for main dropdown */
font-size: 0.75rem;
margin-left: 0.5rem;
color: #ffbd5b;
}
/* Right arrow for items with a sub-dropdown */
.dropdown-content li.dropdown>a::after {
content: "►";
/* Right arrow for sub-dropdowns */
font-size: 0.75rem;
margin-left: 0.5rem;
color: #ffbd5b;
}
.dropdown-content li a {
padding: 0.5rem 0.75rem;
font-family: 'Verdana', sans-serif;
font-size: 0.8125rem;
color: var(--dropdown-text-color);
/* Non-active Text color */
text-decoration: none;
display: block;
/* Ensure full-width hover area */
}
.dropdown-content li a:hover {
background-color: var(--dropdown-hover-background-color);
/* Light gray background on hover */
color: var(--dropdown-text-hover-color);
/* Keep text color as the original */
}
.dropdown-content li a.active {
color: var(--dropdown-text-active-color);
/* Blue text */
}
/* Non-clickable centered separator label inside dropdowns */
.dropdown-content li.dropdown-separator {
text-align: center;
font-family: 'NarcissusOpenSG', serif;
font-weight: bold;
font-size: 1.125rem;
color: var(--dropdown-text-color);
padding: 0.375rem 0.5rem;
cursor: default;
}
/* Global link style (for regular links, not navigation or dropdown) */
a {
color: var(--link-color);
text-decoration: none;
/* Remove underline */
}
a:hover {
/* Link hover state */
color: var(--link-hover-color);
text-decoration: underline;
/* Add underline */
}
.hero {
text-align: center;
padding: 0;
/* Remove padding */
background-color: var(--hero-background-color);
position: relative;
/* Ensure z-index applies */
box-shadow: 0 0.0625rem 2.5rem rgba(0, 0, 0, 0.2);
/* Bottom shadow similar to footer */
}
.hero img {
width: 100%;
display: block;
/* Ensure the image is displayed as a block element */
margin: 0;
/* Remove any default margin */
}
.hero h1 {
font-size: 2.5em;
margin-bottom: 0.625rem;
/* Reduce the space below the h1 in the hero section */
}
.hero p {
font-size: 1.2em;
margin-top: 0.625rem;
/* Reduce the space above the p element */
margin-bottom: 1.25rem;
}
.quote {
font-family: 'Verdana', sans-serif;
background-color: var(--hero-background-color);
/* Use the hero background color for a nice contrast */
border-left: 0.3125rem solid var(--link-color);
/* Add a left border with the link color for distinction */
padding: 0.625rem 0.625rem;
/* Add padding inside the quote box */
border-radius: 0.3125rem;
/* Slight rounding of corners */
box-shadow: 0 0.25rem 0.3125rem rgba(0, 0, 0, 0.1);
/* Subtle shadow for depth */
max-width: fit-content;
/* Make the box only as wide as the content */
}
/* Image floating styles */
.float-right {
float: right;
margin: 0 0 0.625rem 1.25rem;
/* Margin to avoid text overlap */
border: 0.25rem solid var(--image-border-color);
/* Image Border */
max-width: 25rem;
/* Set max width for responsiveness */
}
.float-left {
float: left;
margin: 0 1.25rem 0.625rem 0;
/* Margin to avoid text overlap */
border: 0.25rem solid var(--image-border-color);
max-width: 25rem;
}
.content {
padding: 1.25rem 7.5rem 6.25rem 7.5rem;
/* This sets top padding to 20px, and left, right, bottom padding to 120px */
background-color: var(--content-background-color);
border-radius: 0.625rem;
}
/* Blog stuff */
.blog-list {
list-style: none;
padding: 0;
margin: 0;
}
.blog-list li {
margin-bottom: 0.875rem;
}
.blog-list a {
font-size: 1.125rem;
}
.post-meta {
color: var(--sidebar-text-color);
font-size: 0.75rem;
}
.post-content {
line-height: 1.8;
}
.post-image {
border: 0.25rem solid var(--image-border-color);
max-width: 100%;
height: auto;
}
/* Sidebar stuff */
.blog-layout {
display: flex;
gap: 1.5rem;
flex-direction: row-reverse;
/* Remove for it left sidebar */
}
/* Collapsible years */
.year-header {
cursor: pointer;
font-weight: bold;
margin-top: 0.5rem;
display: flex;
align-items: center;
}
/* Arrow indicator */
.year-header::before {
content: "▼";
/* expanded by default */
font-size: 0.75rem;
margin-right: 0.375rem;
color: #ffbd5b;
/* match your nav arrows */
}
/* When collapsed */
.year-header.collapsed::before {
content: "►";
}
.year-posts.collapsed {
display: none;
}
.blog-sidebar {
width: 16.25rem;
}
.blog-sidebar .year {
font-weight: bold;
margin: 0.75rem 0 0.375rem 0;
}
.blog-sidebar ul {
list-style: none;
padding: 0;
margin: 0 0 0.625rem 0;
}
.blog-sidebar a {
display: block;
padding: 0.25rem 0.375rem;
color: var(--sidebar-text-color);
text-decoration: none;
border-radius: 0.25rem;
font-size: 0.875rem;
}
.blog-sidebar a:hover {
background-color: var(--dropdown-hover-background-color);
color: var(--dropdown-text-hover-color);
}
.blog-sidebar a.active {
color: var(--dropdown-text-active-color);
font-weight: bold;
}
.blog-main {
flex: 1;
}
@media (max-width: 56.25rem) {
.blog-layout {
flex-direction: column;
}
.blog-sidebar {
width: 100%;
}
}
/* Table styles */
.content table {
width: auto;
border-collapse: collapse;
/* Ensure borders are collapsed */
margin-top: 0.625rem;
/* Add some margin above the table */
}
.content table th,
.content table td {
border: 0.0625rem solid var(--table-border-color);
/* Light border around cells */
padding: 0.1875rem;
/* Padding inside cells */
text-align: left;
/* Center text inside cells */
font-size: 1rem;
}
.content table th {
/* Header */
background-color: var(--table-header-background-color);
font-weight: bold;
}
@media (max-width: 48rem) {
.hero h1 {
font-size: 2rem;
}
/* Fix for content padding and h1 on mobile */
.content {
padding: 1.25rem;
/* 20px */
}
h1 {
font-size: 2rem;
/* 32px */
}
h2 {
font-size: 1.5rem;
/* 24px */
}
nav {
margin-left: 0;
/* Remove margin on smaller screens */
margin-right: 0;
padding: 0.625rem 1.25rem;
/* Add some padding */
position: relative;
/* For absolute positioning of menu */
flex-wrap: wrap;
/* Allow wrapping */
}
/* Hamburger Menu Button */
.menu-toggle {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 1.875rem;
height: 1.3125rem;
background: transparent;
border: none;
cursor: pointer;
padding: 0;
z-index: 1001;
/* Above the menu */
}
.menu-toggle span {
width: 100%;
height: 0.1875rem;
background-color: var(--nav-link-text-color);
border-radius: 0.1875rem;
transition: all 0.3s ease;
}
/* Mobile Menu Overlay */
.menu-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
backdrop-filter: blur(2px);
}
.menu-overlay.visible {
display: block;
}
/* Mobile Navigation List */
nav ul {
display: none;
/* Hidden by default */
flex-direction: column;
width: 100%;
background-color: var(--header-background-color);
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
padding: 0.625rem 0;
box-shadow: 0 0.3125rem 0.625rem rgba(0, 0, 0, 0.2);
}
nav ul.show {
display: flex;
/* Show when toggled */
}
nav ul li {
margin: 0;
width: 100%;
}
nav ul li a {
display: block;
padding: 0.9375rem 1.25rem;
border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.1);
}
/* Adjust dropdowns for mobile */
.site-options {
margin-left: 0;
/* Reset margin */
}
.dropdown-content {
position: static;
/* Stack naturally */
box-shadow: none;
background-color: var(--dropdown-background-color);
/* Slightly darker for contrast */
width: 100%;
padding-left: 1.25rem;
/* Indent dropdown items */
}
.dropdown-content ul {
position: static;
padding-left: 1.25rem;
}
/* Ensure dropdowns are visible on mobile or clickable */
/* For simplicity in this pass, we'll let them hover or click as per existing JS,
but we might need to ensure they don't fly out to the right */
.dropdown-content ul {
left: 0;
}
/* Fix for floating images on mobile */
.float-right,
.float-left {
float: none;
display: block;
margin: 0 auto 1.25rem auto;
max-width: 100%;
}
/* Hide the site options dropdown content by default, show on hover/click logic */
/* The existing hover logic might be tricky on touch, but let's stick to structure first */
}
.wrapper {
flex: 1;
}
footer {
background-color: var(--footer-background-color);
color: var(--footer-text-color);
text-align: center;
width: 100%;
box-sizing: border-box;
padding: 0.625rem 1.25rem;
box-shadow: 0 -0.0625rem 2.5rem rgba(0, 0, 0, 0.2);
}
/* Back to top button */
#back-to-top {
position: fixed;
bottom: 1.25rem;
right: 1.25rem;
background-color: var(--header-background-color);
color: var(--nav-link-text-color);
border: none;
border-radius: 20%;
width: 2.5rem;
height: 2.5rem;
font-size: 1.25rem;
cursor: pointer;
display: none;
opacity: 0;
transition: opacity 0.3s, background-color 0.3s;
z-index: 1000;
box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.2);
}
#back-to-top:hover {
background-color: var(--nav-link-hover-background);
color: var(--nav-link-text-hover-color);
}
#back-to-top.visible {
display: block;
opacity: 1;
}
/* Code Block Tabs */
.code-tabs {
margin-top: 10px;
margin-bottom: 10px;
}
.code-tab-header {
display: flex;
background-color: var(--table-header-background-color);
border-top-left-radius: 5px;
border-top-right-radius: 5px;
overflow: hidden;
padding-left: 10px;
padding-top: 5px;
}
.tab-btn {
background-color: var(--tab-background-color);
border: 1px solid transparent;
border-bottom: none;
outline: none;
cursor: pointer;
padding: 8px 16px;
font-family: monospace;
font-size: 0.9rem;
color: var(--tab-text-color);
opacity: 0.9;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
margin-right: 2px;
}
.tab-btn:hover {
opacity: 1;
background-color: var(--tab-hover-background-color);
border-color: var(--table-border-color);
}
.tab-btn.active {
background-color: var(--code-background-color);
border: 1px solid var(--table-border-color);
border-bottom: 1px solid var(--code-background-color);
margin-bottom: -1px;
opacity: 1;
font-weight: bold;
z-index: 2;
}
.code-tabs pre {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.code-content {
display: none;
}
.code-content.active {
display: block;
}
.spoiler{
background-color: gray;
color: transparent;
user-select: none;
}
.spoiler:hover{
background-color: inherit;
color: inherit;
}