From 57c9d532c8a30fbfac2bfd737270b535512c2adb Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 16 May 2024 22:07:30 +0200 Subject: [PATCH 1/3] push --- templates/planned.html.tera | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/planned.html.tera b/templates/planned.html.tera index c7b1034..260b183 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -98,12 +98,12 @@ title="Prognostizierter maximaler Wasserstand am {{ day.day | date(format="%A", locale="de_AT") }}: {{ day.max_waterlevel }} cm">🌊{{ day.max_waterlevel }} cm {% endif %} + {% if day.weather %} + + Temp: {{ day.weather.max_temp | round }}° • Windböe: {{ day.weather.wind_gust | round }} km/h • Regen: {{ day.weather.rain_mm | round }} mm + + {% endif %} - {% if day.weather %} -
- Max temp: {{ day.weather.max_temp | round }}° • Windböe: {{ day.weather.wind_gust | round }} km/h • Regen: {{ day.weather.rain_mm | round }} mm -
- {% endif %} {% if day.planned_events | length > 0 or day.trips | length > 0 %}
{# --- START Events --- #} -- 2.45.2 From 0eac1a66f9c5eac9840d319d791e5d2e974ddebc Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 16 May 2024 22:35:26 +0200 Subject: [PATCH 2/3] better layout --- src/tera/mod.rs | 10 ++- src/tera/planned.rs | 6 -- templates/index.html.tera | 125 ++++++++++++++++++++---------------- templates/planned.html.tera | 21 ------ 4 files changed, 77 insertions(+), 85 deletions(-) diff --git a/src/tera/mod.rs b/src/tera/mod.rs index c47c7f1..c38206c 100644 --- a/src/tera/mod.rs +++ b/src/tera/mod.rs @@ -21,9 +21,10 @@ use sqlx::SqlitePool; use tera::Context; use crate::model::{ + logbook::Logbook, notification::Notification, role::Role, - user::{User, UserWithDetails}, + user::{User, UserWithDetails, SCHECKBUCH}, }; pub(crate) mod admin; @@ -52,8 +53,15 @@ async fn index(db: &State, user: User, flash: Option -

- Ruder - - assistent -

+

Ruder­assistent

- +
+ Vergangene Nachrichten (14 Tage) +
+ {% for notification in notifications %} + {% if notification.read_at %} +
+ + {{ notification.category }} • {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} + +
{{ notification.message | safe }}
+
+ {% endif %} + {% endfor %} +
+
+
+ {% endif %} {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} {% endif %} {% if "scheckbuch" in loggedin_user.roles %} -