-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
195 lines (186 loc) · 4.22 KB
/
index.html
File metadata and controls
195 lines (186 loc) · 4.22 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
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Todo App</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css">
<link rel="stylesheet" href="style.css">
<style>
@import url("https://fonts.googleapis.com/css?family=Kristi|Roboto");
* {
padding: 0;
margin: 0;
}
html {
width: 100%;
height: 100%;
}
body {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
font-family: 'Roboto', sans-serif;
font-size: 15px;
background: linear-gradient(to bottom, #9cedff 0%, #3e82c3 100%);
}
h1 {
font-family: 'Kristi', cursive;
color: white;
margin-bottom: 20px;
font-size: 4em;
font-weight: normal;
}
#todoList {
width: 300px;
box-shadow: -2px 2px 2px -1px rgba(0, 0, 0, 0.15);
border-radius: 8px;
background: white;
overflow: hidden;
}
#todoList ul {
list-style: none;
padding: 25px;
}
#todoList ul li {
display: flex;
align-items: center;
line-height: 1;
user-select: none;
}
#todoList ul li:not(:last-child) {
padding-bottom: 15px;
}
#todoList ul li:hover {
cursor: text;
}
#todoList ul li .checkBox {
width: 20px;
height: 20px;
border: 2px solid #ddd4ce;
border-radius: 50%;
margin-right: 15px;
position: relative;
display: flex;
opacity: 0.7;
}
#todoList ul li .checkBox:hover {
cursor: pointer;
opacity: 1;
}
#todoList ul li .checkBox, #todoList ul li .checkBox:before {
transition: all 0.2s ease-in-out;
}
#todoList ul li .checkBox:before {
content: "\f00c";
font-family: "FontAwesome";
margin: auto;
font-size: 0.8em;
color: #31ecb8;
opacity: 0;
transform: scale(0.5);
}
#todoList ul li .checkBox.done {
border-color: #31ecb8;
opacity: 1;
}
#todoList ul li .checkBox.done:before {
opacity: 1;
transform: scale(1);
}
#todoList ul li i {
margin-left: auto;
padding-left: 15px;
opacity: 0;
color: #ff3c41;
transition: all 0.2s ease-in-out;
font-size: 1.2em;
}
#todoList ul li:hover i {
opacity: 1;
cursor: pointer;
}
#todoList ul li span {
position: relative;
}
#todoList ul li span, #todoList ul li span:before {
transition: all 0.2s ease-in-out;
}
#todoList ul li span:before {
content: '';
height: 1px;
background: #c3bbb6;
width: 0%;
top: 50%;
position: absolute;
left: 0;
}
#todoList ul li.done span {
color: #c3bbb6;
}
#todoList ul li.done span:before {
width: 100%;
}
#todoList #newTask {
background: rgba(0, 0, 0, 0.05);
padding: 15px;
display: flex;
}
#todoList #newTask input {
flex: 1;
margin-right: 10px;
padding: 5px 10px;
border: none;
border-radius: 5px;
outline: none;
border-left: 2px solid #f65050;
font-family: 'Roboto', sans-serif;
}
#todoList #newTask button {
outline: none;
border: none;
border-radius: 50%;
font-size: 1.5em;
color: white;
background: #f65050;
display: flex;
width: 35px;
height: 35px;
transition: all 0.15s ease-in-out;
}
#todoList #newTask button span {
margin: auto;
}
#todoList #newTask button:hover {
cursor: pointer;
background: #ff5c60;
}
::placeholder {
color: rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<div id="app">
<h1>Todo APP</h1>
<div>
<div id="todoList">
<ul>
<li v-for="item in orderedItemList" class="done">
<div v-if="item.ischecked" class="checkBox done" @click="toogleCheck(item)"></div>
<div v-else="item.ischecked" class="checkBox" @click="toogleCheck(item)"></div>
<span>{{ item.name }}</span>
<i class="fa fa-trash-o" @click="removeItem(item)"></i>
</li>
</ul>
<div id="newTask">
<input type="text" placeholder="New task" v-model="newItem">
<button @click="addItem(newItem)"><span>+</span></button>
</div>
</div>
</div>
</div>
<script src="https://unpkg.com/vue"></script>
<script src="./main.js"></script>
</body>
</html>