vimd 0.1.9 → 0.1.10

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.
@@ -1,68 +1,671 @@
1
- /* Academic Theme - Paper-style layout */
1
+ /*
2
+ * Academic Theme for vimd
3
+ * LaTeX-inspired styling for academic documents
4
+ * Based on LaTeX.css (https://latex.vercel.app/)
5
+ * MIT License
6
+ */
7
+
8
+ /* ============================================
9
+ CSS Variables for easy customization
10
+ ============================================ */
11
+ :root {
12
+ --academic-text-color: #1a1a1a;
13
+ --academic-bg-color: #ffffff;
14
+ --academic-link-color: #1a0dab;
15
+ --academic-link-hover: #0f0875;
16
+ --academic-border-color: #1a1a1a;
17
+ --academic-muted-color: #555555;
18
+ --academic-code-bg: #f8f8f8;
19
+ --academic-quote-border: #cccccc;
20
+ }
21
+
22
+ /* ============================================
23
+ Base Styles
24
+ ============================================ */
25
+ html {
26
+ background-color: var(--academic-bg-color);
27
+ }
28
+
2
29
  body {
3
- font-family: Georgia, 'Times New Roman', serif;
30
+ font-family: "Latin Modern Roman", "Computer Modern", Georgia, "Times New Roman", serif;
31
+ font-size: 16px;
4
32
  line-height: 1.8;
5
- color: #333;
6
- background: #fff;
7
- max-width: 700px;
33
+ color: var(--academic-text-color);
34
+ background-color: var(--academic-bg-color);
35
+ max-width: 720px;
8
36
  margin: 0 auto;
9
- padding: 3rem;
37
+ padding: 3rem 2rem;
38
+ text-rendering: optimizeLegibility;
39
+ -webkit-font-smoothing: antialiased;
40
+ -moz-osx-font-smoothing: grayscale;
41
+ hyphens: auto;
42
+ -webkit-hyphens: auto;
43
+ -ms-hyphens: auto;
44
+ }
45
+
46
+ /* ============================================
47
+ Typography
48
+ ============================================ */
49
+
50
+ /* Headings */
51
+ body h1,
52
+ body h2,
53
+ body h3,
54
+ body h4,
55
+ body h5,
56
+ body h6 {
57
+ font-family: "Latin Modern Roman", "Computer Modern", Georgia, "Times New Roman", serif;
58
+ font-weight: normal;
59
+ line-height: 1.3;
60
+ margin-top: 2rem;
61
+ margin-bottom: 1rem;
10
62
  }
11
63
 
