From 58f5722551268ebe61a90c8911082aa89d5d0f45 Mon Sep 17 00:00:00 2001 From: Henri Bourcereau Date: Sun, 24 May 2026 21:33:47 +0200 Subject: [PATCH] feat(web client): sidebar links style --- clients/web/assets/style.css | 5 ++-- clients/web/src/app.rs | 53 ++++++++++++++++++++++++------------ 2 files changed, 38 insertions(+), 20 deletions(-) diff --git a/clients/web/assets/style.css b/clients/web/assets/style.css index 09b21e9..dcc1b7b 100644 --- a/clients/web/assets/style.css +++ b/clients/web/assets/style.css @@ -2045,6 +2045,7 @@ a:hover { text-decoration: underline; } text-decoration: none; opacity: 0.8; transition: opacity 0.15s; + cursor: pointer; } .game-sidebar-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; } @@ -2078,13 +2079,13 @@ a:hover { text-decoration: underline; } } /* Push the version wrapper to the bottom of the sidebar flex column */ -.game-sidebar > div:has(.site-nav-version) { +.sidebar-footer { margin-top: auto; - padding: 0.75rem 1rem; border-top: 1px solid rgba(200,164,72,0.12); } .site-nav-version { + margin: 2em 0 1em; display: block; text-align: center; font-family: var(--font-ui); diff --git a/clients/web/src/app.rs b/clients/web/src/app.rs index 2749d9c..9288be3 100644 --- a/clients/web/src/app.rs +++ b/clients/web/src/app.rs @@ -42,9 +42,7 @@ fn relay_url() -> String { } #[cfg(not(debug_assertions))] { - let location = web_sys::window() - .and_then(|w| Some(w.location())) - .unwrap(); + let location = web_sys::window().and_then(|w| Some(w.location())).unwrap(); let protocol = location.protocol().unwrap_or_default(); let host = location.host().unwrap_or_default(); let ws_protocol = if protocol == "https:" { "wss" } else { "ws" }; @@ -565,47 +563,60 @@ fn SiteHamburger() -> impl IntoView { // Auth -
- - - - {move || match auth_username.get() { Some(u) => { let href = format!("/profile/{u}"); view! { + }.into_any() }, None => view! { + }.into_any(), }} -
+
"v" {VERSION}
+ // ── Replay snapshot modal ─────────────────────────────────────────────