-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
43 lines (32 loc) · 1.22 KB
/
index.html
File metadata and controls
43 lines (32 loc) · 1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ToDo List Flask</title>
<link rel="stylesheet" href="{{ url_for('static' , filename='css/style.css')}}">
</head>
<body>
<h1>ToDo List Flask</h1>
<form action="{{ url_for('home') }}" method="POST" class="input-container">
<input type="text" placeholder="Enter Todo" id="input-todo" name="todo_name">
<button id="add-todo" type="submit">+</button>
</form>
<h2>Todos</h2>
<div class="todo-container">
{% for item in items %}
<div class="todo">
<p>{{ item.name }}</p>
<div class="actions">
<form action="{{ url_for('check_todo', todo_id=item.id) }}" method="POST">
<input type="checkbox" name="checked" {% if item.checked %}checked{% endif %} onchange="this.form.submit()">
</form>
<form action="{{ url_for('delete_todo', todo_id=item.id) }}" method="POST">
<button type="submit">Delete</button>
</form>
</div>
</div>
{% endfor %}
</div>
</body>
</html>