Mobile pass: a top bar that stays put, a menu that scrolls, room for notches
On phones the top bar is now sticky and compact with a 44 px menu button, an open menu scrolls by itself with finger-sized rows, the page asks for the whole screen (viewport-fit=cover) and keeps toasts, drawers and the bar clear of the notch and home bar, text is slightly larger on small screens, toasts and drawers use the full width, and presses do not wait for a second tap. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
645816d5a8
commit
5750350565
4 files changed
+166
-1
No files matched your search
+2
-1
@@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<title>Homelab Manager</title>
|
||||
<link rel="manifest" href="/manifest.webmanifest" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32.png" />
|
||||
@@ -12,6 +12,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-title" content="Homelab" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<script>
|
||||
(function () {
|
||||
try {
|
||||
|
||||
@@ -2226,3 +2226,105 @@ html[data-menu-icons="off"] .dropdown-item .menu-item-icon {
|
||||
display: inline-block;
|
||||
padding-block: 0.3rem;
|
||||
}
|
||||
|
||||
/* ── Phones and tablets held upright ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
|
||||
The top bar stays where the thumb can reach it (the menu was out of reach after scrolling), is compact, and has a menu button that can be hit; an open menu scrolls by itself instead of
|
||||
pushing the page down; the rows in it are finger-sized; and the notch, the rounded corners and the home bar are left clear (the page asks for the whole screen with viewport-fit=cover). */
|
||||
@media (max-width: 991.98px) {
|
||||
.navbar-vertical {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1030;
|
||||
padding-top: env(safe-area-inset-top);
|
||||
padding-left: env(safe-area-inset-left);
|
||||
padding-right: env(safe-area-inset-right);
|
||||
}
|
||||
|
||||
.navbar-vertical .navbar-brand .logo-frame {
|
||||
width: 8.5rem;
|
||||
}
|
||||
|
||||
.navbar-vertical .navbar-toggler {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 2.75rem;
|
||||
height: 2.75rem;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.navbar-vertical .navbar-collapse.show,
|
||||
.navbar-vertical .navbar-collapse.collapsing {
|
||||
max-height: calc(100vh - 4.5rem - env(safe-area-inset-top));
|
||||
max-height: calc(100dvh - 4.5rem - env(safe-area-inset-top));
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
|
||||
.navbar-vertical .nav-link,
|
||||
.navbar-vertical .dropdown-item {
|
||||
min-height: 2.75rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navbar-vertical .dropdown-menu .dropdown-item {
|
||||
padding-top: 0.55rem;
|
||||
padding-bottom: 0.55rem;
|
||||
}
|
||||
|
||||
.fav-star {
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
padding-left: env(safe-area-inset-left);
|
||||
padding-right: env(safe-area-inset-right);
|
||||
}
|
||||
|
||||
.page-body {
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.toast-stack {
|
||||
bottom: calc(1rem + env(safe-area-inset-bottom));
|
||||
right: calc(1rem + env(safe-area-inset-right));
|
||||
}
|
||||
|
||||
.detail-drawer-header {
|
||||
padding-top: calc(1rem + env(safe-area-inset-top));
|
||||
}
|
||||
|
||||
.detail-drawer-body {
|
||||
padding-bottom: calc(1rem + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
/* A little larger text where the screen is small and held close, and toasts across the width instead of a corner. */
|
||||
body {
|
||||
--tblr-body-font-size: 0.9375rem;
|
||||
font-size: 0.9375rem;
|
||||
}
|
||||
|
||||
.toast-stack {
|
||||
left: calc(1rem + env(safe-area-inset-left));
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.detail-drawer {
|
||||
width: 100vw;
|
||||
border-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* No wait for a second tap and no zoom on a double tap, on anything that is pressed. */
|
||||
a,
|
||||
button,
|
||||
summary,
|
||||
label,
|
||||
select,
|
||||
[role="button"],
|
||||
[role="tab"] {
|
||||
touch-action: manipulation;
|
||||
}
|
||||
Reference in new issue
Block a user