Files
aef-website/src/index.rs

157 lines
4.4 KiB
Rust

use crate::{language::language, page::Page};
use axum::http::HeaderMap;
use axum_extra::extract::CookieJar;
use maud::{html, Markup, PreEscaped};
pub(super) async fn index(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!("digital_shadows")) }
hgroup {
h2 { (PreEscaped(t!("who_owns_data"))) }
p { (t!("digital_shadow_description")) }
}
p {
(t!("artists_list"))
span.easteregg { (t!("artists_easter_egg")) }
}
blockquote {
(t!("project_quote"))
footer {
cite { (t!("project_quote_attribution")) }
}
}
p { (t!("project_description")) }
h2 { (t!("what_to_do_title")) }
div.grid.gap-lg {
article {
header { (t!("visit_booth_title")) }
(t!("visit_booth_description"))
a
href="https://www.jku.at/ars-electronica-2025-panic-yes-no/digital-shadows/"
target="_blank"
title=(t!("jku_link_title")) { (t!("find_out_more")) }
footer { (t!("location_postcity")) }
}
article {
header { (t!("play_game_title")) }
(t!("play_game_description"))
a href="/game" title=(t!("game_link_title")) { (t!("find_out_more")) }
footer { (t!("location_linz")) }
}
}
})
}
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 {
(PreEscaped(t!("data_controller_info")))
}
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")) }
li { (t!("statistical_analysis")) }
}
h2 { (t!("data_retention")) }
p {
(t!("data_retention_description"))
}
h2 { (t!("data_sharing")) }
p {
(t!("data_sharing_description"))
}
h2 { (t!("server_logfiles")) }
p {
(t!("server_logfiles_description"))
}
h2 { (t!("data_security")) }
p {
(t!("data_security_description"))
}
h2 { (t!("minors")) }
p {
(t!("minors_description"))
}
h2 { (t!("data_protection_officer")) }
p {
(PreEscaped(t!("data_protection_officer_contact_full")))
}
h2 { (t!("data_collection_timing")) }
p {
(t!("data_collection_timing_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")))
}
}
})
}