Restyle control header: large centered title, nav below.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -25,8 +25,13 @@ function Shell({ children }: { children: ReactNode }) {
|
|||||||
return (
|
return (
|
||||||
<div className="shell">
|
<div className="shell">
|
||||||
<header className="header">
|
<header className="header">
|
||||||
<div className="header-left">
|
<div className="header-top">
|
||||||
<div className="brand">比特骆驼中控</div>
|
<div className="header-title-wrap">
|
||||||
|
<div className="header-title">自动化对冲监控系统</div>
|
||||||
|
<div className="header-subtitle">比特骆驼开发定制</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="header-bar">
|
||||||
<nav className="nav">
|
<nav className="nav">
|
||||||
<NavLink to="/monitor" className={({ isActive }) => (isActive ? "active" : "")}>
|
<NavLink to="/monitor" className={({ isActive }) => (isActive ? "active" : "")}>
|
||||||
监控区
|
监控区
|
||||||
@@ -38,26 +43,22 @@ function Shell({ children }: { children: ReactNode }) {
|
|||||||
系统设置
|
系统设置
|
||||||
</NavLink>
|
</NavLink>
|
||||||
</nav>
|
</nav>
|
||||||
|
{!lanClient ? (
|
||||||
|
<div className="header-right">
|
||||||
|
<span className="meta">{user}</span>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="btn ghost"
|
||||||
|
onClick={() => {
|
||||||
|
clearSession();
|
||||||
|
window.location.href = "/login";
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
退出
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
<div className="header-center">
|
|
||||||
<div className="header-title">自动化对冲监控系统</div>
|
|
||||||
<div className="header-subtitle">比特骆驼开发定制</div>
|
|
||||||
</div>
|
|
||||||
{!lanClient ? (
|
|
||||||
<div className="header-right">
|
|
||||||
<span className="meta">{user}</span>
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="btn ghost"
|
|
||||||
onClick={() => {
|
|
||||||
clearSession();
|
|
||||||
window.location.href = "/login";
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
退出
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</header>
|
</header>
|
||||||
<main className="main">{children}</main>
|
<main className="main">{children}</main>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -47,69 +47,65 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
position: relative;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
align-items: stretch;
|
||||||
gap: 20px;
|
gap: 14px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
flex-wrap: wrap;
|
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
border-bottom: 1px solid var(--line);
|
border-bottom: 1px solid var(--line);
|
||||||
box-shadow: 0 1px 0 rgba(0, 200, 255, 0.08);
|
box-shadow: 0 1px 0 rgba(0, 200, 255, 0.08);
|
||||||
min-height: 52px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-left {
|
.header-top {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: flex-start;
|
||||||
|
padding: 4px 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-title-wrap {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 20px;
|
width: fit-content;
|
||||||
z-index: 1;
|
max-width: 100%;
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.brand {
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
font-size: 1.15rem;
|
|
||||||
color: var(--accent);
|
|
||||||
text-shadow: var(--glow);
|
|
||||||
text-transform: none;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header-center {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
text-align: center;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 0;
|
|
||||||
max-width: min(42vw, 360px);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-title {
|
.header-title {
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.12em;
|
letter-spacing: 0.16em;
|
||||||
font-size: 1.2rem;
|
font-size: clamp(1.55rem, 2.8vw, 2.05rem);
|
||||||
line-height: 1.25;
|
line-height: 1.2;
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
text-shadow: var(--glow);
|
text-shadow: var(--glow);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header-subtitle {
|
.header-subtitle {
|
||||||
margin-top: 2px;
|
align-self: flex-end;
|
||||||
font-size: 0.72rem;
|
margin-top: 4px;
|
||||||
letter-spacing: 0.18em;
|
margin-right: -0.4em;
|
||||||
|
padding-left: 2.5em;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
letter-spacing: 0.2em;
|
||||||
color: var(--muted);
|
color: var(--muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 16px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
.nav {
|
.nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav a {
|
.nav a {
|
||||||
@@ -133,23 +129,10 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
z-index: 1;
|
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 900px) {
|
|
||||||
.header-center {
|
|
||||||
position: static;
|
|
||||||
transform: none;
|
|
||||||
order: 3;
|
|
||||||
width: 100%;
|
|
||||||
max-width: none;
|
|
||||||
margin-top: 4px;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.main h2 {
|
.main h2 {
|
||||||
margin: 0 0 8px;
|
margin: 0 0 8px;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user