diff options
author | metamuffin <metamuffin@disroot.org> | 2023-06-16 20:23:12 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-06-16 20:23:12 +0200 |
commit | 8c2dbd2147ca3fd15495b76437aaaaf83fafe236 (patch) | |
tree | 097598848298f759d100b9002b7bf2cab50ce8ad /server/src/routes | |
parent | 1e66a718f9921c6d2bd0d54fb8eee26c7c7cc0af (diff) | |
download | jellything-8c2dbd2147ca3fd15495b76437aaaaf83fafe236.tar jellything-8c2dbd2147ca3fd15495b76437aaaaf83fafe236.tar.bz2 jellything-8c2dbd2147ca3fd15495b76437aaaaf83fafe236.tar.zst |
navbar improved
Diffstat (limited to 'server/src/routes')
-rw-r--r-- | server/src/routes/ui/layout.rs | 17 | ||||
-rw-r--r-- | server/src/routes/ui/style/itempage.css | 2 | ||||
-rw-r--r-- | server/src/routes/ui/style/layout.css | 7 |
3 files changed, 15 insertions, 11 deletions
diff --git a/server/src/routes/ui/layout.rs b/server/src/routes/ui/layout.rs index 6900dc3..da795aa 100644 --- a/server/src/routes/ui/layout.rs +++ b/server/src/routes/ui/layout.rs @@ -31,23 +31,22 @@ markup::define! { } body[class=class.unwrap_or("")] { nav { - @if *show_back { a[onclick="history.back()", href="#"] { "<- Back" } } - h1 { a[href="/"] { @CONF.brand } } + @if *show_back { a[onclick="history.back()", href="#"] { "<- Back" } } " " + h1 { a[href="/"] { @CONF.brand } } " " @if let Some(_) = session { - a[href="/library"] { "My Library" } - a[href="/items"] { "All Items" } + a[href="/library"] { "My Library" } " " + a[href="/items"] { "All Items" } " " } - div.account { @if let Some(session) = session { - span { "Logged in as " @session.user.display_name } + span { "Logged in as " } span.username { @session.user.display_name } " " @if session.user.admin { - a[href=uri!(r_account_admin_dashboard())] { "Administration" } + a[href=uri!(r_account_admin_dashboard())] { "Administration" } " " } - a[href=uri!(r_account_settings())] { "Settings" } + a[href=uri!(r_account_settings())] { "Settings" } " " a[href=uri!(r_account_logout())] { "Log out" } } else { - a[href=uri!(r_account_register())] { "Register" } + a[href=uri!(r_account_register())] { "Register" } " " a[href=uri!(r_account_login())] { "Log in" } } } diff --git a/server/src/routes/ui/style/itempage.css b/server/src/routes/ui/style/itempage.css index ad32831..22b2774 100644 --- a/server/src/routes/ui/style/itempage.css +++ b/server/src/routes/ui/style/itempage.css @@ -30,7 +30,7 @@ width: 100%; } .page.item .banner { - width: max(8em, 20%); + width: max(8em, 25%); float: left; margin: 3em; margin-top: -1em; diff --git a/server/src/routes/ui/style/layout.css b/server/src/routes/ui/style/layout.css index 07b7397..774cb46 100644 --- a/server/src/routes/ui/style/layout.css +++ b/server/src/routes/ui/style/layout.css @@ -44,6 +44,7 @@ body { } nav { + user-select: none; z-index: 90; position: fixed; top: 0px; @@ -84,11 +85,15 @@ nav h1 { display: inline; margin-right: 1em; } - nav .account { float: right; display: inline; } +nav .account .username { + color: var(--accent-light); + font-weight: bold; + margin-right: 1em; +} #main { display: block; |