-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.html
More file actions
93 lines (81 loc) · 3.04 KB
/
template.html
File metadata and controls
93 lines (81 loc) · 3.04 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
<!-- UI -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do App</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/milligram/1.4.1/milligram.min.css">
<style>
body {
margin-top: 20px;
}
.task-card {
border: 1px solid #ececec;
padding: 20px;
border-radius: 5px;
background: #fff;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.task{
color: #888;
}
.task-done {
text-decoration: line-through;
color: #888;
}
.task-item {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10px;
}
ul {
padding-left: 20px;
}
button {
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<div class="task-card">
<h1>To-Do App</h1>
<!-- Add Task Form -->
<form method="POST">
<div class="row">
<div class="column column-75">
<input type="text" name="task" placeholder="Enter a new task" required>
</div>
<div class="column column-25">
<button type="submit" class="button-primary">Add Task</button>
</div>
</div>
</form>
<!-- Task List -->
<h2>Task List</h2>
<ul style="list-style: none; padding: 0;">
<!-- TODO: Loop through tasks array and display each task with a toggle and delete option -->
<!-- If there are no tasks, display a message saying "No tasks yet. Add one above!" -->
<li>No tasks yet. Add one above!</li>
<!-- if there are tasks, display each task with a toggle and delete option -->
<li class="task-item">
<form method="POST" style="flex-grow: 1;">
<input type="hidden" name="toggle" value="">
<button type="submit" style="border: none; background: none; cursor: pointer; text-align: left; width: 100%;">
<span class="task">
Task 1
</span>
</button>
</form>
<form method="POST">
<input type="hidden" name="delete" value="">
<button type="submit" class="button button-outline" style="margin-left: 10px;">Delete</button>
</form>
</li>
</ul>
</div>
</div>
</body>
</html>