diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-01 00:49:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-01 00:49:19 +0900 |
| commit | 6dedddc545e2f1930bdc2256784eb1551bd4231d (patch) | |
| tree | 75fcb5a6043dc0f2c31b098bf3cfd17a2b938599 /services/nuldoc/nuldoc-src/components/PostPageEntry.ts | |
| parent | d08e3edb65b215152aa26e3518fb2f2cd7071c4b (diff) | |
| download | nsfisis.dev-6dedddc545e2f1930bdc2256784eb1551bd4231d.tar.gz nsfisis.dev-6dedddc545e2f1930bdc2256784eb1551bd4231d.tar.zst nsfisis.dev-6dedddc545e2f1930bdc2256784eb1551bd4231d.zip | |
feat(nuldoc): rewrite nuldoc in Ruby
Diffstat (limited to 'services/nuldoc/nuldoc-src/components/PostPageEntry.ts')
| -rw-r--r-- | services/nuldoc/nuldoc-src/components/PostPageEntry.ts | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/services/nuldoc/nuldoc-src/components/PostPageEntry.ts b/services/nuldoc/nuldoc-src/components/PostPageEntry.ts deleted file mode 100644 index 482a3a8e..00000000 --- a/services/nuldoc/nuldoc-src/components/PostPageEntry.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { - getPostPublishedDate, - getPostUpdatedDate, - postHasAnyUpdates, - PostPage, -} from "../generators/post.ts"; -import { dateToString } from "../revision.ts"; -import { Config } from "../config.ts"; -import { - a, - article, - elem, - Element, - footer, - h2, - header, - p, - section, -} from "../dom.ts"; -import TagList from "./TagList.ts"; - -type Props = { post: PostPage; config: Config }; - -export default function PostPageEntry({ post, config }: Props): Element { - return article( - { class: "post-entry" }, - a( - { href: post.href }, - header({ class: "entry-header" }, h2({}, post.title)), - section( - { class: "entry-content" }, - p({}, post.description), - ), - footer( - { class: "entry-footer" }, - elem( - "time", - { datetime: dateToString(getPostPublishedDate(post)) }, - dateToString(getPostPublishedDate(post)), - ), - " 投稿", - postHasAnyUpdates(post) ? "、" : null, - postHasAnyUpdates(post) - ? elem( - "time", - { datetime: dateToString(getPostUpdatedDate(post)) }, - dateToString(getPostUpdatedDate(post)), - ) - : null, - postHasAnyUpdates(post) ? " 更新" : null, - post.tags.length !== 0 ? TagList({ tags: post.tags, config }) : null, - ), - ), - ); -} |
