Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Simple To-Do App</title> | |
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Simple To-Do List</h1> | |
<form action="/add" method="POST" class="task-form"> | |
<input type="text" name="task" placeholder="Enter a new task..." required> | |
<button type="submit">Add Task</button> | |
</form> | |
<ul class="task-list"> | |
{% if tasks %} | |
{% for task in tasks %} | |
<li> | |
<span class="task-text">{{ task }}</span> | |
<a href="{{ url_for('delete', task_id=loop.index0) }}" class="delete-btn">Delete</a> | |
</li> | |
{% endfor %} | |
{% else %} | |
<li class="empty-list">No tasks yet! Add one above.</li> | |
{% endif %} | |
</ul> | |
</div> | |
</body> | |
</html> | |