12
- h1 {
13
- font-size: 2em;
64
+ body h1 {
65
+ font-size: 2.2em;
14
66
  text-align: center;
15
- margin-bottom: 2em;
16
- border-bottom: none;
67
+ margin-top: 0;
68
+ margin-bottom: 1.5em;
69
+ font-weight: bold;
17
70
  }
18
71
 
19
- h2 {
20
- font-size: 1.5em;
21
- margin-top: 2em;
22
- margin-bottom: 0.5em;
72
+ body h2 {
73
+ font-size: 1.6em;
74
+ margin-top: 2.5rem;
75
+ margin-bottom: 0.8rem;
76
+ border-bottom: 1px solid var(--academic-border-color);
77
+ padding-bottom: 0.3rem;
78
+ }
79
+
80
+ body h3 {
81
+ font-size: 1.3em;
82
+ margin-top: 2rem;
83
+ font-style: italic;
23
84
  }
24
85
 
25
- p {
86
+ body h4 {
87
+ font-size: 1.1em;
88
+ margin-top: 1.5rem;
89
+ }
90
+
91
+ body h5 {
92
+ font-size: 1em;
93
+ margin-top: 1.5rem;
94
+ font-style: italic;
95
+ }
96
+
97
+ body h6 {
98
+ font-size: 0.95em;
99
+ margin-top: 1.5rem;
100
+ color: var(--academic-muted-color);
101
+ }
102
+
103
+ /* Paragraphs - LaTeX style with first-line indent */
104
+ body p {
105
+ margin-top: 0;
106
+ margin-bottom: 0;
26
107
  text-align: justify;
27
- margin-bottom: 1em;
108
+ text-indent: 1.5em;
28
109
  }
29
110
 
30
- code {
31
- background: #f9f9f9;
32
- padding: 0.2em 0.4em;
33
- border: 1px solid #e0e0e0;
34
- font-family: 'Courier New', monospace;
111
+ /* No indent for first paragraph after headings */
112
+ body h1 + p,
113
+ body h2 + p,
114
+ body h3 + p,
115
+ body h4 + p,
116
+ body h5 + p,
117
+ body h6 + p,
118
+ body hr + p,
119
+ body blockquote + p,
120
+ body pre + p,
121
+ body ul + p,
122
+ body ol + p,
123
+ body dl + p,
124
+ body table + p,
125
+ body figure + p {
126
+ text-indent: 0;
127
+ }
128
+
129
+ /* Add vertical space between paragraphs when needed */
130
+ body p + p {
131
+ margin-top: 0;
132
+ }
133
+
134
+ /* ============================================
135
+ Links
136
+ ============================================ */
137
+ body a {
138
+ color: var(--academic-link-color);
139
+ text-decoration: none;
140
+ }
141
+
142
+ body a:hover {
143
+ color: var(--academic-link-hover);
144
+ text-decoration: underline;
145
+ }
146
+
147
+ body a:visited {
148
+ color: #660099;
149
+ }
150
+
151
+ /* ============================================
152
+ Lists
153
+ ============================================ */
154
+ body ul,
155
+ body ol {
156
+ margin-top: 0.5rem;
157
+ margin-bottom: 1rem;
158
+ padding-left: 2em;
159
+ }
160
+
161
+ body li {
162
+ margin-bottom: 0.3em;
163
+ text-align: justify;
164
+ }
165
+
166
+ body li > p {
167
+ text-indent: 0;
168
+ margin-bottom: 0.5em;
169
+ }
170
+
171
+ body ul ul,
172
+ body ol ol,
173
+ body ul ol,
174
+ body ol ul {
175
+ margin-top: 0.3em;
176
+ margin-bottom: 0.3em;
177
+ }
178
+
179
+ /* Definition lists */
180
+ body dl {
181
+ margin-top: 0.5rem;
182
+ margin-bottom: 1rem;
183
+ }
184
+
185
+ body dt {
186
+ font-weight: bold;
187
+ margin-top: 0.8em;
188
+ }
189
+
190
+ body dd {
191
+ margin-left: 2em;
192
+ margin-bottom: 0.5em;
193
+ }
194
+
195
+ /* ============================================
196
+ Blockquotes
197
+ ============================================ */
198
+ body blockquote {
199
+ margin: 1.5rem 0;
200
+ padding: 0.5rem 0 0.5rem 1.5rem;
201
+ border-left: 3px solid var(--academic-quote-border);
202
+ font-style: italic;
203
+ color: var(--academic-muted-color);
204
+ }
205
+
206
+ body blockquote p {
207
+ text-indent: 0;
208
+ margin-bottom: 0.5em;
209
+ }
210
+
211
+ body blockquote p:last-child {
212
+ margin-bottom: 0;
213
+ }
214
+
215
+ body blockquote cite {
216
+ display: block;
217
+ margin-top: 0.5rem;
218
+ font-style: normal;
35
219
  font-size: 0.9em;
36
220
  }
37
221
 
38
- pre {
39
- background: #f9f9f9;
40
- padding: 1em;
222
+ body blockquote cite::before {
223
+ content: "— ";
224
+ }
225
+
226
+ /* ============================================
227
+ Code
228
+ ============================================ */
229
+
230
+ /* Inline code */
231
+ body code,
232
+ body tt {
233
+ font-family: "Latin Modern Mono", "Computer Modern Typewriter", "Courier New", Courier, monospace;
234
+ font-size: 0.9em;
235
+ background-color: var(--academic-code-bg);
236
+ padding: 0.15em 0.4em;
237
+ border: 1px solid #e0e0e0;
238
+ border-radius: 2px;
239
+ }
240
+
241
+ /* Code blocks */
242
+ body pre {
243
+ font-family: "Latin Modern Mono", "Computer Modern Typewriter", "Courier New", Courier, monospace;
244
+ font-size: 0.85em;
245
+ line-height: 1.5;
246
+ background-color: var(--academic-code-bg);
41
247
  border: 1px solid #e0e0e0;
248
+ border-radius: 2px;
249
+ padding: 1em;
250
+ margin: 1.5rem 0;
42
251
  overflow-x: auto;
43
252
  }
44
253
 
45
- blockquote {
46
- border-left: 3px solid #ccc;
47
- padding-left: 1em;
48
- font-style: italic;
49
- color: #666;
50
- margin: 1.5em 0;
254
+ body pre code {
255
+ background: transparent;
256
+ border: none;
257
+ padding: 0;
258
+ font-size: inherit;
51
259
  }
52
260
 
53
- table {
261
+ /* ============================================
262
+ Tables
263
+ ============================================ */
264
+ body table {
54
265
  border-collapse: collapse;
55
266
  width: 100%;
56
- margin: 1.5em 0;
267
+ margin: 1.5rem 0;
268
+ font-size: 0.95em;
57
269
  }
58
270
 
59
- th, td {
60
- border: 1px solid #ddd;
61
- padding: 0.5em;
271
+ body table caption {
272
+ caption-side: bottom;
273
+ padding: 0.5rem;
274
+ font-style: italic;
275
+ font-size: 0.9em;
276
+ color: var(--academic-muted-color);
277
+ }
278
+
279
+ body th,
280
+ body td {
281
+ padding: 0.5rem 0.75rem;
62
282
  text-align: left;
283
+ border-top: 1px solid var(--academic-border-color);
284
+ border-bottom: 1px solid var(--academic-border-color);
285
+ }
286
+
287
+ body th {
288
+ font-weight: bold;
289
+ border-bottom: 2px solid var(--academic-border-color);
63
290
  }
64
291
 
65
- th {
66
- background: #f5f5f5;
67
- font-weight: 600;
292
+ body tr:first-child th,
293
+ body tr:first-child td {
294
+ border-top: 2px solid var(--academic-border-color);
295
+ }
296
+
297
+ body tr:last-child td {
298
+ border-bottom: 2px solid var(--academic-border-color);
299
+ }
300
+
301
+ /* ============================================
302
+ Horizontal Rules
303
+ ============================================ */
304
+ body hr {
305
+ border: none;
306
+ border-top: 1px solid var(--academic-border-color);
307
+ margin: 2rem 0;
308
+ }
309
+
310
+ /* ============================================
311
+ Images & Figures
312
+ ============================================ */
313
+ body img {
314
+ max-width: 100%;
315
+ height: auto;
316
+ display: block;
317
+ margin: 1.5rem auto;
318
+ }
319
+
320
+ body figure {
321
+ margin: 2rem 0;
322
+ text-align: center;
323
+ }
324
+
325
+ body figure img {
326
+ margin: 0 auto 0.5rem;
327
+ }
328
+
329
+ body figcaption {
330
+ font-style: italic;
331
+ font-size: 0.9em;
332
+ color: var(--academic-muted-color);
333
+ }
334
+
335
+ /* ============================================
336
+ Table of Contents (Pandoc)
337
+ ============================================ */
338
+ nav#TOC {
339
+ margin: 2rem 0;
340
+ padding: 1rem 1.5rem;
341
+ border: 1px solid var(--academic-border-color);
342
+ }
343
+
344
+ nav#TOC::before {
345
+ content: "Contents";
346
+ display: block;
347
+ font-weight: bold;
348
+ font-size: 1.1em;
349
+ margin-bottom: 0.8rem;
350
+ text-align: center;
351
+ }
352
+
353
+ nav#TOC > ul {
354
+ margin: 0;
355
+ padding-left: 0;
356
+ list-style: none;
357
+ }
358
+
359
+ nav#TOC ul {
360
+ padding-left: 1.5em;
361
+ list-style: none;
362
+ }
363
+
364
+ nav#TOC li {
365
+ margin: 0.4em 0;
366
+ line-height: 1.4;
367
+ }
368
+
369
+ nav#TOC a {
370
+ color: var(--academic-text-color);
371
+ text-decoration: none;
372
+ }
373
+
374
+ nav#TOC a:hover {
375
+ color: var(--academic-link-color);
376
+ text-decoration: underline;
377
+ }
378
+
379
+ /* ============================================
380
+ Footnotes (Pandoc)
381
+ ============================================ */
382
+ .footnotes {
383
+ margin-top: 3rem;
384
+ padding-top: 1rem;
385
+ border-top: 1px solid var(--academic-border-color);
386
+ font-size: 0.9em;
387
+ }
388
+
389
+ .footnotes hr {
390
+ display: none;
391
+ }
392
+
393
+ .footnotes ol {
394
+ padding-left: 1.5em;
395
+ }
396
+
397
+ .footnotes li {
398
+ margin-bottom: 0.5em;
399
+ }
400
+
401
+ .footnote-ref {
402
+ font-size: 0.75em;
403
+ vertical-align: super;
404
+ text-decoration: none;
405
+ }
406
+
407
+ .footnote-back {
408
+ margin-left: 0.3em;
409
+ }
410
+
411
+ /* ============================================
412
+ Abstract (custom class)
413
+ ============================================ */
414
+ .abstract {
415
+ margin: 2rem 3rem;
416
+ font-size: 0.95em;
417
+ }
418
+
419
+ .abstract::before {
420
+ content: "Abstract";
421
+ display: block;
422
+ font-weight: bold;
423
+ text-align: center;
424
+ margin-bottom: 0.5rem;
425
+ }
426
+
427
+ .abstract p {
428
+ text-indent: 0;
429
+ }
430
+
431
+ /* ============================================
432
+ Pandoc Syntax Highlighting - minted style
433
+ ============================================ */
434
+ div.sourceCode {
435
+ background-color: var(--academic-code-bg);
436
+ border: 1px solid #e0e0e0;
437
+ border-radius: 2px;
438
+ overflow: auto;
439
+ }
440
+
441
+ pre.sourceCode {
442
+ margin: 0;
443
+ padding: 1em;
444
+ border: none;
445
+ }
446
+
447
+ code.sourceCode {
448
+ background: transparent;
449
+ color: var(--academic-text-color);
450
+ }
451
+
452
+ /* Comments - italic gray */
453
+ code.sourceCode span.co,
454
+ .sourceCode .co {
455
+ color: #6a737d;
456
+ font-style: italic;
457
+ }
458
+
459
+ /* Strings - dark red/maroon */
460
+ code.sourceCode span.st,
461
+ code.sourceCode span.ch,
462
+ code.sourceCode span.vs,
463
+ .sourceCode .st,
464
+ .sourceCode .ch,
465
+ .sourceCode .vs {
466
+ color: #b31d28;
467
+ }
468
+
469
+ /* Keywords - bold blue */
470
+ code.sourceCode span.kw,
471
+ code.sourceCode span.cf,
472
+ .sourceCode .kw,
473
+ .sourceCode .cf {
474
+ color: #005cc5;
475
+ font-weight: bold;
476
+ }
477
+
478
+ /* Numbers and constants */
479
+ code.sourceCode span.dv,
480
+ code.sourceCode span.bn,
481
+ code.sourceCode span.fl,
482
+ code.sourceCode span.cn,
483
+ .sourceCode .dv,
484
+ .sourceCode .bn,
485
+ .sourceCode .fl,
486
+ .sourceCode .cn {
487
+ color: #005cc5;
488
+ }
489
+
490
+ /* Functions */
491
+ code.sourceCode span.fu,
492
+ code.sourceCode span.bu,
493
+ .sourceCode .fu,
494
+ .sourceCode .bu {
495
+ color: #6f42c1;
496
+ }
497
+
498
+ /* Variables */
499
+ code.sourceCode span.va,
500
+ .sourceCode .va {
501
+ color: #e36209;
502
+ }
503
+
504
+ /* Data types */
505
+ code.sourceCode span.dt,
506
+ .sourceCode .dt {
507
+ color: #005cc5;
508
+ }
509
+
510
+ /* Operators */
511
+ code.sourceCode span.op,
512
+ .sourceCode .op {
513
+ color: var(--academic-text-color);
514
+ }
515
+
516
+ /* Attributes / Decorators */
517
+ code.sourceCode span.at,
518
+ .sourceCode .at {
519
+ color: #22863a;
520
+ }
521
+
522
+ /* Preprocessor */
523
+ code.sourceCode span.pp,
524
+ code.sourceCode span.im,
525
+ .sourceCode .pp,
526
+ .sourceCode .im {
527
+ color: #005cc5;
528
+ font-weight: bold;
529
+ }
530
+
531
+ /* Special characters */
532
+ code.sourceCode span.sc,
533
+ code.sourceCode span.ss,
534
+ .sourceCode .sc,
535
+ .sourceCode .ss {
536
+ color: #b31d28;
537
+ }
538
+
539
+ /* Annotations and documentation */
540
+ code.sourceCode span.an,
541
+ code.sourceCode span.do,
542
+ .sourceCode .an,
543
+ .sourceCode .do {
544
+ color: #6a737d;
545
+ font-style: italic;
546
+ }
547
+
548
+ /* Errors */
549
+ code.sourceCode span.er,
550
+ code.sourceCode span.al,
551
+ .sourceCode .er,
552
+ .sourceCode .al {
553
+ color: #cb2431;
554
+ font-weight: bold;
555
+ }
556
+
557
+ /* Warnings */
558
+ code.sourceCode span.wa,
559
+ .sourceCode .wa {
560
+ color: #b08800;
561
+ }
562
+
563
+ /* Information */
564
+ code.sourceCode span.in,
565
+ .sourceCode .in {
566
+ color: #6a737d;
567
+ font-style: italic;
568
+ }
569
+
570
+ /* ============================================
571
+ Strong and Emphasis
572
+ ============================================ */
573
+ body strong,
574
+ body b {
575
+ font-weight: bold;
576
+ }
577
+
578
+ body em,
579
+ body i {
580
+ font-style: italic;
581
+ }
582
+
583
+ /* ============================================
584
+ Keyboard and Mark
585
+ ============================================ */
586
+ body kbd {
587
+ font-family: "Latin Modern Mono", "Computer Modern Typewriter", "Courier New", Courier, monospace;
588
+ font-size: 0.85em;
589
+ padding: 0.15em 0.4em;
590
+ border: 1px solid #c6c6c6;
591
+ border-radius: 3px;
592
+ background-color: #f7f7f7;
593
+ box-shadow: inset 0 -1px 0 #bbb;
594
+ }
595
+
596
+ body mark {
597
+ background-color: #fff3cd;
598
+ padding: 0.1em 0.2em;
599
+ }
600
+
601
+ /* ============================================
602
+ Selection
603
+ ============================================ */
604
+ ::selection {
605
+ background-color: #b4d5fe;
606
+ color: var(--academic-text-color);
607
+ }
608
+
609
+ /* ============================================
610
+ Print Styles
611
+ ============================================ */
612
+ @media print {
613
+ body {
614
+ max-width: 100%;
615
+ padding: 1cm;
616
+ font-size: 11pt;
617
+ }
618
+
619
+ body a {
620
+ color: var(--academic-text-color);
621
+ text-decoration: underline;
622
+ }
623
+
624
+ body a[href^="http"]::after {
625
+ content: " (" attr(href) ")";
626
+ font-size: 0.8em;
627
+ color: var(--academic-muted-color);
628
+ }
629
+
630
+ nav#TOC {
631
+ page-break-after: always;
632
+ }
633
+
634
+ body h2,
635
+ body h3 {
636
+ page-break-after: avoid;
637
+ }
638
+
639
+ body pre,
640
+ body blockquote,
641
+ body table {
642
+ page-break-inside: avoid;
643
+ }
644
+ }
645
+
646
+ /* ============================================
647
+ Responsive
648
+ ============================================ */
649
+ @media (max-width: 768px) {
650
+ body {
651
+ padding: 1.5rem 1rem;
652
+ font-size: 15px;
653
+ }
654
+
655
+ body h1 {
656
+ font-size: 1.8em;
657
+ }
658
+
659
+ body h2 {
660
+ font-size: 1.4em;
661
+ }
662
+
663
+ body blockquote {
664
+ margin-left: 0;
665
+ margin-right: 0;
666
+ }
667
+
668
+ .abstract {
669
+ margin: 1.5rem 1rem;
670
+ }
68
671
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vimd",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Real-time Markdown preview tool with pandoc (view markdown)",
5
5
  "type": "module",
6
6
  "keywords": [