AISummary-Cloudflare/public/index.html

48 lines
1.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AI 摘要 Demo</title>
<link rel="stylesheet" href="/demo.css" />
<link rel="stylesheet" href="/summary.css" />
</head>
<body>
<main class="page">
<header class="header">
<h1>AI 摘要 Demo</h1>
<p class="demo-muted">
选择风格后,脚本会读取 <code>.post</code> 内容并调用 <code>/api/summary</code> 获取/生成摘要KV缓存
</p>
</header>
<section class="layout">
<article class="post card">
<h2>示例文章</h2>
<p>
这是一段示例内容:你可以把它替换成你的文章正文。脚本会抽取纯文本并生成不同风格的摘要,比如 TL;DR、要点、结构化等。
</p>
<p>
实际使用时,你的静态页面只要包含 <code>&lt;div class="post"&gt;...&lt;/div&gt;</code> 即可。
</p>
</article>
<aside>
<div class="post-summary" data-post-selector=".post" data-style="tldr">
<div class="post-summary__header">
<div class="post-summary__title">摘要</div>
<div class="post-summary__styles" aria-label="Summary styles"></div>
</div>
<div class="post-summary__body">
<div class="post-summary__status post-summary__muted">等待生成…</div>
<div class="post-summary__content"></div>
</div>
</div>
</aside>
</section>
</main>
<script src="/summary.js" type="module"></script>
</body>
</html>