Create index.html
Browse files- static/index.html +63 -0
static/index.html
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
!doctype html>
|
| 2 |
+
<html lang="ja">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>店舗チェックイン</title>
|
| 7 |
+
<link rel="stylesheet" href="/static/styles.css" />
|
| 8 |
+
<script>
|
| 9 |
+
window.API_BASE = ""; // 同一オリジン想定
|
| 10 |
+
</script>
|
| 11 |
+
</head>
|
| 12 |
+
<body>
|
| 13 |
+
<main class="container">
|
| 14 |
+
<h1>店舗チェックイン</h1>
|
| 15 |
+
<div id="status" class="card"></div>
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
<section class="card">
|
| 19 |
+
<h2>1) ウォレット</h2>
|
| 20 |
+
<p>端末内で鍵を生成・保存します。(簡易ED25519)</p>
|
| 21 |
+
<button id="gen" class="btn">鍵生成/読み込み</button>
|
| 22 |
+
<div>あなたのアドレス: <code id="addr">-</code></div>
|
| 23 |
+
</section>
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
<section class="card">
|
| 27 |
+
<h2>2) チェックイン</h2>
|
| 28 |
+
<p>QRから遷移したURLに <code>?session=...</code> が含まれます。</p>
|
| 29 |
+
<button id="checkin" class="btn">この店舗にチェックイン</button>
|
| 30 |
+
</section>
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
<section class="card">
|
| 34 |
+
<h2>3) 残高</h2>
|
| 35 |
+
<div>ポイント残高: <span id="balance">-</span></div>
|
| 36 |
+
<button id="refresh" class="btn">残高更新</button>
|
| 37 |
+
</section>
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
<section class="card">
|
| 41 |
+
<h2>4) SNS共有</h2>
|
| 42 |
+
<div class="share">
|
| 43 |
+
<a id="share-x" target="_blank">Xで共有</a>
|
| 44 |
+
<a id="share-fb" target="_blank">Facebook</a>
|
| 45 |
+
<a id="share-line" target="_blank">LINE</a>
|
| 46 |
+
</div>
|
| 47 |
+
</section>
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
<section class="card">
|
| 51 |
+
<h2>(任意)ビーコン接続</h2>
|
| 52 |
+
<button id="beacon" class="btn">ビーコンを探索</button>
|
| 53 |
+
<p class="muted">Web Bluetooth対応ブラウザ限定。デモ用。</p>
|
| 54 |
+
</section>
|
| 55 |
+
</main>
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
<script src="https://cdn.jsdelivr.net/npm/tweetnacl@1.0.3/nacl-fast.min.js"></script>
|
| 59 |
+
<script src="/static/wallet.js"></script>
|
| 60 |
+
<script src="/static/checkin.js"></script>
|
| 61 |
+
<script src="/static/bluetooth.js"></script>
|
| 62 |
+
</body>
|
| 63 |
+
</html>
|