forked from next-step/js-lotto
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
213 lines (209 loc) · 7.74 KB
/
index.html
File metadata and controls
213 lines (209 loc) · 7.74 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
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
205
206
207
208
209
210
211
212
213
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8" />
<title>🎱 행운의 로또</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="./src/css/index.css" />
</head>
<body>
<div id="app" class="p-3 d-flex items-center">
<div class="app-container d-flex justify-center">
<div class="w-100">
<h1 class="text-center">🎱 행운의 로또</h1>
<section class="mt-9">
<h2 class="hidden-text">로또 구매 영역</h2>
<form id="purchase-input-form">
<fieldset form="purchase-input-form">
<legend class="hidden-text">수동 로또 입력 영역</legend>
<button type="button" id="create-manual-lotto-button">
+ 수동 게임 추가하기
</button>
<ul id="manual-lotto-list" class="mt-3"></ul>
</fieldset>
<fieldset class="mt-6">
<legend class="hidden-text">로또 구매 입력 영역</legend>
<p class="mb-2">구입할 금액을 입력해주세요.</p>
<div class="d-flex">
<input
type="number"
class="w-100 mr-2 pl-2"
min="1000"
max="100000"
id="purchase-amount-input"
placeholder="구입 금액"
required
/>
<button
type="submit"
class="purchase-amount-submit-button btn btn-cyan"
form="purchase-input-form"
>
확인
</button>
</div>
</fieldset>
</form>
</section>
<section id="purchased-lottos" class="mt-9">
<h2 class="hidden-text">구매한 로또 내역</h2>
<div class="d-flex">
<p class="flex-auto my-0">
총 <strong class="purchased-count"></strong>개를 구매하였습니다.
</p>
<div class="flex-auto d-flex justify-end pr-1">
<label class="switch">
<input type="checkbox" id="view-numbers-checkbox" />
<span class="text-base font-normal">번호보기</span>
</label>
</div>
</div>
<ul id="lotto-list" class="d-flex flex-wrap"></ul>
</section>
<section id="check-winning-number-area" class="mt-9">
<h2 class="hidden-text">당첨 번호 조회 영역</h2>
<form id="winning-number-confirmation-form">
<p class="flex-auto mb-3">
지난 주 당첨번호 6개와 보너스 번호 1개를 입력해주세요.
</p>
<div class="d-flex">
<div>
<p class="mt-0 mb-3 font-bold text-center">당첨 번호</p>
<div>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
<input
type="number"
class="winning-number mx-1 text-center"
min="1"
max="45"
required
/>
</div>
</div>
<div class="bonus-number-container flex-grow">
<p class="mt-0 mb-3 font-bold text-center">보너스 번호</p>
<div class="d-flex justify-center">
<input
type="number"
class="bonus-number text-center"
min="1"
max="45"
required
/>
</div>
</div>
</div>
<button
type="submit"
class="check-result-button mt-5 btn btn-cyan w-100"
form="winning-number-confirmation-form"
>
결과 확인하기
</button>
</form>
</section>
</div>
</div>
<div id="modal">
<div class="modal-inner p-10">
<button type="button" id="modal-close">
<svg viewbox="0 0 40 40">
<path class="close-x" d="M 10,10 L 30,30 M 30,10 L 10,30" />
</svg>
</button>
<h2 class="text-center">🏆 당첨 통계 🏆</h2>
<table class="result-table border-collapse border border-black">
<thead>
<tr class="text-center">
<th class="p-3">일치 갯수</th>
<th class="p-3">당첨금</th>
<th class="p-3">당첨 갯수</th>
</tr>
</thead>
<tbody>
<tr class="text-center">
<td class="p-3">3개</td>
<td class="p-3">5,000</td>
<td class="p-3">
<strong class="match-count rank-5"></strong>개
</td>
</tr>
<tr class="text-center">
<td class="p-3">4개</td>
<td class="p-3">50,000</td>
<td class="p-3">
<strong class="match-count rank-4"></strong>개
</td>
</tr>
<tr class="text-center">
<td class="p-3">5개</td>
<td class="p-3">1,500,000</td>
<td class="p-3">
<strong class="match-count rank-3"></strong>개
</td>
</tr>
<tr class="text-center">
<td class="p-3">5개 + 보너스볼</td>
<td class="p-3">30,000,000</td>
<td class="p-3">
<strong class="match-count rank-2"></strong>개
</td>
</tr>
<tr class="text-center">
<td class="p-3">6개</td>
<td class="p-3">2,000,000,000</td>
<td class="p-3">
<strong class="match-count rank-1"></strong>개
</td>
</tr>
</tbody>
</table>
<p class="text-center font-bold">
당신의 총 수익률은
<strong class="total-return-rate"></strong>%입니다.
</p>
<div class="d-flex justify-center mt-5">
<button type="button" id="reset-lotto-button" class="btn btn-cyan">
다시 시작하기
</button>
</div>
</div>
</div>
</div>
<script type="module" src="./src/js/index.js"></script>
</body>
</html>