2 languages
This commit is contained in:
35
src/game.rs
35
src/game.rs
@@ -30,27 +30,32 @@ async fn index(
|
||||
page.messages(messages);
|
||||
let markup = page.content(html! {
|
||||
hgroup {
|
||||
h1 { "Who finds the most cameras?" }
|
||||
h1 { (t!("game_title")) }
|
||||
}
|
||||
p {
|
||||
mark { "TODO: Explanation of AEF / digital shadows / search game" }
|
||||
mark { (t!("game_explanation_todo")) }
|
||||
}
|
||||
|
||||
div.mb-sm { (t!("ask_to_change_name", name = client.get_display_name())) }
|
||||
|
||||
form action="/name" method="post" {
|
||||
fieldset role="group" {
|
||||
input name="name" placeholder=(t!("funny_name_change_placeholder")) aria-label="Name" required;
|
||||
input type="submit" value="Save";
|
||||
input
|
||||
name="name"
|
||||
placeholder=(t!("funny_name_change_placeholder"))
|
||||
aria-label="Name"
|
||||
required;
|
||||
input type="submit" value=(t!("save_button"));
|
||||
}
|
||||
}
|
||||
|
||||
p.mb-0 {
|
||||
"You have found "
|
||||
(sightings.len())
|
||||
"/"
|
||||
(amount_total_cameras)
|
||||
" cameras:"
|
||||
({
|
||||
t!(
|
||||
"cameras_found", found = sightings.len(), total =
|
||||
amount_total_cameras
|
||||
)
|
||||
})
|
||||
progress value=(sightings.len()) max=(amount_total_cameras);
|
||||
}
|
||||
|
||||
@@ -61,7 +66,7 @@ async fn index(
|
||||
}
|
||||
|
||||
p {
|
||||
h2 { "Highscore" }
|
||||
h2 { (t!("highscore_title")) }
|
||||
ul.iterated {
|
||||
@for rank in highscore {
|
||||
li.card {
|
||||
@@ -105,7 +110,7 @@ async fn game(
|
||||
if let Ok(number) = backend.client_found_camera(&client, &camera).await {
|
||||
messages.info(format!("found-cam|{}|{number}", camera.name));
|
||||
} else {
|
||||
messages.info("err|Try to find a new camera!|You have already collected this camera.|");
|
||||
messages.info(&format!("err|{}|{}|{}", t!("error_already_found_title"), t!("error_already_found_body"), t!("error_already_found_footer")));
|
||||
}
|
||||
|
||||
Ok(Redirect::to("/game"))
|
||||
@@ -114,7 +119,7 @@ async fn game(
|
||||
async fn not_found(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
let lang = language(&cookies, &headers);
|
||||
Page::new(lang).content(html! {
|
||||
h1 { "uups" }
|
||||
h1 { (t!("not_found_title")) }
|
||||
})
|
||||
}
|
||||
|
||||
@@ -133,9 +138,9 @@ async fn set_name(
|
||||
|
||||
match backend.set_client_name(&client, &form.name).await {
|
||||
Ok(()) => messages.info("set-name-succ"),
|
||||
Err(NameUpdateError::TooShort(expected, actual)) => messages.info(format!("err|That's too little!|We need more information about you. Give us at least {expected} characters for you new name!|Received characters: {actual}")),
|
||||
Err(NameUpdateError::TooLong(expected, actual)) => messages.info(format!("err|That's too much!|We only live in (20)25, so please use less than {expected} characters for your new name.|Received characters: {actual}")),
|
||||
Err(NameUpdateError::ContainsBadWord) => messages.info(format!("err|Hmmm. I don't like this name.|Please choose a different one!|")),
|
||||
Err(NameUpdateError::TooShort(expected, actual)) => messages.info(format!("err|{}|{}|{}: {}", t!("error_name_too_short_title"), t!("error_name_too_short_body", expected = expected), t!("received_characters"), actual)),
|
||||
Err(NameUpdateError::TooLong(expected, actual)) => messages.info(format!("err|{}|{}|{}: {}", t!("error_name_too_long_title"), t!("error_name_too_long_body", expected = expected), t!("received_characters"), actual)),
|
||||
Err(NameUpdateError::ContainsBadWord) => messages.info(format!("err|{}|{}|{}", t!("error_bad_word_title"), t!("error_bad_word_body"), t!("error_bad_word_footer"))),
|
||||
};
|
||||
|
||||
// Redirect back to the game page
|
||||
|
98
src/index.rs
98
src/index.rs
@@ -1,7 +1,7 @@
|
||||
use crate::{language::language, page::Page};
|
||||
use axum::http::HeaderMap;
|
||||
use axum_extra::extract::CookieJar;
|
||||
use maud::{html, Markup};
|
||||
use maud::{html, Markup, PreEscaped};
|
||||
|
||||
pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
let lang = language(&cookies, &headers);
|
||||
@@ -9,60 +9,48 @@ pub(super) async fn index(cookies: CookieJar, headers: HeaderMap) -> Markup {
|
||||
rust_i18n::set_locale(lang.to_locale());
|
||||
|
||||
let page = Page::new(lang);
|
||||
page.content(
|
||||
html! {
|
||||
h1 { (t!("digital_shadows")) }
|
||||
hgroup {
|
||||
h2 {
|
||||
"Who owns your "
|
||||
mark { "data" }
|
||||
"?"
|
||||
}
|
||||
p {
|
||||
"What happens when your digital shadow takes shape: tangible, interrogative, observant?"
|
||||
}
|
||||
}
|
||||
p {
|
||||
"Artists: René Mayrhofer (AT), Philipp Hofer (AT), Laura Poulbot (FR), Airan Berg (AT), Andrea Hummer (AT), Ilona Roth (DE/AT), Linda Huber (AT), Gisela Klammsteiner (AT), Sara Koniarek (AT), Simon Sharkey (GB), Valerio Iurato (IT), Doris Roth (DE), Alina Lugovskaya (UA/RU), Selina Nowak (AT), JeanClaude Grieco (AR/AT), Florian Böttcher (AT), Ethem Saygieder-Fischer (AT)"
|
||||
span.easteregg { ", Marie Birner (Couch)" }
|
||||
}
|
||||
blockquote {
|
||||
"Digital Shadows confronts visitors with their digital self – copied, measured, analyzed. An experiment on data power, visibility, and control in the digital age."
|
||||
footer {
|
||||
cite { "— Digital Shadows Team" }
|
||||
}
|
||||
}
|
||||
p {
|
||||
"Digital Shadows invites the participants to experience questions of digital and physical identity, data security, and control. In immersive zones woven with choreographic elements, visitors encounter themselves mirrored, copied, measured and simultaneously lose themselves in a system that knows more about them than they intend to reveal. Between play and analysis, concealment and transparency, a reflection emerges on identity in the age of facial recognition, deepfakes, and algorithmic profiling. How does one fool a camera? How visible do I want to be? Who owns what I leave behind, and who profits from it? This experiment is a collaborative endeavor between science and art, making power, visibility, and self-determination in digital space tangible. Through an exploration of digital materiality and algorithmic intelligence, a sometimes absurd, always immediate reflection unfolds on our role in data-driven worlds until we face our digital dilemma, and the choice is still ours to make."
|
||||
}
|
||||
|
||||
h2 { "What to do with this information?" }
|
||||
|
||||
div.grid.gap-lg {
|
||||
article {
|
||||
header { "Visit our booth" }
|
||||
|
||||
"We will be delighted to see you at our booth in the Post City Linz, where our team will show you, what happens when your Digital Shadow becomes allmighty. "
|
||||
|
||||
a
|
||||
href="https://www.jku.at/ars-electronica-2025-panic-yes-no/digital-shadows/"
|
||||
target="_blank"
|
||||
title="Go to JKU Information Page" {
|
||||
"Find out more"
|
||||
}
|
||||
|
||||
footer { "Where: Postcity Linz" }
|
||||
}
|
||||
article {
|
||||
header { "Play our game" }
|
||||
|
||||
"Ever wandered through Linz with the aim to find (hidden) cameras? Well, if you are that kind of person than our 'Discover cameras' game will be ideal for you! "
|
||||
|
||||
a href="/game" title="Go to Game Page" { "Find out more" }
|
||||
|
||||
footer { "Where: all over Linz" }
|
||||
}
|
||||
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")) }
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
38
src/page.rs
38
src/page.rs
@@ -62,7 +62,7 @@ impl Page {
|
||||
meta name="viewport" content="width=device-width, initial-scale=1.0";
|
||||
link rel="stylesheet" href="/static/pico.min.css";
|
||||
link rel="stylesheet" href="/static/style.css";
|
||||
title { "Digital Shadows" }
|
||||
title { (t!("digital_shadows")) }
|
||||
}
|
||||
body {
|
||||
header.container {
|
||||
@@ -70,7 +70,7 @@ impl Page {
|
||||
ul {
|
||||
li {
|
||||
a href="/" {
|
||||
strong { "Digital Shadows" }
|
||||
strong { (t!("digital_shadows")) }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,26 +99,28 @@ impl Page {
|
||||
article class="succ msg" {
|
||||
header { (t!("found_camera_title", name = found_camera.0)) }
|
||||
(t!("found_camera_body", amount = found_camera.1))
|
||||
footer { a href="#ranking" { "See your ranking" } }
|
||||
footer {
|
||||
a href="#ranking" { (t!("see_ranking")) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@if self.new_name {
|
||||
div.flex {
|
||||
article class="name msg" {
|
||||
header { "New name!" }
|
||||
"Does it feel much different?"
|
||||
div.flex {
|
||||
article class="name msg" {
|
||||
header { (t!("new_name_title")) }
|
||||
(t!("new_name_message"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@if let Some(err) = &self.err {
|
||||
div.flex {
|
||||
article class="error msg" {
|
||||
header { (err.0) }
|
||||
(err.1)
|
||||
footer { (err.2) }
|
||||
div.flex {
|
||||
article class="error msg" {
|
||||
header { (err.0) }
|
||||
(err.1)
|
||||
footer { (err.2) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section { (content) }
|
||||
@@ -126,12 +128,12 @@ impl Page {
|
||||
|
||||
footer.container {
|
||||
small {
|
||||
"Footer "
|
||||
mark { "to be completed" }
|
||||
a href="#" { "with links" }
|
||||
(t!("footer_text"))
|
||||
mark { (t!("footer_todo")) }
|
||||
a href="#" { (t!("footer_links")) }
|
||||
" • "
|
||||
a target="_blank" href="https://www.digidow.eu/impressum/" {
|
||||
"Impressum"
|
||||
(t!("impressum"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user