From 5503f812ec26e5d034a3f9ef6ed12da71bc57c2b Mon Sep 17 00:00:00 2001 From: moris Date: Mon, 10 Mar 2025 09:54:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A1=E3=82=BF=E3=83=87=E3=83=BC=E3=82=BF?= =?UTF-8?q?=E3=82=92=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC=E3=83=8D=E3=83=B3?= =?UTF-8?q?=E3=83=88=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(DefaultStyle)/post/[slug]/+page.svelte | 92 +------------------ .../post/[slug]/metadata.svelte | 89 ++++++++++++++++++ 2 files changed, 91 insertions(+), 90 deletions(-) create mode 100644 src/routes/(DefaultStyle)/post/[slug]/metadata.svelte diff --git a/src/routes/(DefaultStyle)/post/[slug]/+page.svelte b/src/routes/(DefaultStyle)/post/[slug]/+page.svelte index fe0c5ac..85107d5 100644 --- a/src/routes/(DefaultStyle)/post/[slug]/+page.svelte +++ b/src/routes/(DefaultStyle)/post/[slug]/+page.svelte @@ -4,6 +4,7 @@ import Toc from './toc.svelte' import Share from './share.svelte' import Profile from './profile.svelte' + import Metadata from './metadata.svelte' import { base } from '$app/paths'; import { PUBLIC_HOSTNAME, PUBLIC_POST_REPO } from '$env/static/public'; import { onMount } from 'svelte'; @@ -100,28 +101,7 @@

{data.metadata.title}

-
-
- Category: - {data.metadata.category} -
- - {#if data.metadata.tags.length} -
- -
- Tag: - {#each data.metadata.tags as tag} - {tag} - {/each} -
- {/if} - -
- - -
-
+ {#if thumbnail} thumbnail @@ -269,72 +249,4 @@ } } } - - .meta { - display: grid; - grid-template-rows: auto auto; - grid-template-columns: auto auto 1fr auto; - gap: 4px; - font-size: 0.95em; - margin: 8px 16px; - white-space: nowrap; - - @media(width<1000px) { - flex-direction: column; - } - - & .category { - grid-area: 1 / 1; - } - - & .tags { - grid-area: 1 / 3; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - @media(width<1000px) { - grid-area: 2 / 1 / 3 / 5; - } - @media(width<480px){ - grid-area: 1 / 3; - } - } - - & .tag { - display: inline-block; - padding: 1px 4px; - margin: 3px; - border-radius: 3px; - color: currentColor; - background-color: var(--theme-color); - } - - & .divider { - width: 1px; - margin: 3px 0; - background-color: currentColor; - grid-area: 1 / 2; - @media(480px<=width<1000px){ - display: none; - } - } - - & .date{ - display: flex; - align-items: center; - grid-area: 1 / 4; - @media(width<480px){ - grid-area: 2 / 1 / 3 / 5; - } - - & svg{ - height: 1rem; - fill: currentColor; - } - } - - @media(width<480px) { - & .txt {display: none;} - } - } \ No newline at end of file diff --git a/src/routes/(DefaultStyle)/post/[slug]/metadata.svelte b/src/routes/(DefaultStyle)/post/[slug]/metadata.svelte new file mode 100644 index 0000000..f0c8a8c --- /dev/null +++ b/src/routes/(DefaultStyle)/post/[slug]/metadata.svelte @@ -0,0 +1,89 @@ + + +
+
+ Category: + {meta.category} +
+ + {#if meta.tags.length} +
+ +
+ Tag: + {#each meta.tags as tag} + {tag} + {/each} +
+ {/if} + +
+ + +
+
+ + \ No newline at end of file