diff --git a/docs/TEMPLATE_DESIGN.md b/docs/TEMPLATE_DESIGN.md index 6125d3d..37fa678 100644 --- a/docs/TEMPLATE_DESIGN.md +++ b/docs/TEMPLATE_DESIGN.md @@ -85,7 +85,10 @@ ## 6. 값 보여주기 -- **첫 화면은 캐치프레이즈 → 그 아래 소문구.** 소문구는 사장님 문구, 없으면 가장 가까운 명소까지 거리(`kit/heroSub.ts`) +- **첫 화면은 캐치프레이즈 한 줄(고정) → 그 아래 순환 문구.** `/s/stay` 목업과 같다(`sections/HeroCatchphrase.tsx`) + - 캐치프레이즈 = `narrative.tagline`. 없으면 공통 문구 10개 중 사이트마다 정해진 하나 + - 순환 = `narrative.catchphrases`, 일반 → 계절 → 일반 → 월 → 일반 → 날씨 순서, 6초. 없으면 줄을 두지 않는다 + - 두 값은 COPY 잡이 소개문과 함께 만든다(fact `tagline` · `catchphrases`, `services/copy_steps.py`) - 첫 화면에 태그·칩(‘주차 가능’, 지역 말풍선)을 두지 않는다 - 부티크 첫 화면은 모바일도 문(아치) 모양이다. 전체화면 사진으로 되돌리지 않는다 diff --git a/solution/shared/src/types/site-payload.ts b/solution/shared/src/types/site-payload.ts index eebf9c8..144df9d 100644 --- a/solution/shared/src/types/site-payload.ts +++ b/solution/shared/src/types/site-payload.ts @@ -322,10 +322,19 @@ export interface RouteEntry { } export interface Narrative { - /** 히어로 둘째 줄에서 순환할 문구. */ + /** 히어로 둘째 줄에서 순환할 문구. 첫째 줄(캐치프레이즈)은 `tagline` 하나로 고정이다. */ catchphrases?: { version: 1; - items: {text: string; kind?: 'general' | 'season' | 'month' | 'weather'}[]; + items: { + text: string; + kind?: 'general' | 'season' | 'month' | 'weather'; + /** kind=season 일 때 봄·여름·가을·겨울. */ + season?: string; + /** kind=month 일 때 1~12. */ + month?: number; + /** kind=weather 일 때 맑음·흐림·비·눈. */ + weather?: string; + }[]; }; heroHeadline?: string; diff --git a/solution/site/src/layouts/bigtype/Hero.tsx b/solution/site/src/layouts/bigtype/Hero.tsx index 2fb7df6..45b64b1 100644 --- a/solution/site/src/layouts/bigtype/Hero.tsx +++ b/solution/site/src/layouts/bigtype/Hero.tsx @@ -1,8 +1,7 @@ import {PlaceCategory} from '@o2o/shared'; -import {HeroCatchphrase} from '@site/sections/HeroCatchphrase'; +import {HeroCatchphrase, HeroRotator} from '@site/sections/HeroCatchphrase'; import {useSite} from '@site/lib/site-context'; import {bookingActionLabel, bookingLinks, isSectionEnabled, stayBookingView} from '@site/lib/derive'; -import {heroSub} from '../kit/heroSub'; import {BOOK_EVENT} from '../paper/Rooms'; import {Weather} from './Weather'; @@ -13,7 +12,6 @@ export function Hero() { .filter((image) => image.alt?.trim()) .sort((a, b) => Number(b.isPrimary) - Number(a.isPrimary)); const fixed = narrative.tagline ?? narrative.heroSubline; - const sub = heroSub(payload); const lodging = place.category === PlaceCategory.LODGING; const stay = lodging ? stayBookingView(payload) : null; const link = bookingLinks(payload)[0]; @@ -31,7 +29,7 @@ export function Hero() { 오늘의 문장

{(lodging || fixed) &&

{lodging ? : fixed}

} - {lodging && sub &&

{sub}

} +
{stay ? (
{isSectionEnabled(payload, 'weather') && ( diff --git a/solution/site/src/layouts/pine/Hero.tsx b/solution/site/src/layouts/pine/Hero.tsx index 6c749f5..900616f 100644 --- a/solution/site/src/layouts/pine/Hero.tsx +++ b/solution/site/src/layouts/pine/Hero.tsx @@ -1,8 +1,7 @@ import {PlaceCategory} from '@o2o/shared'; -import {HeroCatchphrase} from '@site/sections/HeroCatchphrase'; +import {HeroCatchphrase, HeroRotator} from '@site/sections/HeroCatchphrase'; import {useSite} from '@site/lib/site-context'; import {bookingActionLabel, bookingLinks, isSectionEnabled, stayBookingView} from '@site/lib/derive'; -import {heroSub} from '../kit/heroSub'; import {Car} from '../paper/Car'; import {BOOK_EVENT} from '../paper/Rooms'; import {Weather} from './Weather'; @@ -19,7 +18,6 @@ export function Hero() { const fixed = narrative.tagline ?? narrative.heroSubline; const lodging = place.category === PlaceCategory.LODGING; const region = place.addressLocality ?? place.addressRegion; - const sub = heroSub(payload); const booking = bookingLinks(payload)[0]; const stay = lodging ? stayBookingView(payload) : null; @@ -57,7 +55,7 @@ export function Hero() { ) : ( fixed &&

{fixed}

)} - {lodging && sub &&

{sub}

} +
{stay ? (