21
app/templates/index.html
Normal file
21
app/templates/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h1>To-Do List for DEVOPS</h1>
|
||||
<form action="/add" method="POST">
|
||||
<input type="text" name="title" placeholder="Add a new task" required>
|
||||
<button type="submit">Add</button>
|
||||
</form>
|
||||
<ul>
|
||||
{% for task in tasks %}
|
||||
<li>
|
||||
<span style="text-decoration: {% if task.completed %}line-through{% else %}none{% endif %};">
|
||||
{{ task.title }}
|
||||
</span>
|
||||
|
||||
<a href="/complete/{{ task.id }}">[{{ 'Undo' if task.completed else 'Complete' }}]</a>
|
||||
<a href="/delete/{{ task.id }}">[Delete]</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user