Landing chrome pins to the top while the section's cards centre in the room below — tabs stationary, content mid-screen
Browse files at this commit83d82acf0c271a5a220274a827b6f2a574f49e5aParent: ef240693 changed files +27 -10
- crates/im-web/assets/main.css +9 -3
- crates/im-web/src/pages.rs +3 -1
- style/main.scss +15 -6
crates/im-web/assets/main.cssmodified+9 -3
| @@ -318,9 +318,15 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar { | ||
| 318 | 318 | padding: 4px 0 10px; |
| 319 | 319 | } |
| 320 | 320 | |
| 321 | -.landing-stage .auth-column { | |
| 322 | - margin-top: 40px; | |
| 323 | - margin-bottom: 40px; | |
| 321 | +.landing-stage { | |
| 322 | + flex-direction: column; | |
| 323 | +} | |
| 324 | +.landing-stage .landing-chrome { | |
| 325 | + margin: 24px auto 0; | |
| 326 | + display: flex; | |
| 327 | + flex-direction: column; | |
| 328 | + align-items: center; | |
| 329 | + gap: 6px; | |
| 324 | 330 | } |
| 325 | 331 | |
| 326 | 332 | .auth-card { |
crates/im-web/src/pages.rsmodified+3 -1
| @@ -607,9 +607,11 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result { | ||
| 607 | 607 | let stage = view! { |
| 608 | 608 | cx => |
| 609 | 609 | <main class="auth-stage landing-stage"> |
| 610 | - <div class="auth-column"> | |
| 610 | + <div class="landing-chrome"> | |
| 611 | 611 | (wordmark(cx).await?) |
| 612 | 612 | <nav class="admin-tabs landing-nav">(topcoat::view::Unescaped::new_unchecked(nav))</nav> |
| 613 | + </div> | |
| 614 | + <div class="auth-column"> | |
| 613 | 615 | if let Some(code) = ok { |
| 614 | 616 | <div class="auth-ok">(ok_text(&code, lang))</div> |
| 615 | 617 | } |
style/main.scssmodified+15 -6
| @@ -279,12 +279,21 @@ body:has(.auth-stage) { | ||
| 279 | 279 | padding: 4px 0 10px; |
| 280 | 280 | } |
| 281 | 281 | |
| 282 | -// The landing top-anchors: sections differ in height, and a centred column | |
| 283 | -// would move the tab row under the mouse between them. Fixed offset, the | |
| 284 | -// admin panel's posture; the auth gates stay centred. | |
| 285 | -.landing-stage .auth-column { | |
| 286 | - margin-top: 40px; | |
| 287 | - margin-bottom: 40px; | |
| 282 | +// The landing pins its chrome — wordmark and section tabs — at the top, so | |
| 283 | +// the row never moves between sections, and centres the section's cards in | |
| 284 | +// the room left below. The column's `margin: auto` does the centring and | |
| 285 | +// still top-anchors when a section outgrows the window; the auth gates keep | |
| 286 | +// their plain centred stage. | |
| 287 | +.landing-stage { | |
| 288 | + flex-direction: column; | |
| 289 | + | |
| 290 | + .landing-chrome { | |
| 291 | + margin: 24px auto 0; | |
| 292 | + display: flex; | |
| 293 | + flex-direction: column; | |
| 294 | + align-items: center; | |
| 295 | + gap: 6px; | |
| 296 | + } | |
| 288 | 297 | } |
| 289 | 298 | |
| 290 | 299 | .auth-card { |