示例工程 35-landing-page
35-landing-page/app/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>XWRT Deploy · 一键部署静态站点</title>
<meta name="description" content="把静态站点部署到边缘网络:预览、回滚与自定义域名。" />
<style>
* { box-sizing: border-box; }
body {
margin: 0;
min-height: 100vh;
padding: 0 20px 40px;
background: #f8fafc;
color: #0f172a;
font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
line-height: 1.7;
}
.page { width: min(100%, 960px); margin: 0 auto; }
.skip { position: absolute; left: -9999px; top: 0; padding: 8px 12px; background: #2563eb; color: #fff; }
.skip:focus { left: 8px; top: 8px; z-index: 10; }
.site-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 0 14px; border-bottom: 1px solid #e2e8f0; }
.brand { font-weight: 700; letter-spacing: 0.12em; font-size: 13px; color: #0f172a; text-decoration: none; }
.site-header nav ul { display: flex; flex-wrap: wrap; gap: 14px; margin: 0; padding: 0; list-style: none; }
.site-header nav a { color: #475569; font-size: 14px; text-decoration: none; }
.cta { display: inline-block; padding: 7px 14px; border: 1px solid #2563eb; border-radius: 6px; background: #2563eb; color: #fff; font-size: 14px; text-decoration: none; }
.cta.secondary { background: #fff; color: #2563eb; }
main { padding: 22px 0; }
section { margin-top: 30px; padding-top: 22px; border-top: 1px solid #e2e8f0; }
h1 { margin: 6px 0 10px; font-size: clamp(32px, 7vw, 52px); line-height: 1.1; }
h2 { margin: 0 0 10px; font-size: 24px; }
h3 { margin: 0 0 6px; font-size: 17px; }
p { margin: 0 0 12px; color: #334155; }
ul { margin: 8px 0 12px; padding-left: 22px; color: #334155; }
li + li { margin-top: 4px; }
.eyebrow { margin: 0; color: #2563eb; font-size: 12px; letter-spacing: 0.16em; }
.lead { margin: 0 0 18px; color: #334155; font-size: 19px; max-width: 56ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }
figure { margin: 16px 0; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; }
figure img { display: block; width: 100%; height: auto; border-radius: 8px; }
figcaption { margin-top: 8px; color: #64748b; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 14px 0 0; padding: 0; list-style: none; }
.cards li { padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
.cards p { margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
caption { padding: 12px 14px 6px; text-align: left; color: #475569; font-size: 13px; }
th, td { padding: 9px 14px; border-bottom: 1px solid #e2e8f0; text-align: left; }
thead th { background: #f1f5f9; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
blockquote { margin: 0; padding: 14px 16px; border-left: 4px solid #2563eb; border-radius: 6px; background: #eff6ff; color: #1e3a8a; }
blockquote p { margin: 0; color: inherit; }
details { margin: 10px 0; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; }
summary { cursor: pointer; font-weight: 600; }
.final-cta { padding: 20px; border-radius: 12px; background: #eff6ff; }
.final-cta p { margin-bottom: 14px; }
footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid #e2e8f0; color: #64748b; font-size: 12px; }
@media (max-width: 560px) {
body { padding: 0 14px 32px; }
.site-header { flex-direction: column; align-items: flex-start; }
}
</style>
</head>
<body>
<a class="skip" href="#main">跳到主内容</a>
<div class="page">
<header class="site-header">
<a class="brand" href="#main">XWRT DEPLOY</a>
<nav aria-label="主导航">
<ul>
<li><a href="#features">功能</a></li>
<li><a href="#pricing">价格</a></li>
<li><a href="#faq">常见问题</a></li>
</ul>
</nav>
<a class="cta" href="signup.html">免费开始</a>
</header>
<main id="main">
<section id="hero" aria-labelledby="hero-title">
<p class="eyebrow">STATIC DEPLOY / EDGE</p>
<h1 id="hero-title">把静态站点部署到边缘,三分钟上线</h1>
<p class="lead">预览、回滚、自定义域名与 HTTPS,一条命令完成。按使用量计费,不锁定框架。</p>
<div class="actions">
<a class="cta" href="signup.html">免费开始</a>
<a class="cta secondary" href="#pricing">查看价格</a>
</div>
<figure>
<img src="assets/hero.svg" alt="部署控制台界面:项目列表、部署状态与访问量图表" width="800" height="480" />
<figcaption>图 35-1:部署控制台示例界面。</figcaption>
</figure>
</section>
<section id="features" aria-labelledby="features-title">
<h2 id="features-title">核心功能</h2>
<ul class="cards">
<li>
<h3>预览部署</h3>
<p>每个分支生成独立预览地址,评审后再合并。</p>
</li>
<li>
<h3>一键回滚</h3>
<p>保留历史版本,出错时几秒内切回上一版。</p>
</li>
<li>
<h3>自定义域名</h3>
<p>自动签发与续期证书,强制 HTTPS。</p>
</li>
</ul>
</section>
<section id="pricing" aria-labelledby="pricing-title">
<h2 id="pricing-title">价格</h2>
<div class="table-wrap">
<table>
<caption>XWRT Deploy 方案对比(月付,人民币)</caption>
<thead>
<tr>
<th scope="col">方案</th>
<th scope="col">价格</th>
<th scope="col">带宽</th>
<th scope="col">成员</th>
</tr>
</thead>
<tbody>
<tr><th scope="row">基础</th><td class="num">0</td><td class="num">50 GB</td><td class="num">1</td></tr>
<tr><th scope="row">团队</th><td class="num">99</td><td class="num">500 GB</td><td class="num">10</td></tr>
<tr><th scope="row">企业</th><td class="num">按需</td><td class="num">不限</td><td class="num">不限</td></tr>
</tbody>
</table>
</div>
</section>
<section id="testimonials" aria-labelledby="testimonials-title">
<h2 id="testimonials-title">用户评价</h2>
<figure>
<blockquote cite="signup.html">
<p>迁移到 XWRT 之后,预览与回滚成了默认流程,发布压力小了很多。</p>
</blockquote>
<figcaption>—— <cite>林小满</cite>,某 SaaS 前端负责人</figcaption>
</figure>
</section>
<section id="faq" aria-labelledby="faq-title">
<h2 id="faq-title">常见问题</h2>
<details open>
<summary>支持哪些框架?</summary>
<p>任何能产出静态文件的框架都可以,不需要特定运行时。</p>
</details>
<details>
<summary>可以退款吗?</summary>
<p>月付方案支持 7 天内无理由退款,年付按剩余月份折算。</p>
</details>
<details>
<summary>旧域名会失效吗?</summary>
<p>可以保留旧域名并做 301/308 重定向,避免外部链接失效。</p>
</details>
</section>
<section id="cta" aria-labelledby="cta-title">
<div class="final-cta">
<h2 id="cta-title">准备好发布了吗?</h2>
<p>免费方案足够跑通第一个项目,升级随时可以。</p>
<a class="cta" href="signup.html">创建免费账号</a>
</div>
</section>
</main>
<footer>
<p>© 2026 XWRT Deploy · 示例产品,仅用于教学</p>
</footer>
</div>
</body>
</html>