feat: 공유를 비율 고르기 + 공유하기 하나로 줄이고 이미지에 행사 사진·우리 주소 넣기

- 공유 이미지 9:16·4:5·1:1, 위 로고·지역 날짜 / 카드 / 아래 주소 알약 (시안 A)
- 2장 카드는 한 이미지에 묶음, 버튼만 빼고 링크(장소)는 남김
- 웹폰트는 카드 글자에 필요한 조각만 data URL 로 넣어 글꼴이 안 깨지게
- 문구 고르기·링크 복사 제거, 공유하기 한 번에 이미지 + 제목·주소 글
- 행사 사진은 백엔드 /v1/image 가 대신 받음 (IMAGE_PROXY_HOSTS 만 허용)
- 공유 주소는 VITE_SITE_URL 하나로
This commit is contained in:
minaChoi committed 2026-10-07 15:43:18 +09:00
1 parent 2fde88df27
commit 5e2846ff72
17 files changed
+432 -135

No files matched your search

+4 -4
View File
@@ -308,11 +308,11 @@ function FullCard({ post }: PostProps) {
const [pop, setPop] = useState(0)
const [likeFailed, setLikeFailed] = useState(0)
const lastTap = useRef(0)
const cardRef = useRef<HTMLDivElement>(null)
const trackRef = useRef<HTMLDivElement>(null)
const [account, avatar] = ACCOUNTS[post.post_type]
const n = post.slides.length
const bgs = post.slides.map((sl) => slideBg(post, sl))
const share = () => open({ type: 'share', share: { title: post.title, icon: post.icon, bg: bgs[0] ?? 'sky', messages: post.share_messages ?? [], card: cardRef.current } })
const share = () => open({ type: 'share', share: { title: post.title, slides: Array.from(trackRef.current?.children ?? []).filter((c) => c instanceof HTMLElement) } })
const comments = () => open({ type: 'comments', postId: post.post_id })
const patch = (values: Partial<PostData>) => patchFeed(queryClient, post.post_id, values)
@@ -368,7 +368,7 @@ function FullCard({ post }: PostProps) {
<small className="text-xs font-semibold text-(--ink2)">{account}</small>
</span>
</div>
<div ref={cardRef} className="relative aspect-[4/5] overflow-hidden" onClick={onTap}>
<div className="relative aspect-[4/5] overflow-hidden" onClick={onTap}>
{n > 1 && (
<span data-noshot className="absolute top-3 right-3 z-[2] rounded-full bg-[rgb(30_36_56/0.55)] px-[9px] py-[3px] text-xs font-extrabold text-white" aria-hidden="true">
{index + 1}/{n}
@@ -385,7 +385,7 @@ function FullCard({ post }: PostProps) {
if (e.key === 'ArrowRight') slider?.scrollNext()
}}
>
<div className="flex h-full">
<div ref={trackRef} className="flex h-full">
{post.slides.map((s, i) => (
<SlideView key={i} slide={s} bg={bgs[i]} />
))}