-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (80 loc) · 2.84 KB
/
Copy pathindex.html
File metadata and controls
86 lines (80 loc) · 2.84 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Todo App</title>
<link rel="stylesheet" href="style.css">
<script src="https://unpkg.com/vue"></script>
</head>
<body>
<div id="app">
<task-list :tasks="tasks"></task-list>
</div>
<template id="task-list">
<section class="tasks">
<h1>
Tasks
<transition name="fade">
<small v-if="incomplete">({{ incomplete }})</small>
</transition>
</h1>
<div class="tasks__new input-group">
<input type="text"
class="input-group-field"
v-model="newTask"
@keyup.enter="addTask"
placeholder="New task"
>
<span class="input-group-button">
<button @click="addTask"
class="button"
>
<i class="fa fa-plus"></i> Add
</button>
</span>
</div>
<div class="tasks__clear button-group pull-right">
<button class="button warning small"
@click="clearCompleted"
>
<i class="fa fa-check"></i> Clear Completed
</button>
<button class="button alert small"
@click="clearAll"
>
<i class="fa fa-trash"></i> Clear All
</button>
</div>
<transition-group name="fade" tag="ul" class="tasks__list no-bullet">
<task-item v-for="(task, index) in tasks"
@remove="removeTask(index)"
@complete="completeTask(task)"
:task="task"
:key="task"
></task-item>
</transition-group>
</section>
</template>
<template id="task-item">
<li class="tasks__item">
<button :class="className"
@click.self="$emit('complete')"
>
{{ task.title }}
</button>
<button class="tasks__item__remove button alert pull-right"
@click="$emit('remove')"
>
<i class="fa fa-times"></i>
</button>
</li>
</template>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js" integrity="sha384-ygbV9kiqUc6oa4msXn9868pTtWMgiQaeYH7/t7LECLbyPA2x65Kgf80OJFdroafW" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="script.js"></script>
</body>
<footer>
<p>Khalid Pathan</p>
</footer>
</html>