1
0
Fork 0

Add template

This commit is contained in:
Florian RICHER 2021-07-08 23:29:40 +02:00
parent 4bee273216
commit 2d1d5b66a9
8 changed files with 727 additions and 44 deletions

15
views/layout.html.tera Normal file
View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Tera Demo - {{ title }}</title>
</head>
<body>
{% block content %}{% endblock content %}
<footer>
<a href="/">Home</a>
</footer>
</body>
</html>

View file

@ -0,0 +1,10 @@
{% extends "layout" %}
{% block content %}
<h3>Here are your items:</h3>
<ul>
{% for task in tasks %}
<li>{{ task.id }} {{ task.description }} {{ task.completed }}</li>
{% endfor %}
</ul>
{% endblock content %}