From 16182acfcc1fad2885b9c1a96fe74d8ce56a50e0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 12 Jan 2025 21:59:55 +0900 Subject: refactor(blog/nuldoc): separate pages/* to pages/* and generators/* --- vhosts/blog/nuldoc-src/pages/PostPage.tsx | 74 +++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 vhosts/blog/nuldoc-src/pages/PostPage.tsx (limited to 'vhosts/blog/nuldoc-src/pages/PostPage.tsx') diff --git a/vhosts/blog/nuldoc-src/pages/PostPage.tsx b/vhosts/blog/nuldoc-src/pages/PostPage.tsx new file mode 100644 index 00000000..e6aa83aa --- /dev/null +++ b/vhosts/blog/nuldoc-src/pages/PostPage.tsx @@ -0,0 +1,74 @@ +import GlobalFooter from "../components/GlobalFooter.tsx"; +import GlobalHeader from "../components/GlobalHeader.tsx"; +import PageLayout from "../components/PageLayout.tsx"; +import { Config, getTagLabel } from "../config.ts"; +import { Element } from "../dom.ts"; +import { Document } from "../ndoc/document.ts"; +import { dateToString } from "../revision.ts"; +import { getPostPublishedDate } from "../generators/post.ts"; + +export default function PostPage( + doc: Document, + config: Config, +) { + return ( + getTagLabel(config, slug))} + metaTitle={`${doc.title}|${config.blog.siteName}`} + requiresSyntaxHighlight + config={config} + > + + +
+
+
+

{doc.title}

+ {doc.tags.length !== 0 && ( + + )} +
+
+
+

更新履歴

+
    + {doc.revisions.map((rev) => ( +
  1. + + {`: ${rev.remark}`} +
  2. + ))} +
+
+ { + // TODO: refactor + (doc.root.children[0] as Element).children + } + { + // TODO: footnotes + //
+ // <% for footnote in footnotes %> + //
+ // <%= footnote.index %>. <%= footnote.text %> + //
+ // <% end %> + //
+ } +
+
+
+ + +
+ ); +} -- cgit v1.2.3-70-g09d2