[fix] solution/site: 첫 화면 태그 삭제·소문구 공통화 — 부티크 모바일도 문 모양
- 라운드·코랄·미니멀·솔숲: 히어로의 ‘주차 가능’ 칩 삭제. 일러스트: 지역 말풍선 삭제 - kit/heroSub.ts: 소문구 = 사장님 문구, 없으면 가장 가까운 명소까지 거리. 솔숲에만 있던 규칙을 9종 공통으로 - 고택·부티크: 캐치프레이즈 아래로 소문구 순서 변경 - 부티크 모바일: 전체화면 사진(664px)을 데스크톱과 같은 아치로 — 첫 화면 593px - docs/TEMPLATE_DESIGN.md: 첫 화면 규칙 tsc·eslint 통과 · vitest 123 passed · 9종 모바일·1440px 첫 화면 캡처 확인 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
865eb0cc77
commit
7a7f00dd15
12 files changed
+56
-60
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import {PlaceCategory} from '@o2o/shared';
|
||||
import {HeroCatchphrase} from '@site/sections/HeroCatchphrase';
|
||||
import {useSite} from '@site/lib/site-context';
|
||||
import {bookingActionLabel, bookingLinks, heroFacts, isSectionEnabled, stayBookingView} from '@site/lib/derive';
|
||||
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';
|
||||
@@ -18,13 +19,9 @@ export function Hero() {
|
||||
const fixed = narrative.tagline ?? narrative.heroSubline;
|
||||
const lodging = place.category === PlaceCategory.LODGING;
|
||||
const region = place.addressLocality ?? place.addressRegion;
|
||||
const nearest = [...payload.local.attractions]
|
||||
.filter((spot) => spot.distanceText)
|
||||
.sort((a, b) => (a.distanceMeters ?? Infinity) - (b.distanceMeters ?? Infinity))[0];
|
||||
const sub = fixed ?? (nearest ? `${nearest.name}까지 ${nearest.distanceText}` : undefined);
|
||||
const sub = heroSub(payload);
|
||||
const booking = bookingLinks(payload)[0];
|
||||
const stay = lodging ? stayBookingView(payload) : null;
|
||||
const chips = heroFacts(payload).map((row) => `${row.label} ${row.value}`);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -61,15 +58,6 @@ export function Hero() {
|
||||
fixed && <p className="hl in">{fixed}</p>
|
||||
)}
|
||||
{lodging && sub && <p className="tagline">{sub}</p>}
|
||||
{chips.length > 0 && (
|
||||
<div className="chips">
|
||||
{chips.map((chip) => (
|
||||
<span key={chip} className="chip">
|
||||
{chip}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<div className="hero-cta">
|
||||
{stay ? (
|
||||
<button type="button" className="btn" onClick={() => window.dispatchEvent(new Event(BOOK_EVENT))}>
|
||||
|
||||
Reference in new issue
Block a user