chore: 初始化项目骨架
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import { defaultExportConfig, paperFormatLabels } from "@md-to-pdf/core";
|
||||
|
||||
const capabilities = [
|
||||
"Markdown 本地预览",
|
||||
"Chromium PDF 下载",
|
||||
"纸张与页边距",
|
||||
"页眉、页脚与页码",
|
||||
"可扩展 CSS 主题"
|
||||
];
|
||||
|
||||
export function App() {
|
||||
return (
|
||||
<main className="shell">
|
||||
<section className="intro" aria-labelledby="page-title">
|
||||
<p className="eyebrow">内网文档工具</p>
|
||||
<h1 id="page-title">Markdown PDF 导出器</h1>
|
||||
<p className="summary">
|
||||
使用同一份 HTML 与主题 CSS 完成网页预览和 Chromium PDF 渲染。
|
||||
</p>
|
||||
<div className="status">
|
||||
<span className="status-dot" aria-hidden="true" />
|
||||
项目骨架已就绪
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="panel" aria-labelledby="config-title">
|
||||
<div>
|
||||
<p className="panel-label">默认导出预设</p>
|
||||
<h2 id="config-title">{defaultExportConfig.name}</h2>
|
||||
</div>
|
||||
<dl className="facts">
|
||||
<div>
|
||||
<dt>纸张</dt>
|
||||
<dd>{paperFormatLabels[defaultExportConfig.paper.format]}</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>方向</dt>
|
||||
<dd>
|
||||
{defaultExportConfig.paper.orientation === "portrait"
|
||||
? "纵向"
|
||||
: "横向"}
|
||||
</dd>
|
||||
</div>
|
||||
<div>
|
||||
<dt>主题</dt>
|
||||
<dd>{defaultExportConfig.themeId}</dd>
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section className="capabilities" aria-label="规划能力">
|
||||
{capabilities.map((item, index) => (
|
||||
<article key={item}>
|
||||
<span>{String(index + 1).padStart(2, "0")}</span>
|
||||
<p>{item}</p>
|
||||
</article>
|
||||
))}
|
||||
</section>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user