forge
Explore
Log in

Don't you dare go Hollow

Landing top-anchors so the tab row never moves between sections, and the admin bar's wordmark leads back to it

Browse files at this commit

ef24069d5856a8e711e48bdb53c9e0d9d10da2ecAhmet Kaan GümüşParent: 21e0e94
crates/im-web/assets/main.cssmodified+10 -0
@@ -318,6 +318,11 @@ body:has(.auth-stage) > .auth-stage::-webkit-scrollbar {
318 padding: 4px 0 10px;318 padding: 4px 0 10px;
319 }319 }
320 320
321+.landing-stage .auth-column {
322+ margin-top: 40px;
323+ margin-bottom: 40px;
324+}
325+
321 .auth-card {326 .auth-card {
322 background: var(--surface);327 background: var(--surface);
323 border: 1px solid var(--border);328 border: 1px solid var(--border);
@@ -847,6 +852,11 @@ body:has(.admin-shell) {
847 align-self: auto;852 align-self: auto;
848 }853 }
849 854
855+a.wordmark-home {
856+ text-decoration: none;
857+ color: inherit;
858+}
859+
850 .admin-card {860 .admin-card {
851 background: var(--surface);861 background: var(--surface);
852 border: 1px solid var(--border);862 border: 1px solid var(--border);
crates/im-web/src/admin.rsmodified+3 -1
@@ -168,7 +168,9 @@ async fn admin_page(cx: &Cx) -> Result<Response> {
168 <main class="admin-shell">168 <main class="admin-shell">
169 <div class="admin-column">169 <div class="admin-column">
170 <div class="admin-bar">170 <div class="admin-bar">
171- <span class="wordmark-text">"im"</span>171+ // The brand is the way back to the landing, as in iz's
172+ // topbar; the address stays a link too.
173+ <a class="wordmark-text wordmark-home" href="/">"im"</a>
172 <nav class="admin-tabs">(topcoat::view::Unescaped::new_unchecked(nav(&section)))</nav>174 <nav class="admin-tabs">(topcoat::view::Unescaped::new_unchecked(nav(&section)))</nav>
173 <a class="auth-alt" href="/">(escape(&me.email))</a>175 <a class="auth-alt" href="/">(escape(&me.email))</a>
174 </div>176 </div>
crates/im-web/src/pages.rsmodified+1 -1
@@ -606,7 +606,7 @@ async fn signed_in(cx: &Cx, user: &im_core::model::User) -> Result {
606 .collect::<String>();606 .collect::<String>();
607 let stage = view! {607 let stage = view! {
608 cx =>608 cx =>
609- <main class="auth-stage">609+ <main class="auth-stage landing-stage">
610 <div class="auth-column">610 <div class="auth-column">
611 (wordmark(cx).await?)611 (wordmark(cx).await?)
612 <nav class="admin-tabs landing-nav">(topcoat::view::Unescaped::new_unchecked(nav))</nav>612 <nav class="admin-tabs landing-nav">(topcoat::view::Unescaped::new_unchecked(nav))</nav>
style/main.scssmodified+14 -0
@@ -279,6 +279,14 @@ body:has(.auth-stage) {
279 padding: 4px 0 10px;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;
288+}
289+
282 .auth-card {290 .auth-card {
283 background: var(--surface);291 background: var(--surface);
284 border: 1px solid var(--border);292 border: 1px solid var(--border);
@@ -853,6 +861,12 @@ body:has(.admin-shell) {
853 861
854 .admin-bar .auth-alt { margin-left: auto; align-self: auto; }862 .admin-bar .auth-alt { margin-left: auto; align-self: auto; }
855 863
864+// A brand that is also a link keeps the wordmark's look, not the link's.
865+a.wordmark-home {
866+ text-decoration: none;
867+ color: inherit;
868+}
869+
856 .admin-card {870 .admin-card {
857 background: var(--surface);871 background: var(--surface);
858 border: 1px solid var(--border);872 border: 1px solid var(--border);