Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeev committed Sep 10, 2024
2 parents 8bf7af6 + 8c80b68 commit a413cb0
Showing 1 changed file with 83 additions and 0 deletions.
83 changes: 83 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>
<head>
<title>Todo App</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 20px;
color: #333;
}
h1 {
color: #333;
}
form {
margin-bottom: 20px;
}
input[type="text"],
textarea {
padding: 10px;
margin: 10px 0;
width: 300px;
border: 1px solid #ddd;
border-radius: 4px;
}
input[type="submit"] {
background-color: #4caf50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
ul {
list-style-type: none;
padding: 0;
}
li {
background-color: #fff;
margin-bottom: 8px;
padding: 12px;
border: 1px solid #ddd;
border-radius: 4px;
}
.task-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.task-text {
margin: 0;
}
</style>
</head>
<body>
<h1>Todo App: v9</h1>

<!-- Add Task Form -->
<form method="post">
<input type="text" name="task_content" placeholder="Enter a new task" />
<input type="submit" name="add_task" value="Add Task" />
</form>

<!-- Display Tasks -->
<h2>Tasks: sdfasdf</h2>
<ul>
{% for id, task in tasks.items() %}
<li class="task-item">
<p class="task-text">{{ task }}</p>
<!-- Delete Button for Each Task -->
<form method="post" style="display: inline">
<input type="hidden" name="task_id_to_delete" value="{{ id }}" />
<input type="submit" name="delete_task" value="Delete" />
</form>
</li>
{% endfor %}
</ul>
</body>
</html>

0 comments on commit a413cb0

Please sign in to comment.