chore: initialized repository

This commit is contained in:
Lukas Wölfer
2026-04-08 22:45:47 +02:00
commit 024d64b284
11 changed files with 2483 additions and 0 deletions

17
templates/index.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<title>Weight Tracker</title>
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<h1>Weight Tracker</h1>
<div id="weights">
{% for weight in weights %}
<p>{{ weight.date }}: {{ weight.weight }} kg by {{ weight.user_id }}</p>
{% endfor %}
</div>
<a href="/input">Add Weight</a>
</body>
</html>

20
templates/input.html Normal file
View File

@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html>
<head>
<title>Add Weight</title>
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<h1>Add Weight</h1>
<form hx-post="/input" hx-target="#result" hx-swap="innerHTML">
<label for="date">Date:</label>
<input type="date" id="date" name="date" required><br>
<label for="weight">Weight (kg):</label>
<input type="number" step="0.1" id="weight" name="weight" required><br>
<button type="submit">Submit</button>
</form>
<div id="result"></div>
<a href="/">Back to Tracker</a>
</body>
</html>