[refactor] postgres-init,solution: DB 구조 재편 — 스키마 해체 · 공용 콘텐츠 한 벌 · 마이그레이션 체계

도메인별 스키마(company·place·fact·local·site·job)를 걷어내고 public 한 벌로 폈다.
스키마 한정자가 붙은 순간부터 ORM·raw SQL·테스트 픽스처가 각자 그 이름을 들고 다녀야 했다.

- 공용 콘텐츠를 한 테이블로 되돌린다. spots·region_stories 를 따로 파 놓고 보니
  같은 성격이 세 곳으로 갈라져 있었다 — `area_contents` 가 처음부터 content_type 으로
  종류를 가르는 설계였고 그걸 쓰면 됐다. 관계(거리·숨김)만 `place_area_refs` 로 남긴다.
- migrations/ + scripts/migrate.py: `init.sql` 은 **DB 를 처음 만들 때만** 돈다. 파일에
  컬럼을 더해도 이미 데이터가 든 DB 에는 반영되지 않는다 — 실제로 TourAPI 가 주변 정보를
  받아 와도 저장할 곳이 없어 축제·맛집이 0건이었고, 화면에는 "그냥 안 나오는 것" 으로만 보였다.
  DECISIONS.md 가 예고한 그대로다("운영 DB 가 생기는 순간 다시 필요해진다").
  Alembic 을 쓰지 않는 이유는 스키마 정의가 이미 두 곳(ORM·init.sql)이라 세 번째를
  더하면 어긋날 자리가 하나 더 생기기 때문이다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
minaChoiandClaude Opus 5 committed 2026-09-09 17:08:02 +09:00
1 parent 7bbeb068a8
commit 64ce467f21
189 files changed
+13374 -5023

No files matched your search

