Files
stock_chart_site/web/app/layout.tsx
claude-owner 6f71aef451 feat(shortcuts): keyboard shortcuts help overlay + F modifier guard
- 글로벌 `ShortcutsHelp` 컴포넌트 추가 — `?` 키로 토글, ESC 또는 바깥
  클릭 / 닫기 버튼 / 우하단 floating ? 버튼으로 닫음. /, Ctrl+K, F,
  ESC, ↑↓, Enter 등 현재 사이트의 모든 단축키를 scope 별로 표시.
- 입력 필드 포커스 시 단축키 무시 가드 — `?` 입력 의도를 방해하지 않음.
- 열릴 때 닫기 버튼에 포커스 → 키보드 사용자 Tab 흐름 자연스럽게.
- 모달 click-outside → setOpen(false), aria-modal/role=dialog 로 접근성.
- 리뷰어 9f215ac 지적: StockChart F 단축키가 Ctrl+F/Cmd+F/Alt+F 도
  가로채던 것을 modifier guard 로 막음. shift/ctrl/meta/alt 어느 것도
  눌리지 않은 단순 F 일 때만 toggleFullscreen.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 00:21:07 +09:00

46 lines
1.3 KiB
TypeScript

import "./globals.css";
import type { Metadata, Viewport } from "next";
import { AlertsToaster } from "../components/AlertsToaster";
import { PwaRegister } from "../components/PwaRegister";
import { ShortcutsHelp } from "../components/ShortcutsHelp";
import { TopNav } from "../components/TopNav";
export const metadata: Metadata = {
title: {
default: "주식 차트 · 예측",
template: "%s · 주식 차트",
},
description: "한국 주식 차트와 단기 예측을 보는 개인용 앱.",
manifest: "/manifest.webmanifest",
// SVG 아이콘 하나로 다 처리. Chrome/Safari/iOS 모두 SVG favicon + apple-touch 수용.
icons: {
icon: [{ url: "/icon.svg", type: "image/svg+xml" }],
apple: [{ url: "/icon.svg", type: "image/svg+xml" }],
},
appleWebApp: {
capable: true,
statusBarStyle: "black-translucent",
title: "주식 차트",
},
};
// Next 14: themeColor / colorScheme 는 viewport 로 분리해야 빌드 경고가 안 뜸.
export const viewport: Viewport = {
themeColor: "#09090b",
colorScheme: "dark",
};
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="ko">
<body className="min-h-screen">
<TopNav />
{children}
<AlertsToaster />
<ShortcutsHelp />
<PwaRegister />
</body>
</html>
);
}