-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (65 loc) · 2.5 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tasks VueJS</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div class="container">
<div id="taskApp">
<h1 class="text-center">{{ nameApp }}</h1>
<div class="form-group">
<div class="mb-3">
<label class="form-group">
Add a new task
</label>
<input type="text"
class="form-control"
placeholder="title task"
v-model="titleTask"/>
</div>
<div class="d-grid gap-2">
<button class="btn btn-primary"
type="button"
@click="addTask">
Add
</button>
</div>
</div>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Done</th>
<th scope="col">Task</th>
<th scope="col">Delete</th>
</tr>
</thead>
<tbody>
<tr v-for="(task, index) of tasks" :key="index">
<td>
<input type="checkbox" v-model="task.done">
</td>
<td>
<span :class="{ taskDone: task.done }">
{{ task.title }}
</span>
</td>
<td>
<button @click="deleteTask(task)"
class="btn btn-danger btn-block">
Delete
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="./js/main.js"></script>
</body>
</html>