@limcpf/everything-is-a-markdown 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limcpf/everything-is-a-markdown",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "type": "module",
@@ -60,6 +60,10 @@
60
60
  --sidebar-mobile-shadow: 0 24px 48px rgba(76, 79, 105, 0.2);
61
61
  --accent-hover: #7030d0;
62
62
  --accent-strong: #6732ca;
63
+ --badge-new-bg: var(--latte-red);
64
+ --badge-new-fg: #ffffff;
65
+ --mobile-toggle-bg: var(--latte-mauve);
66
+ --mobile-toggle-fg: #ffffff;
63
67
  --desktop-sidebar-default: 420px;
64
68
  --desktop-sidebar-min: 320px;
65
69
  --desktop-viewer-min: 680px;
@@ -103,6 +107,10 @@
103
107
  --sidebar-mobile-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
104
108
  --accent-hover: #a985f6;
105
109
  --accent-strong: #dfcbff;
110
+ --badge-new-bg: var(--mocha-red);
111
+ --badge-new-fg: var(--mocha-crust);
112
+ --mobile-toggle-bg: var(--mocha-mauve);
113
+ --mobile-toggle-fg: var(--mocha-crust);
106
114
  }
107
115
 
108
116
  * {
@@ -483,7 +491,7 @@ a:hover {
483
491
  font-size: 0.68rem;
484
492
  font-weight: 600;
485
493
  letter-spacing: 0.02em;
486
- color: var(--latte-overlay1);
494
+ color: var(--latte-subtext1);
487
495
  }
488
496
 
489
497
  .tree-label {
@@ -534,8 +542,8 @@ a:hover {
534
542
  letter-spacing: 0.03em;
535
543
  padding: 2px 6px;
536
544
  border-radius: 999px;
537
- color: white;
538
- background: var(--latte-red);
545
+ color: var(--badge-new-fg);
546
+ background: var(--badge-new-bg);
539
547
  }
540
548
 
541
549
  /* Active badge */
@@ -590,7 +598,7 @@ a:hover {
590
598
 
591
599
  .status-encoding {
592
600
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
593
- color: var(--latte-overlay0);
601
+ color: var(--latte-subtext1);
594
602
  }
595
603
 
596
604
  .sidebar-footer-actions {
@@ -739,8 +747,8 @@ a:hover {
739
747
  gap: 6px;
740
748
  border: 0;
741
749
  border-radius: 999px;
742
- background: var(--latte-mauve);
743
- color: #fff;
750
+ background: var(--mobile-toggle-bg);
751
+ color: var(--mobile-toggle-fg);
744
752
  min-height: 48px;
745
753
  padding: 0 16px;
746
754
  font-size: 0.9rem;
@@ -837,7 +845,7 @@ body.mobile-toggle-left .mobile-menu-toggle {
837
845
  min-height: 22px;
838
846
  font-size: 0.85rem;
839
847
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
840
- color: var(--latte-subtext0);
848
+ color: var(--latte-subtext1);
841
849
  }
842
850
 
843
851
  .meta-item {
@@ -855,7 +863,7 @@ body.mobile-toggle-left .mobile-menu-toggle {
855
863
  font-size: 0.74rem;
856
864
  font-weight: 700;
857
865
  letter-spacing: 0.03em;
858
- color: var(--latte-overlay1);
866
+ color: var(--latte-subtext1);
859
867
  }
860
868
 
861
869
  .meta-tags {
@@ -873,7 +881,7 @@ body.mobile-toggle-left .mobile-menu-toggle {
873
881
  max-width: 72ch;
874
882
  margin: 0 auto;
875
883
  text-wrap: pretty;
876
- color: var(--latte-subtext0);
884
+ color: var(--latte-subtext1);
877
885
  }
878
886
 
879
887
  .viewer-content h1,
@@ -930,7 +938,7 @@ body.mobile-toggle-left .mobile-menu-toggle {
930
938
  background: rgba(230, 233, 239, 0.5);
931
939
  border-radius: 0 8px 8px 0;
932
940
  font-style: normal;
933
- color: var(--latte-subtext0);
941
+ color: var(--latte-subtext1);
934
942
  }
935
943
 
936
944
  /* Inline code */
@@ -889,11 +889,15 @@ async function start() {
889
889
  }
890
890
 
891
891
  if (!isCompactLayout()) {
892
- sidebar.removeAttribute("aria-hidden");
892
+ sidebar.removeAttribute("inert");
893
893
  return;
894
894
  }
895
895
 
896
- sidebar.setAttribute("aria-hidden", String(!isOpen));
896
+ if (isOpen) {
897
+ sidebar.removeAttribute("inert");
898
+ } else {
899
+ sidebar.setAttribute("inert", "");
900
+ }
897
901
  };
898
902
 
899
903
  const openSidebar = () => {
package/src/template.ts CHANGED
@@ -199,7 +199,9 @@ export function renderAppShellHtml(
199
199
  ${headMeta}
200
200
  <link rel="preconnect" href="https://fonts.googleapis.com" />
201
201
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
202
- <link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" />
202
+ <link rel="preload" as="style" href="${escapeHtmlAttribute(symbolFontStylesheet)}" />
203
+ <link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" media="print" onload="this.media='all'" />
204
+ <noscript><link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" /></noscript>
203
205
  <link rel="stylesheet" href="${escapeHtmlAttribute(assets.cssHref)}" />
204
206
  </head>
205
207
  <body>
@@ -330,7 +332,9 @@ export function render404Html(assets: AppShellAssets = DEFAULT_ASSETS): string {
330
332
  <title>404 - File-System Blog</title>
331
333
  <link rel="preconnect" href="https://fonts.googleapis.com" />
332
334
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
333
- <link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" />
335
+ <link rel="preload" as="style" href="${escapeHtmlAttribute(symbolFontStylesheet)}" />
336
+ <link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" media="print" onload="this.media='all'" />
337
+ <noscript><link rel="stylesheet" href="${escapeHtmlAttribute(symbolFontStylesheet)}" /></noscript>
334
338
  <link rel="stylesheet" href="${escapeHtmlAttribute(assets.cssHref)}" />
335
339
  </head>
336
340
  <body>