Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
52 lines (52 loc) · 2.47 KB
/
Copy pathindex.html
File metadata and controls
52 lines (52 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f5f7f5">
<title>讀頭 API 測試</title>
<style>
* { box-sizing: border-box; }
body { margin: 0; background: #f5f7f5; color: #19312b; font-family: system-ui, sans-serif; line-height: 1.6; }
main { max-width: 620px; margin: 0 auto; padding: 8vh 24px 48px; }
h1 { margin: 0 0 10px; font-size: clamp(1.8rem, 6vw, 2.5rem); letter-spacing: -.03em; }
h2 { margin: 0 0 10px; font-size: 1rem; }
.intro { margin: 0 0 24px; color: #536b63; }
.card { background: white; border: 1px solid #dbe6df; border-radius: 16px; padding: 24px; box-shadow: 0 12px 32px #173c2c0b; }
.status { margin: 8px 0; font-weight: 600; }
.subtle { color: #536b63; font-size: .9rem; }
button { margin-top: 12px; width: 100%; padding: 14px 20px; border: 0; border-radius: 9px; background: #176b4b; color: white; font: inherit; font-weight: 700; cursor: pointer; }
button:disabled { background: #a5b8ae; cursor: not-allowed; }
button:focus-visible { outline: 3px solid #7ab89e; outline-offset: 3px; }
.section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e6ede8; }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: .9rem/1.6 ui-monospace, monospace; }
#result-status { font-weight: 700; }
.pass { color: #176b4b; }
.fail { color: #a13333; }
noscript { display: block; margin-top: 16px; color: #a13333; }
</style>
<script src="./test.js" defer></script>
</head>
<body>
<main>
<h1>讀頭 API 測試</h1>
<p class="intro">初始化讀頭服務後,查詢裝置的讀頭類型。</p>
<section class="card" aria-label="測試操作">
<p id="load-status" class="subtle">等待 JavaScript 載入</p>
<noscript>此瀏覽器已停用 JavaScript。</noscript>
<p id="status" class="status" role="status">等待檢查 App 介面</p>
<button id="initialize" type="button" disabled>1. 初始化讀頭</button>
<button id="query" type="button" disabled>2. 查詢讀頭類型</button>
<div id="result" class="section" aria-live="polite" hidden>
<h2>查詢結果</h2>
<p id="result-status"></p>
<pre id="result-value"></pre>
</div>
<div class="section">
<h2>事件紀錄</h2>
<pre id="log" aria-live="polite">尚無事件</pre>
</div>
</section>
</main>
</body>
</html>