first commit
This commit is contained in:
11
templates/base.html
Normal file
11
templates/base.html
Normal 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
43
templates/index.html
Normal 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
17
templates/update.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user