From b7340433104bef4dbffb8845d00788b11f43845a Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Sat, 2 Aug 2025 21:24:12 +0200 Subject: [PATCH] maud formatting --- src/game.rs | 34 +++++++++++++++------------ src/index.rs | 10 +++----- src/page.rs | 66 +++++++++++++++++++++++++--------------------------- 3 files changed, 54 insertions(+), 56 deletions(-) diff --git a/src/game.rs b/src/game.rs index 9317fe9..7fae183 100644 --- a/src/game.rs +++ b/src/game.rs @@ -29,14 +29,22 @@ async fn index(State(backend): State>, cookies: CookieJar) -> Respo } form { - fieldset role="group" { - input name="name" placeholder=(format!("Rename {}", client.get_display_name())) aria-label="Name"; - input type="submit" value="Save"; - } + fieldset role="group" { + input + name="name" + placeholder=(format!("Rename {}", client.get_display_name())) + aria-label="Name"; + input type="submit" value="Save"; + } } - p { "You have found " (sightings.len()) "/" (amount_total_cameras) " cameras." - progress value=(sightings.len()) max=(amount_total_cameras); + p { + "You have found " + (sightings.len()) + "/" + (amount_total_cameras) + " cameras." + progress value=(sightings.len()) max=(amount_total_cameras); } p { h2 { "Highscore" } @@ -44,16 +52,12 @@ async fn index(State(backend): State>, cookies: CookieJar) -> Respo @for rank in highscore { li.card { span { - span.font-headline.rank.text-muted { - (rank.rank)"." - } - @if rank.client == client { (PreEscaped("")) } - (rank.client.get_display_name()) - @if rank.client == client{ (PreEscaped("")) } - } - span.font-headline.cam { - (rank.amount)(PreEscaped(" "))"📸" + span.font-headline.rank.text-muted { (rank.rank) "." } + @if rank.client == client { (PreEscaped("")) } + (rank.client.get_display_name()) + @if rank.client == client { (PreEscaped("")) } } + span.font-headline.cam { (rank.amount) (PreEscaped(" ")) "📸" } } } } diff --git a/src/index.rs b/src/index.rs index 5af50de..274041d 100644 --- a/src/index.rs +++ b/src/index.rs @@ -3,11 +3,9 @@ use maud::{html, Markup}; pub(super) async fn index() -> Markup { new(html! { - h1 { - "Digital Shadows" - } + h1 { "Digital Shadows" } hgroup { - h2 { + h2 { "Who owns your " mark { "data" } "?" @@ -22,9 +20,7 @@ pub(super) async fn index() -> Markup { 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 { - "— René Mayrhofer" - } + cite { "— René Mayrhofer" } } } p { diff --git a/src/page.rs b/src/page.rs index 7b776a1..c73454b 100644 --- a/src/page.rs +++ b/src/page.rs @@ -10,52 +10,50 @@ pub fn new(content: Markup) -> Markup { 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 { "Digital Shadows" } } body { header.container { - nav { - ul { - li { a href="/" { strong { "Digital Shadows" } } } + nav { + ul { + li { + a href="/" { + strong { "Digital Shadows" } + } } - ul { - li { - a href="/"{ - span role="img" aria-label="home" { - "🏠" - } - } + } + ul { + li { + a href="/" { + span role="img" aria-label="home" { "🏠" } } - li { - a href="/game" { - span role="img" aria-label="camera" { - "📸" - } - } + } + li { + a href="/game" { + span role="img" aria-label="camera" { "📸" } } - li { span id="theme_switcher" {} } + } + li { + span id="theme_switcher" {} } } } + } - main.container { - section { - (content) - } - } + main.container { + section { (content) } + } - footer.container { - small { - "Footer " - mark { "to be completed" } - a href="#" { "with links" } - " • " - a target="_blank" href="https://www.digidow.eu/impressum/" { "Impressum" } - } + footer.container { + small { + "Footer " + mark { "to be completed" } + a href="#" { "with links" } + " • " + a target="_blank" href="https://www.digidow.eu/impressum/" { "Impressum" } } - script src="/static/theme.js" {} + } + script src="/static/theme.js" {} } } }