put header in separate file

This commit is contained in:
Khaïs COLIN 2025-10-24 17:49:03 +02:00
parent c5b21d1cef
commit 4aa1fa5731
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
6 changed files with 48 additions and 239 deletions

View file

@ -1,44 +1,26 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.7/dist/htmx.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Food Tracker</title>
</head>
<body>
<header>
<span>
Datum: {{ date }}
</span>
<div>
<span>
kc: {{ sum.kc }}
</span>
<span>
Protein: {{ sum.protein }}
</span>
<span>
Balaststoffe: {{ sum.bs }}
</span>
</div>
</header>
<main>
<hr>
{% for food in foods %}
<head>
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.7/dist/htmx.min.js"></script>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Food Tracker</title>
</head>
<body>
{% include "header.html" %}
<main>
<hr>
{% for food in foods %}
{% include "food.html" %}
{% if !loop.last %}
<hr>
{% endif %}
<hr>
{% endif %}
{% endfor %}
</main>
</body>
<style>
html {
</main>
</body>
<style>
html {
font-family: sans-serif;
border: 2px solid hsl(from #a8c8a6 h 40% l);
}
@ -146,6 +128,5 @@
accent-color: hsl(from #cb8175 h 90% l);
background-color: hsl(from #cb8175 h 60% l);
}
</style>
</style>
</html>