From ef24069d5856a8e711e48bdb53c9e0d9d10da2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 5 Sep 2026 08:00:49 +0300 Subject: [PATCH] Landing top-anchors so the tab row never moves between sections, and the admin bar's wordmark leads back to it --- crates/im-web/assets/main.css | 10 ++++++++++ crates/im-web/src/admin.rs | 4 +++- crates/im-web/src/pages.rs | 2 +- style/main.scss | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/crates/im-web/assets/main.css b/crates/im-web/assets/main.css index e2dc4d2..b636a45 100644 --- a/crates/im-web/assets/main.css +++ b/crates/im-web/assets/main.css @@ -318,6 +318,11 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { padding: 4px 0 10px; } +.landing-stage .auth-column { + margin-top: 40px; + margin-bottom: 40px; +} + .auth-card { background: var(--surface); border: 1px solid var(--border); @@ -847,6 +852,11 @@ body:has(.admin-shell) { align-self: auto; } +a.wordmark-home { + text-decoration: none; + color: inherit; +} + .admin-card { background: var(--surface); border: 1px solid var(--border); diff --git a/crates/im-web/src/admin.rs b/crates/im-web/src/admin.rs index 7dcf70f..3ffce1e 100644 --- a/crates/im-web/src/admin.rs +++ b/crates/im-web/src/admin.rs @@ -168,7 +168,9 @@ async fn admin_page(cx: &Cx) -> Result {
- "im" + // The brand is the way back to the landing, as in iz's + // topbar; the address stays a link too. + "im" (escape(&me.email))
diff --git a/crates/im-web/src/pages.rs b/crates/im-web/src/pages.rs index e49d9ae..c7eec45 100644 --- a/crates/im-web/src/pages.rs +++ b/crates/im-web/src/pages.rs @@ -606,7 +606,7 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { .collect::(); let stage = view! { cx => -
+
(wordmark(cx).await?) diff --git a/style/main.scss b/style/main.scss index a78faf1..b6848da 100644 --- a/style/main.scss +++ b/style/main.scss @@ -279,6 +279,14 @@ body:has(.auth-stage) { padding: 4px 0 10px; } +// The landing top-anchors: sections differ in height, and a centred column +// would move the tab row under the mouse between them. Fixed offset, the +// admin panel's posture; the auth gates stay centred. +.landing-stage .auth-column { + margin-top: 40px; + margin-bottom: 40px; +} + .auth-card { background: var(--surface); border: 1px solid var(--border); @@ -853,6 +861,12 @@ body:has(.admin-shell) { .admin-bar .auth-alt { margin-left: auto; align-self: auto; } +// A brand that is also a link keeps the wordmark's look, not the link's. +a.wordmark-home { + text-decoration: none; + color: inherit; +} + .admin-card { background: var(--surface); border: 1px solid var(--border);