Files
blog/blog-admin/public/index.html
T

45 lines
1.5 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<title>评论后端 · 优世界</title>
<meta name="robots" content="noindex,nofollow">
<script>
try { if (localStorage.getItem('atk-theme') === 'dark') document.documentElement.dataset.theme = 'dark'; } catch (e) {}
</script>
<link rel="stylesheet" href="./admin/admin.css">
</head>
<body>
<div class="gate">
<div class="login-card">
<h1>评论后端</h1>
<p class="sub">优世界 · Cloudflare Workers + D1</p>
<dl class="kv" style="margin:0 0 22px">
<dt>接口</dt><dd class="mono">/api/v2/*</dd>
<dt>状态</dt><dd class="ok" id="st">检查中…</dd>
</dl>
<a class="btn primary block" href="./admin/" style="text-decoration:none">进入管理面板</a>
<a class="btn block" href="./sidebar/" style="text-decoration:none;margin-top:8px">官方后台(Artalk Sidebar)</a>
<p class="hint">博客端的 <code>server</code> 指向本域名即可</p>
</div>
</div>
<script>
(function () {
var el = document.getElementById('st');
fetch('./api/v2/healthz')
.then(function (r) { return r.json(); })
.then(function (d) {
el.textContent = '正常 · ' + Number(d.comments || 0).toLocaleString('zh-CN') +
' 条评论 · ' + d.latency_ms + 'ms';
})
.catch(function () { el.className = 'bad'; el.textContent = '不可达'; });
})();
</script>
</body>
</html>