-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
204 lines (192 loc) · 6.03 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, shrink-to-fit=no"
/>
<!-- <meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/> -->
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="theme-color" content="#e50000" />
<meta name="description" content="The Dice Pig Game" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<link rel="manifest" href="manifest.json" />
<!-- Add this to your HEAD if you want to load the
apple-touch-icons from another dir than your sites' root -->
<link
rel="apple-touch-icon"
href="img/touch-icons/apple-touch-icon-iphone-60x60.png"
/>
<link
rel="apple-touch-icon"
sizes="60x60"
href="img/touch-icons/apple-touch-icon-ipad-76x76.png"
/>
<link
rel="apple-touch-icon"
sizes="114x114"
href="img/touch-icons/apple-touch-icon-iphone-retina-120x120.png"
/>
<link
rel="apple-touch-icon"
sizes="144x144"
href="img/touch-icons/apple-touch-icon-ipad-retina-152x152.png"
/>
<title>The Dice Pig Game</title>
</head>
<body class="bg-dark">
<div class="container text-white">
<div
class="row m-3 rounded p-2 header text-center shadow-lg border border-secondary text-danger"
>
<div class="col"><h1>The Dice Pig Game</h1></div>
</div>
<div class="row mt-1">
<div class="col">
<div class="row">
<div class="col-sm-5 text-center">
<button class="mb-1 btn-new btn btn-outline-info">
New Game
</button>
</div>
<div class="col-sm-3">
<h5>
<span class="badge badge-pill badge-info"
>Winning Score
<input
class="bg-info text-center border text-warning"
style="width: 40%;height: 30%;"
id="winning-score"
type="number"
/>
</span>
</h5>
</div>
</div>
</div>
</div>
<div class="play-buttons row mt-4 text-center">
<div class="col-11">
<button class="mr-2 btn-roll btn btn-outline-danger">
Roll Dice
</button>
<button class="btn-hold btn btn-outline-success">
Hold
</button>
</div>
</div>
<div class="row mb-1 mt-5 ml-1 mr-1">
<div class="col-4">
<div
class="row text-center rounded player-0-panel border border-secondary "
>
<div class="col">
<div class="row mb-1">
<div class="col">
<h2 class="shadow-lg rounded-circle ">
Player 1
</h2>
<h1><div class="" id="name-0"></div></h1>
<h1>
<div class="badge badge-warning" id="score-0">43</div>
</h1>
</div>
</div>
<div class="row mt-3">
<div class="col">
<div class="">Current Score</div>
<h3>
<div class="" id="current-0">11</div>
</h3>
</div>
</div>
</div>
</div>
</div>
<div class="col-4 mt-3">
<div class="row play-area">
<div class="col">
<div class="row">
<div class="col-2"></div>
<div class="col-7 text-center">
<!-- <h1>
<div class="dicediv badge badge-primary"></div>
</h1> -->
<img
src="img/dice-5.png"
alt="dice"
class="dice bg-white rounded img-fluid"
/>
</div>
<div class="col-2"></div>
</div>
</div>
</div>
</div>
<div class="col-4">
<div
class="row text-center rounded player-1-panel border border-secondary "
>
<div class="col">
<div class="row mb-1">
<div class="col">
<h2 class="shadow-lg rounded-circle">
Player 2
</h2>
<h1><div class="" id="name-1"></div></h1>
<h1>
<div class="badge badge-warning" id="score-1">43</div>
</h1>
</div>
</div>
<div class="row mt-3">
<div class="col">
<div class="">Current Score</div>
<h3>
<div class="" id="current-1">11</div>
</h3>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="app.js"></script>
<script>
if ('serviceWorker' in navigator) {
if (navigator.serviceWorker.controller) {
console.log(
'[PWA Builder] active service worker found, no need to register'
);
} else {
// Register the service worker
navigator.serviceWorker
.register('sw.js', {
scope: './'
})
.then(function(reg) {
console.log(
'[PWA Builder] Service worker has been registered for scope: ' +
reg.scope
);
});
}
}
// if ('serviceWorker' in navigator) {
// navigator.serviceWorker.register('/sw.js').then(function() {
// console.log('Service Worker Registered');
// });
// }
</script>
</body>
</html>