fx: keep navbar always centered

This commit is contained in:
Ou 2024-10-21 20:02:03 +08:00
parent cc1aee2ae8
commit 884d55d71d
2 changed files with 15 additions and 9 deletions

View File

@ -51,7 +51,7 @@ function Refresh() {
export function Header() {
return (
<>
<span className="flex">
<span className="flex justify-self-start">
<Link to="/" className="flex gap-2 items-center">
<div className="h-10 w-10 bg-cover" title="logo" style={{ backgroundImage: "url(/icon.svg)" }} />
<span className="text-2xl font-brand line-height-none!">
@ -66,10 +66,12 @@ export function Header() {
{`v${Version}`}
</a>
</span>
<span className="hidden md:inline-block">
<NavBar />
<span className="justify-self-center">
<span className="hidden md:(inline-block)">
<NavBar />
</span>
</span>
<span className="flex gap-2 items-center text-xl text-primary-600 dark:text-primary">
<span className="justify-self-end flex gap-2 items-center text-xl text-primary-600 dark:text-primary">
<GoTop />
<Refresh />
<Menu />

View File

@ -47,11 +47,15 @@ function RootComponent() {
"lg:(px-24)",
])}
>
<header className={clsx([
"flex justify-between items-center py-4 px-5",
"lg:(py-6)",
"sticky top-0 z-10 backdrop-blur-md",
])}
<header
className={clsx([
"grid items-center py-4 px-5",
"lg:(py-6)",
"sticky top-0 z-10 backdrop-blur-md",
])}
style={{
gridTemplateColumns: "50px auto 50px",
}}
>
<Header />
</header>