@@ -0,0 +1,162 @@
import {useSite} from '@/lib/site-context';
import {primaryImage} from '@/seo/meta';
import {
bookingLabel,
bookingLinks,
contactLinks,
channelLabel,
heroFacts,
lowestPrice,
unitSpec,
unitViews,
} from '@/lib/derive';
import {GRAIN} from './SectionHead';
/**
* 편집(잡지)형 첫 화면 — 표지.
*
* ★ 사진은 오른쪽에 크게 걸고, 상호는 그 경계를 넘어 왼쪽 여백까지 흘러나온다.
* 겹침은 12칸 격자 위에서 만든다 — 사진과 상호 띠를 **같은 행 같은 칸**에 놓고
* 띠만 아래로 붙였다(absolute 를 쓰지 않아 모바일에서 자동으로 위아래로 풀린다).
* ★ 상호를 사진에 맨몸으로 얹지 않는다. 어느 사진의 어느 쪽이 밝은지 우리는 모른다 —
* 어두운 띠를 한 겹 깔고 그 위에 얹으면 어떤 사진에서도 대비가 남는다(88% 기준
* 흰 사진 위 최악값이 약 3.9:1, 큰 글자 기준 3:1 을 넘긴다).
* ★ 태그라인·요금·이용 정보는 사진 위가 아니라 **왼쪽 종이 면**에 둔다. 작은 글자는
* 3:1 로 부족하고(4.5:1 이 기준이다), 무엇보다 인용되는 문장을 사진에 태우면 안 된다.
*/
export function Hero() {
const payload = useSite();
const {place, narrative} = payload;
const image = primaryImage(payload);
const spec = unitSpec(payload);
const units = unitViews(payload);
const facts = heroFacts(payload);
const price = lowestPrice(payload);
const booking = bookingLinks(payload)[0];
const contact = contactLinks(payload)[0];
const tagline = narrative.tagline ?? narrative.heroSubline;
// 검색창에 치는 이름을 먼저 쓴다 — "제주시" 보다 "애월" 이다.
const locality = place.addressSubLocality ?? place.addressLocality ?? place.addressRegion;
// 메타 한 줄 — 지역 · 객실 수 · 최저가. 확인된 값만 · 로 잇는다.
const meta = [
locality,
units.length > 0 ? `${spec.label} ${units.length}개` : undefined,
price,
].filter((part): part is string => Boolean(part));
return (
<section id="top" className="relative w-full" style={{backgroundImage: GRAIN}}>
<div className="grid grid-cols-12">
{image && (
<div
className="relative col-span-12 xl:col-span-8 xl:col-start-5 xl:row-start-1"
style={{minHeight: 'clamp(15rem, 52vh, 34rem)', backgroundColor: 'var(--tpl-inverse)'}}
>
<img
src={image.url}
alt={image.alt}
// 첫 화면 이미지는 지연 로딩하지 않는다 — LCP 가 그만큼 늦어진다.
fetchPriority="high"
decoding="async"
width={image.width}
height={image.height}
className="absolute inset-0 size-full object-cover"
/>
</div>
)}
{/*
상호 띠 — 데스크톱에서는 격자 1~12칸 같은 행에 놓고 아래에 붙인다(self-end).
사진이 5~12칸이므로 왼쪽 4칸은 종이 위, 나머지는 사진 위를 지난다.
★ z-10: 격자에서 뒤에 오는 형제(왼쪽 칸)가 이 띠를 덮지 않게 한다.
*/}
<div
className="z-10 col-span-12 xl:col-start-1 xl:row-start-1 xl:mb-12 xl:mr-16 xl:self-end"
style={{
backgroundColor: 'color-mix(in srgb, var(--tpl-inverse) 88%, transparent)',
color: 'var(--tpl-bg)',
}}
>
{/* h1 은 페이지에 하나. 가게 이름이 들어가야 "○○ 홈페이지" 질의에 잡힌다. */}
<h1
className="serif px-4 py-5 sm:px-6 xl:py-8 xl:pl-10 xl:pr-16"
style={{
fontSize: 'clamp(2.25rem, 7.5vw, 5.5rem)',
fontWeight: 800,
lineHeight: 0.98,
letterSpacing: '-0.035em',
}}
>
{place.name}
</h1>
</div>
{/* 왼쪽 종이 면 — 읽는 값이 전부 여기 있다. 아래는 상호 띠가 지나가는 자리다. */}
{/* pb-56 은 상호 띠 높이(제목 5.5rem + 여백)에서 나온 값이다 — 줄이면 글자가 겹친다. */}
<div className="col-span-12 flex flex-col gap-5 px-4 py-8 sm:px-6 xl:col-span-4 xl:col-start-1 xl:row-start-1 xl:py-12 xl:pb-56 xl:pl-10 xl:pr-8">
{tagline && (
<p className="measure font-serif text-[length:var(--fs-lead)] leading-relaxed">
{tagline}
</p>
)}
{meta.length > 0 && (
<p className="text-[length:var(--fs-sm)] font-semibold tabular-nums">
{meta.join(' · ')}
</p>
)}
{/* 버튼을 세우지 않는다 — 잡지의 규칙은 밑줄 링크다. 대신 .tap 으로 높이를 지킨다. */}
{(booking || place.phone || contact) && (
<div className="flex flex-wrap items-center gap-x-6 gap-y-1 text-[length:var(--fs-sm)] font-bold">
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center underline underline-offset-4"
>
{bookingLabel(booking)} 예약
</a>
)}
{place.phone && (
<a
href={`tel:${place.phone}`}
className="tap inline-flex items-center underline underline-offset-4"
>
{place.phone}
</a>
)}
{contact && (
<a
href={contact.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center underline underline-offset-4"
>
{channelLabel(contact)} 문의
</a>
)}
</div>
)}
{/* 확인된 값만. 없는 업종에서는 칸 자체가 안 생긴다. */}
{facts.length > 0 && (
<dl className="mt-1">
{facts.map((row) => (
<div
key={row.label}
className="border-line flex items-baseline justify-between gap-4 border-t py-2 text-[length:var(--fs-sm)]"
>
<dt className="text-muted shrink-0">{row.label}</dt>
<dd className="text-right font-semibold">{row.value}</dd>
</div>
))}
</dl>
)}
</div>
</div>
</section>
);
}
@@ -0,0 +1,240 @@
import type {ChannelLink} from '@o2o/shared';
import {useSite} from '@/lib/site-context';
import {
bookingLabel,
bookingLinks,
sectionName,
unitSpec,
unitViews,
type UnitView,
} from '@/lib/derive';
import {GRAIN, SectionHead} from './SectionHead';
/**
* 편집(잡지)형 객실 — 한 객실이 한 판이다.
*
* ★ 카드로 감싸지 않는다. 카드 격자는 '고르는 화면'이고, 잡지의 판은 '보여 주는 화면'이다.
* 판마다 배경을 밝은 면 ↔ 어두운 면으로 교차해 넘기는 리듬을 만든다.
* ★ `lib/ui/Section` 을 쓰지 않고 <section> 을 직접 그린다 — 판마다 배경이 갈려야 하는데
* Section 은 섹션 하나에 바탕 하나다.
* ★ 사진은 두 장을 위아래로 어긋나게 걸되, 세 번째부터는 아래 접지(contact sheet)로 남긴다.
* 장식을 위해 사진을 버리면 그 alt 문장이 HTML 에서 사라진다 — 인용될 자리가 준다.
*/
export function Rooms() {
const payload = useSite();
const units = unitViews(payload);
const spec = unitSpec(payload);
const booking = bookingLinks(payload)[0];
if (units.length === 0) return null;
return (
<section
id="units"
aria-labelledby="units-heading"
className="border-line w-full border-b"
style={{
backgroundColor: 'var(--tpl-surface)',
backgroundImage: GRAIN,
paddingBlock: 'var(--section-space)',
}}
>
<div className="shell">
{/* 섹션 id 는 업종마다 다르다(rooms · menu · programs) — spec.path 가 그 id 다. */}
<SectionHead
id="units"
title={sectionName(payload, spec.path, `${spec.label} ${units.length}개 안내`)}
/>
</div>
{units.map((unit, order) => (
<UnitSpread
key={unit.unitId}
unit={unit}
no={String(order + 1).padStart(2, '0')}
/* 홀수 번째 판을 어두운 면으로. 넘길 때마다 바탕이 뒤집힌다. */
dark={order % 2 === 1}
booking={booking}
phone={payload.place.phone}
/>
))}
</section>
);
}
function UnitSpread({
unit,
no,
dark,
booking,
phone,
}: {
unit: UnitView;
no: string;
dark: boolean;
booking?: ChannelLink;
phone?: string;
}) {
return (
<article
className="w-full"
style={
dark
? {backgroundColor: 'var(--tpl-inverse)', color: 'var(--tpl-bg)', backgroundImage: GRAIN}
: undefined
}
>
{/*
★ 가로 홈(gap-x-10)은 xl 부터다. 390px 에서 12칸 격자에 40px 홈을 주면
홈만 440px 이라 컨테이너(347px)를 넘고, 페이지 전체가 77px 가로로 밀린다(실측).
좁은 화면에서는 어차피 전부 col-span-12 라 홈이 할 일이 없다.
*/}
<div className="shell grid grid-cols-12 gap-y-6 py-10 xl:gap-x-10 xl:py-16">
{/*
왼쪽 절반 — 번호 · 이름 · 스펙. 읽는 값은 전부 종이 위에 있다.
★ pr-8 은 장식이 아니다. 오른쪽 사진이 격자의 홈을 통째로 먹으므로(-ml-10)
이 여백이 없으면 스펙 표의 값이 사진 모서리에 붙는다(실측: 간격 0px).
*/}
<div className="col-span-12 xl:col-span-5 xl:pr-8">
<div className="relative">
<span
aria-hidden
className="serif pointer-events-none absolute -top-1 left-0 select-none leading-none tabular-nums"
style={{fontSize: 'clamp(3rem, 8vw, 6rem)', fontWeight: 800, opacity: 0.1}}
>
{no}
</span>
<h3
className="serif relative pt-7 xl:pt-12"
style={{
fontSize: 'clamp(1.5rem, 3vw, 2.25rem)',
fontWeight: 800,
lineHeight: 1.1,
letterSpacing: '-0.02em',
}}
>
{unit.name}
</h3>
</div>
{unit.intro && (
<p className="measure mt-4 font-serif text-[length:var(--fs-body)] leading-relaxed opacity-85">
{unit.intro}
</p>
)}
{/*
★ 요금은 한 값이 아니라 비교하는 값이다. 주중 하나만 적어 두면 손님은
주말이 얼마인지 모른 채 전화를 걸거나 떠난다. 안 채워진 칸은 '문의' 로 온다.
*/}
{/* 요금은 객실 정보에서 내지 않는다 — 사유는 sections/UnitsSection.tsx 의 같은 자리 주석. */}
{unit.rows.length > 0 && (
<dl className="border-line mt-6 border-t">
{unit.rows.map((row) => (
<div
key={row.label}
className="border-line flex items-baseline justify-between gap-6 border-b py-2.5 text-[length:var(--fs-sm)]"
>
<dt className="text-muted shrink-0">{row.label}</dt>
<dd className="text-right font-semibold">{row.value}</dd>
</div>
))}
</dl>
)}
{(booking || phone) && (
<div className="mt-6 flex flex-wrap items-center gap-x-6 gap-y-1 text-[length:var(--fs-sm)] font-bold">
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center underline underline-offset-4"
>
{bookingLabel(booking)} 예약
</a>
)}
{phone && (
<a
href={`tel:${phone}`}
className="tap inline-flex items-center underline underline-offset-4"
>
{phone}
</a>
)}
</div>
)}
</div>
{/*
오른쪽 절반 — 사진 두 장을 어긋나게.
★ -ml-10 이 격자의 홈(gap-x-10)을 그대로 먹는다. 글이 있는 칸까지 넘기지는 않는다 —
겹침이 읽기를 방해하면 그건 장식이 아니라 고장이다.
★ 음수 여백은 xl 부터다. 390px 에서는 두 장이 그냥 위아래로 선다.
*/}
<div className="col-span-12 xl:col-span-7 xl:-ml-10">
{/*
★ 폭을 64%/50% 로 잡은 건 취향이 아니라 균형이다. 82% 로 뒀더니 오른쪽 칸이
1120px 이 되어 왼쪽 글 아래로 600px 짜리 빈 판이 생겼다(실측) —
어두운 판에서는 그 빈자리가 통째로 검은 구멍으로 보인다.
*/}
{unit.images[0] && (
<figure className="w-full xl:w-[64%]">
<img
src={unit.images[0].url}
alt={unit.images[0].alt}
loading="lazy"
decoding="async"
width={unit.images[0].width}
height={unit.images[0].height}
className="w-full object-cover"
style={{aspectRatio: '4 / 5'}}
/>
</figure>
)}
{unit.images[1] && (
<figure className="mt-3 w-full xl:-mt-24 xl:ml-auto xl:w-[50%]">
<img
src={unit.images[1].url}
alt={unit.images[1].alt}
loading="lazy"
decoding="async"
width={unit.images[1].width}
height={unit.images[1].height}
className="w-full object-cover"
style={{aspectRatio: '4 / 3'}}
/>
</figure>
)}
</div>
{/*
나머지 사진 — 판 아래를 가로지르는 접지(contact sheet).
★ 작게라도 남겨야 alt 가 HTML 에 남는다. 장식 때문에 사진을 버리면
그 문장이 인용될 자리도 같이 사라진다.
*/}
{unit.images.length > 2 && (
<ul className="col-span-12 grid grid-cols-3 gap-2 xl:grid-cols-6">
{unit.images.slice(2).map((image) => (
<li key={image.mediaId}>
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
width={image.width}
height={image.height}
className="w-full object-cover"
style={{aspectRatio: '3 / 2'}}
/>
</li>
))}
</ul>
)}
</div>
</article>
);
}
@@ -0,0 +1,189 @@
import type {ReactNode} from 'react';
import {useSite} from '@/lib/site-context';
import {enabledSections, unitSpec} from '@/lib/derive';
/**
* 편집(잡지)형 — 섹션 제목 · 차례.
*
* ★ 이 파일은 `@/lib/ui` 에서 아무것도 가져오지 않는다. `lib/ui/Section` 이 이 파일을
* 불러다 쓰기 때문에, 반대 방향이 생기면 순환 참조로 빌드가 조용히 깨진다.
* ★ 차례(useSectionIndex)와 결 무늬(GRAIN)도 여기 둔다. Shell·Rooms 가 둘 다 쓰는데
* 의존 없는 이 파일이 잎사귀라 어느 쪽에서 가져가도 고리가 생기지 않는다.
*/
/**
* 종이 결.
*
* ★ 화면 전체를 덮는 오버레이로 두지 않는다 — 사진까지 누렇게 뜬다(레트로 안에서 밟은 함정).
* `background-image` 는 그 요소의 배경색 위·내용 아래에 깔리므로, 종이 면에만 앉고
* 그 위에 놓인 <img> 는 손대지 않는다.
* ★ 색을 박지 않고 currentColor 를 3% 섞는다. 밝은 면에서는 옅은 회색, 어두운 면에서는
* 옅은 밝은 선이 되어 어느 팔레트에서도 결이 남는다.
*/
export const GRAIN =
'repeating-linear-gradient(90deg, color-mix(in oklab, currentColor 3%, transparent) 0 1px, transparent 1px 6px),' +
'repeating-linear-gradient(0deg, color-mix(in oklab, currentColor 2%, transparent) 0 1px, transparent 1px 6px)';
export interface IndexEntry {
/** 두 자리 번호. 차례와 섹션 제목이 같은 번호를 써야 목차가 목차 구실을 한다. */
no: string;
label: string;
/** 실제 DOM 의 앵커 id. theme 의 섹션 id 와 다르다(rooms → units). */
anchor: string;
}
/**
* theme 섹션 id → 화면 앵커 id.
*
* ★ 두 이름이 다르다. 사장님 에디터의 섹션 id 는 'rooms'·'intro'·'photos' 인데,
* 발행본이 실제로 그리는 <section id> 는 'units'·'about'·'gallery' 다.
* 여기 없는 id 는 렌더러에 컴포넌트가 없다는 뜻이라(HomePage 의 SECTION_COMPONENTS)
* 차례에서도 조용히 빠진다 — 눌러도 아무 데도 안 가는 목차 줄이 최악이다.
*/
const ANCHOR: Record<string, string> = {
intro: 'about',
info: 'info',
rooms: 'units',
menu: 'units',
programs: 'units',
pricing: 'pricing',
booking: 'booking',
space: 'space',
inquiry: 'inquiry',
exhibition: 'exhibition',
photos: 'gallery',
local: 'guide',
weather: 'weather',
map: 'location',
faq: 'faq',
// 붙여넣기 아이템 — 섹션 id 가 곧 앵커다.
songs: 'songs',
daily: 'daily',
chronicle: 'chronicle',
people: 'people',
quiz: 'quiz',
postcard: 'postcard',
video: 'video',
itinerary: 'itinerary',
};
/** 사장님이 이름을 안 붙였을 때 차례에 적을 짧은 말. 제목이 아니라 목차 라벨이다. */
const FALLBACK_LABEL: Record<string, string> = {
about: '소개',
info: '이용 정보',
pricing: '요금',
booking: '예약 안내',
space: '공간',
inquiry: '문의',
exhibition: '관람 안내',
gallery: '사진',
guide: '주변',
weather: '날씨',
location: '오시는 길',
faq: '자주 묻는 질문',
songs: '노래',
daily: '일력',
chronicle: '연표',
people: '인물',
quiz: '퀴즈',
postcard: '엽서',
video: '영상',
itinerary: '일정',
};
function pad(n: number): string {
return String(n).padStart(2, '0');
}
/**
* 차례 — 켜져 있는 섹션을 순서대로.
*
* ★ 번호를 여기 한 곳에서만 매긴다. 왼쪽 차례와 섹션 제목의 번호가 어긋나면
* 목차가 오히려 길을 잃게 만든다.
* ★ 차례 라벨은 `theme.sections[].name` 을 그대로 쓴다. derive 의 sectionName() 이
* <h2> 용으로는 이 값을 말리지만(짧은 목록 라벨이라서), 차례는 바로 그 목록이다.
*/
export function useSectionIndex(): IndexEntry[] {
const payload = useSite();
const spec = unitSpec(payload);
const seen = new Set<string>();
const entries: IndexEntry[] = [];
for (const section of enabledSections(payload)) {
const anchor = ANCHOR[section.id];
if (!anchor || seen.has(anchor)) continue;
// 객실이 없으면 그 판은 아예 안 그려진다(Rooms 가 null). 목차에만 남기지 않는다.
if (anchor === 'units' && payload.units.length === 0) continue;
seen.add(anchor);
const name = section.name?.trim();
entries.push({
no: pad(entries.length + 1),
label: name || FALLBACK_LABEL[anchor] || spec.label,
anchor,
});
}
// 오시는 길은 섹션 설정과 무관하게 항상 나간다(HomePage). 차례도 그걸 따라간다.
if (!seen.has('location')) {
entries.push({no: pad(entries.length + 1), label: '오시는 길', anchor: 'location'});
}
return entries;
}
/**
* 섹션 제목 — 큰 두 자리 번호를 옅게 깔고 제목을 그 위에 겹친다.
*
* ★ 제목 위 굵은 실선(2px)이 판을 가른다. 색 띠 대신 선으로 가르는 건 인쇄물의 규칙이고,
* 어떤 팔레트에서도 같은 세기로 보인다(currentColor).
* ★ 번호는 aria-hidden 이다. 낭독기가 "영일 객실" 로 읽으면 제목이 아니라 잡음이 된다.
*/
export function SectionHead({
id,
title,
lead,
aside,
}: {
id: string;
title: string;
lead?: string;
aside?: ReactNode;
}) {
const no = useSectionIndex().find((entry) => entry.anchor === id)?.no;
return (
<header className="mb-7 sm:mb-10">
<div aria-hidden className="mb-5 h-0.5 w-full bg-current opacity-75" />
<div className="flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between lg:gap-10">
<div className="relative min-w-0 flex-1">
{no && (
<span
aria-hidden
className="serif pointer-events-none absolute left-0 top-1/2 -translate-y-1/2 select-none leading-none tabular-nums"
style={{fontSize: 'clamp(2.5rem, 7vw, 5rem)', fontWeight: 800, opacity: 0.12}}
>
{no}
</span>
)}
<h2
id={`${id}-heading`}
className="h2 relative pl-9 sm:pl-14 xl:pl-20"
style={{fontWeight: 800}}
>
{title}
</h2>
{lead && (
<p className="text-muted measure relative mt-2 pl-9 font-serif text-[length:var(--fs-sm)] leading-relaxed sm:pl-14 xl:pl-20">
{lead}
</p>
)}
</div>
{aside && <div className="shrink-0">{aside}</div>}
</div>
</header>
);
}
@@ -0,0 +1,236 @@
import {useEffect, useState, type ReactNode} from 'react';
import {useSite} from '@/lib/site-context';
import {bookingLabel, bookingLinks, channelLabel} from '@/lib/derive';
import {formatKoreanDate, isoDate} from '@/lib/format';
// 배럴(@/sections)이 아니라 파일을 직접 가리킨다 — 배럴을 타면 섹션 전부가 딸려 온다.
import {MobileTabBar} from '@/sections/MobileTabBar';
import {GRAIN, useSectionIndex, type IndexEntry} from './SectionHead';
/**
* 편집(잡지)형 껍데기.
*
* ★ 왼쪽 세로 차례가 이 안의 얼굴이다. 잡지의 등(spine)처럼 화면 왼쪽에 붙어 따라오고,
* 스크롤에 따라 지금 읽는 항목만 진해진다. **데스크톱에서만** 세운다 — 좁은 화면에서
* 목차는 자리만 먹고, 그 일은 이미 상단 제호 줄과 하단 고정 바가 한다.
* ★ 차례를 fixed 로 띄우지 않고 flex 한 칸으로 세웠다. fixed 로 얹으면 어두운 판이
* 밑으로 지나갈 때 목차 글자가 통째로 사라진다 — 칸으로 두면 항상 제 종이 위에 있다.
* ★ 제호 줄에 전화·예약을 둔다. 국내 숙박 사이트에서 상단이 답해야 하는 건 그 둘뿐이다.
*/
export function Shell({children}: {children: ReactNode}) {
const payload = useSite();
const {place, site} = payload;
const index = useSectionIndex();
const active = useActiveSection(index);
const booking = bookingLinks(payload)[0];
// 확정된 링크만 — 확정 전 URL 은 동명 업소일 수 있다.
const links = payload.links.filter((link) => link.confirmed);
const address = place.roadAddress ?? place.address;
return (
<div
className="flex min-h-screen w-full flex-col"
style={{backgroundColor: 'var(--tpl-bg)', color: 'var(--tpl-text)'}}
>
{/* 제호(masthead) — 얇은 한 줄, 아래는 굵은 실선. 잡지의 표제부다. */}
<header
className="sticky top-0 z-40 w-full border-b-2 backdrop-blur-md"
style={{
backgroundColor: 'color-mix(in srgb, var(--tpl-bg) 90%, transparent)',
borderColor: 'var(--tpl-text)',
}}
>
<div className="flex h-14 items-center justify-between gap-4 px-4 sm:px-6 xl:px-8">
<a href="#top" className="serif min-w-0 truncate text-[length:var(--fs-lead)] font-extrabold">
{place.name}
</a>
<div className="flex shrink-0 items-center gap-4 text-[length:var(--fs-sm)]">
{place.phone && (
<a
href={`tel:${place.phone}`}
className="tap inline-flex items-center underline underline-offset-4"
>
{place.phone}
</a>
)}
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center font-bold underline underline-offset-4"
>
{bookingLabel(booking)} 예약
</a>
)}
</div>
</div>
</header>
<div className="flex w-full flex-1">
{index.length > 0 && (
<aside
/* self-start 가 없으면 flex 가 높이를 늘려 sticky 가 움직일 자리를 잃는다. */
className="border-line sticky top-14 hidden h-[calc(100vh-3.5rem)] w-44 shrink-0 self-start border-r xl:block"
style={{backgroundImage: GRAIN}}
>
<nav aria-label="차례" className="flex h-full flex-col justify-center gap-0.5 py-8 pl-6 pr-3">
{index.map((entry) => {
const on = entry.anchor === active;
return (
<a
key={entry.anchor}
href={`#${entry.anchor}`}
aria-current={on ? 'true' : undefined}
className="flex items-baseline gap-2 py-2 text-[length:var(--fs-sm)] leading-tight motion-safe:transition-opacity"
style={{opacity: on ? 1 : 0.35}}
>
<span className="shrink-0 text-[length:var(--fs-xs)] font-bold tabular-nums">
{entry.no}
</span>
<span className="truncate" style={{fontWeight: on ? 700 : 400}}>
{entry.label}
</span>
</a>
);
})}
</nav>
</aside>
)}
<div className="flex min-w-0 flex-1 flex-col">{children}</div>
</div>
{/* 판권장(colophon) — 잡지 맨 뒷장. 상호·주소·연락처·법정 표기가 한자리에 남는다. */}
<footer
className="w-full pb-28 pt-12 md:pb-16"
style={{
backgroundColor: 'var(--tpl-inverse)',
color: 'var(--tpl-bg)',
backgroundImage: GRAIN,
}}
>
<div className="shell">
<div aria-hidden className="h-0.5 w-full bg-current opacity-70" />
<div className="grid grid-cols-1 gap-8 pt-8 md:grid-cols-12">
<div className="md:col-span-5">
<p
className="serif"
style={{fontSize: 'clamp(1.5rem, 4vw, 2.5rem)', fontWeight: 800, lineHeight: 1.05}}
>
{place.name}
</p>
{place.englishName && (
<p className="mt-2 text-[length:var(--fs-xs)] uppercase tracking-[0.18em] opacity-55">
{place.englishName}
</p>
)}
</div>
<address className="space-y-2 font-serif text-[length:var(--fs-sm)] not-italic opacity-80 md:col-span-4">
{address && <p>{address}</p>}
{place.phone && (
<p>
<a href={`tel:${place.phone}`} className="underline underline-offset-4">
{place.phone}
</a>
</p>
)}
{place.email && (
<p>
<a href={`mailto:${place.email}`} className="underline underline-offset-4">
{place.email}
</a>
</p>
)}
</address>
{links.length > 0 && (
<nav aria-label="공식 채널" className="md:col-span-3">
<ul className="space-y-1.5 text-[length:var(--fs-sm)]">
{links.map((link) => (
<li key={link.url}>
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="underline underline-offset-4 opacity-80 transition-opacity hover:opacity-100"
>
{channelLabel(link)}
</a>
</li>
))}
</ul>
</nav>
)}
</div>
<div className="mt-10 flex flex-col gap-2 border-t border-current/20 pt-5 text-[length:var(--fs-xs)] opacity-55 sm:flex-row sm:items-center sm:justify-between">
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
<span>상호: {place.name}</span>
{place.legal?.representative && <span>대표: {place.legal.representative}</span>}
{place.legal?.businessRegistrationNumber && (
<span>사업자등록번호: {place.legal.businessRegistrationNumber}</span>
)}
{place.legal?.mailOrderNumber && (
<span>통신판매업신고: {place.legal.mailOrderNumber}</span>
)}
{place.legal?.licenseNumber && (
<span>
{place.legal.licenseLabel ?? '인허가번호'}: {place.legal.licenseNumber}
</span>
)}
</div>
{/* 마지막 갱신을 화면에도 적는다 — 사람도 AI 도 신선도를 여기서 본다. */}
{/* ★ 작성자·최종 업데이트는 안마다 같은 모양이어야 한다 (2026-09-04, AEO 진단 0/3)
한글 날짜("2026년 9월 4일")는 최신성을 재는 쪽이 못 읽는다. 화면 글자도 ISO 로 적고,
byline 은 E-E-A-T 채점이 본문에서 찾는 값이라 같이 남긴다. 공용 꼬리(SiteFooter)와 한 벌. */}
<p className="byline shrink-0">
<span className="author">작성·운영 {place.name}</span>
{' · 최종 업데이트: '}
<time dateTime={site.updatedAt}>{isoDate(site.updatedAt)}</time>
</p>
</div>
</div>
</footer>
<MobileTabBar />
</div>
);
}
/**
* 지금 읽고 있는 섹션.
*
* ★ 화면 한가운데 얇은 띠(위 45% · 아래 50% 를 잘라낸 나머지)를 지나는 판만
* '읽는 자리'로 본다. 띠를 안 좁히면 긴 섹션 둘이 동시에 걸려 목차가 깜빡인다.
* ★ 서버 렌더에서는 아무것도 진해지지 않는다(useEffect 는 브라우저에서만 돈다) —
* 초기 상태가 양쪽 다 같아서 하이드레이션이 어긋나지 않는다.
*/
function useActiveSection(entries: IndexEntry[]): string {
// 배열은 렌더마다 새로 만들어진다 — 문자열로 굳혀야 effect 가 매 렌더 다시 돌지 않는다.
const anchors = entries.map((entry) => entry.anchor).join(',');
const [active, setActive] = useState('');
useEffect(() => {
if (typeof IntersectionObserver === 'undefined') return;
const targets = anchors
.split(',')
.map((id) => document.getElementById(id))
.filter((el): el is HTMLElement => el !== null);
if (targets.length === 0) return;
const observer = new IntersectionObserver(
(records) => {
const hit = records.find((record) => record.isIntersecting);
if (hit) setActive(hit.target.id);
},
{rootMargin: '-45% 0px -50% 0px'},
);
targets.forEach((el) => observer.observe(el));
return () => observer.disconnect();
}, [anchors]);
return active;
}
@@ -0,0 +1,14 @@
/**
* 6안 — 편집(잡지)형.
*
* 1안(레트로)의 정체성은 '화면을 종이처럼 다루는 밀도'다. 그 밀도를 현대 잡지로 옮겼다:
* 왼쪽에 붙는 세로 차례 · 사진 경계를 넘어 흐르는 상호 · 큰 번호를 깐 섹션 제목 ·
* 판마다 뒤집히는 밝은 면/어두운 면. 모서리 0, 그림자 없음, 굵은 고딕 제목 + 명조 본문.
*
* ★ 소비처가 파일을 직접 가리키므로(App·lib/ui/Section·HeroSection·UnitsSection)
* 이 배럴은 폴더 밖에서 한 벌로 가져다 쓸 때를 위한 것이다.
*/
export {Shell} from './Shell';
export {SectionHead} from './SectionHead';
export {Hero} from './Hero';
export {Rooms} from './Rooms';
+17
View File
@@ -0,0 +1,17 @@
/**
* 레이아웃 = 템플릿의 뼈대. 안 하나가 폴더 하나다.
*
* ★ 안마다 폴더를 통째로 가른 이유
* 상단·섹션 제목·첫 화면·객실·하단을 한 벌로 두면 어떤 payload 를 줘도 같은 사이트가
* 나온다(그래서 색만 다른 안이 나왔었다). 안은 **뼈대가 갈려야** 안이다.
* 폴더가 갈려 있으면 한 안을 고쳐도 다른 안이 안 흔들린다.
*
* 각 폴더가 지켜야 하는 계약:
* Shell({children}) 머리·꼬리까지 포함한 페이지 껍데기
* SectionHead(...) 섹션 제목 블록
* Hero() 첫 화면
* Rooms() 객실 안내
*/
export * as reservation from './reservation';
export * as oasi from './oasi';
export * as studio from './studio';
+109
View File
@@ -0,0 +1,109 @@
import {useSite} from '@/lib/site-context';
import {primaryImage} from '@/seo/meta';
import {bookingLabel, bookingLinks, essentialRows, heroFacts, lowestPrice} from '@/lib/derive';
/**
* oasi 첫 화면 — 사진 한 장과 아주 작은 글씨.
*
* ★ 사진 위에 글자를 얹지 않는다. 이 안은 폭을 제한한 사진을 가운데 한 장 놓고
* **바깥 여백에 세로쓰기 캡션**을 세우는 편집형이다 — 사진을 화면 끝까지 늘리면
* 그 여백이 사라져 안 자체가 성립하지 않는다.
* ★ 상호는 `<h1>` 이지만 크게 쓰지 않는다. 크기는 왼쪽 워드마크가 이미 맡았고,
* 여기서 큰 활자를 한 번 더 쓰면 화면에 큰 글자가 둘이 된다.
* ★ 세로쓰기 캡션은 좁은 화면에서 감춘다 — 390px 에서는 사진 밖 여백이 없어
* 그대로 두면 가로 스크롤이 생긴다.
* ★ 사진 틀의 **높이를 고정한다**. 자연 비율로 두면 소스가 세로 사진일 때 첫 화면을
* 사진 하나가 통째로 먹는다 — 실측(stay3, 1000×1333): 544×725px.
* 사장님이 어떤 사진을 올리든 첫 화면 높이가 같아야 한다.
*/
export function Hero() {
const payload = useSite();
const {place, narrative} = payload;
const image = primaryImage(payload);
const price = lowestPrice(payload);
const links = bookingLinks(payload);
/* 첫 화면 우선순위 key(체크인·영업시간…)가 하나도 없는 업종이 있다 —
그때 띠를 비우지 않고 확인된 이용 정보 앞 넷으로 채운다. */
const priority = heroFacts(payload);
const facts = priority.length > 0 ? priority : essentialRows(payload).slice(0, 4);
const caption = image?.caption ?? place.name;
return (
/* data-oasi: 껍데기의 판 지우개(Shell PLATE_CSS)를 건너뛴다 — 여기는 이미 투명하고
위 여백도 스스로 정한다(첫 섹션이라 다른 섹션보다 좁다). */
<section id="top" data-oasi aria-labelledby="top-heading" className="pt-12 lg:pt-16">
<h1
id="top-heading"
className="text-[length:var(--fs-sm)] font-normal tracking-[0.08em] leading-[1.9]"
>
{place.name}
</h1>
{narrative.heroHeadline && (
<p className="text-muted measure mt-3 text-[length:var(--fs-xs)] leading-[1.9]">
{narrative.heroHeadline}
</p>
)}
{image && (
<figure className="relative mx-auto mt-10 w-full max-w-[34rem]">
<img
src={image.url}
alt={image.alt}
// 첫 화면 이미지는 지연 로딩하지 않는다 — LCP 가 그만큼 늦어진다.
fetchPriority="high"
decoding="async"
width={image.width}
height={image.height}
className="block h-[clamp(17rem,27vw,24rem)] w-full object-cover"
/>
{/* 캡션 높이를 액자에 묶고(max-h-full) 한 줄로 묶는다(nowrap).
22rem 로 박아 두면 액자보다 캡션이 길어져 사진 아래로 흘러내리고,
긴 캡션은 세로쓰기가 여러 단으로 갈려 액자 옆이 글자 벽이 된다. */}
<figcaption
className="text-muted absolute left-full top-0 ml-5 hidden max-h-full overflow-hidden text-ellipsis whitespace-nowrap text-[length:var(--fs-xs)] tracking-[0.14em] xl:block"
style={{writingMode: 'vertical-rl'}}
>
{caption}
</figcaption>
</figure>
)}
{(price || facts.length > 0) && (
<dl className="border-line mt-10 flex flex-wrap gap-x-10 gap-y-4 border-t pt-5 text-[length:var(--fs-xs)] leading-[1.9]">
{price && (
<div>
<dt className="text-muted">최저가</dt>
<dd>{price}</dd>
</div>
)}
{facts.map((row) => (
<div key={row.label}>
<dt className="text-muted">{row.label}</dt>
<dd>{row.value}</dd>
</div>
))}
</dl>
)}
{/* 확정된 예약 채널만. 버튼 상자를 만들지 않는다 — 이 안에는 면이 없다. */}
{links.length > 0 && (
<ul className="mt-6 flex flex-wrap items-center gap-x-8">
{links.map((link) => (
<li key={link.url}>
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center text-[length:var(--fs-sm)] underline underline-offset-[6px]"
style={{color: 'var(--color-brand)'}}
>
{bookingLabel(link)} 예약
</a>
</li>
))}
</ul>
)}
</section>
);
}
+137
View File
@@ -0,0 +1,137 @@
import {useSite} from '@/lib/site-context';
import {bookingLabel, bookingLinks, sectionName, unitSpec, unitViews} from '@/lib/derive';
import {SectionHead} from './SectionHead';
/**
* oasi 객실 안내 — 카드 격자가 아니라 **사진 한 장씩 내려가는 지면**이다.
*
* ★ `@/lib/ui/Section` 을 쓰지 않고 `<section>` 을 직접 그린다.
* 그쪽은 섹션마다 배경(`--tpl-surface`)과 아래 실선을 칠하는데, 이 안은 배경이
* 한 톤이고 면이 갈리지 않는 게 정체성이다 — 그걸 쓰면 색 띠가 생긴다.
* ★ 값은 상자에 넣지 않는다. 요금·스펙은 가는 실선 하나로만 구분한다.
* ★ 사진은 한 장도 빼지 않는다. 대표 한 장은 세로 캡션과 함께 크게, 나머지는
* 아래 작은 격자로 — 감추면 HTML 에서 사라져 검색·AI 가 못 본다.
* ★ 사진 틀은 높이를 고정한다. 자연 비율로 두면 객실마다 사진 높이가 제각각이라
* 지면이 아니라 무너진 격자가 된다 — 실측(stay3): 대표 사진 544×725 ↔ 544×306,
* 아래 2열 격자 268×178 · 268×335 · 268×268.
*/
export function Rooms() {
const payload = useSite();
const spec = unitSpec(payload);
const units = unitViews(payload);
const booking = bookingLinks(payload)[0];
if (units.length === 0) return null;
return (
/* data-oasi + pt-[var(--oasi-gap)]: 껍데기의 판 지우개를 건너뛰되(이미 투명하다)
섹션 사이 여백은 공용 섹션과 같은 값을 쓴다 — 여기만 다르면 리듬이 끊긴다. */
<section
id="units"
data-oasi
aria-labelledby="units-heading"
className="pt-[var(--oasi-gap)]"
>
<SectionHead
id="units"
title={sectionName(payload, spec.path, `${spec.label} ${units.length}개 안내`)}
/>
<ul className="space-y-20 lg:space-y-28">
{units.map((unit) => (
<li key={unit.unitId}>
{unit.images[0] && (
<figure className="relative mx-auto w-full max-w-[34rem]">
<img
src={unit.images[0].url}
alt={unit.images[0].alt}
loading="lazy"
decoding="async"
className="block h-[clamp(15rem,24vw,21rem)] w-full object-cover"
/>
{/* 세로 캡션은 한 줄로 묶는다(nowrap). 객실 이름이 길면
("A동 (일본식 가정집 느낌으로 …")) 세로쓰기가 오른쪽으로 여러 단을
만들어 액자 옆이 글자 벽이 된다. 잘려도 바로 아래 <h3> 에 전문이 있다. */}
<figcaption
className="text-muted absolute left-full top-0 ml-5 hidden max-h-full overflow-hidden text-ellipsis whitespace-nowrap text-[length:var(--fs-xs)] tracking-[0.14em] xl:block"
style={{writingMode: 'vertical-rl'}}
>
{unit.name}
</figcaption>
</figure>
)}
<h3 className="mt-8 text-[length:var(--fs-sm)] font-normal tracking-[0.08em]">
{unit.name}
</h3>
{/* 스펙은 칩 상자 대신 가운뎃점으로 잇는다 — 이 안에는 테두리 상자가 없다. */}
{unit.chips.length > 0 && (
<p className="text-muted mt-2 text-[length:var(--fs-xs)] leading-[1.9]">
{unit.chips.map((chip) => `${chip.label} ${chip.value}`).join(' · ')}
</p>
)}
{unit.intro && (
<p className="measure mt-4 text-[length:var(--fs-xs)] leading-[1.9]">{unit.intro}</p>
)}
{/* 요금은 한 값이 아니라 비교하는 값이다 — 주중만 적으면 손님이 주말을 모른 채 떠난다. */}
{/* 요금은 객실 정보에서 내지 않는다 — 사유는 sections/UnitsSection.tsx 의 같은 자리 주석. */}
{unit.rows.length > 0 && (
<dl className="divide-line border-line mt-6 divide-y border-t text-[length:var(--fs-xs)]">
{unit.rows.map((row) => (
<div key={row.label} className="flex items-baseline justify-between gap-6 py-2.5">
<dt className="text-muted shrink-0">{row.label}</dt>
<dd className="text-right">{row.value}</dd>
</div>
))}
</dl>
)}
{unit.images.length > 1 && (
<ul className="mx-auto mt-6 grid w-full max-w-[34rem] grid-cols-2 gap-2">
{unit.images.slice(1).map((image) => (
<li key={image.mediaId}>
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
className="block aspect-[4/3] w-full object-cover"
/>
</li>
))}
</ul>
)}
{(booking || payload.place.phone) && (
<p className="mt-6 flex flex-wrap items-center gap-x-8 text-[length:var(--fs-sm)]">
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap inline-flex items-center underline underline-offset-[6px]"
style={{color: 'var(--color-brand)'}}
>
{bookingLabel(booking)} 예약
</a>
)}
{payload.place.phone && (
<a
href={`tel:${payload.place.phone}`}
className="tap text-muted inline-flex items-center underline underline-offset-[6px]"
>
{payload.place.phone}
</a>
)}
</p>
)}
</li>
))}
</ul>
</section>
);
}
@@ -0,0 +1,40 @@
import type {ReactNode} from 'react';
/**
* oasi 섹션 제목 — **큰 제목이 없다.**
*
* 대괄호로 감싼 작은 라벨 한 줄이 제목이고, 설명은 그 아래 더 작은 글씨로 온다.
* ★ `.h2` 를 쓰지 않는다. 그 클래스는 템플릿 제목 굵기·자간을 그대로 받아서
* 이 안에서만 제목이 굵고 크게 튄다 — 이 디자인의 정체성이 그 반대다.
* ★ `@/lib/ui` 에서 아무것도 들여오지 않는다. `lib/ui/Section` 이 이 파일을 부르므로
* 반대 방향 import 가 생기면 순환 참조다.
* ★ `<h2 id="{id}-heading">` 은 반드시 그린다 — 바깥 section 의 aria-labelledby 가 이걸 가리킨다.
*/
export function SectionHead({
id,
title,
lead,
aside,
}: {
id: string;
title: string;
lead?: string;
aside?: ReactNode;
}) {
return (
<header className="mb-8 flex flex-col gap-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-8">
<div className="min-w-0">
<h2
id={`${id}-heading`}
className="text-[length:var(--fs-sm)] font-normal tracking-[0.08em]"
>
[{title}]
</h2>
{lead && (
<p className="text-muted measure mt-3 text-[length:var(--fs-xs)] leading-[1.9]">{lead}</p>
)}
</div>
{aside && <div className="shrink-0 text-[length:var(--fs-xs)]">{aside}</div>}
</header>
);
}
+398
View File
@@ -0,0 +1,398 @@
import type {CSSProperties, ReactNode} from 'react';
import {isoDate} from '@/lib/format';
import {useSite} from '@/lib/site-context';
import {
bookingLabel,
bookingLinks,
contactLinks,
heroFacts,
isSectionEnabled,
unitSpec,
} from '@/lib/derive';
// ★ 배럴(`@/sections`)을 거치면 껍데기 하나가 사이트의 모든 섹션을 끌고 들어온다.
// 껍데기는 하단 고정 바 하나만 필요하다 — 파일을 직접 가리킨다.
import {MobileTabBar} from '@/sections/MobileTabBar';
/**
* 본문 섹션의 색 띠를 걷어낸다 (2026-09-04, 사장님 지적).
*
* ★ 실측: 히어로는 투명(바탕 #e5ddd2)인데 소개가 rgb(219,211,200), 예약 전 확인이
* rgb(222,213,200), 객실이 다시 투명, 요금·이용정보가 rgb(222,213,200) 이었다.
* 밝기가 오르락내리락하는 띠가 여덟 번 반복된다. 이 안에는 **면이 없다** —
* Hero 주석의 "버튼 상자를 만들지 않는다"와 같은 규칙이 섹션에도 걸려야 한다.
* ★ !important 인 이유: 공용 Section 이 배경색과 세로 여백을 **인라인 style** 로 박는다
* (lib/ui/Section.tsx:82). 인라인은 선택자 특정도로 못 이기므로 이 자리에서만 강제한다.
* 제 폴더가 직접 그린 판(Hero·Rooms)은 `data-oasi` 로 표시해 건너뛴다 — 이미 투명이고
* 위 여백을 스스로 정한다.
* ★ 글자색도 같이 강제한다. tone='dark' 섹션이 인라인으로 밝은 글자를 넣는데,
* 면이 사라지면 그 글자가 갱지 위에 하얗게 떠서 안 읽힌다.
* ★ 아래 실선(border-b)도 지운다. 색 띠를 지우고 선만 남기면 이번엔 줄만 여덟 개 그어진다.
* ★ `.shell` 의 좌우 여백을 0 으로 돌린다. 껍데기가 이미 본문 폭을 잡아 뒀는데
* 섹션 안에서 한 번 더 들어가서, 실측 1440px 에서 공용 섹션 제목만 40px 안쪽에
* 있었다(히어로·객실 569px ↔ 소개·요금 609px).
*
* ★ 뒤의 두 규칙은 **본문 칸이 716px 로 고정**이라 생기는 어긋남을 되돌린다.
* 공용 섹션은 1200px 지면을 전제로 `lg:`·`xl:` 에서 칸을 나누는데, 그 중단점은
* 화면 폭이지 이 칸의 폭이 아니다. 이 껍데기는 화면이 아무리 넓어도 칸이 안 넓어진다.
* - #about: 사진 7 · 글 5 로 갈리면 글 칸이 275px 다 — 한 줄에 열네 자.
* 게다가 세로 가운데 정렬이라 짧은 사진이 허공에 뜨고 위아래로 200px 씩 빈다.
* → 위아래로 쌓아 사진도 글도 칸을 다 쓰게 한다(글은 .measure 가 줄 길이를 잡는다).
* - #summary: 값 표가 xl 에서 두 칸으로 갈려 한 칸이 179px 이 됐다.
* 환불 규정 한 문장이 여덟 줄로 감긴다 → 한 칸으로 되돌린다.
*
* ─────────────────────────────────────────────────────────────────────────────
* 남아 있던 마지막 면 — 공용 `.panel` (2026-09-04, 사장님 "다 고쳐")
*
* ★ 섹션 띠를 지우고 나니 `.panel`(index.css:197, 글자색 5% 틴트 + 실선)만 남아
* 이 안에서 유일하게 떠 있는 상자가 됐다. 실측 64개 — FAQ 32 · 주변 24 · 축제 4 ·
* 이용정보 2 · 오시는 길 1 · 날씨 1.
* ★ 그냥 지우면 FAQ 서른둘이 구분 없는 글 덩어리가 된다. 그래서 **면을 걷고 구분을
* 다시 세운다** — 인쇄물이 상자 없이 목록을 가르는 두 가지, 가는 괘선과 들여쓰기다.
* ★ !important 를 쓰지 않는다. 이 <style> 은 캐스케이드 레이어 **밖**이라
* `@layer components` 의 `.panel` 도 `@layer utilities` 의 `px-5` 도 그냥 이긴다.
* 위쪽 규칙들이 !important 인 건 인라인 style 을 이겨야 해서지 특정도 때문이 아니다.
* ★ `.oasi-page` 밖으로 새면 안 된다 — `index.css` 를 고치면 1~6안이 전부 바뀐다.
*
* - #faq: 항목마다 윗줄 괘선 하나. 항목 사이 여백(gap-3)은 0 으로 — 괘선이 경계를
* 맡는데 여백까지 두면 줄 뜬 상자로 다시 읽힌다. 대신 두 단 사이는 16px → 40px:
* 실측 본문 칸이 716px 뿐이라 16px 이면 두 단의 활자가 한 덩어리로 붙는다.
* 답변은 질문 첫 글자 자리(1.875rem = 'Q.' 칸 1.125rem + gap-3 0.75rem)에 매달아
* 들여쓰고, 질문과 답변 사이의 실선은 뺀다 — 괘선이 두 종류면 어느 게 항목 경계인지
* 눈이 못 고른다. 'Q.' 칸에 폭을 박는 건 들여쓰기 눈금을 맞추기 위해서다(실측 17.4px).
* - #info: `divide-y` 가 이미 줄 사이를 긋고 있었다. 상자만 걷으면 그게 곧 표다.
* 좌우 여백(px-5)을 0 으로 돌려 항목 이름이 섹션 제목과 같은 왼쪽 선에 서게 한다.
* 목록 맨 위에 줄을 **덧긋지 않는다** — 묶음 제목('예약 전 확인')이 이미 밑줄을
* 달고 있어서, 실측 16px 간격으로 같은 굵기의 줄이 두 개 그어졌다.
* 값이 전부 짧을 때만 뜨는 격자 판(`dl > div.panel`, 이 payload 에는 안 나온다)은
* 칸이 따로 떨어져 있어 줄 사이를 잇는 실선이 없다 — 칸마다 윗줄을 하나씩 준다.
* - #location: 주소 칸도 같은 규칙. 지도 액자(1px 실선)는 **그대로 둔다** —
* 사진·지도를 실선으로 두르는 건 편집 문법이지 여기서 걷어내는 '틴트 면'이 아니다.
* 거점 표는 이 payload 에 없지만(routes 0건) 같은 안을 쓰는 다른 사이트에서는 뜬다.
* - #guide·#festival: 사진이 이미 덩어리를 가른다. 괘선을 더 긋지 않고 캡션의 좌우
* 여백만 0 으로 — 글이 사진 왼쪽 변에 붙는 인쇄물의 캡션 규칙이다. 축제 카드는
* sm 아래에서 썸네일이 왼쪽에 서는 가로 배치라 그때는 왼쪽 여백을 남긴다.
* - #weather: 값이 한 줄이라 가를 것이 없다. 여백만 0 으로.
*
* ★ 거점 표의 칸을 `thead`/`tbody` 로 짚은 이유 — **이 문자열도 소스 파일이다.**
* Tailwind 스캐너는 이 파일의 글자를 전부 훑어 유틸리티 후보를 뽑는다. 선택자에
* 유틸리티와 이름이 같은 태그 하나를 적었더니 공용 CSS 에 쓰지도 않는 규칙이
* 하나 구워졌다(실측: 번들 해시가 index-Dm9iRWS8 → index-Ca3hpIbE 로 바뀐다).
* 해시가 바뀌면 3안 하나 고치자고 **여섯 사이트를 다 다시 구워야** 한다.
*/
const PLATE_CSS = `
.oasi-page main > section:not([data-oasi]) {
background-color: transparent !important;
background-image: none !important;
border-color: transparent !important;
color: var(--tpl-text) !important;
padding-block: var(--oasi-gap) 0 !important;
}
.oasi-page main > section:not([data-oasi]) .shell {
max-width: none;
padding-inline: 0;
}
.oasi-page main > section#about > .shell > .grid {
display: block;
}
.oasi-page main > section#about > .shell > .grid > * + * {
margin-top: 2.5rem;
}
.oasi-page main > section#summary dl {
grid-template-columns: minmax(0, 1fr);
}
/*
* 붙여넣기 아이템 카드 — 소식 · 영상 · 추천 일정 (2026-09-04, 사장님: "1,2,3안 다 맞추세요")
*
* ★ 이 카드들은 .panel 이 아니라 제 인라인 style 로 면을 그린다(items/common.tsx 의
* ITEM_CARD·ITEM_BORDER). 그래서 위 .panel 규칙이 안 닿았고, 섹션 띠를 다 지운 3안에서
* **소식 카드만 갱지 결에 2px 테두리를 두른 상자로 혼자 서 있었다.**
* ★ w4-paper 의 결은 1안(레트로 갱지)의 것이다. 여기서는 결을 지우고 테두리를 실선 한 겹으로
* 낮춘다. 상자를 아예 없애지는 않는다 — 전단 여섯 장이 경계 없이 붙으면 어디까지가 한 장인지
* 안 보인다. 면은 빼고 테두리만 남기는 게 이 안의 타협점이다.
* ★ 배경은 transparent 로 두지 않는다. 사진 없는 공지 카드가 종이에 바로 얹히면
* 본문과 구분이 사라진다 — 아주 옅은 틴트 한 겹만 남긴다.
* ★ 영상은 뺐다 (2026-09-04, 사장님: "영상 border 안 예쁘다")
* 영상 카드는 상자가 아니라 **표지 사진 한 장**이고, 쇼츠라 9:16 세로다. li 에 틴트를 깔면
* 영상보다 넓은 회색 판이 뒤에 깔려 액자처럼 보인다. 사진은 제 테두리가 곧 경계다.
*/
.oasi-page section#event li,
.oasi-page section#itinerary article {
background-image: none !important;
background-color: color-mix(in oklab, currentcolor 3%, transparent) !important;
border-width: 1px !important;
box-shadow: none !important;
}
.oasi-page .panel,
.oasi-page .panel-sunken {
background-color: transparent;
border-width: 0;
border-radius: 0;
box-shadow: none;
}
.oasi-page main > section#faq > .shell > div:last-of-type {
row-gap: 0;
column-gap: 2.5rem;
}
.oasi-page main > section#faq details {
margin-block: 0;
border-top: 1px solid var(--site-line);
}
.oasi-page main > section#faq summary {
padding-inline: 0;
}
.oasi-page main > section#faq summary > span:first-child {
width: 1.125rem;
}
.oasi-page main > section#faq summary + div {
border-top-width: 0;
padding-inline: 1.875rem 0;
padding-top: 0.5rem;
}
.oasi-page main > section#info dl.panel > div {
padding-inline: 0;
}
.oasi-page main > section#info dl > div.panel {
border-top: 1px solid var(--site-line);
padding-inline: 0;
}
.oasi-page main > section#location .panel {
border-top: 1px solid var(--site-line);
padding-inline: 0;
}
.oasi-page main > section#location :is(thead, tbody) :is(th, td):first-child {
padding-left: 0;
}
.oasi-page main > section#location :is(thead, tbody) :is(th, td):last-child {
padding-right: 0;
}
.oasi-page main > section#weather .panel {
padding-inline: 0;
}
.oasi-page main > section#guide .panel > span:last-child {
padding-inline: 0;
}
@media (min-width: 40rem) {
.oasi-page main > section#festival .panel > span:last-child {
padding-inline: 0;
}
}
`;
/**
* ★ 섹션 사이 여백은 이제 **유일한 경계**다. 색 띠와 실선이 사라졌으니 여백이 좁으면
* 섹션이 이어 붙어 보인다. 템플릿이 정한 값(--tpl-section-space, 이 안은 7rem)을
* 상한으로 쓰되 모바일에서는 3.5rem 까지 줄인다.
* 공용 --section-space(상한 같음, 하한 2.25rem)를 그대로 쓰지 않는 이유는,
* 그 값은 '위아래 둘 다' 붙던 값이라 경계 하나로 쓰기에는 좁다.
*/
const OASI_VARS = {
'--oasi-gap': 'clamp(3.5rem, 7vw, var(--tpl-section-space, 4rem))',
backgroundColor: 'var(--tpl-bg)',
color: 'var(--tpl-text)',
} as CSSProperties;
/**
* oasi 껍데기 — **왼쪽 세로 메뉴 + 아주 큰 여백 + 작은 글씨.**
*
* ★ 다른 안과 갈리는 지점은 '상단 가로 헤더가 없다' 하나다.
* 메뉴가 왼쪽에 세로로 서면 본문 폭이 좁아지고, 좁은 폭에 작은 글씨를 넣어야
* 줄 길이가 맞는다 — 여백·글자 크기가 전부 여기서 따라온다.
* ★ 카드·그림자를 쓰지 않는다. 이 안에서 면을 가르는 건 가는 실선 하나뿐이다.
* ★ 왼쪽 칼럼은 `sticky` 다 — 본문이 길어도 메뉴가 따라온다. 좁은 화면에서는
* 위로 올라가 가로 메뉴가 된다(sticky 를 걸면 모바일에서 화면 절반을 먹는다).
*/
export function Shell({children}: {children: ReactNode}) {
const payload = useSite();
const {place} = payload;
const spec = unitSpec(payload);
const booking = bookingLinks(payload)[0];
const channels = contactLinks(payload);
const menu = [
{label: '처음', href: '#top', show: true},
{label: '소개', href: '#about', show: isSectionEnabled(payload, 'intro')},
{label: spec.label, href: '#units', show: payload.units.length > 0},
{label: '이용 정보', href: '#info', show: true},
{label: '주변', href: '#guide', show: isSectionEnabled(payload, 'local')},
{label: '오시는 길', href: '#location', show: true},
{label: '자주 묻는 질문', href: '#faq', show: payload.faqs.length > 0},
].filter((item) => item.show);
/*
* 유틸 띠에 놓는 짧은 문구 셋.
* ★ 문구를 지어내지 않는다 — 확인된 fact 를 먼저 쓰고(체크인 16:00), 모자라면
* 사장님이 켜 둔 섹션 이름으로 채운다. 둘 다 없으면 띠를 그리지 않는다.
*/
const strip = [
...heroFacts(payload).map((row) => `${row.label} ${row.value}`),
...payload.theme.sections
.filter((section) => section.enabled && section.name?.trim())
.map((section) => section.name.trim()),
].slice(0, 3);
const slogan = payload.narrative.tagline ?? payload.narrative.heroSubline;
const address = place.roadAddress ?? place.address;
return (
<div className="oasi-page flex min-h-screen w-full flex-col" style={OASI_VARS}>
<style dangerouslySetInnerHTML={{__html: PLATE_CSS}} />
{/* 아래 여백을 위보다 크게 잡는다 — 섹션이 판 없이 여백으로만 끊기는데,
마지막 섹션과 꼬리 실선 사이가 섹션 간격보다 좁으면 꼬리가 본문에 붙어 보인다. */}
<div className="mx-auto flex w-full max-w-[72rem] flex-col gap-10 px-5 pb-16 pt-10 lg:flex-row lg:gap-14 lg:px-10 lg:pb-24 lg:pt-16">
{/* 왼쪽 칼럼 — 워드마크 → 넉넉한 여백 → 세로 메뉴. 300px 가 원본 폭이다. */}
<header className="lg:sticky lg:top-12 lg:h-fit lg:w-[18.75rem] lg:shrink-0">
<a href="#top" className="block">
<span
className="serif block leading-none"
/* 자간·굵기를 인라인으로 덮는다 — 템플릿 기본값은 굵고 자간이 음수다.
이 안의 워드마크는 '가늘고 넓게' 가 정체성이라 그대로 두면 안이 안 산다. */
style={{
fontSize: 'var(--fs-display)',
fontWeight: 300,
letterSpacing: '0.14em',
}}
>
{place.name}
</span>
{place.englishName && (
<span className="text-muted mt-3 block text-[length:var(--fs-xs)] tracking-[0.24em]">
{place.englishName}
</span>
)}
</a>
<nav aria-label="주요 메뉴" className="mt-12 lg:mt-24">
{/* 좁은 화면에서는 두 줄로 접힌다 — gap-y 가 없으면 두 줄이 붙어 한 덩어리로 읽힌다. */}
<ul className="flex flex-wrap items-center gap-x-6 gap-y-1 lg:block">
{menu.map((item, index) => (
<li key={item.label}>
<a
href={item.href}
/* ★ 스크롤 위치를 따라가며 표시를 옮기지 않는다. 그건 자바스크립트가
떠야 도는데, 이 사이트는 크롤러가 보는 HTML 이 정본이다.
문서를 연 시점의 위치(맨 위)만 표시한다. */
aria-current={index === 0 ? 'true' : undefined}
className={`tap inline-flex items-center text-[length:var(--fs-sm)] transition-opacity hover:opacity-100 ${
index === 0 ? '' : 'text-muted'
}`}
>
{item.label}
</a>
</li>
))}
</ul>
</nav>
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap mt-2 inline-flex items-center text-[length:var(--fs-sm)] underline underline-offset-[6px]"
style={{color: 'var(--color-brand)'}}
>
{bookingLabel(booking)} 예약
</a>
)}
</header>
<div className="flex min-w-0 flex-1 flex-col">
{/* 유틸 띠 — 위아래 실선 사이에 짧은 문구 셋, 오른쪽 끝에 아주 작은 슬로건. */}
{(strip.length > 0 || slogan) && (
<div className="border-line flex flex-col gap-3 border-y py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6">
{strip.length > 0 && (
<ul className="text-muted flex min-w-0 flex-wrap items-center gap-x-4 gap-y-1 text-[length:var(--fs-xs)]">
{strip.map((text, index) => (
<li key={text} className="flex items-center gap-4">
{/* 구분선은 항목 사이에만. 첫 항목 앞에 세로줄이 서면 띠가 잘려 보인다. */}
{index > 0 && (
<span aria-hidden className="opacity-40">
|
</span>
)}
<span>{text}</span>
</li>
))}
</ul>
)}
{slogan && (
<p className="text-muted measure shrink-0 text-[length:var(--fs-xs)] leading-[1.9] sm:max-w-[18rem] sm:text-right">
{slogan}
</p>
)}
</div>
)}
{children}
</div>
</div>
{/* 하단 — 아주 작은 글씨 3열. 어두운 면을 깔지 않는다(이 안에는 색 띠가 없다). */}
<footer className="border-line mt-auto w-full border-t">
<div className="mx-auto grid w-full max-w-[72rem] grid-cols-1 gap-8 px-5 pb-28 pt-10 text-[length:var(--fs-xs)] leading-[1.9] sm:grid-cols-3 lg:px-10 lg:pb-14">
<p>[{place.name}]</p>
{channels.length > 0 ? (
<ul className="space-y-1">
{channels.map((link) => (
<li key={link.url}>
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="underline underline-offset-[5px]"
>
{/* 채널 코드 → 사람이 읽는 이름. 수집된 링크 제목은 상호가 붙어 있어 쓰지 않는다. */}
{bookingLabel(link)}
</a>
</li>
))}
</ul>
) : (
<span />
)}
<div className="text-muted space-y-1 sm:text-right">
{address && <p>{address}</p>}
{place.phone && (
<p>
<a href={`tel:${place.phone}`} className="underline underline-offset-[5px]">
{place.phone}
</a>
</p>
)}
{place.email && <p>{place.email}</p>}
{place.legal?.representative && <p>대표 {place.legal.representative}</p>}
{place.legal?.businessRegistrationNumber && (
<p>사업자등록번호 {place.legal.businessRegistrationNumber}</p>
)}
{place.legal?.mailOrderNumber && <p>통신판매업신고 {place.legal.mailOrderNumber}</p>}
{place.legal?.licenseNumber && (
<p>
{place.legal.licenseLabel ?? '인허가번호'} {place.legal.licenseNumber}
</p>
)}
{/* ★ 작성자·최종 업데이트는 안마다 같은 모양이어야 한다 (2026-09-04, AEO 진단 0/3)
한글 날짜("2026년 9월 4일")는 최신성을 재는 쪽이 못 읽는다. 화면 글자도 ISO 로 적고,
byline 은 E-E-A-T 채점이 본문에서 찾는 값이라 같이 남긴다. 공용 꼬리(SiteFooter)와 한 벌. */}
<p className="byline">
<span className="author">작성·운영 {place.name}</span>
{' · 최종 업데이트: '}
<time dateTime={payload.site.updatedAt}>{isoDate(payload.site.updatedAt)}</time>
</p>
</div>
</div>
</footer>
<MobileTabBar />
</div>
);
}
+11
View File
@@ -0,0 +1,11 @@
/**
* oasi — 왼쪽 세로 메뉴 · 아주 큰 여백 · 아주 작은 글씨.
*
* ★ 배럴은 re-export 만 한다. `lib/ui/Section` 과 `sections/HeroSection` 은 이 배럴이
* 아니라 파일을 직접 가리킨다 — 배럴을 거치면 제목 하나 그리려고 껍데기·객실까지
* 끌려 들어와 순환 참조가 난다.
*/
export {Shell} from './Shell';
export {SectionHead} from './SectionHead';
export {Hero} from './Hero';
export {Rooms} from './Rooms';
+202
View File
@@ -0,0 +1,202 @@
import {useSite} from '@/lib/site-context';
import {bookingLabel, bookingLinks, heroFacts, lowestPrice} from '@/lib/derive';
/**
* 파스텔의 첫 화면 — **연노랑 판 위에 둥근 사진**.
*
* ★ 사진을 쓴다 (2026-09-03, 두 번째 반려)
* 처음엔 상호를 담은 CSS 배지를 벽지처럼 깔았다. 레퍼런스(아이스크림 브랜드)는 그게 맞다 —
* **그쪽은 파는 게 브랜드고, 여기는 파는 게 집이다.** 손님이 첫 화면에서 보고 싶은 건
* 상호를 반복한 무늬가 아니라 방이 어떻게 생겼는가다. 파스텔은 사진을 감싸는 판으로 남기고,
* 원 무늬는 사진 뒤에 몇 개만 흘려 이 안의 결만 유지한다.
* ★ 사진 모서리를 크게 굴린다(--tpl-radius 가 24px 인 안이다). 각진 사진 하나만 딱딱해 보인다.
* ★ 장식 원은 aria-hidden 이고 사진 **뒤**에 둔다. 사진을 가리면 장식이 아니라 방해다.
*/
export function Hero() {
const payload = useSite();
const {place, narrative} = payload;
const facts = heroFacts(payload);
const price = lowestPrice(payload);
const links = bookingLinks(payload);
const line = narrative.tagline ?? narrative.summary;
const locality = place.addressLocality ?? place.addressRegion;
// 대표 사진이 먼저. og:image 와 첫 장이 다르면 공유 카드와 화면이 어긋난다.
const shots = [...payload.media]
.filter((image) => image.alt?.trim())
.sort((a, b) => Number(b.isPrimary) - Number(a.isPrimary))
.slice(0, 3);
// id="top" — 상단 워드마크와 하단 바가 여기로 돌아온다.
return (
<section id="top" data-pastel="own" className="w-full">
{/* 판 1 — 연노랑 바탕. 왼쪽에 말, 오른쪽에 사진. */}
<div className="relative w-full overflow-hidden" style={{backgroundColor: 'var(--pastel-1)'}}>
{/* 장식 원 — 사진 뒤에서 살짝만 삐져나온다. 화면 밖으로 잘려도 된다. */}
<div aria-hidden className="pointer-events-none absolute inset-0">
<span
className="absolute rounded-full"
style={{
width: 'clamp(12rem, 26vw, 22rem)',
aspectRatio: '1',
backgroundColor: 'var(--pastel-2)',
right: '-6%',
top: '-6%',
opacity: 0.75,
}}
/>
<span
className="absolute rounded-full"
style={{
width: 'clamp(8rem, 18vw, 15rem)',
aspectRatio: '1',
backgroundColor: 'var(--pastel-3)',
left: '46%',
bottom: '-10%',
opacity: 0.7,
}}
/>
</div>
<div
className="shell relative grid items-center gap-8 lg:grid-cols-2 lg:gap-14"
style={{paddingBlock: 'var(--section-space)'}}
>
<div className="order-2 lg:order-1">
{locality && (
<p
className="inline-flex items-center rounded-full px-3 py-1 text-[length:var(--fs-xs)] font-extrabold"
style={{backgroundColor: 'var(--tpl-bg, #fff)', color: 'var(--pastel-ink)'}}
>
{locality}
</p>
)}
{/* h1 은 페이지에 하나. 가게 이름이 들어가야 "○○ 홈페이지" 질의에 잡힌다. */}
<h1
className="mt-4 break-keep"
style={{
fontSize: 'var(--fs-display)',
fontWeight: 800,
lineHeight: 1.2,
letterSpacing: 'var(--tpl-heading-tracking, -0.03em)',
}}
>
{place.name}
</h1>
{line && (
<p className="measure mt-4 text-[length:var(--fs-lead)] font-medium leading-relaxed opacity-80">
{line}
</p>
)}
{links.length > 0 && (
<a
href={links[0].url}
target="_blank"
rel="noopener noreferrer"
className="tap mt-7 inline-flex items-center justify-center rounded-full px-8 text-[length:var(--fs-sm)] font-extrabold transition-opacity hover:opacity-90"
style={{backgroundColor: 'var(--pastel-ink)', color: 'var(--tpl-bg, #fff)'}}
>
{bookingLabel(links[0])}로 예약
</a>
)}
</div>
<div className="order-1 lg:order-2">
{shots[0] && (
<div
className="relative w-full overflow-hidden"
style={{
aspectRatio: '1 / 1',
borderRadius: 'calc(var(--tpl-radius, 24px) * 1.6)',
// 그림자 대신 흰 테두리로 띄운다 — 이 안의 규칙이다.
boxShadow: '0 0 0 clamp(6px, 1.4vw, 12px) var(--tpl-bg, #fff)',
}}
>
<img
src={shots[0].url}
alt={shots[0].alt}
fetchPriority="high"
decoding="async"
className="size-full object-cover"
/>
</div>
)}
{/* 나머지 두 장은 아래 작게. 사진 문장(alt)이 문서에서 사라지지 않게 남긴다. */}
{shots.length > 1 && (
<ul className="mt-3 grid grid-cols-2 gap-3">
{shots.slice(1).map((image) => (
<li
key={image.mediaId}
className="relative overflow-hidden"
style={{
aspectRatio: '4 / 3',
borderRadius: 'var(--tpl-radius, 24px)',
boxShadow: '0 0 0 clamp(4px, 1vw, 8px) var(--tpl-bg, #fff)',
}}
>
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
className="size-full object-cover"
/>
</li>
))}
</ul>
)}
</div>
</div>
</div>
{/*
판 2 — 가격 · 핵심 값.
★ 국내 숙박 사이트에서 첫 화면이 답해야 하는 건 셋이다: 얼마인가 · 언제 드나 ·
어디서 예약하나. 예약은 위 버튼이 받고 나머지 둘이 이 띠다.
값이 하나도 없으면(수집 전 가게) 빈 칸 네 개 대신 판을 지운다.
*/}
{(price || facts.length > 0) && (
<div className="w-full" style={{backgroundColor: 'var(--pastel-2)'}}>
<dl className="shell flex flex-wrap items-center justify-center gap-x-12 gap-y-5 py-8 text-center">
{price && (
<div>
<dt
className="text-[length:var(--fs-xs)] font-extrabold"
style={{color: 'var(--tpl-bg, #fff)', opacity: 0.85}}
>
최저가
</dt>
<dd
className="mt-1 font-extrabold tabular-nums"
style={{fontSize: 'var(--fs-h3)', color: 'var(--tpl-bg, #fff)'}}
>
{price}
</dd>
</div>
)}
{facts.map((row) => (
<div key={row.label}>
<dt
className="text-[length:var(--fs-xs)] font-extrabold"
style={{color: 'var(--tpl-bg, #fff)', opacity: 0.85}}
>
{row.label}
</dt>
<dd
className="mt-1 font-extrabold"
style={{fontSize: 'var(--fs-h3)', color: 'var(--tpl-bg, #fff)'}}
>
{row.value}
</dd>
</div>
))}
</dl>
</div>
)}
</section>
);
}
+181
View File
@@ -0,0 +1,181 @@
import {ChevronDown, Phone} from 'lucide-react';
import {useSite} from '@/lib/site-context';
import {bookingLabel, bookingLinks, sectionName, unitSpec, unitViews} from '@/lib/derive';
import {SectionHead} from './SectionHead';
/**
* 파스텔의 객실(·메뉴·프로그램) — 파스텔 카드 2열.
*
* ★ 공용 Section 을 쓰지 않고 <section> 을 직접 그린다. 이 안은 판마다 배경이 통째로
* 바뀌는 게 뼈대라, 배경·여백을 남이 정하면 뼈대가 안 선다. `data-pastel` 은
* Shell 이 까는 자동 색면을 건너뛰라는 표시다(두 색이 겹치면 판이 둘로 안 보인다).
* ★ 그림자를 쓰지 않는다 — 카드가 판보다 진한 파스텔이라 **색으로 떠 있다.**
* 그림자까지 얹으면 말랑한 형태가 무거워진다.
* ★ 사진은 카드 안쪽에 여백을 두고 넣는다. 카드 가장자리까지 채우면 큰 둥근 모서리가
* 사진에 잘려 이 안의 형태가 사라진다.
* ★ 사진은 한 장도 빠뜨리지 않는다. 나머지는 <details> 안에 둔다 — 조건부 렌더로 감추면
* HTML 에 아예 없어서, 구조화 데이터가 주장하는 image 가 화면에 없는 상태가 된다.
*/
export function Rooms() {
const payload = useSite();
const spec = unitSpec(payload);
const units = unitViews(payload);
const booking = bookingLinks(payload)[0];
if (units.length === 0) return null;
return (
<section
id="units"
aria-labelledby="units-heading"
data-pastel="own"
className="w-full"
style={{
backgroundColor: 'var(--tpl-surface, #fff)',
paddingBlock: 'var(--section-space)',
}}
>
<div className="shell">
<SectionHead
id="units"
/* 섹션 id 는 업종마다 다르다(rooms · menu · programs). 사장님이 이름을 바꿨으면 그 이름이 나간다. */
title={sectionName(payload, spec.path, `${spec.label} ${units.length}개 안내`)}
/>
<ul className="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:gap-8">
{units.map((unit, index) => (
<li
key={unit.unitId}
className="flex flex-col overflow-hidden p-4 sm:p-5"
style={{
backgroundColor: index % 2 === 0 ? 'var(--pastel-1)' : 'var(--pastel-2)',
borderRadius: 'calc(var(--tpl-radius, 0.75rem) * 1.35)',
}}
>
{unit.images[0] && (
<div
className="relative aspect-16/10 overflow-hidden"
style={{borderRadius: 'var(--tpl-radius, 0.75rem)'}}
>
<img
src={unit.images[0].url}
alt={unit.images[0].alt}
loading="lazy"
decoding="async"
className="size-full object-cover"
/>
</div>
)}
<div className="flex flex-1 flex-col gap-3 px-1 pt-4">
<div className="flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1">
<h3 className="h3" style={{fontWeight: 800}}>
{unit.name}
</h3>
</div>
{/*
★ 요금은 한 값이 아니라 비교하는 값이다. 주중만 적어 두면 손님은 주말이
얼마인지 모른 채 떠난다. 안 채워진 칸은 derive 가 '문의' 로 준다.
*/}
{unit.chips.length > 0 && (
<ul className="flex flex-wrap items-center gap-1.5">
{unit.chips.map((chip) => (
<li
key={chip.label}
className="inline-flex items-center gap-1 rounded-full px-3 py-1 text-[length:var(--fs-xs)]"
style={{backgroundColor: 'color-mix(in srgb, var(--tpl-surface, #fff) 70%, transparent)'}}
>
<span className="opacity-60">{chip.label}</span>
<span className="font-bold">{chip.value}</span>
</li>
))}
</ul>
)}
{unit.intro && (
<p className="text-[length:var(--fs-sm)] leading-relaxed opacity-75">
{unit.intro}
</p>
)}
</div>
{/* ★ 예약·문의는 접힌 곳에 두지 않는다. 손님이 못 보는 버튼은 없는 버튼이다. */}
{(booking || payload.place.phone) && (
<div className="mt-4 flex gap-2 px-1">
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap flex flex-1 items-center justify-center rounded-full text-[length:var(--fs-sm)] font-extrabold transition-opacity hover:opacity-90"
style={{backgroundColor: 'var(--pastel-ink)', color: 'var(--tpl-bg, #fff)'}}
>
{bookingLabel(booking)} 예약
</a>
)}
{payload.place.phone && (
<a
href={`tel:${payload.place.phone}`}
className="tap flex items-center justify-center gap-1.5 rounded-full px-5 text-[length:var(--fs-sm)] font-bold"
style={{backgroundColor: 'color-mix(in srgb, var(--tpl-surface, #fff) 75%, transparent)'}}
>
<Phone className="size-4" />
<span>전화</span>
</a>
)}
</div>
)}
{(unit.rows.length > 0 || unit.images.length > 1) && (
<details className="group mt-3 px-1">
<summary className="tap flex cursor-pointer list-none items-center justify-between gap-2 text-[length:var(--fs-sm)] font-bold marker:content-none [&::-webkit-details-marker]:hidden">
<span>{unit.name} 자세히</span>
<ChevronDown className="size-4 shrink-0 transition-transform group-open:rotate-180" />
</summary>
<div className="space-y-4 pb-1">
{unit.rows.length > 0 && (
<dl className="divide-line divide-y">
{unit.rows.map((row) => (
<div
key={row.label}
className="flex items-baseline justify-between gap-4 py-2.5 text-[length:var(--fs-sm)]"
>
<dt className="shrink-0 opacity-60">{row.label}</dt>
<dd className="text-right font-bold">{row.value}</dd>
</div>
))}
</dl>
)}
{unit.images.length > 1 && (
<ul className="grid grid-cols-2 gap-2">
{unit.images.slice(1).map((image) => (
<li
key={image.mediaId}
className="relative aspect-4/3 overflow-hidden"
style={{borderRadius: 'calc(var(--tpl-radius, 0.75rem) * 0.7)'}}
>
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
className="size-full object-cover"
/>
</li>
))}
</ul>
)}
</div>
</details>
)}
</li>
))}
</ul>
</div>
</section>
);
}
@@ -0,0 +1,47 @@
import type {ReactNode} from 'react';
/**
* 파스텔의 섹션 제목 — 판 **가운데**에 굵고 큼직하게.
*
* ★ @/lib/ui 에서 아무것도 가져오지 않는다. Section 이 이 파일을 불러 쓰므로
* 반대 방향 import 가 하나라도 생기면 순환 참조다.
* ★ 제목 위 짧은 알약 하나만 장식으로 둔다. 색면 사이에서 제목이 시작하는 자리를
* 표시하는 게 이 안의 규칙이고, 기본 안의 왼쪽 세로선을 가운데 정렬로 옮긴 것이다.
* ★ h2 의 id 는 계약이다 — Section 의 aria-labelledby 가 `${id}-heading` 을 가리킨다.
*/
export function SectionHead({
id,
title,
lead,
aside,
}: {
id: string;
title: string;
lead?: string;
aside?: ReactNode;
}) {
return (
<header className="mb-8 flex flex-col items-center gap-3 text-center sm:mb-10">
<i
aria-hidden
className="block h-[6px] w-10 rounded-full"
style={{backgroundColor: 'var(--pastel-2, currentColor)', opacity: 0.9}}
/>
<h2
id={`${id}-heading`}
className="h2 break-keep"
style={{fontSize: 'calc(var(--fs-h2) * 1.15)', fontWeight: 800}}
>
{title}
</h2>
{/* 설명은 한 줄이다. 없으면 그리지 않는다 — 없는 문구를 지어내지 않는다. */}
{lead && (
<p className="measure text-[length:var(--fs-sm)] leading-relaxed opacity-65">{lead}</p>
)}
{aside && <div className="text-[length:var(--fs-sm)]">{aside}</div>}
</header>
);
}
+207
View File
@@ -0,0 +1,207 @@
import type {CSSProperties, ReactNode} from 'react';
import {Instagram, Menu, MessageCircle, Phone} from 'lucide-react';
import {useSite} from '@/lib/site-context';
import {channelLabel, contactLinks, isSectionEnabled, unitSpec} from '@/lib/derive';
// ★ 배럴(@/sections)로 들어가면 UnitsSection → layouts/pastel/Rooms 로 돌아와 순환 참조다.
// 쓰는 파일을 직접 가리킨다.
import {SiteFooter} from '@/sections/SiteFooter';
import {MobileTabBar} from '@/sections/MobileTabBar';
/**
* 파스텔 — 색면(色面) 블록형 껍데기.
*
* ★ 이 안의 뼈대는 "섹션마다 배경이 통째로 바뀌는 것" 하나다. 판과 판 사이에 선이 없고,
* **색이 바뀌는 것 자체가 섹션의 경계**다. 그래서 아래 <style> 이 본문의 섹션들에
* 파스텔 판을 번갈아 깔고 경계선을 지운다.
* ★ !important 가 붙은 이유: 공용 Section 이 배경색을 **인라인 style** 로 박는다
* (lib/ui/Section.tsx). 인라인은 선택자 특정도로 못 이기므로 이 자리에서만 강제한다.
* 대신 우리 폴더가 직접 그린 판(Hero·Rooms)은 `data-pastel` 로 표시해 건너뛴다.
* ★ 글자색도 같이 강제한다. tone='dark' 섹션이 인라인으로 흰 글자를 넣는데,
* 파스텔 판 위의 흰 글자는 읽히지 않는다.
*/
const PLATE_CSS = `
.pastel-page > main > section:not([data-pastel]) {
border-color: transparent;
background-image: none;
color: var(--pastel-ink) !important;
}
.pastel-page > main > section:not([data-pastel]):nth-of-type(4n+1) { background-color: var(--pastel-1) !important; }
.pastel-page > main > section:not([data-pastel]):nth-of-type(4n+2) { background-color: var(--pastel-soft) !important; }
.pastel-page > main > section:not([data-pastel]):nth-of-type(4n+3) { background-color: var(--pastel-2) !important; }
.pastel-page > main > section:not([data-pastel]):nth-of-type(4n) { background-color: var(--pastel-3) !important; }
`;
/**
* 파스텔 다섯 색.
*
* ★ hex 를 박지 않는다 — 사장님이 색을 바꾸면 이 안만 안 따라온다.
* 템플릿 색에 흰색을 섞어 만들되, 섞는 **비율로 사다리를 만든다**(6 → 15 → 27 → 38%).
* ★ 처음엔 넷을 20% 언저리로 맞췄더니, 실측 팔레트(stay-pastel: primary #6f63c9 ·
* accent #7c7fd6)처럼 색상이 하나뿐인 안에서는 네 판이 **같은 색으로 보였다** —
* 색이 경계인 안에서 그건 경계가 없는 것이다. 밝기 차로 판을 가른다.
* ★ 제일 진한 판만 primary 에서 뽑는다. 색상이 갈린 팔레트에서는 그 판만 색이 달라져
* 리듬이 생기고, 하나뿐인 팔레트에서도 밝기 사다리는 그대로 남는다.
* ★ --pastel-ink 는 글자색이다. 파스텔 판 위에 흰 글자를 얹으면 아무것도 안 읽혀서,
* 본문 색(--tpl-text)에 브랜드색을 살짝 섞은 진한 색 하나로 전부 쓴다.
*/
const PASTEL = {
/*
* ★ 한 색에서 밝기만 뽑아 쓰던 것을 버렸다 (2026-09-03, 사장님 반려)
* accent 하나를 6·15·27·38% 로 섞으니 네 판이 **같은 라벤더 계열**로 나왔다.
* 레퍼런스(수제 아이스크림 브랜드)의 정체성은 밝기 사다리가 아니라
* **색상이 다른 파스텔 세 가지가 판마다 바뀌는 것**이다 — 연노랑 · 하늘 · 연보라.
* 그래서 팔레트 여섯 칸을 **각각 다른 판**으로 쓴다. 섞지 않는다.
* card → 판 1(연노랑, 패턴 바탕)
* accent → 판 2(하늘)
* secondary → 판 3(연보라)
* text → 잉크(진한 남색). 파스텔 위에 흰 글자를 얹으면 안 읽힌다.
*/
'--pastel-1': 'var(--tpl-card)',
'--pastel-2': 'var(--tpl-accent)',
'--pastel-3': 'var(--tpl-secondary)',
'--pastel-soft': 'var(--tpl-bg)',
'--pastel-ink': 'var(--tpl-text)',
// 판 안쪽 여백이 이 안의 성격이다 — 템플릿 값보다 한 단 넉넉하게 쓰되 모바일에서는 줄인다.
'--section-space': 'clamp(2.75rem, 8vw, calc(var(--tpl-section-space, 4rem) * 1.4))',
backgroundColor: 'var(--pastel-soft)',
color: 'var(--pastel-ink)',
} as CSSProperties;
export function Shell({children}: {children: ReactNode}) {
const payload = useSite();
const spec = unitSpec(payload);
const channels = contactLinks(payload);
const items = [
{label: '소개', href: '#about', show: isSectionEnabled(payload, 'intro')},
{label: spec.label, href: '#units', show: payload.units.length > 0},
{label: '이용 정보', href: '#info', show: true},
{label: '주변', href: '#guide', show: isSectionEnabled(payload, 'local')},
{label: '오시는 길', href: '#location', show: true},
{label: 'FAQ', href: '#faq', show: payload.faqs.length > 0},
].filter((item) => item.show);
return (
<div className="pastel-page flex min-h-screen w-full flex-col" style={PASTEL}>
<style dangerouslySetInnerHTML={{__html: PLATE_CSS}} />
{/* 상단 — 흰 바탕 가로 바. 테두리를 두지 않는다(색면이 경계다). */}
<header
className="sticky top-0 z-40 w-full"
style={{backgroundColor: 'color-mix(in srgb, var(--tpl-surface, #fff) 92%, transparent)'}}
>
<div className="shell flex h-16 items-center justify-between gap-3">
{/*
워드마크. ★ 손글씨 서체를 새로 불러오지 않는다 — 서체는 템플릿이 정하는 값이고
(--tpl-font-heading), 여기서 웹폰트를 하나 더 받으면 그 결정을 덮어쓴다.
기울임 + 굵기 + 아주 작은 회전으로 손으로 쓴 결만 흉내 낸다.
*/}
<a href="#top" className="flex min-w-0 items-center gap-2">
<span
className="serif truncate italic"
style={{
fontSize: 'var(--fs-lead)',
fontWeight: 800,
display: 'inline-block',
transform: 'rotate(-1.5deg)',
}}
>
{payload.place.name}
</span>
</a>
{/* 가운데 메뉴 — 자간을 넓게 벌린다. 한글 라벨 그대로다(영문 눈썹을 쓰지 않는다). */}
<nav aria-label="주요 메뉴" className="hidden items-center gap-8 lg:flex">
{items.map((item) => (
<a
key={item.label}
href={item.href}
className="py-1 text-[length:var(--fs-xs)] font-bold tracking-[0.2em] opacity-70 transition-opacity hover:opacity-100"
>
{item.label}
</a>
))}
</nav>
<div className="flex shrink-0 items-center gap-1">
{payload.place.phone && (
<a
href={`tel:${payload.place.phone}`}
aria-label="전화"
className="tap flex items-center justify-center rounded-full"
style={{backgroundColor: 'var(--pastel-1)'}}
>
<Phone className="size-4" />
</a>
)}
{channels.map((link) => (
<a
key={link.url}
href={link.url}
target="_blank"
rel="noopener noreferrer"
aria-label={channelLabel(link)}
className="tap flex items-center justify-center rounded-full"
style={{backgroundColor: 'var(--pastel-2)'}}
>
{/instagram/i.test(link.url) ? (
<Instagram className="size-4" />
) : (
<MessageCircle className="size-4" />
)}
</a>
))}
{/* 좁은 화면 전체 메뉴. <details> 라 자바스크립트 없이 열린다. */}
<details className="relative lg:hidden">
<summary
className="tap flex cursor-pointer items-center justify-center rounded-full marker:content-none [&::-webkit-details-marker]:hidden"
aria-label="메뉴 열기"
>
<Menu className="size-5" />
</summary>
<nav
aria-label="전체 메뉴"
className="absolute right-0 top-[calc(100%+0.5rem)] z-50 w-48 overflow-hidden rounded-2xl"
style={{backgroundColor: 'var(--tpl-surface, #fff)', boxShadow: '0 10px 30px rgb(0 0 0 / 0.12)'}}
>
<ul>
{items.map((item) => (
<li key={item.label}>
<a
href={item.href}
className="tap flex items-center px-4 text-[length:var(--fs-sm)] font-bold tracking-[0.08em]"
>
{item.label}
</a>
</li>
))}
</ul>
</nav>
</details>
</div>
</div>
</header>
{children}
{/*
꼬리는 공용 SiteFooter 를 그대로 쓴다 — 사업자등록번호·통신판매업신고는 법정 표시라
여기서 다시 그리면 빠뜨린다. 대신 이 껍데기 안에서만 어두운 면 색을 파스텔로 덮어,
검은 바닥이 색면의 흐름을 끊지 않게 한다(SiteFooter 는 --tpl-inverse/--tpl-bg 만 본다).
*/}
<div
style={
{
'--tpl-inverse': 'var(--pastel-3)',
'--tpl-bg': 'var(--pastel-ink)',
} as CSSProperties
}
>
<SiteFooter />
</div>
<MobileTabBar />
</div>
);
}
@@ -0,0 +1,4 @@
export {Shell} from './Shell';
export {SectionHead} from './SectionHead';
export {Hero} from './Hero';
export {Rooms} from './Rooms';
@@ -0,0 +1,308 @@
import {useSite} from '@/lib/site-context';
import {bookingLabel, bookingLinks, unitSpec} from '@/lib/derive';
/**
* 예약형 첫 화면 — 사진이 화면을 채우고 저절로 넘어가며, 정중앙에 이름이 선다.
*
* ★ 기본 히어로는 글이 왼쪽 아래에 붙는다. 이 안은 가운데다 —
* 사진을 정면으로 보여 주는 것이 이 템플릿의 유일한 주장이라, 글이 사진을 비켜야 한다.
* ★ 그라디언트를 아주 옅게 깐다. 짙게 덮으면 팔려는 물건(사진)이 탁해진다.
* 대신 글자 뒤쪽만 조금 더 어둡게 해 흰 하늘 위에서도 이름이 읽히게 한다.
* ★ 높이는 `100svh` 다 (2026-09-04). 92vh·48rem 상한이었는데 1440×723 에서 665px 이라
* 아래 섹션이 58px 삐져나왔다 — 사장님이 본 "꽉 안 찬" 첫 화면의 정체다.
* `vh`·`dvh` 는 모바일 주소창이 접혔다 펴질 때 값이 변해 글자가 뛴다. `svh` 는 안 변한다.
*
* ★ 사진 아래 값 띠를 뺐다 (2026-09-03)
* 최저가·체크인/아웃·주차를 띠로 깔았는데, **바로 아래 '예약 전 확인'(AnswerBlock)이
* 같은 값을 이미 낸다.** 같은 화면에서 같은 숫자가 두 번 나오면 둘 다 값어치가 떨어진다.
* 레퍼런스(아임웹 Reservation)도 첫 화면은 사진·상호·버튼 셋뿐이다.
* 국내 손님은 첫 화면에서 "얼마인가 · 어디로 예약하나"에 답을 못 얻으면 그냥 나간다.
* 테두리·배경 없이 실선 하나로만 구획해 이 안의 결(카드 없음)을 지킨다.
*
* ★ 사진 전환과 글 등장을 **CSS 애니메이션으로만** 짰다 (2026-09-04)
* 상태(useState)로 돌리면 서버가 그린 HTML 과 첫 클라이언트 렌더가 갈려 하이드레이션이
* 어긋난다. 발행물은 정적 HTML 이 먼저 보이는 물건이라, 스크립트가 뜨기 전·아예 안 뜰 때도
* 첫 화면이 완성돼 있어야 한다. CSS 는 마크업이 같아도 알아서 돈다.
*/
/**
* 한 장이 머무는 시간(초). 3초는 눈이 따라가기 전에 바뀌고, 8초는 넘어가는 걸 아무도 못 본다.
*/
const HOLD_S = 5;
/** 겹쳐 녹는 시간(초). 이 안의 결은 느린 호흡이라 1안(0.7s)보다 길게 잡는다. */
const FADE_S = 1.8;
/**
* 저절로 넘어가는 장수.
*
* ★ 사진은 **전부 HTML 에 남기되**, 돌리는 건 앞의 몇 장뿐이다.
* - 남기는 이유: 한 장씩 갈아 끼우면 나머지 alt 문장이 문서에서 사라진다. 이 사이트의
* 존재 이유가 AI·이미지 검색의 인용이라, 문장이 사라지는 건 사진을 버리는 것이다.
* - 자르는 이유: opacity 애니메이션은 요소마다 합성 레이어를 만든다. 100svh 전면 사진
* 열 장이면 390×844@3x 기준 레이어만 100MB 대다. 그리고 5초씩 열 장이면 한 바퀴가
* 50초라 뒤쪽 장은 어차피 아무도 못 본다.
* 돌지 않는 사진은 opacity:0 로 멈춰 있어 레이어가 안 생긴다.
*
* ★ 다섯 장 → 세 장으로 줄였다 (2026-09-04). 수를 줄인 게 아니라 **선별한 결과**다.
* payload 의 사진 순서는 앞쪽이 예약 채널에 올린 촬영본이고, 뒤로 갈수록 영상 캡처와
* 손님 리뷰 사진이다. 앞 다섯 장으로 잡으면 4·5번째로 이런 게 들어왔다:
* - 인물이 화면 절반을 차지한 주방 사진 — 전면 배경에 얼굴이 크게 깔리면 남의 집이 된다.
* - 영상에서 뽑은 한 장 — 1280×720 에 57KB 로, 아홉 장 중 가장 작고 가장 눌렸다.
* 100svh 로 늘리면 1440폭에서 1.13배·390폭에서 1.17배라 압축 자국이 그대로 보인다.
* 화면 대부분이 무늬 없는 회색 벽이라 첫 화면에 쓸 그림도 아니다.
* 나머지 넉 장(창밖 저녁 정원 · 조명 클로즈업 · 화병 클로즈업 · 창밖 하늘)은 소품과
* 구석 사진이거나 색온도가 실내 촬영본과 널뛴다 — 겹쳐 녹는 전환에서 널뛰면 싸구려다.
* ★ 정면 배경으로 쓸 수 있는지는 **원본 픽셀 크기와 무엇이 찍혔는지**로 갈린다.
* payload 의 width·height 는 수집 단계에서 비어 오고(전부 null) category 도
* '거실/주방/전망' 뿐이라 코드가 판단할 근거가 없다 — 그래서 눈으로 고른 수를 상수로 둔다.
*/
const ROTATING = 3;
/**
* 첫 화면 애니메이션 CSS.
*
* ★ 사진: 겹쳐 놓고 불투명도만 바꾼다. 가로 스크롤 트랙으로 짜면 그 상자가 **휠을 먹어
* 페이지가 안 내려간다** — 1안에서 밟았던 함정이다(HeroPension.tsx:15).
* ★ 첫 프레임에 대표 사진이 이미 보여야 한다. 그래서 keyframe 0% 가 opacity:1 이고,
* 나머지 장은 인라인 opacity:0 으로 서 있다가 자기 차례에 애니메이션이 덮는다
* (애니메이션 선언은 인라인 스타일보다 우선한다). 썸네일·공유 카드·스크립트가 꺼진
* 환경이 보는 게 그 첫 프레임이다.
* ★ 지연은 음수다. i번째가 t=i*HOLD 에 서려면 한 바퀴에서 그만큼 당겨 놓아야 한다.
* FADE_S 를 한 번 더 당기는 이유(실측): 그냥 `-(N-i)*HOLD` 로 두면 t=0 이 **마지막 장이
* 빠지는 도중**이다. 마지막 장은 DOM 순서상 대표 사진 위에 있어서, 사진이 다 로드된
* 순간 첫 화면이 대표 사진이 아니라 마지막 장으로 시작한다(op=[1,0,0,0,1] 로 찍혔다).
* 한 바퀴의 시작을 그 교차가 **끝난 지점**으로 옮겨야 첫 프레임이 대표 사진 하나다.
* ★ 마우스를 올려도 안 멈춘다. 1안은 멈추지만 거기는 사진마다 설명이 바뀐다 —
* 이 안은 글이 정중앙에 고정이라 읽는 자리가 흔들릴 일이 없고, PC 에서는 커서가
* 첫 화면에 얹혀 있는 시간이 길어 멈추면 전환을 아예 못 본다.
*
* ★ 글: **흐림에서 또렷해진다**(2026-09-04). 앞의 "12px 아래에서 떠오름"을 걷어냈다.
* - translateY 를 버린 이유: 이 안의 얼굴은 가는 획(300)이고, 획이 가늘수록 움직임이
* '미끄러짐'으로 읽힌다. 사진이 겹쳐 녹는 전환과도 문법이 다르다 — 저쪽은 밀도가 변하는데
* 글자만 자리를 옮기면 두 동작이 따로 논다. blur 는 사진과 같은 문법(초점이 맞는다)이다.
* - 자간 벌림·clip-path 를 안 쓴 이유: 둘 다 글자 상자의 **폭**이 변한다. 상호가 긴 집에서는
* 시작 프레임이 화면 밖으로 나간다(히어로가 overflow-hidden 이라 넘치진 않고 잘린다).
* blur 는 레이아웃을 한 픽셀도 안 건드려서 어떤 상호 길이에도 안전하다.
* - 흐림 값이 `em` 인 이유: 제목(48px)과 버튼(14px)에 같은 px 를 주면 버튼은 뭉개지고
* 제목은 안 흐리다. em 은 요소의 글자 크기로 풀려서 한 줄로 셋 다 맞는다.
* - opacity 는 40% 지점에서 이미 다 찼다. 끝까지 같이 끌면 초점이 맞는 게 아니라
* 그냥 페이드로 보인다.
* ★ fill-mode 가 both 인 이유는 끝난 상태가 기본값과 같아서다 — 애니메이션이 안 돌면
* (모션 축소·CSS 실패) 글자는 흐림 없이 제자리에 보인다. opacity:0 에 갇히는 경로가 없다.
*/
function heroCss(rotating: number): string {
const total = rotating * HOLD_S;
const at = (sec: number) => `${((sec / total) * 100).toFixed(3)}%`;
/*
* 한 장뿐이면 전환 규칙을 아예 안 낸다 — 키프레임이 100% 를 넘어(HOLD+FADE > 총 길이)
* 브라우저가 그 줄만 버리고, 남은 규칙 때문에 한 장이 혼자 깜빡인다.
*/
const slides =
rotating < 2
? ''
: `
.stay2-hero-slide { animation: stay2-hero-fade ${total}s ease-in-out infinite; }
@keyframes stay2-hero-fade {
0% { opacity: 1; }
${at(HOLD_S)} { opacity: 1; }
${at(HOLD_S + FADE_S)} { opacity: 0; }
${at(total - FADE_S)} { opacity: 0; }
100% { opacity: 1; }
}`;
return `${slides}
.stay2-hero-focus { animation: stay2-hero-focus 1.6s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes stay2-hero-focus {
0% { opacity: 0; filter: blur(0.22em); }
40% { opacity: 1; }
100% { opacity: 1; filter: blur(0); }
}
@media (prefers-reduced-motion: reduce) {
.stay2-hero-slide, .stay2-hero-focus { animation: none; }
}
`;
}
/** i번째 장을 앞으로 당길 초. 인라인 `animation-delay` 에 음수로 들어간다. */
function slideDelay(i: number, rotating: number): string {
return (((rotating - i) % rotating) * HOLD_S + FADE_S).toFixed(1);
}
export function Hero() {
const payload = useSite();
const {place, narrative} = payload;
const spec = unitSpec(payload);
const booking = bookingLinks(payload)[0];
const subline = narrative.tagline ?? narrative.heroSubline;
/*
* 대표 사진이 첫 장이다 — og:image(`primaryImage()`)와 첫 장이 다르면 공유 카드와
* 화면이 어긋난다. 정렬은 안정 정렬이라 대표가 없을 때도 두 함수가 같은 장을 고른다.
* 대체 텍스트가 없는 사진은 안 쓴다(문서에 남길 문장이 없는 사진이다).
*/
const photos = [...payload.media]
.filter((image) => image.alt?.trim())
.sort((a, b) => Number(b.isPrimary) - Number(a.isPrimary));
// 한 장뿐이면 돌릴 것이 없다 — 전환을 아예 안 건다(0 이면 어느 장도 애니메이션을 안 받는다).
const rotating = photos.length < 2 ? 0 : Math.min(photos.length, ROTATING);
// 사진 위 버튼은 하나뿐이다. 예약 창구가 있으면 그것, 없으면 전화, 둘 다 없으면 객실로 내려보낸다.
/*
* ★ "네이버 플레이스 예약" 이 아니라 "네이버 플레이스**에서** 예약" 이다 (2026-09-04)
* 앞의 것은 '네이버 플레이스 예약'이라는 상품 이름처럼 읽혀, 이 사이트 안에서 예약이
* 끝나는 것처럼 보인다. 실제로는 새 창으로 넘어간다. 조사 하나가 "저기로 가서 예약한다"
* 를 만든다. 채널 이름 자체는 `bookingLabel()` 그대로다 — 수집된 제목("스테이,머뭄
* 네이버 플레이스")을 쓰면 상호가 두 번 나온다(derive.ts:372).
*/
const cta = booking
? {href: booking.url, label: `${bookingLabel(booking)}에서 예약`, external: true}
: place.phone
? {href: `tel:${place.phone}`, label: `${place.phone} 예약 문의`, external: false}
: payload.units.length > 0
? {href: '#units', label: `${spec.label} 보기`, external: false}
: null;
// id="top" — 헤더 워드마크가 여기로 돌아온다.
return (
<section id="top" className="w-full">
<style dangerouslySetInnerHTML={{__html: heroCss(rotating)}} />
<div
className="relative flex w-full items-center justify-center overflow-hidden"
style={{
backgroundColor: 'var(--tpl-inverse, #1c1917)',
color: 'var(--tpl-bg, #ffffff)',
height: '100svh',
}}
>
{photos.map((image, i) => (
<img
key={image.mediaId}
src={image.url}
alt={image.alt}
// 첫 장은 LCP 다 — 지연 로딩하면 첫 화면이 그만큼 늦게 뜬다.
// 돌아가는 장도 첫 화면 사진이라 lazy 를 안 건다. 5초 뒤에 넘어오는데 그때부터
// 받기 시작하면 흰 화면이 스친다. 돌지 않는 장만 lazy 다.
fetchPriority={i === 0 ? 'high' : i < rotating ? 'auto' : 'low'}
loading={i < Math.max(rotating, 1) ? undefined : 'lazy'}
decoding="async"
width={image.width}
height={image.height}
className={`absolute inset-0 size-full object-cover object-center ${
i < rotating ? 'stay2-hero-slide' : ''
}`}
style={{
// 애니메이션이 없을 때의 기본값. 대표 사진만 서 있고 나머지는 접혀 있다.
opacity: i === 0 ? 1 : 0,
animationDelay: i < rotating ? `-${slideDelay(i, rotating)}s` : undefined,
}}
/>
))}
<div
className="pointer-events-none absolute inset-0"
style={{
background:
'linear-gradient(to bottom, color-mix(in srgb, var(--tpl-inverse, #1c1917) 16%, transparent) 0%, color-mix(in srgb, var(--tpl-inverse, #1c1917) 14%, transparent) 40%, color-mix(in srgb, var(--tpl-inverse, #1c1917) 34%, transparent) 100%)',
}}
/>
{/*
헤더가 놓이는 위쪽 띠만 따로 어둡게 한다 (2026-09-04).
★ 사진 전체를 덮지 않는 이유: 팔려는 물건이 탁해진다. 위 그라디언트를 짙게 올리는 대신
12rem 짜리 띠 하나를 얹어, 사진 가운데(주제)는 손대지 않는다.
★ 실측: 대표 사진이 밝은 천장이라 옛 위쪽 28% 로는 흰 메뉴 글자가 사라졌다.
헤더 높이는 5rem(h-20) — 띠를 그 두 배 넘게 잡아야 경계선이 눈에 안 띈다.
★ 58/30 → 68/40 (2026-09-04). 사장님이 "헤더가 안 보인다" 하신 것의 절반이 여기다.
돌아가는 세 장을 실제 크롭(1440×723 · 390×844)으로 놓고, 글자가 앉는 띠의 화소마다
흰 글자 명암비를 계산했다. **워드마크는 원래 불투명한데도** 390px 에서 주방 사진이
오면 화소의 31% 가 4.5:1 아래였다(왼쪽 위에 밝은 미닫이창이 온다). 68/40 에서 2% 다.
더 짙게(72/42) 가면 0% 지만, 그쯤부터는 첫 화면 위쪽이 띠로 보이기 시작한다.
*/}
<div
className="pointer-events-none absolute inset-x-0 top-0 h-48"
style={{
background:
'linear-gradient(to bottom, color-mix(in srgb, var(--tpl-inverse, #1c1917) 68%, transparent) 0%, color-mix(in srgb, var(--tpl-inverse, #1c1917) 40%, transparent) 45%, transparent 100%)',
}}
/>
{/*
글이 놓이는 가운데만 타원으로 한 겹 (2026-09-04).
★ 사진 전면을 덮지 않는다 — 네 귀퉁이는 원본 그대로 두고 글자 뒤만 가라앉힌다.
대표 사진(밝은 천장)에서 `font-light` 한 줄 소개가 흰 벽에 묻혔다.
★ 사진이 넘어가면서 밝기가 제각각이 됐다 — 한 장에 맞춰 얇게 깔면 다음 장에서 글이
묻힌다. 스크림은 사진과 무관하게 항상 같은 자리에 있어야 한다.
*/}
<div
className="pointer-events-none absolute inset-0"
style={{
background:
'radial-gradient(ellipse 58% 42% at 50% 52%, color-mix(in srgb, var(--tpl-inverse, #1c1917) 38%, transparent) 0%, color-mix(in srgb, var(--tpl-inverse, #1c1917) 18%, transparent) 55%, transparent 78%)',
}}
/>
{/*
스크림만으로 안 되는 밝은 화소(창·조명)가 글자 획에 걸린다 — 획 밑에 얇은 그림자를 깐다.
굵기(300)는 이 안의 얼굴이라 건드리지 않는다.
*/}
<div
className="shell relative z-10 flex flex-col items-center pt-20 text-center"
style={{
textShadow:
'0 1px 3px color-mix(in srgb, var(--tpl-inverse, #1c1917) 55%, transparent)',
}}
>
{/* h1 은 페이지에 하나. 가게 이름이 들어가야 "○○ 홈페이지" 질의에 잡힌다. */}
<h1
className="stay2-hero-focus serif"
style={{
fontSize: 'var(--fs-display)',
// 이 안의 얼굴은 가는 획이다. 템플릿의 제목 굵기(기본 700)를 따르면 다른 안이 된다.
fontWeight: 300,
letterSpacing: '0.06em',
lineHeight: 1.25,
animationDelay: '0.05s',
}}
>
{place.name}
</h1>
{subline && (
<p
className="stay2-hero-focus measure mt-6 text-[length:var(--fs-lead)] font-light leading-loose opacity-95"
// 이름이 다 선 뒤에 한 박자 쉬고 따라온다. 동시에 뜨면 두 줄이 한 덩어리로 보인다.
style={{animationDelay: '0.3s'}}
>
{subline}
</p>
)}
{cta && (
<a
href={cta.href}
{...(cta.external ? {target: '_blank', rel: 'noopener noreferrer'} : {})}
className="stay2-hero-focus tap mt-10 inline-flex items-center justify-center border border-current/70 px-9 text-[length:var(--fs-sm)] font-light tracking-[0.14em] transition-colors hover:border-current"
/*
* ★ 실선 테두리 하나로는 390px 에서 버튼이 사라졌다 (2026-09-04).
* 사진이 넘어가며 버튼 자리에 흰 벽·창이 오면 border-current/60 이 그대로 묻힌다.
* 채운 버튼으로 바꾸는 대신(그러면 이 안의 결이 무너진다) 글자에 쓴 것과 같은
* 수법을 테두리에도 쓴다 — 아주 옅은 어두운 판 + 테두리 밑 그림자.
* opacity-85 는 걷어냈다. 첫 화면에서 누를 수 있는 유일한 것이 옅으면 안 된다.
*/
style={{
animationDelay: '0.55s',
backgroundColor: 'color-mix(in srgb, var(--tpl-inverse, #1c1917) 22%, transparent)',
boxShadow:
'0 1px 6px color-mix(in srgb, var(--tpl-inverse, #1c1917) 30%, transparent)',
}}
>
{cta.label}
</a>
)}
</div>
</div>
</section>
);
}
@@ -0,0 +1,194 @@
import {useSite} from '@/lib/site-context';
import {
bookingLabel,
bookingLinks,
essentialRows,
isSectionEnabled,
sectionName,
unitSpec,
unitViews,
} from '@/lib/derive';
import {SectionHead} from './SectionHead';
/**
* 예약형 객실 · 메뉴 · 프로그램.
*
* ★ `@/lib/ui/Section` 을 쓰지 않고 <section> 을 직접 그린다. 그 껍데기는 여백·바탕·제목을
* 한 벌로 고정하는데, 이 안의 여백은 그보다 넓고 카드가 없다 — 껍데기를 쓰면 다른 안이 된다.
*
* ★ 카드에 테두리·그림자·바탕이 없다. 사진 · 이름 · 한 줄, 그리고 넓은 간격뿐이다.
* 테두리를 두르는 순간 이 안은 기본 격자와 구분되지 않는다.
*
* ★ 그래도 확인된 fact 와 나머지 사진은 <details> 안에 **HTML 로 남긴다.**
* 빼면 JSON-LD 에는 있는 값이 화면에 없어져 발행 게이트(화면 ↔ 구조화 데이터 대조)에 걸리고,
* 무엇보다 alt 문장이 문서에서 사라진다 — 이미지 검색이 그 문장을 읽는다.
* 조건부 렌더가 아니라 <details> 인 이유: 접혀 있어도 크롤러는 읽는다.
*/
export function Rooms() {
const payload = useSite();
const spec = unitSpec(payload);
const units = unitViews(payload);
const booking = bookingLinks(payload)[0];
if (units.length === 0) return null;
// 항목이 둘뿐인데 3열에 두면 오른쪽이 빈다.
const columns =
units.length === 1
? 'grid-cols-1 max-w-2xl mx-auto'
: units.length === 2
? 'grid-cols-1 sm:grid-cols-2'
: 'grid-cols-1 sm:grid-cols-2 lg:grid-cols-3';
/*
* 이용 정보 섹션을 사장님이 꺼 두면 확인된 place fact 가 페이지에서 통째로 사라진다 —
* JSON-LD 는 그대로 주장하므로 대조 게이트에 걸린다. 그때만 여기서 받아 준다.
*/
const fallbackRows = isSectionEnabled(payload, 'info') ? [] : essentialRows(payload);
return (
<section
id="units"
aria-labelledby="units-heading"
className="border-line paper w-full border-b"
style={{
backgroundColor: 'var(--tpl-surface, #fff)',
// 이 안의 결은 여백이다. 섹션 기본 여백보다 한 뼘 더 준다.
paddingBlock: 'calc(var(--section-space) * 1.4)',
}}
>
<div className="shell">
<SectionHead
id="units"
/* 섹션 id 는 업종마다 다르다(rooms · menu · programs) — spec.path 가 그 id 다. */
title={sectionName(payload, spec.path, `${spec.label} 안내`)}
/>
<ul className={`grid gap-x-8 gap-y-14 lg:gap-x-12 ${columns}`}>
{units.map((unit) => (
<li key={unit.unitId} className="flex min-w-0 flex-col">
{unit.images[0] && (
<div className="relative aspect-4/3 w-full overflow-hidden">
<img
src={unit.images[0].url}
alt={unit.images[0].alt}
loading="lazy"
decoding="async"
className="size-full object-cover object-center"
/>
</div>
)}
<h3
className="serif mt-6"
style={{fontSize: 'var(--fs-h3)', fontWeight: 300, letterSpacing: '0.04em'}}
>
{unit.name}
</h3>
{unit.intro && (
<p className="text-muted mt-3 line-clamp-2 text-[length:var(--fs-sm)] font-light leading-loose">
{unit.intro}
</p>
)}
{/*
요금은 한 값이 아니라 **비교하는 값**이다. 주중만 적어 두면 손님은 주말이
얼마인지 모른 채 떠난다. 표를 두르지 않고 한 줄로 늘어놓아 카드의 결을 지킨다.
안 채워진 칸은 derive 에서 '문의' 로 온다 — 없는 값을 지어내지 않는다.
*/}
{/* 요금은 객실 정보에서 내지 않는다 — 사유는 sections/UnitsSection.tsx 의 같은 자리 주석. */}
{unit.chips.length > 0 && (
<ul className="text-muted mt-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-[length:var(--fs-xs)] font-light">
{unit.chips.map((chip) => (
<li key={chip.label}>
{chip.label} {chip.value}
</li>
))}
</ul>
)}
{(unit.rows.length > 0 || unit.images.length > 1) && (
<details className="border-line mt-5 border-t">
<summary className="tap flex cursor-pointer list-none items-center text-[length:var(--fs-sm)] font-light opacity-70 marker:content-none [&::-webkit-details-marker]:hidden">
자세히 보기
</summary>
<div className="space-y-6 pb-2">
{unit.rows.length > 0 && (
<dl className="divide-line divide-y">
{unit.rows.map((row) => (
<div
key={row.label}
className="flex items-baseline justify-between gap-4 py-2.5 text-[length:var(--fs-sm)] font-light"
>
<dt className="text-muted shrink-0">{row.label}</dt>
<dd className="text-right">{row.value}</dd>
</div>
))}
</dl>
)}
{unit.images.length > 1 && (
<ul className="grid grid-cols-2 gap-3">
{unit.images.slice(1).map((image) => (
<li key={image.mediaId} className="relative aspect-4/3 overflow-hidden">
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
className="size-full object-cover object-center"
/>
</li>
))}
</ul>
)}
</div>
</details>
)}
</li>
))}
</ul>
{fallbackRows.length > 0 && (
<dl className="divide-line border-line mx-auto mt-16 max-w-2xl divide-y border-t">
{fallbackRows.map((row) => (
<div
key={row.label}
className="flex items-baseline justify-between gap-4 py-3 text-[length:var(--fs-sm)] font-light"
>
<dt className="text-muted shrink-0">{row.label}</dt>
<dd className="text-right">{row.value}</dd>
</div>
))}
</dl>
)}
{(booking || payload.place.phone) && (
<div className="mt-14 flex flex-wrap items-center justify-center gap-4">
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap border-line inline-flex items-center justify-center border px-9 text-[length:var(--fs-sm)] font-light tracking-[0.14em] transition-opacity hover:opacity-70"
>
{bookingLabel(booking)} 예약
</a>
)}
{payload.place.phone && (
<a
href={`tel:${payload.place.phone}`}
className="tap border-line inline-flex items-center justify-center border px-9 text-[length:var(--fs-sm)] font-light tabular-nums tracking-[0.08em] transition-opacity hover:opacity-70"
>
{payload.place.phone}
</a>
)}
</div>
)}
</div>
</section>
);
}
@@ -0,0 +1,52 @@
import type {ReactNode} from 'react';
/**
* 예약형(reservation) 섹션 제목.
*
* ★ `@/lib/ui` 를 부르지 않는다. `lib/ui/Section` 이 레이아웃별 제목을 골라 부르는 쪽이라,
* 여기서 되받으면 순환 참조가 난다(빌드는 통과하고 런타임에 undefined 컴포넌트가 된다).
*
* ★ 기본 제목(왼쪽 정렬 + 강조선)과 **자리가 다르다.** 이 안은 가운데 정렬에
* 가는 세리프다 — 안이 갈리려면 제목이 서는 자리부터 갈려야 한다.
* ★ `.h2` 를 쓰지 않는 이유: 그 클래스는 굵기를 `--tpl-heading-weight`(기본 700)로 고정한다.
* 이 안의 얼굴은 가는 획이라 굵기만 따로 잡는다. 서체·자간은 `.serif` 가 템플릿에서 가져온다.
*/
export function SectionHead({
id,
title,
lead,
aside,
}: {
id: string;
title: string;
lead?: string;
aside?: ReactNode;
}) {
return (
<header className="mb-10 flex flex-col items-center gap-4 text-center sm:mb-14">
{/* 바깥 <section> 의 aria-labelledby 가 이 id 를 가리킨다 — 이름이 어긋나면 섹션에 이름이 없어진다. */}
<h2
id={`${id}-heading`}
className="serif max-w-full"
style={{
fontSize: 'var(--fs-h2)',
fontWeight: 300,
// 가는 획은 자간을 조금 벌려야 글자가 붙어 보이지 않는다.
letterSpacing: '0.04em',
lineHeight: 1.35,
}}
>
{title}
</h2>
{/* 제목 아래 짧은 실선 하나. 이 안은 카드·아이콘을 쓰지 않아서 구획을 선이 맡는다. */}
<i aria-hidden className="block h-px w-10 bg-current opacity-25" />
{lead && (
<p className="text-muted measure text-[length:var(--fs-sm)] leading-loose">{lead}</p>
)}
{aside && <div className="text-[length:var(--fs-xs)]">{aside}</div>}
</header>
);
}
@@ -0,0 +1,354 @@
import {useEffect, useState, type ReactNode} from 'react';
import {useSite} from '@/lib/site-context';
import {
bookingLabel,
bookingLinks,
contactLinks,
isSectionEnabled,
sectionName,
unitSpec,
} from '@/lib/derive';
import {formatKoreanDate, isoDate} from '@/lib/format';
// ★ `@/sections` 배럴이 아니라 파일을 직접 가리킨다. 배럴은 섹션 전부를 끌고 오는데,
// 그 안의 UnitsSection 이 이 폴더의 Rooms 를 다시 부른다 — 배럴을 타면 순환이 된다.
import {MobileTabBar} from '@/sections/MobileTabBar';
/**
* 예약형(reservation) 껍데기 — 머리 · 본문 · 꼬리.
*
* ★ 기본 껍데기와 다른 건 색이 아니라 **머리가 서는 방식**이다.
* 기본형은 흰 띠가 본문을 밀어내는 sticky 헤더고, 이 안은 사진 위에 얹힌 투명 헤더다.
* 그래서 첫 화면 사진이 화면 맨 위부터 시작한다 — 그게 이 안의 첫인상 전부다.
* ★ 스크롤을 내리면 배경이 차오르고 아래 실선이 생긴다. 안 그러면 밝은 섹션 위에서
* 흰 글자가 통째로 사라진다.
*/
export function Shell({children}: {children: ReactNode}) {
return (
<div className="flex min-h-screen w-full flex-col">
<TopBar />
<div className="flex w-full flex-1 flex-col">{children}</div>
<Bottom />
{/* 좁은 화면의 전화·예약 고정 바. 이 안은 헤더에서 전화를 감추므로 여기가 유일한 창구다. */}
<MobileTabBar />
</div>
);
}
interface NavItem {
label: string;
href: string;
}
/**
* 메뉴 항목 — **켜져 있는 섹션만.**
*
* ★ 앵커 id 는 섹션 컴포넌트가 박은 값이고, 켜짐 여부는 payload 의 섹션 id 가 쥐고 있다.
* 둘이 이름이 다르다(intro → #about, map → #location). 여기서 한 번에 짝지어 둔다 —
* 짝이 어긋나면 눌러도 아무 데도 안 가는 메뉴가 조용히 생긴다.
* ★ 이름은 사장님이 [섹션] 패널에서 붙인 것을 그대로 쓴다. 에디터에서 고친 이름이
* 발행본 메뉴에 안 나오면 사장님에게는 반영이 안 된 것이다.
*/
function useNavItems(): NavItem[] {
const payload = useSite();
const spec = unitSpec(payload);
return (
[
{id: 'intro', href: '#about', fallback: '소개'},
{id: spec.path, href: '#units', fallback: spec.label},
{id: 'pricing', href: '#pricing', fallback: '요금'},
{id: 'info', href: '#info', fallback: '이용 정보'},
{id: 'booking', href: '#booking', fallback: '예약 안내'},
{id: 'photos', href: '#gallery', fallback: '사진'},
{id: 'map', href: '#location', fallback: '오시는 길'},
{id: 'local', href: '#guide', fallback: '주변 정보'},
{id: 'faq', href: '#faq', fallback: '자주 묻는 질문'},
] as const
)
.filter((entry) => isSectionEnabled(payload, entry.id))
.map((entry) => ({label: sectionName(payload, entry.id, entry.fallback), href: entry.href}));
}
/** 스크롤이 이만큼 내려가면 헤더가 불투명해진다. 24px 아래는 손가락이 스친 정도다. */
const SOLID_AT = 24;
/**
* 사진 위에서 헤더 글자가 안 보이던 것 (2026-09-04).
*
* ★ 원인은 헤더 높이가 아니었다. 실측(돌아가는 세 장의 실제 크롭, 화소마다 명암비):
* - 메뉴·전화는 `opacity-70` 이 걸려 있었다. 1440px 에서 글자 뒤 화소의 **25~38%**(메뉴),
* **79%**(전화)가 4.5:1 아래였다. 같은 사진·같은 그라디언트에서 불투명하게만 바꾸면
* 9%·4% 로 떨어진다 — 사진 탓이 아니라 **우리가 글자를 흐리게 만든 탓**이었다.
* - 위 그라디언트를 68/40 으로 올리면(Hero.tsx) 둘 다 0% 다.
* 높이(5rem)는 어느 쪽에도 안 걸렸다. 키우지 않는다 — 이 안은 사진이 화면 맨 위에서
* 시작하는 게 첫인상 전부라, 띠가 두꺼워지면 그걸 잃는다.
*
* ★ 그래서 옅게 만드는 건 **불투명한 바탕 위(solid)에서만** 한다. 거기는 글자가
* `--color-ink`(#2c2c2c) 라 70% 로도 5.2:1 이다. 사진 위에서는 온전히 쓰고,
* 대신 히어로 글자에 쓴 것과 같은 수법(획 밑 얇은 그림자)으로 밝은 화소를 받는다.
* ★ 사진 위에서 마우스 반응을 불투명도로 못 주므로 밑줄로 준다 — 꼬리(Bottom)와 같은 규약이다.
*/
const OVER_PHOTO_SHADOW = '0 1px 3px color-mix(in srgb, var(--tpl-inverse, #1c1917) 55%, transparent)';
function TopBar() {
const payload = useSite();
const items = useNavItems();
const [solid, setSolid] = useState(false);
useEffect(() => {
const onScroll = () => setSolid(window.scrollY > SOLID_AT);
// 새로고침이 페이지 중간에서 일어나면 첫 프레임부터 불투명해야 한다.
onScroll();
window.addEventListener('scroll', onScroll, {passive: true});
return () => window.removeEventListener('scroll', onScroll);
}, []);
// 서버가 그리는 첫 프레임은 solid=false — 스크롤 0 에서 맞는 값이라 하이드레이션이 안 어긋난다.
const quiet = solid
? 'opacity-70 transition-opacity hover:opacity-100'
: 'underline-offset-4 hover:underline';
return (
<header
className={`fixed inset-x-0 top-0 z-40 w-full transition-colors duration-300 ${
solid ? 'border-line border-b backdrop-blur-md' : ''
}`}
style={
solid
? {backgroundColor: 'color-mix(in srgb, var(--tpl-surface, #fff) 92%, transparent)'}
: // 사진 위에 얹혀 있는 동안은 밝은 면 색으로 쓴다 — 사진이 어둡든 밝든 그라디언트가 받쳐 준다.
{color: 'var(--tpl-bg, #ffffff)', textShadow: OVER_PHOTO_SHADOW}
}
>
<div className="shell grid h-20 grid-cols-[1fr_auto] items-center gap-4 lg:grid-cols-[1fr_auto_1fr]">
<a href="#top" className="min-w-0">
<span
className="serif block truncate"
style={{fontSize: 'var(--fs-lead)', fontWeight: 300, letterSpacing: '0.12em'}}
>
{payload.place.name}
</span>
</a>
{/* 가운데 한 줄. 넓은 간격 · 가는 획 — 이 안의 헤더는 읽히기보다 비켜서 있어야 한다.
비켜서는 건 크기·간격이 맡는다. 불투명도로 비키면 사진 위에서 그냥 사라진다. */}
<nav aria-label="주요 메뉴" className="hidden items-center justify-center gap-10 lg:flex">
{items.map((item) => (
<a
key={item.href}
href={item.href}
className={`py-1 text-[length:var(--fs-sm)] font-light ${quiet}`}
>
{item.label}
</a>
))}
</nav>
<div className="flex items-center justify-end gap-2">
{payload.place.phone && (
<a
href={`tel:${payload.place.phone}`}
className={`tap hidden items-center text-[length:var(--fs-sm)] font-light tabular-nums sm:inline-flex ${quiet}`}
>
{payload.place.phone}
</a>
)}
{/*
좁은 화면 메뉴는 <details> 다 — 스크립트가 뜨기 전에 누른 손님에게
열리지 않는 버튼은 그냥 고장난 사이트다.
*/}
{items.length > 0 && (
<details className="lg:hidden">
<summary
className="tap flex cursor-pointer list-none items-center justify-center px-2 text-[length:var(--fs-sm)] font-light marker:content-none [&::-webkit-details-marker]:hidden"
aria-label="메뉴 열기"
>
메뉴
</summary>
<nav
aria-label="전체 메뉴"
className="border-line absolute inset-x-0 top-full border-b border-t"
// 이 판은 불투명한 밝은 면이다 — 헤더가 사진 위에서 켜 둔 획 그림자를
// 그대로 물려받으면 흰 바탕에 어두운 자국이 진다.
style={{
backgroundColor: 'var(--tpl-surface, #fff)',
color: 'var(--tpl-text)',
textShadow: 'none',
}}
>
<ul className="divide-line shell divide-y">
{items.map((item) => (
<li key={item.href}>
<a
href={item.href}
className="tap flex items-center text-[length:var(--fs-sm)] font-light"
>
{item.label}
</a>
</li>
))}
</ul>
</nav>
</details>
)}
</div>
</div>
</header>
);
}
/**
* 꼬리 — 세 칸(소개 · 연락 · 메뉴) + 실선 + 채널 + 사업자 정보.
*
* ★ 어두운 바닥을 쓰지 않는다. 이 안은 전체가 옅은 회색 글자라, 바닥만 검게 두면
* 마지막 섹션과 색이 부딪친다.
* ★ 없는 칸은 만들지 않는다. 무통장 계좌 같은 항목은 payload 에 없으므로 자리도 없다.
*/
function Bottom() {
const payload = useSite();
const {place, site, narrative} = payload;
const items = useNavItems();
const address = place.roadAddress ?? place.address;
const booking = bookingLinks(payload)[0];
const contacts = contactLinks(payload);
// 소개 문단은 사장님이 쓴 첫 문단, 없으면 한 줄 요약. 둘 다 없으면 문단을 그리지 않는다.
const intro = narrative.about[0] ?? narrative.summary;
return (
<footer
className="border-line paper w-full border-t pb-28 md:pb-16"
style={{
backgroundColor: 'var(--tpl-surface-alt, #f5f5f4)',
paddingTop: 'var(--section-space)',
}}
>
<div className="shell">
<div className="grid gap-10 md:grid-cols-3 md:gap-12">
<div className="min-w-0">
<p
className="serif"
style={{fontSize: 'var(--fs-lead)', fontWeight: 300, letterSpacing: '0.1em'}}
>
{place.name}
</p>
{intro && (
<p className="text-muted measure mt-4 text-[length:var(--fs-sm)] leading-loose">
{intro}
</p>
)}
</div>
<dl className="min-w-0 space-y-5">
{address && (
<div>
<dt className="label">주소</dt>
<dd className="mt-1 text-[length:var(--fs-sm)] font-light">{address}</dd>
</div>
)}
{place.phone && (
<div>
<dt className="label">전화</dt>
<dd className="mt-1 text-[length:var(--fs-sm)] font-light tabular-nums">
<a href={`tel:${place.phone}`} className="underline-offset-4 hover:underline">
{place.phone}
</a>
</dd>
</div>
)}
{place.email && (
<div>
<dt className="label">이메일</dt>
<dd className="mt-1 text-[length:var(--fs-sm)] font-light">
<a href={`mailto:${place.email}`} className="underline-offset-4 hover:underline">
{place.email}
</a>
</dd>
</div>
)}
{booking && (
<div>
<dt className="label">예약</dt>
<dd className="mt-1 text-[length:var(--fs-sm)] font-light">
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="underline-offset-4 hover:underline"
>
{bookingLabel(booking)}
</a>
</dd>
</div>
)}
</dl>
{items.length > 0 && (
<nav aria-label="사이트 메뉴" className="min-w-0">
<ul className="space-y-3">
{items.map((item) => (
<li key={item.href}>
<a
href={item.href}
className="text-muted text-[length:var(--fs-sm)] font-light underline-offset-4 hover:underline"
>
{item.label}
</a>
</li>
))}
</ul>
</nav>
)}
</div>
<hr className="border-line mt-12 border-t" />
{contacts.length > 0 && (
<ul className="mt-8 flex flex-wrap items-center justify-center gap-x-6 gap-y-2">
{contacts.map((link) => (
<li key={link.url}>
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="text-muted text-[length:var(--fs-xs)] font-light underline-offset-4 hover:underline"
>
{/* 링크 제목에는 상호가 붙어 온다("○○ 네이버 플레이스") — 가운데 한 줄에는 채널 이름만 둔다. */}
{bookingLabel(link)}
</a>
</li>
))}
</ul>
)}
<div className="text-muted mt-8 flex flex-wrap items-center justify-center gap-x-4 gap-y-1 text-center text-[length:var(--fs-xs)] font-light">
<span>상호 {place.name}</span>
{place.legal?.representative && <span>대표 {place.legal.representative}</span>}
{place.legal?.businessRegistrationNumber && (
<span>사업자등록번호 {place.legal.businessRegistrationNumber}</span>
)}
{place.legal?.mailOrderNumber && (
<span>통신판매업신고 {place.legal.mailOrderNumber}</span>
)}
{place.legal?.licenseNumber && (
<span>
{place.legal.licenseLabel ?? '인허가번호'} {place.legal.licenseNumber}
</span>
)}
{/* 마지막 갱신을 화면에도 적는다 — 사람도 AI 도 신선도를 여기서 본다. */}
{/* ★ 작성자·최종 업데이트는 안마다 같은 모양이어야 한다 (2026-09-04, AEO 진단 0/3)
한글 날짜("2026년 9월 4일")는 최신성을 재는 쪽이 못 읽는다. 화면 글자도 ISO 로 적고,
byline 은 E-E-A-T 채점이 본문에서 찾는 값이라 같이 남긴다. 공용 꼬리(SiteFooter)와 한 벌. */}
<span className="byline">
<span className="author">작성·운영 {place.name}</span>
{' · 최종 업데이트: '}
<time dateTime={site.updatedAt}>{isoDate(site.updatedAt)}</time>
</span>
</div>
</div>
</footer>
);
}
@@ -0,0 +1,10 @@
/**
* 예약형(reservation) 뼈대 — 사진을 정면에 두고 카드를 쓰지 않는 안.
*
* 다른 파일들은 이 배럴이 아니라 파일을 직접 가리킨다(`@/layouts/reservation/Shell`).
* 배럴을 타면 Rooms → UnitsSection → Rooms 로 도는 길이 생긴다.
*/
export {Shell} from './Shell';
export {SectionHead} from './SectionHead';
export {Hero} from './Hero';
export {Rooms} from './Rooms';
+54
View File
@@ -0,0 +1,54 @@
import {useSite} from '@/lib/site-context';
import {galleryImages} from '@/lib/derive';
import {primaryImage} from '@/seo/meta';
/**
* 첫 화면 — **큰 사진 한 장이 아니라 사진 격자다.**
*
* ★ 상호·소개·가격·예약은 왼쪽 칼럼(Shell)이 이미 말한다. 그래서 여기에는 글자가 없고,
* 사진 위에 아무것도 얹지 않는다 — 얹으면 글도 사진도 둘 다 죽는다.
* ★ 두 열을 `columns`(다단)로 짠다. `grid` 로 짜면 행 높이가 제일 큰 사진에 맞춰 묶여
* 빈칸이 생긴다. 다단은 사진을 **원래 비율 그대로** 세로로 흘려 담아, 세로·가로 사진이
* 섞인 채로 높이가 제각각인 격자가 된다(레퍼런스의 골격).
* ★ 바깥 여백을 두지 않는다. 오른쪽 끝까지 사진이 닿는 것이 이 안의 정체성이라
* `.shell` 을 쓰지 않는다.
* ★ alt 가 있는 사진만 나간다(derive 가 이미 거른다). 대체 문장이 곧 이미지 검색이 읽는 글이다.
*/
export function Hero() {
const payload = useSite();
const images = galleryImages(payload);
const primary = primaryImage(payload);
// 대표 사진을 맨 앞으로. 나머지 순서는 payload 가 정한 그대로 둔다.
const ordered =
primary && images.some((image) => image.mediaId === primary.mediaId)
? [primary, ...images.filter((image) => image.mediaId !== primary.mediaId)]
: images;
// 사진이 하나도 없으면 빈 격자를 그리지 않는다 — 첫 화면의 빈 상자가 더 나쁘다.
if (ordered.length === 0) return null;
return (
// id="top" — 왼쪽 칼럼의 상호와 하단 바가 여기로 돌아온다.
<section id="top" aria-label={`${payload.place.name} 사진`} className="w-full">
{/* gap-2 = 8px. 간격을 넓히면 격자가 카드 나열로 보인다. */}
<div className="columns-1 gap-2 sm:columns-2">
{ordered.map((image, index) => (
<figure key={image.mediaId} className="mb-2 break-inside-avoid">
<img
src={image.url}
alt={image.alt}
// 첫 장은 LCP 다 — 지연 로딩하면 그만큼 늦게 그려진다.
loading={index === 0 ? 'eager' : 'lazy'}
fetchPriority={index === 0 ? 'high' : undefined}
decoding="async"
width={image.width}
height={image.height}
className="block h-auto w-full"
/>
</figure>
))}
</div>
</section>
);
}
+112
View File
@@ -0,0 +1,112 @@
import {useSite} from '@/lib/site-context';
import {sectionName, unitSpec, unitViews} from '@/lib/derive';
import {SectionHead} from './SectionHead';
/**
* 객실 · 메뉴 · 프로그램 — 스튜디오형.
*
* ★ `@/lib/ui/Section` 을 쓰지 않고 <section> 을 직접 그린다. 그 껍데기는 아래 테두리와
* `.shell` 안쪽 여백을 항상 붙이는데, 이 안은 선을 하나도 쓰지 않는 것이 정체성이다.
* ★ 카드로 감싸지 않는다. 사진 한 장 옆에 이름·인원·요금이 세로로 놓이는 것이 전부다 —
* 테두리를 두르는 순간 사진 스튜디오가 아니라 예약 사이트가 된다.
* ★ 사진을 잘라 비율을 맞추지 않는다(`aspect-*` 없음). 세로 사진은 세로로 남는다.
* ★ 첫 장 말고 나머지 사진도 전부 그린다. HTML 에서 빠지면 이미지 검색이 못 읽는다.
*/
export function Rooms() {
const payload = useSite();
const spec = unitSpec(payload);
const units = unitViews(payload);
if (units.length === 0) return null;
return (
<section
id="units"
aria-labelledby="units-heading"
className="w-full"
style={{paddingBlock: 'var(--section-space)', backgroundColor: 'var(--tpl-bg)'}}
>
<div className="shell">
<SectionHead
id="units"
/* 섹션 id 는 업종마다 다르다(rooms · menu · programs) — spec.path 가 그 id 다. */
title={sectionName(payload, spec.path, `${spec.label} ${units.length}개 안내`)}
/>
<ul className="space-y-16 sm:space-y-24">
{units.map((unit) => (
<li key={unit.unitId} className="grid grid-cols-1 gap-6 lg:grid-cols-12 lg:gap-10">
<div className="min-w-0 lg:col-span-7">
{unit.images[0] && (
<img
src={unit.images[0].url}
alt={unit.images[0].alt}
loading="lazy"
decoding="async"
width={unit.images[0].width}
height={unit.images[0].height}
className="block h-auto w-full"
/>
)}
{unit.images.length > 1 && (
<ul className="mt-2 grid grid-cols-2 gap-2">
{unit.images.slice(1).map((image) => (
<li key={image.mediaId}>
<img
src={image.url}
alt={image.alt}
loading="lazy"
decoding="async"
width={image.width}
height={image.height}
className="block h-auto w-full"
/>
</li>
))}
</ul>
)}
</div>
<div className="min-w-0 lg:col-span-5">
<h3
className="serif min-w-0 break-keep font-extrabold"
style={{fontSize: 'var(--fs-h3)', letterSpacing: '0.02em', lineHeight: 1.35}}
>
{unit.name}
</h3>
{/* 인원·침대·면적. 칩으로 감싸지 않고 라벨과 값을 한 줄씩 적는다. */}
{unit.chips.length > 0 && (
<dl className="mt-4 space-y-1.5">
{unit.chips.map((chip) => (
<div key={chip.label} className="flex gap-3 text-[length:var(--fs-sm)]">
<dt className="text-muted w-20 shrink-0">{chip.label}</dt>
<dd className="min-w-0 font-medium">{chip.value}</dd>
</div>
))}
</dl>
)}
{/*
★ 요금은 **비교하는 값**이다. 주중 하나만 적어 두면 손님은 주말이 얼마인지
모른 채 떠난다. 안 채워진 칸은 derive 에서 '문의' 로 온다 — 지어내지 않는다.
*/}
{/* 요금은 객실 정보에서 내지 않는다 — 사유는 sections/UnitsSection.tsx 의 같은 자리 주석. */}
{unit.intro && (
<p
className="text-muted measure mt-5 text-[length:var(--fs-sm)]"
style={{lineHeight: 1.8}}
>
{unit.intro}
</p>
)}
</div>
</li>
))}
</ul>
</div>
</section>
);
}
@@ -0,0 +1,57 @@
import type {ReactNode} from 'react';
/**
* 스튜디오형 섹션 제목.
*
* ★ `@/lib/ui` 에서 아무것도 가져오지 않는다. `lib/ui/Section` 이 이 파일을 부르므로
* 반대로 가져오면 순환 참조가 되고, Vite 에서는 빌드가 아니라 **런타임에**
* `Cannot access before initialization` 으로 터진다.
* ★ 가운데 정렬을 쓰지 않는다. 이 안은 왼쪽 칼럼이 기준선이라, 제목이 가운데로 가면
* 왼쪽 세로선이 끊긴다.
* ★ 제목 위에 영문 눈썹(ABOUT · ROOMS …)을 달지 않는다 — 국내 사이트는 그렇게 쓰지 않고,
* payload 에 없는 문구를 만들어 내는 자리가 된다. 굵은 제목 하나로 끝낸다.
*/
export function SectionHead({
id,
title,
lead,
aside,
}: {
id: string;
title: string;
lead?: string;
aside?: ReactNode;
}) {
return (
<header className="mb-7 sm:mb-10">
<div className="flex flex-col gap-3 sm:flex-row sm:items-baseline sm:justify-between sm:gap-10">
<div className="min-w-0">
{/* 바깥 <section> 이 aria-labelledby 로 이 id 를 가리킨다 — 비우면 섹션이 이름을 잃는다. */}
<h2
id={`${id}-heading`}
className="serif min-w-0 font-extrabold"
style={{
fontSize: 'var(--fs-h2)',
letterSpacing: '0.01em',
lineHeight: 1.2,
color: 'var(--tpl-text)',
}}
>
{title}
</h2>
{lead && (
<p
className="text-muted measure mt-2 text-[length:var(--fs-sm)]"
style={{lineHeight: 1.7}}
>
{lead}
</p>
)}
</div>
{aside && <div className="shrink-0 text-[length:var(--fs-xs)]">{aside}</div>}
</div>
</header>
);
}
+218
View File
@@ -0,0 +1,218 @@
import type {ReactNode} from 'react';
import {useSite} from '@/lib/site-context';
import {
bookingLabel,
bookingLinks,
channelLabel,
heroFacts,
isSectionEnabled,
lowestPrice,
unitSpec,
} from '@/lib/derive';
import {formatKoreanDate, isoDate} from '@/lib/format';
// ★ 배럴(@/sections)이 아니라 파일을 직접 가리킨다 — 배럴은 섹션 열여덟을 전부 끌고 오고,
// 그 안에 lib/ui 가 있어 이 폴더로 순환 참조가 돌아온다.
import {MobileTabBar} from '@/sections/MobileTabBar';
/**
* 스튜디오형 껍데기 — **가로 메뉴 바가 없다.**
*
* ★ 상단 띠를 없앤 이유
* 이 안은 오른쪽 전부가 사진 격자다. 위에 띠가 한 줄 더 있으면 사진이 시작하는 자리가
* 내려가, 격자가 첫 화면이 아니라 '본문 속 삽화'로 읽힌다.
* 메뉴·채널·연락처는 스크롤을 따라오는 왼쪽 칼럼 하나가 전부 맡는다.
*
* ★ 최저가·예약도 왼쪽 칼럼에 둔다
* 이 안은 사진 위에 글자를 얹지 않기로 했다. 그러면 손님이 첫 화면에서 값을 볼 수 있는
* 자리가 여기밖에 없다 — 국내 숙박 사이트에서 가격과 예약 창구가 첫 화면에 없으면
* 손님은 전화를 걸거나 그냥 떠난다.
*
* ★ h1 이 여기 있다. 첫 화면(Hero)이 사진 격자뿐이라 상호를 말하는 곳이 이 칼럼이다.
* 페이지에 h1 은 하나여야 하므로 studio/Hero 는 h1 을 그리지 않는다.
*
* ★ 테두리·그림자·둥근 모서리를 쓰지 않는다. 칼럼을 가르는 것은 선이 아니라 여백이다.
*/
export function Shell({children}: {children: ReactNode}) {
const payload = useSite();
const {place, narrative, site} = payload;
const spec = unitSpec(payload);
const price = lowestPrice(payload);
const facts = heroFacts(payload);
const booking = bookingLinks(payload)[0];
// ★ 확정된 링크 전부다. contactLinks() 는 말을 걸 수 있는 곳(네이버·인스타)만 남기는데,
// 이 칼럼은 문의 창구가 아니라 **채널 목록**이라 블로그·공식 채널도 여기 선다.
const links = payload.links.filter((link) => link.confirmed);
const address = place.roadAddress ?? place.address;
const menu = [
{label: '소개', href: '#about', show: isSectionEnabled(payload, 'intro')},
{label: spec.label, href: '#units', show: payload.units.length > 0},
{label: '이용 정보', href: '#info', show: true},
{label: '주변 정보', href: '#guide', show: isSectionEnabled(payload, 'local')},
{label: '오시는 길', href: '#location', show: true},
{label: '자주 묻는 질문', href: '#faq', show: payload.faqs.length > 0},
].filter((item) => item.show);
return (
<div
className="flex min-h-screen w-full flex-col lg:flex-row"
style={{backgroundColor: 'var(--tpl-bg)', color: 'var(--tpl-text)'}}
>
{/*
왼쪽 정보 칼럼.
★ 260px 고정. 넓히면 오른쪽 격자의 두 열이 좁아져 사진이 우표가 된다.
★ h-screen + overflow-y-auto — 칼럼 내용이 화면보다 길어도 본문 스크롤을 뺏지 않는다.
*/}
<aside
className="w-full shrink-0 px-6 pb-8 pt-8 lg:sticky lg:top-0 lg:h-screen lg:w-[260px] lg:overflow-y-auto lg:px-7 lg:py-10"
style={{backgroundColor: 'var(--tpl-bg)'}}
>
<div className="flex h-full min-w-0 flex-col">
<a href="#top" className="block min-w-0">
<h1
className="serif min-w-0 break-keep font-black"
style={{
fontSize: 'var(--fs-h2)',
letterSpacing: '0.12em',
lineHeight: 1.25,
}}
>
{place.name}
</h1>
</a>
{(narrative.tagline ?? narrative.heroSubline) && (
<p className="text-muted mt-3 text-[length:var(--fs-sm)]" style={{lineHeight: 1.7}}>
{narrative.tagline ?? narrative.heroSubline}
</p>
)}
{/* 값 — 손님이 첫 화면에서 확인하는 것. 없는 칸은 만들지 않는다. */}
{(price || facts.length > 0) && (
<dl className="mt-7 space-y-2.5">
{price && (
<div>
<dt className="label">최저가</dt>
<dd className="text-[length:var(--fs-lead)] font-bold tabular-nums">{price}</dd>
</div>
)}
{facts.map((row) => (
<div key={row.label}>
<dt className="label">{row.label}</dt>
<dd className="text-[length:var(--fs-sm)] font-semibold">{row.value}</dd>
</div>
))}
</dl>
)}
{/* 확정된 예약 채널만 — 확정 전 URL 은 동명 업소의 예약 페이지일 수 있다. */}
{booking && (
<a
href={booking.url}
target="_blank"
rel="noopener noreferrer"
className="tap mt-5 inline-flex w-full items-center justify-center px-4 text-[length:var(--fs-sm)] font-bold transition-opacity hover:opacity-90"
style={{backgroundColor: 'var(--color-brand)', color: 'var(--tpl-bg)'}}
>
{bookingLabel(booking)}로 예약
</a>
)}
{place.phone && (
<a
href={`tel:${place.phone}`}
className="tap mt-2 inline-flex w-full items-center justify-center px-4 text-[length:var(--fs-sm)] font-bold"
style={{backgroundColor: 'var(--tpl-surface-alt)', color: 'var(--tpl-text)'}}
>
전화 {place.phone}
</a>
)}
{/* 메뉴 — 한 줄에 하나. 가로로 눕히지 않는다. */}
<nav aria-label="주요 메뉴" className="mt-10">
<ul className="space-y-0.5">
{menu.map((item) => (
<li key={item.label}>
<a
href={item.href}
className="text-muted flex min-h-[2rem] items-center text-[length:var(--fs-sm)] transition-colors hover:text-current"
>
{item.label}
</a>
</li>
))}
</ul>
</nav>
{links.length > 0 && (
<nav aria-label="공식 채널" className="mt-12">
<ul className="space-y-0.5">
{links.map((link) => (
<li key={link.url}>
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="text-muted flex min-h-[2rem] items-center text-[length:var(--fs-xs)] underline-offset-4 transition-colors hover:text-current hover:underline"
>
{channelLabel(link)}
</a>
</li>
))}
</ul>
</nav>
)}
{/*
칼럼 맨 아래 — 주소·전화·이메일과 법적 고지.
★ mt-auto: 칼럼이 화면보다 짧을 때 아래에 붙는다(레퍼런스의 자리).
★ 이 안에는 어두운 푸터가 없다. 상호·사업자 정보가 갈 곳이 여기뿐이라
빼면 발행본에서 법적 고지가 통째로 사라진다.
*/}
<div className="text-muted mt-14 space-y-1 pb-2 text-[length:var(--fs-xs)] lg:mt-auto lg:pt-14">
{address && <p className="break-keep">{address}</p>}
{place.phone && <p>{place.phone}</p>}
{place.email && (
<p>
<a href={`mailto:${place.email}`} className="underline-offset-2 hover:underline">
{place.email}
</a>
</p>
)}
<div className="flex flex-wrap gap-x-2 gap-y-0.5 pt-3">
<span>상호: {place.name}</span>
{place.legal?.representative && <span>대표: {place.legal.representative}</span>}
{place.legal?.businessRegistrationNumber && (
<span>사업자등록번호: {place.legal.businessRegistrationNumber}</span>
)}
{place.legal?.mailOrderNumber && (
<span>통신판매업신고: {place.legal.mailOrderNumber}</span>
)}
{place.legal?.licenseNumber && (
<span>
{place.legal.licenseLabel ?? '인허가번호'}: {place.legal.licenseNumber}
</span>
)}
</div>
{/* 마지막 갱신을 화면에도 적는다 — 사람도 AI 도 신선도를 여기서 본다. */}
{/* ★ 작성자·최종 업데이트는 안마다 같은 모양이어야 한다 (2026-09-04, AEO 진단 0/3)
한글 날짜("2026년 9월 4일")는 최신성을 재는 쪽이 못 읽는다. 화면 글자도 ISO 로 적고,
byline 은 E-E-A-T 채점이 본문에서 찾는 값이라 같이 남긴다. 공용 꼬리(SiteFooter)와 한 벌. */}
<p className="byline pt-1">
<span className="author">작성·운영 {place.name}</span>
{' · 최종 업데이트: '}
<time dateTime={site.updatedAt}>{isoDate(site.updatedAt)}</time>
</p>
</div>
</div>
</aside>
{/* ★ min-w-0 — 없으면 사진 격자가 칼럼을 밀어내 390px 에서 가로 스크롤이 생긴다. */}
<div className="flex min-w-0 flex-1 flex-col pb-24 lg:pb-0">{children}</div>
<MobileTabBar />
</div>
);
}
@@ -0,0 +1,8 @@
/**
* 스튜디오형 — 사진 스튜디오·디자인 사무소가 쓰는 골격.
* 왼쪽 정보 칼럼(스크롤을 따라온다) + 오른쪽 사진 격자. 히어로 사진이 없다.
*/
export {Shell} from './Shell';
export {SectionHead} from './SectionHead';
export {Hero} from './Hero';
export {Rooms} from './Rooms';