mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-22 03:50:30 +00:00
5346182807
From the large-screen review (visual findings of the shell and the top-level screens): - Rail: 80px wide, one caption size for every name (no shrinking per item), balanced two-line names with every entry as tall as the tallest, short rail names where a language's word is too long (mobileNav.rail*, all locales), and near-opaque glass so a map's colours no longer smear through it. - Rail head: always one 56px circle, so the entries never jump between pages: the create action, the screen's own action (the vacation calendar's year/editor switch moves there instead of floating over the days) or the quiet logo on settings and administration. It stays put while a short rail scrolls. - Vacation calendar: weekday letters over each month on a wide window; the editor's mode switch sits at the foot with room kept for it. - Docks: More is marked with a ring rather than the centre button's fill, the dock glass is denser, and lists fade out under the dock instead of showing in the gap below it. - Dashboard: trip names get the card's width with the dates under them, the hero's facts wrap as whole chips, the filter chips scroll with a fade, the hero ends above the dock on a phone on its side and its buttons sit on a dark ground; the header bar stands in the content's column. - Journeys: on a wide window the header is the same glass bar, in the column of the cards, and the other journeys' label starts with them. - Notifications: the round chevron back button, in the list's column. - Settings and administration share one frame and width. Admin's new-user action sits under the section list's title, the users card header wraps inside the card, stat labels ellipsize, role badges read in dark mode. - Collections: one card per place with the status inside it, worded in a readable mix of its colour. - Atlas and the journey map frame clear of the rail and the header; the journey's day bar sits on a glass plate, and a phone on its side gets smaller cards. - Rail label tests rewritten for the new rule; FE-MOB-PANES-016 duplicate renumbered to 017.
34 lines
1.3 KiB
TypeScript
34 lines
1.3 KiB
TypeScript
import { ReactNode } from 'react'
|
|
|
|
interface MGlassBarProps {
|
|
/** Pins the bar below the status bar (default). Pass false to embed it in flow. */
|
|
floating?: boolean
|
|
/**
|
|
* The width the screen's content column stops at on a wide window, as the
|
|
* same class the content uses (`wide:max-w-[1280px]`). The floating bar then
|
|
* stands in that column with the content's own padding, so their edges line
|
|
* up at every width.
|
|
*/
|
|
column?: string
|
|
className?: string
|
|
children: ReactNode
|
|
}
|
|
|
|
/** Top bar glass pill: blur 26 / saturate 1.7 on --m-glass with --m-gbr border. */
|
|
export default function MGlassBar({ floating = true, column = '', className = '', children }: MGlassBarProps) {
|
|
const bar = (
|
|
<div
|
|
className={`pointer-events-auto flex items-center gap-[11px] rounded-full border border-[color:var(--m-gbr)] bg-[color:var(--m-glass)] px-[14px] py-2 backdrop-blur-[26px] backdrop-saturate-[1.7] shadow-[0_14px_34px_-16px_rgba(0,0,0,.22)] ${className}`}
|
|
>
|
|
{children}
|
|
</div>
|
|
)
|
|
if (!floating) return bar
|
|
// The page column (m-span-x), padded and capped like the content under it.
|
|
return (
|
|
<div className="m-span-x pointer-events-none fixed top-[var(--m-safe-top,12px)] z-30">
|
|
<div className={`px-4 wide:mx-auto wide:px-6 ${column}`}>{bar}</div>
|
|
</div>
|
|
)
|
|
}
|