-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
45 lines (45 loc) · 1.45 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk"
crossorigin="anonymous"
/>
<title>TODO's</title>
</head>
<body>
<div class="container mt-5" id="app">
<h3>{{title}}</h3>
<input
type="text"
class="form-control my-3"
v-model="newTask"
@keyup.enter="addTask"
/>
<button class="btn btn-primary" @click="addTask">Add</button>
<div class="mt-3" v-for="(task, index) of tasks">
<div :class="['alert', task.state ? 'alert-success': 'alert-danger']">
<div class="d-flex justify-content-between">
<div>
{{index +1}}) {{task.name}} - {{task.state ? "complete":"incomplete"}}
</div>
<div>
<button class="btn btn-success btn-sm" @click="editTask(index)">
OK
</button>
<button class="btn btn-danger btn-sm" @click="deleteTask(index)">
X
</button>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="./app.js"></script>
</body>
</html>