style: reduce empty space on dev-env page

- Tighter vertical spacing (space-y-4, smaller header margins)
- Larger device mockup at all breakpoints (up to 700px monitor)
- Wider content area (max-w-5xl) for dev-env page
- Less padding in device hero section

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-14 08:39:15 +08:00
parent 1077c76366
commit 8d08383391
4 changed files with 13 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ import { SiArchlinux, SiUbuntu, SiLinux } from 'react-icons/si';
export function DevEnvDeviceHero() {
return (
<div
className="dev-env-device-hero -mx-4 mb-8 flex justify-center py-8 sm:-mx-12 sm:py-12 lg:-mx-20 group-[.toc-open]:lg:-mx-4"
className="dev-env-device-hero -mx-4 mb-6 flex justify-center py-4 sm:-mx-12 sm:py-6 lg:-mx-20 lg:py-8 group-[.toc-open]:lg:-mx-4"
role="img"
aria-label="Mac mini、鍵盤與外接螢幕的 3D 裝置展示"
>

View File

@@ -11,7 +11,7 @@ const PostToc = dynamic(() => import('./post-toc').then(mod => ({ default: mod.P
ssr: false,
});
export function PostLayout({ children, hasToc = true, contentKey }: { children: React.ReactNode; hasToc?: boolean; contentKey?: string }) {
export function PostLayout({ children, hasToc = true, contentKey, wide }: { children: React.ReactNode; hasToc?: boolean; contentKey?: string; wide?: boolean }) {
const [isTocOpen, setIsTocOpen] = useState(false); // Default closed on mobile
const [isDesktopTocOpen, setIsDesktopTocOpen] = useState(hasToc); // Separate state for desktop
const [mounted, setMounted] = useState(false);
@@ -116,7 +116,7 @@ export function PostLayout({ children, hasToc = true, contentKey }: { children:
)}>
{/* Main Content Area */}
<div className="min-w-0">
<div className={cn("mx-auto transition-all duration-500 ease-snappy", isDesktopTocOpen && hasToc ? "max-w-3xl" : "max-w-4xl")}>
<div className={cn("mx-auto transition-all duration-500 ease-snappy", isDesktopTocOpen && hasToc ? "max-w-3xl" : wide ? "max-w-5xl" : "max-w-4xl")}>
{children}
</div>
</div>