azube/core/templates/index.html

46 lines
1.4 KiB
HTML
Raw Permalink Normal View History

2024-12-05 17:03:42 +01:00
{{ title|safe }}
2024-12-02 16:49:45 +01:00
2024-12-04 11:41:57 +01:00
{% if late_reports > 1 %}
2024-12-04 16:36:57 +01:00
2024-12-06 12:10:30 +01:00
<div class="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mr-10 ml-10 mt-2" role="alert">
2024-12-04 11:41:57 +01:00
<p class="font-bold"> Du bist nicht aktuell! </p>
<p> Du hast noch {{ late_reports }} Berichtshefte nachzuschreiben. </p>
</div>
{% endif %}
2024-12-04 09:37:01 +01:00
{% if reports|length == 0 %}
2024-12-04 11:41:57 +01:00
<h3 class="text-xl justify-center flex m-10 p-5">wau, such empty!</h3>
2024-12-04 09:37:01 +01:00
2024-12-04 11:41:57 +01:00
<button onclick="location = '/write'" class="{{ style.red_btn }} justify-center">
2024-12-04 09:37:01 +01:00
Füge dein erstes Berichtsheft hinzu!
</button>
{% else %}
2024-12-02 16:49:45 +01:00
2024-12-04 09:37:01 +01:00
<div
2024-12-04 14:04:12 +01:00
class="mb-5 -mt-5 flex items-center justify-center grid sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
2024-12-04 09:37:01 +01:00
>
2024-12-02 16:49:45 +01:00
{% for report in reports %}
2024-12-03 15:15:45 +01:00
2024-12-04 11:41:57 +01:00
{% if forloop.first %} {% if report.week != week_now %}
2024-12-06 14:04:17 +01:00
<a class="{{ style.card }} flex items-center justify-center" title="Neues Berichtsheft"
href="/write" hx-get="/write" hx-target="#main_content" hx-push-url="true" hx-swap="innerHTML"
2024-12-05 17:03:42 +01:00
>
2024-12-04 11:41:57 +01:00
<span class="text-9xl font-bold"> + </span>
2024-12-06 14:04:17 +01:00
</a>
2024-12-04 11:41:57 +01:00
{% endif %} {% endif %}
{% include 'component/report.html' with report=report %}
{% endfor %}
<div hx-get="/reports?page=2"
hx-trigger="revealed"
hx-swap="outerHTML">
{% endif %}
2024-12-03 15:15:45 +01:00
2024-12-04 09:37:01 +01:00
</div>
</div>