75 lines
2.0 KiB
HTML
75 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="author" content="{{ author }}">
|
|
<title>{{ title }} — {{ version }}</title>
|
|
|
|
{# KaTeX 数学公式支持 #}
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.css">
|
|
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/katex.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/katex@0.16.25/dist/contrib/auto-render.min.js"></script>
|
|
|
|
<style>
|
|
{{ css_screen }}
|
|
</style>
|
|
|
|
{# 打印样式 #}
|
|
<style media="print">
|
|
{{ css_print }}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<header class="report-header">
|
|
<h1 class="report-title">{{ title }}</h1>
|
|
{% if subtitle %}
|
|
<p class="report-subtitle">{{ subtitle }}</p>
|
|
{% endif %}
|
|
<div class="report-meta">
|
|
<span>版本: {{ version }}</span>
|
|
<span>作者: {{ author }}</span>
|
|
</div>
|
|
</header>
|
|
|
|
{# 侧边栏目录 #}
|
|
<nav class="sidebar-toc">
|
|
<h2>目录</h2>
|
|
<ul>
|
|
{% for item in toc %}
|
|
{% if item.level == 1 %}
|
|
<li class="toc-h1"><a href="#{{ item.anchor }}">{{ item.title }}</a></li>
|
|
{% elif item.level == 2 %}
|
|
<li class="toc-h2"><a href="#{{ item.anchor }}">{{ item.title }}</a></li>
|
|
{% elif item.level == 3 %}
|
|
<li class="toc-h3"><a href="#{{ item.anchor }}">{{ item.title }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</nav>
|
|
|
|
{# 正文内容 #}
|
|
<main class="report-body">
|
|
{{ body }}
|
|
</main>
|
|
|
|
<footer class="report-footer">
|
|
<p>{{ title }} — {{ version }} — {{ author }}</p>
|
|
</footer>
|
|
|
|
{# KaTeX 自动渲染 #}
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
renderMathInElement(document.body, {
|
|
delimiters: [
|
|
{left: "$$", right: "$$", display: true},
|
|
{left: "$", right: "$", display: false}
|
|
]
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|