first commit

This commit is contained in:
ilgazca
2025-07-28 14:57:53 +03:00
commit ef6114eff9
13 changed files with 196 additions and 0 deletions

11
templates/base.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}"
{% block head %}{% endblock %}
</head>
<body style="align-content: center">
{% block body %}{% endblock %}
</body>
</html>

43
templates/index.html Normal file
View File

@ -0,0 +1,43 @@
{% extends 'base.html' %}
{% block head %}
<title>Task Master</title>
{% endblock %}
{% block body %}
<div class="content">
<h1 style="text-align: center">Task Master</h1>
{% if tasks|length < 1 %}
<h4 style="text-align: center">There are no tasks. Create one below</h4>
{% else %}
<table>
<tr>
<th>Task</th>
<th>Added</th>
<th>Actions</th>
</tr>
{% for task in tasks %}
<tr>
<td>{{ task.content }}</td>
<td>{{ task.date_created.date() }}</td>
<td>
<a href="/delete/{{task.id}}">Delete</a>
<br>
<a href="/update/{{task.id}}">Update</a>
</td>
</tr>
{% endfor %}
</table>
{% endif %}
<form action="/" method="POST">
<input type="text" name="content" id="content" placeholder="Task name">
<input type="submit" value="Add Task">
</form>
</div>
{% endblock %}

17
templates/update.html Normal file
View File

@ -0,0 +1,17 @@
{% extends 'base.html' %}
{% block head %}
<title>Task Master</title>
{% endblock %}
{% block body %}
<div class="content">
<h1 style="text-align: center">Update Task</h1>
<form action="/update/{{task.id}}" method="POST">
<input type="text" name="content" id="content" placeholder="Task name" value="{{task.content}}">
<input type="submit" value="Update Task">
</form>
</div>
{% endblock %}