1
Some checks failed
ci/woodpecker/push/publish Pipeline failed

This commit is contained in:
2024-12-03 12:29:43 +03:00
parent 404f128166
commit 4ef44fc2ed
15 changed files with 158 additions and 0 deletions

14
app/templates/base.html Normal file
View File

@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>To-Do List</title>
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>
<body>
<div class="container">
{% block content %}{% endblock %}
</div>
</body>
</html>

21
app/templates/index.html Normal file
View 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 %}