This commit is contained in:
Angelo Rodriguez 2024-12-04 09:37:01 +01:00
parent d2e6b65a12
commit 34f3367a08
13 changed files with 175 additions and 519 deletions

View file

@ -1,33 +1,44 @@
<html>
<head>
<title>Azube</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
{{ user.display_name }}
<head>
<title>Azube</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body>
{{ user.display_name }}
<h1> Deine Berichtshefte </h1>
<div class="bg-gray-100">
<h1 class="text-2xl justify-center flex pt-5">Deine Berichtshefte</h1>
{% if reports|length == 0 %}
<button onclick="location = '/write'">
Füge dein erstes Berichtsheft hinzu!
</button>
{% endif %}
{% if reports|length == 0 %}
<div class="min-h-screen bg-gray-100 flex items-center justify-center">
<h3>wau, such empty!</h3>
<button onclick="location = '/write'" class="{{ style.red_btn }}">
Füge dein erstes Berichtsheft hinzu!
</button>
{% else %}
<div
class="min-h-screen flex items-center justify-center grid grid-cols-5"
>
{% for report in reports %}
<div class="{{ style.card }}">
<a href="/report/{{ report.id }}"> {{ report }} </a>
</div>
{% if forloop.last %}
{% if report.week != week_now %}
<a href="/report/{{ report.id }}" class="{{ style.card }}">
{% if approved %}
<div
class="absolute top-0 right-0 translate-y-3 -translate-x-3 bg-green-500 text-white rounded-full w-6 h-6 flex items-center justify-center scale-[1.5]"
>
</div>
{% endif %} {{ report }}
</a>
{% if forloop.last %} {% if report.week != week_now %}
<button onclick="location = '/write'" class="{{ style.red_btn }}">
Berichtsheft schreiben
</button>
{% endif %} {% endif %} {% endfor %} {% endif %}
</div>
</div>
<button onclick="location = '/write'" class="{{ style.red_btn }}"> Berichtsheft schreiben </button>
{% endif %}
{% endif %}
{% endfor %}
</div>
</body>
</html>
</body>
</html>