[feat] solution/frontend: 템플릿이 색만 바꾸던 걸 끝낸다 — 업종당 5개에서 3개로

업종마다 템플릿이 다섯인데 넷이 "흰 바탕 + 고딕 + 둥근 모서리"에 색조만 달랐다. 고르는 화면의
미리보기도 회색 막대 세 줄 + 색 동그라미라 다섯 장이 전부 같은 그림이었다 — 뭐가 다른지 알 수
없으니 아무거나 골랐다.

- shared/TemplateItem.look: 제목·본문 서체, 모서리, 테두리 두께, 그림자, 제목 자간·굵기, 섹션 여백.
  CSS 에 그대로 들어가는 문자열로 들고 있다 — 숫자로 두면 쓰는 쪽에서 단위를 빠뜨린 곳이 조용히 0 이 된다
- CanvasView: Tailwind v4 의 --radius-* · --shadow-* 를 캔버스 안에서만 덮는다. 변이 파일 40여 개에
  흩어진 rounded-* · shadow-* 를 한 줄도 안 고치고 전부 템플릿을 따르게 된다. 배수는 Tailwind
  기본 비율 그대로라 기준값 0.75rem 이면 지금까지와 픽셀 단위로 같다
- index.css: .site-canvas 는 --tpl-font-heading/body 를 이미 읽고 있었는데 아무도 넣지 않았다.
  서체가 안 갈리던 진짜 이유가 이 빠진 고리다. 제목 굵기도 토큰으로 뺐다 — 간판체(Gugi)는 굵기가
  한 벌뿐이라 700 을 주면 브라우저가 가짜 볼드를 씌워 획이 뭉갠다
- industryData: templatesFor() 팩토리 하나로 심플·매거진·레트로 셋. 업종은 accent 하나만 바꾼다 —
  생김새는 업종이 아니라 취향의 문제다. 537줄 → 237줄
- Step4Template: 미리보기를 그 템플릿의 서체·모서리·테두리·그림자로 실제로 그린다
- index.html: Noto Serif KR 추가. 매거진 제목이 Batang 으로 떨어지는데 맥에는 그 서체가 없다
- SectionFrame: 세로 여백을 --tpl-section-space 로. 이 값 하나로 페이지의 호흡이 바뀐다

옛 템플릿 id 가 DB 에 남아 있어도 resolveTemplate 이 첫 템플릿으로 떨어뜨린다.

tsc·eslint·vite build 통과(frontend·admin·site), 템플릿 12벌 look 전량 대조 + 폴백 확인
This commit is contained in:
minaChoi committed 2026-09-02 08:49:38 +09:00
1 parent e6ffdad888
commit 4debeaed3a
9 files changed
+315 -407

No files matched your search

@@ -54,13 +54,18 @@ export function SectionFrame({
onClick={onSelect}
className={cn(
'relative cursor-pointer transition-all',
padded && 'px-4 py-12 sm:px-6 sm:py-16 md:px-8',
padded && 'px-4 sm:px-6 md:px-8',
isSelected
? 'ring-2 ring-stone-900 ring-offset-2'
: 'hover:outline-1 hover:outline-dashed hover:outline-stone-300',
className,
)}
style={{backgroundColor: TONE_BG[tone]}}
style={{
backgroundColor: TONE_BG[tone],
// 세로 여백은 템플릿이 정한다 — 이 값 하나로 페이지의 호흡이 바뀐다.
// 폴백은 걷어낸 py-12/py-16 과 같은 값이라, 토큰이 없는 곳에서는 지금까지와 동일하다.
...(padded ? {paddingBlock: 'var(--tpl-section-space, 3.5rem)'} : {}),
}}
>
{isSelected && (
<span
@@ -52,7 +52,7 @@ export function SectionHeading({
</span>
)}
<h2
className="serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
className="tpl-title serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
style={titleStyle}
>
{title}
@@ -76,7 +76,7 @@ export function SectionHeading({
</span>
)}
<h2
className="serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
className="tpl-title serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
style={titleStyle}
>
{title}
@@ -93,7 +93,7 @@ export function SectionHeading({
return (
<div className={cn('flex items-baseline justify-between gap-3', className)}>
<h2
className="text-sm font-bold uppercase tracking-[0.18em] text-stone-500"
className="tpl-title text-sm font-bold uppercase tracking-[0.18em] text-stone-500"
style={colors ? {color: colors.secondary} : undefined}
>
{title}
@@ -113,7 +113,7 @@ export function SectionHeading({
>
<div>
<h2
className="serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
className="tpl-title serif-title text-xl font-bold tracking-tight text-stone-900 sm:text-2xl"
style={titleStyle}
>
{title}