Files
cwd/widget/test/test.html
2026-01-14 10:02:58 +08:00

78 lines
1.6 KiB
HTML

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CWD Comments Widget - 测试页面</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: #f5f5f5;
padding: 40px 20px;
}
.container {
max-width: 800px;
margin: 0 auto;
background: white;
padding: 40px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
h1 {
margin-bottom: 20px;
color: #333;
}
.demo-post {
margin-bottom: 40px;
}
.demo-post h2 {
font-size: 20px;
margin-bottom: 10px;
}
.demo-post p {
color: #666;
line-height: 1.8;
font-size: 16px;
}
</style>
</head>
<body>
<div class="container">
<h1>CWD Comments Widget - 测试页面</h1>
<div class="demo-post">
<h2>这是一篇示例文章</h2>
<p>
这是一个用于测试 CWD Comments Widget 的示例页面。组件已经通过 UMD 格式打包,
可以在任何网站上通过简单的配置来使用。评论数据将存储在你的 Cloudflare D1 数据库中。
</p>
</div>
<!-- 评论组件容器 -->
<div id="comments"></div>
</div>
<script src="../dist/cwd-comments.js"></script>
<script>
new CWDComments({
el: '#comments',
apiBaseUrl: 'https://message.zishu.me',
postSlug: '/message'
}).mount();
</script>
</body>
</html>