-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
100 lines (92 loc) · 4.89 KB
/
index.html
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<!DOCTYPE html>
<html lang="jp">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="じゃんけん on Ethereum" />
<head prefix="og: http://ogp.me/ns#">
<meta property="og:url" content="https://lirlia.github.io/Rock-paper-scissors-ethereum/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="じゃんけん on Ethereum" />
<meta property="og:description" content="Ropsten テストネットワークで動作するじゃんけんのDAppsです。独自トークンをかけてじゃんけんできます。" />
<meta property="og:site_name" content="じゃんけん on Ethereum" />
<meta property="og:image" content="https://lirlia.github.io/Rock-paper-scissors-ethereum/img/paper.png" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@riddle_tec">
<link rel="shortcut icon" type="image/x-icon" href="https://lirlia.github.io/Rock-paper-scissors-ethereum/favicon.ico">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"></script>
<script type="application/javascript" src="https://cdn.ethers.io/lib/ethers-5.2.umd.min.js"></script>
<script language="javascript" type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="module" src='js/janken.js'></script>
<style>
.image-coin {
width: 20%;
}
.image-vs {
width: 50%;
}
</style>
<title>じゃんけん</title>
<body>
<div id="root">
<div class="App">
<div class="container-fluid p-3 m-0 bg-success text-white">
<div class="row">
<div class="col fs-4 d-flex align-items-center justify-content-center">保有トークン : <span id="myToken"></span> RSP</div>
<div class="col fs-4 d-flex align-items-center justify-content-center"><span id="myScore"></span></div>
<div id="getToken" class="col fs-4 d-flex align-items-center justify-content-center">RSPトークンをGet → <img
class="img-fluid image-coin" src="./img/coin.png" alt="coin"></div>
</div>
</div>
<div class="container">
<p class="fs-1 py-3">出したい手と掛け金 (<b class="text-danger">R</b class="text-danger">ock<b class="text-danger">S</b>cissors<b class="text-danger">P</b>aper トークン) を選んでください</p>
<input id="bet" class="form-control" type="text"
placeholder="賭けたいじゃんけん(RSP)ポイント (未入力時は保有トークンの1/2を使用します)">
<p class="py-2">※【勝】 掛け金の2倍を返却 / 【負】掛け金をすべて没収/【引き分け】掛け金を返却</p>
<div class="row my-5 hand-area">
<div id="rock" class="border border-3 rsp col m-3 p-3 d-flex align-items-center justify-content-center"><img
src="./img/rock.png" alt="rock"></div>
<div id="scissors" class="border border-3 rsp col m-3 p-3 d-flex align-items-center justify-content-center"><img
src="./img/scissors.png" alt="scissors"></div>
<div id="paper" class="border border-3 rsp col m-3 p-3 d-flex align-items-center justify-content-center"><img
src="./img/paper.png" alt="paper"></div>
</div>
<div class="text-center">
<button class="btn btn-primary" disabled>
<span class="fs-1 text-center px-3">結果 : </span>
<span id="result" class="fs-1">なし</span>
</button>
</div>
<div class="row border p-5 my-5">
<span class="col">
<div class="row">
<p class="col d-flex fs-3 align-items-center justify-content-center">あなた</p>
</div>
<div class="row">
<div class="col d-flex align-items-center justify-content-center"><img src="" alt="" id="playerHand">
</div>
</div>
</span>
<span class="col d-flex align-items-center justify-content-center">
<img class="image-vs" src="./img/vs.png" alt="vs">
</span>
<span class="col">
<div class="row">
<p class="col d-flex fs-3 align-items-center justify-content-center">CPU</p>
</div>
<div class="row">
<div class="col d-flex align-items-center justify-content-center"><img src="" alt="" id="cpuHand"></div>
</div>
</span>
</div>
</div>
</div>
</div>
</body>
</html>