-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
55 lines (52 loc) · 1.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
/>
<link rel="stylesheet" href="style.css" />
<script src="app.js" type="module" defer></script>
</head>
<body>
<div x-data="app" @keydown.space="run">
<div x-text="timeArea" class="time-area"></div>
<section class="progress-bar-container">
<div class="progress-bar">
<div class="progress-bar-bg" x-ref="progressBar"></div>
</div>
</section>
<section class="setting-area">
<div>
<button @click="reduceTime" :disabled="!paused">
<i class="fa fa-minus" aria-hidden="true"></i>
</button>
<input
class="time-input"
type="number"
min="1"
x-model="currTime"
x-on:change.debounce="setTime"
autofocus
:disabled="!paused"
/>
<button @click="addTime" :disabled="!paused">
<i class="fa fa-plus" aria-hidden="true"></i>
</button>
</div>
<div class="btn-area">
<button @click="reset">
<i class="fa fa-refresh" aria-hidden="true"></i>
</button>
<button @click="run">
<i :class="paused ? 'fa fa-play-circle' : 'fa fa-pause-circle'"></i>
</button>
</div>
</section>
</div>
</body>
</html>
<!-- type=number 要擋下輸入 e+- -->