diff --git a/src/tera/mod.rs b/src/tera/mod.rs index 314483b..c44652b 100644 --- a/src/tera/mod.rs +++ b/src/tera/mod.rs @@ -1,6 +1,6 @@ use std::{fs::OpenOptions, io::Write}; -use chrono::Local; +use chrono::{Datelike, Local}; use rocket::{ catch, catchers, fairing::{AdHoc, Fairing, Info, Kind}, @@ -63,6 +63,11 @@ async fn index(db: &State, user: User, flash: Option= 10 { + context.insert("show_quick_ergo_button", "yes"); + } + context.insert("achievements", &Achievements::for_user(db, &user).await); context.insert("notifications", &Notification::for_user(db, &user).await); context.insert("loggedin_user", &UserWithDetails::from_user(user, db).await); diff --git a/templates/index.html.tera b/templates/index.html.tera index 698dcc9..1ee0e38 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -12,6 +12,15 @@ Geplante Ausfahrten + {% if show_quick_ergo_button %} + + {% endif %} {% if notifications %}