diff --git a/components/layout/page-title.tsx b/components/layout/page-title.tsx index 60a400d..1b0a062 100644 --- a/components/layout/page-title.tsx +++ b/components/layout/page-title.tsx @@ -1,11 +1,10 @@ -"use client" - import { cn } from "@/lib/utils" interface PageTitleProps { children: string as?: "h1" | "h2" | "h3" variant?: "home" | "page" | "blog" + className?: string } const variantStyles = { @@ -14,21 +13,6 @@ const variantStyles = { blog: "font-serif font-light text-4xl md:text-5xl text-foreground mb-2", } -export function PageTitle({ children, as: Tag = "h1", variant = "home" }: PageTitleProps) { - const styles = variantStyles[variant] - - return ( - <> - {/* Mobile: sticky title that stays in header area */} -
- - {children} - -
- {/* Desktop: normal static title */} - - {children} - - - ) +export function PageTitle({ children, as: Tag = "h1", variant = "home", className }: PageTitleProps) { + return {children} } diff --git a/components/layout/page-wrapper.tsx b/components/layout/page-wrapper.tsx index 342bacc..d9911d3 100644 --- a/components/layout/page-wrapper.tsx +++ b/components/layout/page-wrapper.tsx @@ -12,7 +12,9 @@ export function PageWrapper({ title, subtitle, children }: PageWrapperProps) { return (
- {title} +
+ {title} +
{subtitle && (

{subtitle}

)} diff --git a/components/layout/theme-toggle.tsx b/components/layout/theme-toggle.tsx index 2a12d48..d3631ff 100644 --- a/components/layout/theme-toggle.tsx +++ b/components/layout/theme-toggle.tsx @@ -36,9 +36,11 @@ function ThemeIcon({ theme, className }: { theme: string; className: string }) { export function ThemeToggle({ iconSize = "sm", shortcut, + align = "start", }: { iconSize?: "sm" | "md" shortcut?: string + align?: "start" | "end" }) { const { theme, resolvedTheme, setTheme } = useTheme() const [open, setOpen] = useState(false) @@ -76,11 +78,13 @@ export function ThemeToggle({ const sizeClass = iconSizeClasses[iconSize] - const handlePointerEnter = () => { + const handlePointerEnter = (e: React.PointerEvent) => { + if (e.pointerType !== "mouse") return if (leaveTimer.current) clearTimeout(leaveTimer.current) } - const handlePointerLeave = () => { + const handlePointerLeave = (e: React.PointerEvent) => { + if (e.pointerType !== "mouse") return leaveTimer.current = setTimeout(() => setOpen(false), 100) } @@ -117,7 +121,7 @@ export function ThemeToggle({ trigger )} { const handleKeyDown = (e: KeyboardEvent) => { @@ -66,7 +66,7 @@ export function TopNav() { return ( <> -