diff --git a/bun.lock b/bun.lock index 2e41c7e..0959dc2 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "misc-mdn.dev", @@ -7,6 +8,7 @@ "@fontsource-variable/jetbrains-mono": "^5.2.8", "@fontsource-variable/m-plus-1": "^5.2.10", "@fontsource/noto-color-emoji": "^5.2.12", + "@iconify-json/mdi": "^1.2.3", "@nanostores/persistent": "^0.10.2", "bits-ui": "^2.0.0", "cheerio": "^1.2.0", @@ -128,6 +130,8 @@ "@humanwhocodes/object-schema": ["@humanwhocodes/object-schema@2.0.3", "", {}, "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA=="], + "@iconify-json/mdi": ["@iconify-json/mdi@1.2.3", "", { "dependencies": { "@iconify/types": "*" } }, "sha512-O3cLwbDOK7NNDf2ihaQOH5F9JglnulNDFV7WprU2dSoZu3h3cWH//h74uQAB87brHmvFVxIOkuBX2sZSzYhScg=="], + "@iconify/svelte": ["@iconify/svelte@5.2.1", "", { "dependencies": { "@iconify/types": "^2.0.0" }, "peerDependencies": { "svelte": ">5.0.0" } }, "sha512-zHmsIPmnIhGd5gc95bNN5FL+GifwMZv7M2rlZEpa7IXYGFJm/XGHdWf6PWQa6OBoC+R69WyiPO9NAj5wjfjbow=="], "@iconify/types": ["@iconify/types@2.0.0", "", {}, "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="], diff --git a/package.json b/package.json index afec1b1..ee08bcc 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "@fontsource-variable/jetbrains-mono": "^5.2.8", "@fontsource-variable/m-plus-1": "^5.2.10", "@fontsource/noto-color-emoji": "^5.2.12", + "@iconify-json/mdi": "^1.2.3", "@nanostores/persistent": "^0.10.2", "bits-ui": "^2.0.0", "cheerio": "^1.2.0", diff --git a/src/ambient.d.ts b/src/ambient.d.ts new file mode 100644 index 0000000..a56c53a --- /dev/null +++ b/src/ambient.d.ts @@ -0,0 +1,4 @@ +declare module "the-new-css-reset"; +declare module "@fontsource-variable/m-plus-1"; +declare module "@fontsource-variable/jetbrains-mono"; +declare module "@fontsource/noto-color-emoji"; diff --git a/src/lib/components/BlogDetails.svelte b/src/lib/components/BlogDetails.svelte index 3378e67..00ffd11 100644 --- a/src/lib/components/BlogDetails.svelte +++ b/src/lib/components/BlogDetails.svelte @@ -36,13 +36,13 @@
- - -

公開日:{formatDate(details.publishedAt)}

更新日:{formatDate(details.updatedAt)}

+ + +
{@html rewriteHTML(details.content)}
@@ -61,6 +61,7 @@ :not(h1) { padding-inline: $spacing-2; } + div { display: grid; grid-template-columns: 1fr; @@ -90,6 +91,12 @@ display: block; padding: $spacing-5; } + + #date-at { + display: flex; + flex-direction: column; + padding: $spacing-5; + } } @include mobile { @@ -132,11 +139,7 @@ padding: auto 0; line-height: 1.8; text-align: justify; - - #date-at { - display: flex; - flex-direction: column; - } + margin: $spacing-5 0; } @include mobile { diff --git a/src/lib/components/BlogLink.svelte b/src/lib/components/BlogLink.svelte index 18d2333..65493c1 100644 --- a/src/lib/components/BlogLink.svelte +++ b/src/lib/components/BlogLink.svelte @@ -81,4 +81,8 @@ margin: 5px; font-size: 0.8em; } + + h1:hover { + text-decoration: underline; + } diff --git a/src/lib/components/BlogList.svelte b/src/lib/components/BlogList.svelte index 165b04b..f3a6fd2 100644 --- a/src/lib/components/BlogList.svelte +++ b/src/lib/components/BlogList.svelte @@ -56,6 +56,6 @@ padding: 0 $spacing-8; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); - gap: $spacing-8; + gap: $spacing-10; } diff --git a/src/lib/components/TagAndSort.svelte b/src/lib/components/TagAndSort.svelte index 3faf5ff..83f10ff 100644 --- a/src/lib/components/TagAndSort.svelte +++ b/src/lib/components/TagAndSort.svelte @@ -78,7 +78,7 @@ position: relative; @include mobile { - grid-template-columns: 1fr; + grid-template-columns: 1fr 1fr; } button { diff --git a/src/lib/utils/middlewares/rewriters/add-anchor-copy.ts b/src/lib/utils/middlewares/rewriters/add-anchor-copy.ts index e45bfe6..86a351d 100644 --- a/src/lib/utils/middlewares/rewriters/add-anchor-copy.ts +++ b/src/lib/utils/middlewares/rewriters/add-anchor-copy.ts @@ -15,5 +15,5 @@ export function addAnchorCopy(html: string): string { $elem.prepend(btn); }); - return $.html(); + return $("body").html() ?? html; } diff --git a/src/lib/utils/middlewares/rewriters/figure.ts b/src/lib/utils/middlewares/rewriters/figure.ts index 972ad0e..a369eeb 100644 --- a/src/lib/utils/middlewares/rewriters/figure.ts +++ b/src/lib/utils/middlewares/rewriters/figure.ts @@ -19,5 +19,5 @@ export function processFigure(html: string): string { ); }); - return $.html(); + return $("body").html() ?? html; } diff --git a/src/lib/utils/middlewares/rewriters/highlight.ts b/src/lib/utils/middlewares/rewriters/highlight.ts index 0839713..e0e038e 100644 --- a/src/lib/utils/middlewares/rewriters/highlight.ts +++ b/src/lib/utils/middlewares/rewriters/highlight.ts @@ -35,5 +35,5 @@ export function highlight(html: string): string { $container.addClass("code-block"); }); - return $.html(); + return $("body").html() ?? html; } diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index 0c8a1aa..6651eae 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -1,11 +1,11 @@
-
{$page.status}
+
{page.status}

-

{$page.error?.message}

+

{page.error?.message}