示例工程 47-project-brief
47-project-brief/demo-02-content-model/index.html
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>内容模型演示</title>
<style>
body { margin: 0; padding: 32px; background: #f8fafc; color: #0f172a; font-family: system-ui, sans-serif; line-height: 1.7; }
.box { max-width: 760px; margin-bottom: 16px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
h1 { margin: 0 0 16px; font-size: 28px; }
h2 { margin: 0 0 8px; font-size: 17px; }
h3 { margin: 14px 0 6px; font-size: 15px; }
p { margin: 0 0 10px; color: #334155; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { padding: 6px 8px; text-align: left; color: #475569; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
thead th { background: #f1f5f9; }
ol { margin: 8px 0 0; padding-left: 22px; color: #334155; }
code { padding: 1px 5px; border-radius: 4px; background: #f1f5f9; font-family: ui-monospace, monospace; }
</style>
</head>
<body>
<h1>内容模型</h1>
<div class="box">
<h2>实体与字段</h2>
<table>
<caption>指南实体的最小字段</caption>
<thead>
<tr><th scope="col">字段</th><th scope="col">类型</th><th scope="col">说明</th></tr>
</thead>
<tbody>
<tr><th scope="row">title</th><td>字符串</td><td>面向症状,不写内部编号</td></tr>
<tr><th scope="row">slug</th><td>字符串</td><td>稳定 URL 片段,小写短横线</td></tr>
<tr><th scope="row">steps</th><td>有序列表</td><td>每步一个动作,配图可选</td></tr>
<tr><th scope="row">risk</th><td>枚举</td><td>低 / 中 / 高,高风险先提示报修</td></tr>
<tr><th scope="row">updated</th><td>日期</td><td>用于审校与过期提醒</td></tr>
</tbody>
</table>
</div>
<div class="box">
<h2>详情页模板</h2>
<ol>
<li>H1:症状标题</li>
<li>一句话摘要:适用场景</li>
<li>安全警告:什么情况下停止</li>
<li>工具与材料</li>
<li>编号步骤</li>
<li>完成检查</li>
<li>报修入口</li>
</ol>
</div>
<div class="box">
<h2>关系</h2>
<p>指南属于分类;安全须知可被多篇指南引用;报修入口在所有指南中一致。</p>
</div>
</body>
</html>