diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-01-12 21:59:55 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-01-12 22:16:17 +0900 |
| commit | 16182acfcc1fad2885b9c1a96fe74d8ce56a50e0 (patch) | |
| tree | dfff5ee9b9a9e16680fda5cba36e5c817eda1f9e /vhosts/blog/nuldoc-src/pages/SlidePage.tsx | |
| parent | f31d24cd1417088b7806ddc7d2e0df982d666e38 (diff) | |
| download | nsfisis.dev-16182acfcc1fad2885b9c1a96fe74d8ce56a50e0.tar.gz nsfisis.dev-16182acfcc1fad2885b9c1a96fe74d8ce56a50e0.tar.zst nsfisis.dev-16182acfcc1fad2885b9c1a96fe74d8ce56a50e0.zip | |
refactor(blog/nuldoc): separate pages/* to pages/* and generators/*
Diffstat (limited to 'vhosts/blog/nuldoc-src/pages/SlidePage.tsx')
| -rw-r--r-- | vhosts/blog/nuldoc-src/pages/SlidePage.tsx | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/vhosts/blog/nuldoc-src/pages/SlidePage.tsx b/vhosts/blog/nuldoc-src/pages/SlidePage.tsx new file mode 100644 index 00000000..6d167036 --- /dev/null +++ b/vhosts/blog/nuldoc-src/pages/SlidePage.tsx @@ -0,0 +1,70 @@ +import GlobalFooter from "../components/GlobalFooter.tsx"; +import GlobalHeader from "../components/GlobalHeader.tsx"; +import PageLayout from "../components/PageLayout.tsx"; +import StaticScript from "../components/StaticScript.tsx"; +import { Config, getTagLabel } from "../config.ts"; +import { dateToString } from "../revision.ts"; +import { Slide } from "../slide/slide.ts"; +import { getPostPublishedDate } from "../generators/post.ts"; + +export default function SlidePage( + slide: Slide, + config: Config, +) { + return ( + <PageLayout + metaCopyrightYear={getPostPublishedDate(slide).year} + metaDescription={slide.title} + metaKeywords={slide.tags.map((slug) => getTagLabel(config, slug))} + metaTitle={`${slide.event} (${slide.talkType})|${config.blog.siteName}`} + requiresSyntaxHighlight + config={config} + > + <body className="single"> + <GlobalHeader config={config} /> + <main className="main"> + <article className="post-single"> + <header className="post-header"> + <h1 className="post-title">{slide.title}</h1> + {slide.tags.length !== 0 && ( + <ul className="post-tags"> + {slide.tags.map((slug) => ( + <li className="tag"> + <a href={`/tags/${slug}/`}>{getTagLabel(config, slug)}</a> + </li> + ))} + </ul> + )} + </header> + <div className="post-content"> + <section> + <h2 id="changelog">更新履歴</h2> + <ol> + {slide.revisions.map((rev) => ( + <li className="revision"> + <time datetime={dateToString(rev.date)}> + {dateToString(rev.date)} + </time> + {`: ${rev.remark}`} + </li> + ))} + </ol> + </section> + <canvas id="slide" data-slide-link={slide.slideLink} /> + <div> + <button id="prev">Prev</button> + <button id="next">Next</button> + </div> + <StaticScript + fileName="/slide.js" + type="module" + config={config} + /> + </div> + </article> + </main> + <GlobalFooter config={config} /> + </body> + </PageLayout> + ); +} |
