Skip to content

Commit 544f1df

Browse files
authored
Merge pull request #65 from Twigpine/ui/overhaul-2-nav
ui: rebuild the header nav
2 parents a86db2f + e997dc5 commit 544f1df

6 files changed

Lines changed: 199 additions & 135 deletions

File tree

‎app/src/components/HeaderNav.tsx‎

Lines changed: 168 additions & 110 deletions
Large diffs are not rendered by default.

‎app/src/components/NotificationSettings.module.css‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44
flex-shrink: 0;
55
align-items: center;
66
justify-content: center;
7-
width: 36px;
8-
height: 36px;
9-
border: 1px solid var(--color-line);
7+
/* one borderless tool in the header's rail (HeaderNav), which draws the frame */
8+
width: 30px;
9+
height: 30px;
10+
border: 1px solid transparent;
1011
border-radius: 999px;
11-
background: var(--color-card);
12+
background: transparent;
1213
color: var(--color-body);
1314
cursor: pointer;
1415
transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
1516
}
16-
/* Larger hit area without widening the desktop instrument strip. */
17-
.trigger::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; }
18-
.trigger:hover, .trigger[data-popup-open] { background: var(--color-line); border-color: var(--color-line-strong); color: var(--color-ink); }
17+
.trigger:hover, .trigger[data-popup-open] { background: var(--color-line); color: var(--color-ink); }
1918
.bell { position: relative; display: flex; }
2019
.dot { position: absolute; top: -2px; right: -2px; width: 6px; height: 6px; border-radius: 50%; background: var(--color-brand); box-shadow: 0 0 0 2px var(--color-card); }
21-
.block { width: 100%; min-height: 48px; height: auto; padding: 12px; justify-content: start; gap: 12px; border-color: transparent; border-radius: 12px; font-size: 14px; font-weight: 500; }
22-
.block::before { display: none; }
20+
.block { width: 100%; min-height: 48px; height: auto; padding: 12px; justify-content: start; gap: 12px; border-color: transparent; border-radius: 12px; color: var(--color-ink); font-size: 15px; font-weight: 500; }
2321
.triggerStatus { margin-left: auto; color: var(--color-muted); font-size: 12px; font-weight: 400; }
2422
.positioner { z-index: 70; }
2523
.backdrop { position: fixed; inset: 0; z-index: 69; background: color-mix(in srgb, var(--color-scrim) 55%, transparent); }

‎app/src/components/ThemeToggle.tsx‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import { useSyncExternalStore } from "react";
44
import { useTheme } from "next-themes";
5+
import { SunMoon } from "lucide-react";
56
import { AnimatedThemeToggler } from "@/components/vendor/animated-theme-toggler";
67

78
/**
@@ -20,7 +21,10 @@ export default function ThemeToggle({ block = false }: { block?: boolean }) {
2021
() => false,
2122
);
2223

23-
const control = "h-9 w-9 inline-flex items-center justify-center rounded-full border border-line bg-card text-body hover:text-ink hover:border-line-strong [&_svg]:size-4";
24+
// in the header it is one borderless tool in the rail; in the phone menu's settings row it keeps its own frame
25+
const control = block
26+
? "h-9 w-9 inline-flex items-center justify-center rounded-full border border-line bg-card text-body hover:text-ink hover:border-line-strong [&_svg]:size-4"
27+
: "h-7.5 w-7.5 inline-flex shrink-0 items-center justify-center rounded-full text-body transition-colors hover:bg-line hover:text-ink motion-reduce:transition-none [&_svg]:size-4";
2428

2529
if (!mounted) {
2630
return block ? <div className="min-h-12" aria-hidden /> : <div className={control} aria-hidden />;
@@ -35,13 +39,14 @@ export default function ThemeToggle({ block = false }: { block?: boolean }) {
3539
if (!block) return toggler;
3640

3741
// In the mobile menu the toggler sits in a list of labelled rows, so it gets
38-
// a visible label too — a settings row, label left, control right.
42+
// a visible label too — a settings row: icon and label left, control right.
3943
return (
40-
<div className="min-h-12 px-3 flex items-center justify-between gap-3 rounded-xl text-base font-medium text-ink">
44+
<div className="min-h-12 px-3 flex items-center gap-3 rounded-xl text-[15px] font-medium text-ink">
45+
<SunMoon size={17} strokeWidth={1.8} aria-hidden className="shrink-0" />
4146
<span>
4247
Theme <span className="text-muted">· {theme === "dark" ? "Dark" : "Light"}</span>
4348
</span>
44-
{toggler}
49+
<span className="ml-auto">{toggler}</span>
4550
</div>
4651
);
4752
}

‎app/src/components/bridge/BridgeDialog.module.css‎

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎app/src/components/launchpad/LivePulse.tsx‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,13 @@ export default function LivePulse({ initial, block = false }: { initial: Pulse;
4949
);
5050

5151
if (block) {
52+
// the phone menu's footer line: quiet, under the buttons
5253
return (
53-
<div className="flex items-center justify-between min-h-12 px-3 rounded-xl text-base font-medium text-ink" title="cookie-free: all-time visits · people here right now">
54+
<div className="flex items-center justify-between gap-3 px-3 pb-1 pt-3 text-xs text-muted" title="cookie-free: all-time visits · people here right now">
5455
<span>
55-
<LiveNumber value={p.visits} className="font-mono tnum" /> visits
56+
<LiveNumber value={p.visits} className="font-mono tnum text-body" /> visits
5657
</span>
57-
<span className="text-sm text-muted">{online}</span>
58+
{online}
5859
</div>
5960
);
6061
}

‎app/src/components/navigation-shell.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function NavigationSurface({ children, className, visible = false, mobile = fals
3939
width,
4040
y: visible ? 20 : 0,
4141
borderRadius: visible ? 28 : 0,
42-
backdropFilter: visible ? "blur(10px)" : "blur(0px)",
42+
backdropFilter: visible ? "blur(16px) saturate(1.5)" : "blur(0px) saturate(1)",
4343
...(mobile ? { paddingLeft: visible ? 12 : 16, paddingRight: visible ? 12 : 16 } : {}),
4444
}}
4545
transition={{ duration: reduced ? 0 : 0.28, ease: [0.22, 1, 0.36, 1] }}
@@ -87,9 +87,9 @@ export function MobileNavMenu({ children, className, isOpen, onClose }: SlotProp
8787
{isOpen ? (
8888
<motion.div
8989
key="mobile-navigation"
90-
initial={{ opacity: 0 }}
91-
animate={{ opacity: 1 }}
92-
exit={{ opacity: 0 }}
90+
initial={{ opacity: 0, y: -6 }}
91+
animate={{ opacity: 1, y: 0 }}
92+
exit={{ opacity: 0, y: -6 }}
9393
transition={{ duration: reduced ? 0 : 0.12 }}
9494
className={cn(
9595
"absolute inset-x-0 top-16 z-50 flex flex-col gap-2 rounded-2xl border border-line bg-card p-2",

0 commit comments

Comments
 (0)