[fix] solution/site: 사진 카드를 PhotoCard 하나로 통일 — 템플릿마다 제각각이던 축제·명소 카드
같은 템플릿 안에서도 축제 카드(흰 바탕·글 안쪽)와 명소 카드(바탕 없음·글 아래)가 따로 놀았다. 실측(9종 전수): 제목 굵기 400/500/700/900, 사진 모서리 0/12/18/22px 가 한 화면에 섞여 있었다. - kit/Card.tsx·card.css: 사진 3:2 + 제목 1줄 + 거리 1줄 + 설명 2줄. 템플릿 차이는 --kc-* 변수만 - 9종 Around·Festival, 고택 인물: 사진 카드를 PhotoCard 로 교체. 맛집·홈 목록 행은 그대로 - 템플릿 CSS: 모서리·글꼴·강조색 변수와 그리드 간격. 일러스트는 상자형, 빅타이포는 선 격자 - 모바일 캐러셀 화살표가 카드를 가려 1024px 미만에서 숨김 - docs/TEMPLATE_DESIGN.md: 사진 카드 규칙 tsc·eslint 통과 · vitest 123 passed · 12개 사이트 굽기 · 카드 모양 템플릿당 1종 확인 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
089886fe1e
commit
4831e2d25d
27 files changed
+282
-178
No files matched your search
@@ -2,6 +2,7 @@ import {useState} from 'react';
|
||||
import type {LocalPlace} from '@o2o/shared';
|
||||
import {useSite} from '@site/lib/site-context';
|
||||
import {naverMapSearchUrl} from '@site/lib/format';
|
||||
import {PhotoCard} from '../kit/Card';
|
||||
import {Car} from './Car';
|
||||
import {Sheet} from './Sheet';
|
||||
|
||||
@@ -80,11 +81,7 @@ export function Around() {
|
||||
arrows
|
||||
label="주변 안내"
|
||||
slides={rail.map((place) => (
|
||||
<button type="button" className="itemcard" onClick={() => setOpen(place)}>
|
||||
<img src={place.imageUrl} alt={place.name} loading="lazy" style={{aspectRatio: '3 / 2'}} />
|
||||
<p className="cap">{place.name}</p>
|
||||
{place.distanceText && <p className="cap dim">{place.distanceText}</p>}
|
||||
</button>
|
||||
<PhotoCard image={place.imageUrl} title={place.name} meta={place.distanceText} onClick={() => setOpen(place)} />
|
||||
))}
|
||||
/>
|
||||
</section>
|
||||
@@ -104,17 +101,16 @@ export function Around() {
|
||||
걸어서 닿는 곳부터 차로 가는 곳까지 묶었습니다.
|
||||
</p>
|
||||
<RangeTabs places={spots} value={spotRange} onChange={setSpotRange} />
|
||||
<div className="grid2" style={{gap: 14}}>
|
||||
<div className="grid2" style={{gap: '24px 14px'}}>
|
||||
{shownSpots.map((place) => (
|
||||
<button key={place.name} type="button" className="itemcard" onClick={() => setOpen(place)}>
|
||||
{place.imageUrl && (
|
||||
<img src={place.imageUrl} alt={place.name} loading="lazy" style={{aspectRatio: '3 / 2'}} />
|
||||
)}
|
||||
<p className="cap">
|
||||
<b>{place.name}</b> {place.distanceText && <span className="dim">{place.distanceText}</span>}
|
||||
</p>
|
||||
{place.description && <p className="cap dim clamp">{place.description}</p>}
|
||||
</button>
|
||||
<PhotoCard
|
||||
key={place.name}
|
||||
image={place.imageUrl}
|
||||
title={place.name}
|
||||
meta={place.distanceText}
|
||||
desc={place.description}
|
||||
onClick={() => setOpen(place)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -2,6 +2,7 @@ import {useState} from 'react';
|
||||
import type {FestivalEntry} from '@o2o/shared';
|
||||
import {useSite} from '@site/lib/site-context';
|
||||
import {naverSearchUrl} from '@site/lib/format';
|
||||
import {PhotoCard} from '../kit/Card';
|
||||
import {Car} from './Car';
|
||||
import {Sheet} from './Sheet';
|
||||
|
||||
@@ -48,19 +49,12 @@ export function Festival() {
|
||||
arrows
|
||||
label="계절별 축제"
|
||||
slides={shown.map((f) => (
|
||||
<button type="button" className="itemcard" onClick={() => setOpen(f)}>
|
||||
{f.imageUrl ? (
|
||||
<img src={f.imageUrl} alt={f.name} loading="lazy" style={{aspectRatio: '3 / 2'}} />
|
||||
) : (
|
||||
<span className="noimg" style={{aspectRatio: '3 / 2'}}>
|
||||
{f.name}
|
||||
</span>
|
||||
)}
|
||||
<p className="cap">
|
||||
<b>{f.name}</b>
|
||||
</p>
|
||||
<p className="cap dim">{[f.month, f.location].filter(Boolean).join(' · ')}</p>
|
||||
</button>
|
||||
<PhotoCard
|
||||
image={f.imageUrl}
|
||||
title={f.name}
|
||||
meta={[f.month, f.location].filter(Boolean).join(' · ')}
|
||||
onClick={() => setOpen(f)}
|
||||
/>
|
||||
))}
|
||||
/>
|
||||
</section>
|
||||
|
||||
@@ -2,6 +2,7 @@ import {useState, type ReactNode} from 'react';
|
||||
import type {ChronicleItem, PeopleItem, ReadingItem, SongItem} from '@o2o/shared';
|
||||
import {useSite} from '@site/lib/site-context';
|
||||
import {sectionItems, sectionName} from '@site/lib/derive';
|
||||
import {PhotoCard} from '../kit/Card';
|
||||
import {Sheet} from './Sheet';
|
||||
|
||||
const COUNT_WORD: Record<number, string> = {1: '한', 2: '두', 3: '세', 4: '네'};
|
||||
@@ -60,27 +61,35 @@ export function Story() {
|
||||
{item.year && <span className="r">{item.year}</span>}
|
||||
</button>
|
||||
);
|
||||
const person = (item: PeopleItem) => (
|
||||
<button
|
||||
key={item.name}
|
||||
type="button"
|
||||
className="itemcard"
|
||||
onClick={() =>
|
||||
setOpen({
|
||||
title: item.name,
|
||||
meta: [item.role, item.years].filter(Boolean).join(' · '),
|
||||
body: item.oneLine,
|
||||
image: item.imageUrl,
|
||||
})
|
||||
}
|
||||
>
|
||||
{item.imageUrl && <img src={item.imageUrl} alt={item.name} loading="lazy" style={{aspectRatio: '1 / 1'}} />}
|
||||
<p className="cap">
|
||||
<b>{item.name}</b> {item.role && <span className="dim">{item.role}</span>}
|
||||
</p>
|
||||
{item.oneLine && <p className="cap dim clamp">{item.oneLine}</p>}
|
||||
</button>
|
||||
);
|
||||
const person = (item: PeopleItem) => {
|
||||
const show = () =>
|
||||
setOpen({
|
||||
title: item.name,
|
||||
meta: [item.role, item.years].filter(Boolean).join(' · '),
|
||||
body: item.oneLine,
|
||||
image: item.imageUrl,
|
||||
});
|
||||
if (item.imageUrl)
|
||||
return (
|
||||
<PhotoCard
|
||||
key={item.name}
|
||||
image={item.imageUrl}
|
||||
title={item.name}
|
||||
meta={item.role}
|
||||
desc={item.oneLine}
|
||||
ratio="1 / 1"
|
||||
onClick={show}
|
||||
/>
|
||||
);
|
||||
return (
|
||||
<button key={item.name} type="button" className="itemcard" onClick={show}>
|
||||
<p className="cap">
|
||||
<b>{item.name}</b> {item.role && <span className="dim">{item.role}</span>}
|
||||
</p>
|
||||
{item.oneLine && <p className="cap dim clamp">{item.oneLine}</p>}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
const event = (item: ChronicleItem) => (
|
||||
<button
|
||||
key={`${item.year}-${item.title}`}
|
||||
|
||||
@@ -338,3 +338,4 @@
|
||||
.w4p #w4d-panel .w4d-eq i{background:#8c4a2f}
|
||||
.w4p #w4d-lyrics-box{padding:14px 16px 18px;border-top:1px solid var(--line);font-family:'Noto Serif KR','AppleMyungjo',serif;font-size:15px;line-height:1.95;color:#39352e}
|
||||
.w4p #w4d-panel .w4d-info{line-height:1.45}
|
||||
.w4p{--kc-r:4px;--kc-tw:500;--kc-ts:16.5px;--kc-mc:var(--sub);--kc-sub:var(--sub);--kc-soft:var(--tint)}
|
||||
Reference in new issue
Block a user