From 4170b82aaefb204f981635e546ecda288f7e1e9b 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 00:35:23 +0300 Subject: [PATCH] =?UTF-8?q?Landing=20spreads=20into=20two,=20then=20three?= =?UTF-8?q?=20columns=20as=20the=20window=20widens=20=E2=80=94=20the=20who?= =?UTF-8?q?le=20dashboard=20fits=20a=20desktop=20screen=20at=20full=20zoom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/im-web/assets/main.css | 66 +++++++++++++++++++++++++++++++++++ crates/im-web/src/pages.rs | 6 ++-- style/main.scss | 40 +++++++++++++++++++++ 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/crates/im-web/assets/main.css b/crates/im-web/assets/main.css index 6939557..4a66d36 100644 --- a/crates/im-web/assets/main.css +++ b/crates/im-web/assets/main.css @@ -286,6 +286,72 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { gap: 10px; } +@media (min-width: 900px) { + .landing { + width: 1060px; + display: grid; + grid-template-columns: 1fr 1fr; + align-items: start; + gap: 16px; + } + .landing > .wordmark { + grid-column: 1/-1; + } + .landing > :nth-child(2) { + grid-column: 1; + grid-row: 2; + } + .landing > :nth-child(3) { + grid-column: 2; + grid-row: 2; + } + .landing > :nth-child(4) { + grid-column: 2; + grid-row: 3; + } + .landing > :nth-child(5) { + grid-column: 2; + grid-row: 4; + } + .landing > :nth-child(6) { + grid-column: 1; + grid-row: 3; + } + .landing > :nth-child(7) { + grid-column: 1; + grid-row: 4; + } +} +@media (min-width: 1100px) { + .landing { + width: 1320px; + grid-template-columns: 1fr 1fr 1fr; + } + .landing > :nth-child(2) { + grid-column: 1; + grid-row: 2; + } + .landing > :nth-child(3) { + grid-column: 1; + grid-row: 3; + } + .landing > :nth-child(4) { + grid-column: 2; + grid-row: 2; + } + .landing > :nth-child(5) { + grid-column: 2; + grid-row: 3; + } + .landing > :nth-child(6) { + grid-column: 3; + grid-row: 2; + } + .landing > :nth-child(7) { + grid-column: 3; + grid-row: 3; + } +} .wordmark { display: flex; align-items: center; diff --git a/crates/im-web/src/pages.rs b/crates/im-web/src/pages.rs index 3ae6fa9..78ee3bb 100644 --- a/crates/im-web/src/pages.rs +++ b/crates/im-web/src/pages.rs @@ -228,7 +228,9 @@ async fn totp(cx: &Cx) -> Result { }; - shell(cx, t(lang, Key::TitleTotp), None, stage).await?.into_response(cx) + shell(cx, t(lang, Key::TitleTotp), None, stage) + .await? + .into_response(cx) } _ => see_other("/login").into_response(cx), } @@ -581,7 +583,7 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { let stage = view! { cx =>
-
+
(wordmark(cx).await?)
diff --git a/style/main.scss b/style/main.scss index 6c6047b..45a87fc 100644 --- a/style/main.scss +++ b/style/main.scss @@ -236,6 +236,46 @@ body:has(.auth-stage) { gap: 10px; } +// The signed-in landing is a dashboard, not a gate: six cards in one 520px +// column run twice the height of a desktop window. Wide viewports spread the +// cards across columns so the whole page is on screen; narrow ones keep the +// single file. Placement is explicit per card (source order: wordmark, +// profile, stats, sessions, preferences, password, sign-out) so the columns +// balance by height instead of pairing by source order. +@media (min-width: 900px) { + .landing { + width: 1060px; + display: grid; + grid-template-columns: 1fr 1fr; + align-items: start; + gap: 16px; + + > .wordmark { grid-column: 1 / -1; } + // Tall cards (profile, password) anchor the left; the short ones stack + // right. Row heights couple, so this pairing is what keeps it shortest. + > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile + > :nth-child(3) { grid-column: 2; grid-row: 2; } // stats + > :nth-child(4) { grid-column: 2; grid-row: 3; } // sessions + > :nth-child(5) { grid-column: 2; grid-row: 4; } // preferences + > :nth-child(6) { grid-column: 1; grid-row: 3; } // password + > :nth-child(7) { grid-column: 1; grid-row: 4; } // sign out + } +} + +@media (min-width: 1100px) { + .landing { + width: 1320px; + grid-template-columns: 1fr 1fr 1fr; + + > :nth-child(2) { grid-column: 1; grid-row: 2; } // profile + > :nth-child(3) { grid-column: 1; grid-row: 3; } // stats + > :nth-child(4) { grid-column: 2; grid-row: 2; } // sessions + > :nth-child(5) { grid-column: 2; grid-row: 3; } // preferences + > :nth-child(6) { grid-column: 3; grid-row: 2; } // password + > :nth-child(7) { grid-column: 3; grid-row: 3; } // sign out + } +} + // The brand lockup. Lower case, and not by taste: capitalised, the dotted // `i` becomes `I` and the name reads as the English word. The tittle is the // Turkish one, in the word as it is in the mark.