-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
650 lines (568 loc) · 15.2 KB
/
styles.css
File metadata and controls
650 lines (568 loc) · 15.2 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
:root {
--bg-color: #ffffff;
--editor-bg: #f6f8fa;
--preview-bg: #ffffff; /* Preview background for light mode */
--text-color: #24292e;
--preview-text-color: #24292e; /* Text color for preview in light mode */
--border-color: #e1e4e8;
--header-bg: #f6f8fa;
--button-bg: #f6f8fa;
--button-hover: #e1e4e8;
--button-active: #d1d5da;
--dropzone-bg: rgba(255, 255, 255, 0.8);
--scrollbar-thumb: #c1c1c1;
--scrollbar-track: #f1f1f1;
--accent-color: #0366d6;
--table-bg: #ffffff; /* Table background for light mode */
--code-bg: #f6f8fa; /* Code block background for light mode */
}
[data-theme="dark"] {
--bg-color: #0d1117;
--editor-bg: #161b22;
--preview-bg: #0d1117; /* Preview background for dark mode */
--text-color: #c9d1d9;
--preview-text-color: #c9d1d9; /* Text color for preview in dark mode */
--border-color: #30363d;
--header-bg: #161b22;
--button-bg: #21262d;
--button-hover: #30363d;
--button-active: #3b434b;
--dropzone-bg: rgba(13, 17, 23, 0.8);
--scrollbar-thumb: #484f58;
--scrollbar-track: #21262d;
--accent-color: #58a6ff;
--table-bg: #161b22; /* Table background for dark mode */
--code-bg: #161b22; /* Code block background for dark mode */
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
transition: background-color 0.3s ease, color 0.3s ease;
min-height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}
.app-header {
background-color: var(--header-bg);
border-bottom: 1px solid var(--border-color);
padding: 1rem;
transition: background-color 0.3s ease;
position: sticky;
top: 0;
z-index: 100;
}
.app-container {
height: 100vh;
display: flex;
flex-direction: column;
}
.content-container {
display: flex;
flex: 1;
overflow: hidden;
}
.editor-pane, .preview-pane {
flex: 1;
padding: 20px;
overflow-y: auto;
position: relative;
transition: background-color 0.3s ease;
}
.editor-pane {
background-color: var(--editor-bg);
border-right: 1px solid var(--border-color);
padding-right: 0px;
}
.preview-pane {
background-color: var(--preview-bg); /* Using the new variable for preview background */
}
/* Custom scrollbar */
.editor-pane::-webkit-scrollbar,
.preview-pane::-webkit-scrollbar,
#markdown-editor::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.editor-pane::-webkit-scrollbar-track,
.preview-pane::-webkit-scrollbar-track,
#markdown-editor::-webkit-scrollbar-track {
background: var(--scrollbar-track);
}
.editor-pane::-webkit-scrollbar-thumb,
.preview-pane::-webkit-scrollbar-thumb,
#markdown-editor::-webkit-scrollbar-thumb {
background: var(--scrollbar-thumb);
border-radius: 4px;
}
.editor-pane::-webkit-scrollbar-thumb:hover,
.preview-pane::-webkit-scrollbar-thumb:hover,
#markdown-editor::-webkit-scrollbar-thumb:hover {
background: var(--button-active);
}
#markdown-editor {
width: 100%;
height: 100%;
border: none;
background-color: var(--editor-bg);
color: var(--text-color);
resize: none;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
font-size: 14px;
line-height: 1.5;
padding: 10px;
transition: background-color 0.3s ease, color 0.3s ease;
overflow-y: auto;
}
#markdown-editor:focus {
outline: none;
}
.preview-pane {
padding: 20px;
}
.markdown-body {
padding: 20px;
width: 100%;
background-color: var(--preview-bg); /* Ensuring the markdown content matches preview background */
color: var(--preview-text-color); /* Using specific text color for preview content */
}
/* Style tables in light mode */
.markdown-body table {
background-color: var(--table-bg);
border-color: var(--border-color);
}
.markdown-body table tr {
background-color: var(--table-bg);
border-top: 1px solid var(--border-color);
}
.markdown-body table tr:nth-child(2n) {
background-color: var(--bg-color);
}
/* Style code blocks in light mode */
.markdown-body pre {
background-color: var(--code-bg);
border-radius: 6px;
}
.markdown-body code {
background-color: var(--code-bg);
border-radius: 3px;
padding: 0.2em 0.4em;
}
.toolbar {
display: flex;
gap: 8px;
}
.tool-button {
background-color: var(--button-bg);
border: 1px solid var(--border-color);
color: var(--text-color);
border-radius: 6px;
padding: 6px 12px;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
gap: 4px;
transition: all 0.2s ease;
}
.tool-button:hover {
background-color: var(--button-hover);
}
.tool-button:active {
background-color: var(--button-active);
}
.tool-button i {
font-size: 16px;
}
.file-input {
display: none;
}
.dropzone {
border: 2px dashed var(--border-color);
border-radius: 6px;
padding: 20px;
text-align: center;
margin-bottom: 20px;
cursor: pointer;
transition: all 0.3s ease;
background-color: var(--dropzone-bg);
}
.dropzone.active {
border-color: var(--accent-color);
background-color: rgba(var(--accent-color), 0.05);
}
.dropzone p {
transition: transform 0.2s ease;
}
.dropzone:hover p {
transform: scale(1.02);
}
/* Dropdown improvements */
.dropdown-menu {
background-color: var(--bg-color);
border-color: var(--border-color);
}
.dropdown-item {
color: var(--text-color);
}
.dropdown-item:hover, .dropdown-item:focus {
background-color: var(--button-hover);
color: var(--text-color);
}
/* Responsive design for mobile */
@media (max-width: 1080px) {
.content-container {
flex-direction: column;
}
.editor-pane, .preview-pane {
flex: none;
height: 50%;
border-right: none;
}
.editor-pane {
border-bottom: 1px solid var(--border-color);
}
.toolbar {
flex-wrap: wrap;
justify-content: center;
gap: 1rem;
}
}
/* Loading indicators */
.loading {
opacity: 0.6;
pointer-events: none;
}
/* Focus outline for accessibility */
button:focus,
a:focus {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
}
/* Animation for copied message */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
/* Tooltip styles */
.tooltip {
position: absolute;
background: var(--button-bg);
border: 1px solid var(--border-color);
padding: 5px 8px;
border-radius: 4px;
font-size: 12px;
z-index: 1000;
animation: fadeIn 0.2s ease;
}
/* Styles for GitHub markdown preview light mode */
.markdown-body {
color-scheme: light;
--color-prettylights-syntax-comment: #6a737d;
--color-prettylights-syntax-constant: #005cc5;
--color-prettylights-syntax-entity: #6f42c1;
--color-prettylights-syntax-storage-modifier-import: #24292e;
--color-prettylights-syntax-entity-tag: #22863a;
--color-prettylights-syntax-keyword: #d73a49;
--color-prettylights-syntax-string: #032f62;
--color-prettylights-syntax-variable: #e36209;
--color-prettylights-syntax-brackethighlighter-unmatched: #b31d28;
--color-prettylights-syntax-invalid-illegal-text: #fafbfc;
--color-prettylights-syntax-invalid-illegal-bg: #b31d28;
--color-prettylights-syntax-carriage-return-text: #fafbfc;
--color-prettylights-syntax-carriage-return-bg: #d73a49;
--color-prettylights-syntax-string-regexp: #22863a;
--color-prettylights-syntax-markup-list: #735c0f;
--color-prettylights-syntax-markup-heading: #005cc5;
--color-prettylights-syntax-markup-italic: #24292e;
--color-prettylights-syntax-markup-bold: #24292e;
--color-prettylights-syntax-markup-deleted-text: #b31d28;
--color-prettylights-syntax-markup-deleted-bg: #ffeef0;
--color-prettylights-syntax-markup-inserted-text: #22863a;
--color-prettylights-syntax-markup-inserted-bg: #f0fff4;
--color-prettylights-syntax-markup-changed-text: #e36209;
--color-prettylights-syntax-markup-changed-bg: #ffebda;
--color-prettylights-syntax-markup-ignored-text: #f6f8fa;
--color-prettylights-syntax-markup-ignored-bg: #005cc5;
--color-prettylights-syntax-meta-diff-range: #6f42c1;
--color-prettylights-syntax-brackethighlighter-angle: #586069;
--color-prettylights-syntax-sublimelinter-gutter-mark: #e1e4e8;
--color-prettylights-syntax-constant-other-reference-link: #032f62;
--color-fg-default: #24292e;
--color-fg-muted: #586069;
--color-fg-subtle: #6a737d;
--color-canvas-default: #ffffff;
--color-canvas-subtle: #f6f8fa;
--color-border-default: #e1e4e8;
--color-border-muted: #eaecef;
--color-neutral-muted: rgba(175,184,193,0.2);
--color-accent-fg: #0366d6;
--color-accent-emphasis: #0366d6;
--color-attention-subtle: #fff5b1;
--color-danger-fg: #d73a49;
}
/* Styles for GitHub markdown preview dark mode */
[data-theme="dark"] .markdown-body {
color-scheme: dark;
--color-prettylights-syntax-comment: #8b949e;
--color-prettylights-syntax-constant: #79c0ff;
--color-prettylights-syntax-entity: #d2a8ff;
--color-prettylights-syntax-storage-modifier-import: #c9d1d9;
--color-prettylights-syntax-entity-tag: #7ee787;
--color-prettylights-syntax-keyword: #ff7b72;
--color-prettylights-syntax-string: #a5d6ff;
--color-prettylights-syntax-variable: #ffa657;
--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
--color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
--color-prettylights-syntax-invalid-illegal-bg: #8e1519;
--color-prettylights-syntax-carriage-return-text: #f0f6fc;
--color-prettylights-syntax-carriage-return-bg: #b62324;
--color-prettylights-syntax-string-regexp: #7ee787;
--color-prettylights-syntax-markup-list: #f2cc60;
--color-prettylights-syntax-markup-heading: #1f6feb;
--color-prettylights-syntax-markup-italic: #c9d1d9;
--color-prettylights-syntax-markup-bold: #c9d1d9;
--color-prettylights-syntax-markup-deleted-text: #ffdcd7;
--color-prettylights-syntax-markup-deleted-bg: #67060c;
--color-prettylights-syntax-markup-inserted-text: #aff5b4;
--color-prettylights-syntax-markup-inserted-bg: #033a16;
--color-prettylights-syntax-markup-changed-text: #ffdfb6;
--color-prettylights-syntax-markup-changed-bg: #5a1e02;
--color-prettylights-syntax-markup-ignored-text: #c9d1d9;
--color-prettylights-syntax-markup-ignored-bg: #1158c7;
--color-prettylights-syntax-meta-diff-range: #d2a8ff;
--color-prettylights-syntax-brackethighlighter-angle: #8b949e;
--color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
--color-fg-default: #c9d1d9;
--color-fg-muted: #8b949e;
--color-fg-subtle: #484f58;
--color-canvas-default: #0d1117;
--color-canvas-subtle: #161b22;
--color-border-default: #30363d;
--color-border-muted: #21262d;
--color-neutral-muted: rgba(110,118,129,0.4);
--color-accent-fg: #58a6ff;
--color-accent-emphasis: #1f6feb;
--color-attention-subtle: rgba(187,128,9,0.15);
--color-danger-fg: #f85149;
}
/* Override specific styles for dark mode tables and code */
[data-theme="dark"] .markdown-body table tr {
background-color: var(--table-bg);
}
[data-theme="dark"] .markdown-body table tr:nth-child(2n) {
background-color: #1c2128; /* Slightly lighter than base dark background */
}
[data-theme="dark"] .markdown-body pre {
background-color: var(--code-bg);
}
[data-theme="dark"] .markdown-body code {
background-color: var(--code-bg);
}
[data-theme="dark"] .hljs {
color: #e8eaed;
}
.stats-container {
font-size: 0.9rem;
color: var(--text-color);
}
.stat-item {
align-items: center;
}
.stat-item i {
font-size: 1rem;
opacity: 0.8;
}
.dropzone {
border: 2px dashed var(--border-color);
border-radius: 6px;
padding: 20px;
text-align: center;
margin-bottom: 10px;
cursor: pointer;
transition: all 0.3s ease;
background-color: var(--dropzone-bg);
position: relative;
}
.dropzone.active {
border-color: var(--accent-color);
background-color: rgba(var(--accent-color), 0.05);
}
.dropzone p {
transition: transform 0.2s ease;
}
.dropzone:hover {
border: var(--accent-color) 2px dashed;
}
.dropzone:hover p {
transform: scale(1.02);
}
.close-btn {
position: absolute;
top: 5px;
right: 5px;
background: none;
border: none;
color: var(--text-color);
font-size: 1rem;
cursor: pointer;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
width: 28px;
height: 28px;
opacity: 0.6;
transition: all 0.2s ease;
background-color: var(--button-bg);
border: 1px solid var(--border-color);
}
.close-btn:hover {
opacity: 1;
background-color: var(--color-danger-fg);
}
.editor-pane {
overflow: hidden;
}
/* Mobile Menu Styles */
.mobile-menu {
display: none;
position: relative;
z-index: 1001;
}
@media (max-width: 1080px) {
.mobile-menu {
display: block;
}
}
/* slide‑in panel */
.mobile-menu-panel {
position: fixed;
top: 0;
right: -300px;
width: 280px;
height: 100vh;
background-color: var(--bg-color);
box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
transition: right 0.3s ease;
overflow-y: auto;
padding: 1rem;
display: flex;
flex-direction: column;
z-index: 1002;
}
.mobile-menu-panel.active {
right: 0;
}
/* translucent overlay behind panel */
.mobile-menu-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
visibility: hidden;
transition: opacity 0.3s ease, visibility 0.3s ease;
z-index: 1000;
}
.mobile-menu-overlay.active {
display: block;
opacity: 1;
visibility: visible;
}
/* header inside mobile menu */
.mobile-menu-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.mobile-menu-header h5 {
margin: 0;
font-size: 1.25rem;
color: var(--text-color);
}
/* stats section in mobile menu */
.mobile-stats-container {
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.75rem;
margin-bottom: 1rem;
}
.mobile-stats-container .stat-item {
font-size: 0.9rem;
color: var(--text-color);
display: flex;
align-items: center;
}
.mobile-stats-container .stat-item i {
margin-right: 0.5em;
opacity: 0.8;
}
/* menu buttons list */
.mobile-menu-items {
display: flex;
flex-direction: column;
gap: 0.5rem;
flex-grow: 1;
}
/* each menu item */
.mobile-menu-item {
background-color: var(--button-bg);
border: 1px solid var(--border-color);
color: var(--text-color);
border-radius: 6px;
padding: 0.6rem 1rem;
font-size: 1rem;
text-align: left;
display: flex;
align-items: center;
gap: 0.5rem;
transition: background-color 0.2s ease;
cursor: pointer;
}
.mobile-menu-item:hover {
background-color: var(--button-hover);
}
.mobile-menu-item:active {
background-color: var(--button-active);
}
/* close button override */
#close-mobile-menu.tool-button {
padding: 0.25rem 0.5rem;
font-size: 1rem;
}
/* ensure dropzone doesn’t cover menu */
.mobile-menu-panel .dropzone {
margin-bottom: 0;
}
/* hide desktop-only stats and toolbar on mobile */
@media (max-width: 767px) {
.stats-container.d-none.d-md-flex,
.toolbar.d-none.d-md-flex {
display: none !important;
}
}
.github-link {
color: var(--text-color);
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.2s ease, color 0.2s ease;
margin-right: 2rem;
}
.github-link:hover {
color: var(--accent-color);
transform: scale(1.1);
}
.github-link i {
font-size: 1.5rem;
}