From f4b93843b7205e5cd6592d619293fc0b61a249a5 Mon Sep 17 00:00:00 2001 From: dev-wooyeon Date: Wed, 22 Apr 2026 14:08:23 +0900 Subject: [PATCH] =?UTF-8?q?fix(blog):=20=EB=A0=88=EC=9D=B4=EC=95=84?= =?UTF-8?q?=EC=9B=83=20=EC=9E=94=EB=B2=84=EA=B7=B8=EC=99=80=20=EB=AA=A8?= =?UTF-8?q?=EB=B0=94=EC=9D=BC=20=ED=83=90=EC=83=89=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 방문자 관점에서 보이는 레이아웃 잔버그를 정리했어요. 모바일 하단 네비게이션을 좌측 드로어로 바꾸고 헤더와 글로벌 레이아웃의 간섭을 줄였어요. 베트남 여행 글의 어색한 문장 배치도 함께 정리했어요. --- .../index.mdx" | 4 +- src/shared/layout/AppShell/AppShell.tsx | 57 ++++- .../layout/Header/MobileBottomNav.test.tsx | 117 ++++----- src/shared/layout/Header/MobileBottomNav.tsx | 234 ++++++++++++++---- src/styles/globals.css | 10 +- 5 files changed, 279 insertions(+), 143 deletions(-) diff --git "a/posts/\353\262\240\355\212\270\353\202\250-\354\227\254\355\226\211-\355\233\204\352\270\260/index.mdx" "b/posts/\353\262\240\355\212\270\353\202\250-\354\227\254\355\226\211-\355\233\204\352\270\260/index.mdx" index 9bbb9c6f..93dee98e 100644 --- "a/posts/\353\262\240\355\212\270\353\202\250-\354\227\254\355\226\211-\355\233\204\352\270\260/index.mdx" +++ "b/posts/\353\262\240\355\212\270\353\202\250-\354\227\254\355\226\211-\355\233\204\352\270\260/index.mdx" @@ -83,7 +83,9 @@ ![](/assets/posts/2026-02-05-travel-vietnam-review/food3.jpeg) -유튜브로 미리 찾아본 식당들 전부 만족했어요. 그중에서도 가장 추천하는 식당은 [Beni 2](https://share.google/1wtyxMhTXyT2QvGCO)예요. ⭐⭐⭐⭐⭐ +유튜브로 미리 찾아본 식당들은 전부 만족스러웠어요. 그중에서 가장 추천하는 곳은 [Beni 2](https://share.google/1wtyxMhTXyT2QvGCO)예요. + +체감 평점으로는 ⭐⭐⭐⭐⭐ 정도였습니다. - 해산물 맛집이예요. 랍스터랑 세트메뉴로 주문해서 먹었는데 하나같이 다 맛있었어요. - 찐로컬 분위기로 현지인들도 많았어요. diff --git a/src/shared/layout/AppShell/AppShell.tsx b/src/shared/layout/AppShell/AppShell.tsx index edd0dabc..d304fdc5 100644 --- a/src/shared/layout/AppShell/AppShell.tsx +++ b/src/shared/layout/AppShell/AppShell.tsx @@ -3,7 +3,7 @@ import Link from 'next/link'; import { usePathname } from 'next/navigation'; import type { ReactNode } from 'react'; -import { useEffect, useMemo } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { useKBar } from 'kbar'; import { clsx } from 'clsx'; import type { FeedData } from '@/domains/post/model/types'; @@ -212,19 +212,24 @@ function SearchButton() { export default function AppShell({ children, posts }: AppShellProps) { const pathname = usePathname(); + const [mobileNavOpen, setMobileNavOpen] = useState(false); const activeSection = useMemo( () => resolveSection(pathname, posts), [pathname, posts] ); + useEffect(() => { + setMobileNavOpen(false); + }, [pathname]); + return (
+
+ ); +} + +function getDescription(id: MobileNavItem['id']) { + switch (id) { + case 'home': + return '전체 피드와 최근 글'; + case 'engineering': + return '기술 글과 시리즈'; + case 'life': + return '에세이와 회고'; + case 'resume': + return '경력과 프로젝트'; + default: + return ''; + } +} + +function ExternalLink({ + href, + label, + onNavigate, +}: { + href: string; + label: string; + onNavigate: () => void; +}) { + return ( + + {label} + 열기 + ); } diff --git a/src/styles/globals.css b/src/styles/globals.css index 4ff9f44e..7adc8e71 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -9,8 +9,8 @@ @import 'tailwindcss'; :root { - --mobile-bottom-nav-height: 84px; - --mobile-bottom-nav-offset: var(--mobile-bottom-nav-height); + --mobile-bottom-nav-height: 0px; + --mobile-bottom-nav-offset: 0px; } /* ===== Local Fonts ===== */ @@ -248,12 +248,6 @@ } } -@media (max-width: 767px) { - body { - padding-bottom: calc(var(--mobile-bottom-nav-offset) + env(safe-area-inset-bottom)); - } -} - /* ===== Focus Styles (Accessibility) ===== */ :focus-visible { outline: 2px solid var(--color-toss-blue);