-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
177 lines (168 loc) · 9.64 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="shortcut icon" href="./assets/img/favicon.ico" />
<link
rel="apple-touch-icon"
sizes="76x76"
href="./assets/img/apple-icon.png"
/>
<title>Landing | Tailwind Starter Kit by Creative Tim</title>
<link type="text/css" href="assets/css/style.css" rel="stylesheet" />
</head>
<body>
<div class="todo-app-container">
<div class="todo-app">
<h2>Todo App</h2>
<form action="#" onSubmit="{handleSubmit}">
<input
type="text"
value="{todoInput}"
onChange="{handleInput}"
className="todo-input"
placeholder="What do you need to do?"
/>
</form>
{todos.length > 0 ? (
<ul className="todo-list">
{props.todosFiltered(filter).map((todo, index) => (
<li key={index} className="todo-item-container">
<div className="todo-item">
<input
type="checkbox"
onChange={() => props.completeTodo(todo.id)}
checked={todo.complete ? true : false}
/>
{!todo.editing ? (
<span
onDoubleClick={() =>
props.markAsEditing(todo.id)
}
className={`todo-item-label ${
todo.complete ? 'line-through' : ''
}`}
>
{todo.title}
</span>
) : (
<input
type="text"
onBlur={event =>
props.updateTodo(event, todo.id)
}
onKeyDown={event => {
if (event.key === 'Enter') {
props.updateTodo(event, todo.id);
} else if (event.key === 'Escape') {
props.cancelEdit(event, todo.id);
}
}}
className="todo-item-input"
defaultValue={todo.title}
autoFocus
/>
)}
</div>
<button
onClick={() => props.deleteTodo(todo.id)}
className="x-button"
>
<svg
className="x-button-icon"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
</li>
))}
</ul>
<div className="check-all-container">
<TodoCompleteAllTodos
completeAllTodos={props.completeAllTodos}
/>
<TodoItemsRemaining remaining={props.remaining} />
</div>
<div className="other-buttons-container">
<TodoFilters
todosFiltered={props.todosFiltered}
filter={filter}
setFilter={setFilter}
/>
<div>
<TodoClearComplete clearComplete={props.clearComplete} />
</div>
</div>
) : (
<div className="no-todos-container">
<svg
width="247"
height="241"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0)">
<path
d="M156.806 54.2H90.25a5.729 5.729 0 00-5.72 5.718v147.858l-.764.233-16.327 4.998a3.057 3.057 0 01-3.81-2.025L15.063 52.412a3.05 3.05 0 012.025-3.808l25.16-7.701 72.941-22.317 25.16-7.7a3.048 3.048 0 013.81 2.02l12.414 40.532.233.762z"
fill="#F2F2F2"
/>
<path
d="M171.329 53.438l-14.961-48.85A6.475 6.475 0 00153.21.761a6.477 6.477 0 00-4.939-.473L112.897 11.11 39.961 33.43 4.587 44.259a6.489 6.489 0 00-4.302 8.094L51.42 219.3a6.494 6.494 0 006.202 4.586 6.408 6.408 0 001.895-.285l24.249-7.419.763-.236v-.797l-.763.232-24.474 7.491a5.729 5.729 0 01-7.143-3.793L1.017 52.127a5.708 5.708 0 013.795-7.14L40.186 34.16l72.936-22.317 35.374-10.827a5.783 5.783 0 011.682-.252 5.728 5.728 0 015.461 4.045l14.893 48.63.237.762h.793l-.233-.763z"
fill="#3F3D56"
/>
<path
d="M46.789 48.728a3.44 3.44 0 01-3.284-2.427l-4.913-16.039a3.43 3.43 0 012.278-4.285l67.1-20.534a3.438 3.438 0 014.287 2.276l4.913 16.04a3.435 3.435 0 01-2.277 4.285L47.792 48.578c-.325.1-.663.15-1.003.15z"
fill="#C7C7C7"
/>
<path
d="M72.522 17.138a7.626 7.626 0 007.628-7.625 7.626 7.626 0 00-7.628-7.624 7.626 7.626 0 00-7.628 7.624 7.626 7.626 0 007.628 7.625z"
fill="#C7C7C7"
/>
<path
d="M72.522 14.341a4.83 4.83 0 100-9.656 4.83 4.83 0 100 9.656z"
fill="#fff"
/>
<path
d="M229.838 221.939H100.929a3.248 3.248 0 01-3.242-3.241V64.302a3.243 3.243 0 013.242-3.24h128.909a3.247 3.247 0 013.241 3.24v154.396a3.245 3.245 0 01-3.241 3.241z"
fill="#E6E6E6"
/>
<path
d="M170.532 53.438H90.25a6.494 6.494 0 00-6.484 6.48v155.464l.763-.233V59.919A5.724 5.724 0 0190.25 54.2h80.518l-.236-.762zm69.984 0H90.25a6.494 6.494 0 00-6.484 6.48V234.52A6.489 6.489 0 0090.25 241h150.266a6.491 6.491 0 006.484-6.481v-174.6a6.494 6.494 0 00-6.484-6.48v-.001zm5.721 181.081a5.727 5.727 0 01-5.721 5.719H90.25a5.73 5.73 0 01-5.72-5.719v-174.6a5.724 5.724 0 015.72-5.719h150.266a5.726 5.726 0 015.721 5.718V234.52z"
fill="#3F3D56"
/>
<path
d="M200.471 70.212h-70.175a3.437 3.437 0 01-3.433-3.432V50.007a3.432 3.432 0 013.433-3.431h70.175a3.438 3.438 0 013.432 3.43V66.78a3.436 3.436 0 01-3.432 3.431z"
fill="#C7C7C7"
/>
<path
d="M165.383 47.72a7.626 7.626 0 007.628-7.625 7.626 7.626 0 00-7.628-7.625 7.627 7.627 0 00-7.628 7.625 7.627 7.627 0 007.628 7.624z"
fill="#C7C7C7"
/>
<path
d="M165.383 44.739a4.645 4.645 0 100-9.288 4.645 4.645 0 100 9.288z"
fill="#fff"
/>
</g>
<defs>
<clipPath id="clip0">
<path fill="#fff" d="M0 0h247v241H0z" />
</clipPath>
</defs>
</svg>
</div>
)}
</div>
</div>
<script type="text/javascript" src="assets/js/main.js" defer></script>
</body>
</html>