Files
stock_chart_site/web/public/icon.svg
claude-owner 89f3a865af feat(pwa): installable PWA (manifest + 빈 SW + SVG 아이콘)
설치 가능한 PWA 자격을 갖추는 최소 셋:
- web/public/manifest.webmanifest: 한국어 name/short_name, 다크 테마 컬러,
  standalone display, /icon.svg (any maskable, sizes any)
- web/public/icon.svg: 다크 배경 + 한국 컬러 캔들(상승=#ef4444 / 하락=#3b82f6)
  + 우상향 추세선. maskable safe-zone (중심 80%) 보존
- web/public/sw.js: install/activate 만 처리 (fetch handler 없음).
  install 자격만 충족하고 네트워크는 그대로 통과 → 캐시 stale 위험 0
- web/components/PwaRegister.tsx: production 빌드에서만 SW 등록,
  실패는 silently 무시
- web/app/layout.tsx: Metadata.manifest/icons/appleWebApp,
  viewport.themeColor/colorScheme 분리 (Next 14 권장)

dev (next dev) 에서는 SW 등록을 우회 — HMR 응답 간섭 회피.
2026-05-28 23:39:27 +09:00

29 lines
1.4 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" role="img" aria-label="주식 차트">
<!-- maskable safe-zone: 중심 80% (102.4 ~ 409.6) 안에 핵심 요소를 둠. -->
<rect width="512" height="512" rx="96" fill="#09090b"/>
<!-- 격자 가이드 (옅게) -->
<g stroke="#27272a" stroke-width="2">
<line x1="64" y1="160" x2="448" y2="160"/>
<line x1="64" y1="256" x2="448" y2="256"/>
<line x1="64" y1="352" x2="448" y2="352"/>
</g>
<!-- 캔들 (한국 컬러: 상승=빨강 / 하락=파랑) -->
<g>
<!-- 하락 -->
<line x1="144" y1="120" x2="144" y2="300" stroke="#3b82f6" stroke-width="6"/>
<rect x="124" y="180" width="40" height="100" fill="#3b82f6"/>
<!-- 상승 -->
<line x1="224" y1="160" x2="224" y2="360" stroke="#ef4444" stroke-width="6"/>
<rect x="204" y="200" width="40" height="140" fill="#ef4444"/>
<!-- 하락 -->
<line x1="304" y1="200" x2="304" y2="380" stroke="#3b82f6" stroke-width="6"/>
<rect x="284" y="240" width="40" height="120" fill="#3b82f6"/>
<!-- 상승 (가장 큼 — 우상향 인상) -->
<line x1="384" y1="100" x2="384" y2="340" stroke="#ef4444" stroke-width="6"/>
<rect x="364" y="140" width="40" height="180" fill="#ef4444"/>
</g>
<!-- 추세선 (사선 우상향) -->
<polyline points="80,380 160,330 240,280 320,260 400,180 448,140"
fill="none" stroke="#fbbf24" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
</svg>