From 609ec824da4888feebb396ea0f5ef73e363a8b51 Mon Sep 17 00:00:00 2001 From: tpart Date: Fri, 22 Dec 2023 14:38:04 +0100 Subject: Improve nav css for small screen widths --- server/src/routes/ui/layout.rs | 4 ++-- web/style/navbar.css | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/server/src/routes/ui/layout.rs b/server/src/routes/ui/layout.rs index c98c8ec..d12dc26 100644 --- a/server/src/routes/ui/layout.rs +++ b/server/src/routes/ui/layout.rs @@ -40,8 +40,8 @@ markup::define! { nav { h1 { a[href="/"] { @CONF.brand } } " " @if let Some(_) = session { - a[href=uri!(r_library_node("library"))] { "My Library" } " " - a[href=uri!(r_all_items())] { "All Items" } " " + a.library[href=uri!(r_library_node("library"))] { "My Library" } " " + a.library[href=uri!(r_all_items())] { "All Items" } " " } div.account { @if let Some(session) = session { diff --git a/web/style/navbar.css b/web/style/navbar.css index 3ccd838..308b39a 100644 --- a/web/style/navbar.css +++ b/web/style/navbar.css @@ -86,4 +86,17 @@ nav .back::before { *::before { margin-right: 0px; } +} +@media (max-width: 750px) { + nav h1 { + display: none; + } + nav .account span { + display: none; + } +} +@media (max-width: 400px) { + nav .library { + display: none; + } } \ No newline at end of file -- cgit v1.2.3-70-g09d2