add privacy page

This commit is contained in:
2025-08-15 17:30:44 +02:00
parent 0327892f02
commit ff72f7c9fa
5 changed files with 162 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
use crate::{language::language, page::Page};
use axum::http::HeaderMap;
use axum_extra::extract::CookieJar;
use maud::{Markup, PreEscaped, html};
use maud::{html, Markup, PreEscaped};
pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
let lang = language(&cookies, &headers);
@@ -53,3 +53,83 @@ pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
}
})
}
pub(super) async fn data(cookies: CookieJar, headers: HeaderMap) -> Markup {
let lang = language(&cookies, &headers);
rust_i18n::set_locale(lang.to_locale());
let page = Page::new(lang);
page.content(html! {
h1 { (t!("privacy_policy_title")) }
h2 { (t!("data_controller")) }
p {
a href="https://www.digidow.eu/impressum/" target="_blank" { (t!("see_impressum")) }
}
h2 { (t!("overview")) }
p {
(PreEscaped(t!("privacy_overview")))
}
h2 { (t!("data_we_collect")) }
h3 { (t!("cookies")) }
p {
(t!("cookies_description"))
ol {
li {
kbd { "client_id" }
" "
(t!("cookie_client_id"))
}
li {
kbd { "lang" }
" "
(t!("cookie_lang"))
}
}
}
h3 { (t!("game_data")) }
p {
(t!("game_data_description"))
ul {
li { (t!("chosen_name")) }
li { (t!("game_progress")) }
li {
(PreEscaped(t!("random_client_id")))
}
}
}
h2 { (t!("purpose_legal_basis")) }
ul {
li { (t!("game_functionality")) }
li { (t!("language_preference")) }
}
h2 { (t!("data_retention")) }
p {
(t!("data_retention_description"))
}
h2 { (t!("data_sharing")) }
p {
(t!("data_sharing_description"))
}
h2 { (t!("your_rights_gdpr")) }
p {
(t!("rights_description"))
ul {
li { (t!("right_access")) }
li { (t!("right_rectification")) }
li { (t!("right_erasure")) }
li { (t!("right_restriction")) }
li { (t!("right_portability")) }
li { (t!("right_object")) }
li { (t!("right_withdraw_consent")) }
}
}
h3 { (t!("how_to_exercise_rights")) }
ul {
li { (t!("clear_cookies")) }
li {
(PreEscaped(t!("contact_us")))
}
}
})
}