feat: 날씨각 소개 카드 템플릿(intro, 8장) + 타로·코디 인스타 해시태그
This commit is contained in:
1 parent
14ca71a41c
commit
82854785a0
7 files changed
+271
-6
No files matched your search
@@ -1,10 +1,14 @@
|
||||
import type { ReactNode } from 'react'
|
||||
import tarotBack from '../assets/tarot-back.webp'
|
||||
import shotHome from '../assets/intro/shot-home.webp'
|
||||
import shotGak from '../assets/intro/shot-gak.webp'
|
||||
import shotSky from '../assets/intro/shot-sky.webp'
|
||||
import shotWeek from '../assets/intro/shot-week.webp'
|
||||
import type { CardData } from './data'
|
||||
import { Frame, Lines } from './Frame'
|
||||
import { tidy } from './text'
|
||||
import { DEFAULT_STYLE, ootdBand, ootdOutfits, styleLabel } from './ootd'
|
||||
import { gakArt } from './gaks'
|
||||
import { gakArt, gakByCode } from './gaks'
|
||||
|
||||
// 대주제(skin)마다 한 번 만든 배경 그림 (npm run gen-image -- tarot-bg <skin>). 없으면 민무늬 배경
|
||||
const TAROT_BG = import.meta.glob<string>('../assets/tarot-bg/*.webp', { eager: true, import: 'default' })
|
||||
@@ -34,7 +38,7 @@ export type Template = {
|
||||
/** 처음 열 때 보여 주는 미리 만든 예시 문구 (그림도 미리 만들어 둠). 만들기를 누르면 그날 카드로 바뀐다 */
|
||||
example?: Copy
|
||||
/** 날씨각 피드 포스트 제목·설명 */
|
||||
post: (d: CardData, c: Copy) => { title: string; caption: string }
|
||||
post: (d: CardData, c: Copy) => { title: string; caption: string; hashtags?: string }
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +57,11 @@ const ootd: Template = {
|
||||
defaults: () => ({ title: '', style: DEFAULT_STYLE }),
|
||||
// 예시: 17~22도 캐주얼 (Codex 그림 6장)
|
||||
example: { style: 'casual', band: 'mild', theme: 'berry' },
|
||||
post: (d, c) => ({ title: `오늘의 코디 · ${styleLabel(c.style)}`, caption: `낮 최고 ${d.maxC}도, 20대부터 40대~까지 오늘 입을 옷을 넘겨 보세요` }),
|
||||
post: (d, c) => ({
|
||||
title: `오늘의 코디 · ${styleLabel(c.style)}`,
|
||||
caption: `낮 최고 ${d.maxC}도, 20대부터 40대~까지 오늘 입을 옷을 넘겨 보세요`,
|
||||
hashtags: '#날씨각 #오늘의코디 #OOTD #데일리룩 #옷차림 #코디추천 #날씨 #오늘날씨 #서울날씨 #일상',
|
||||
}),
|
||||
warnings: (d, c) => {
|
||||
const missing = ootdOutfits(d.maxC, c.style).filter((o) => !o.image)
|
||||
const id = `${ootdBand(d.maxC).id}`
|
||||
@@ -89,7 +97,11 @@ const ootd: Template = {
|
||||
|
||||
const tarot: Template = {
|
||||
id: 'tarot',
|
||||
post: (_d, c) => ({ title: c.title.replaceAll('\n', ' ').replaceAll('*', ''), caption: `Q. ${c.question} 1·2·3 중 한 장을 골라 보세요` }),
|
||||
post: (_d, c) => ({
|
||||
title: c.title.replaceAll('\n', ' ').replaceAll('*', ''),
|
||||
caption: `Q. ${c.question} 1·2·3 중 한 장을 골라 보세요`,
|
||||
hashtags: '#날씨각 #날씨타로 #타로 #오늘의타로 #오늘의운세 #날씨 #오늘날씨 #서울날씨 #오늘뭐하지 #일상',
|
||||
}),
|
||||
name: '날씨 타로',
|
||||
autoPlan: true,
|
||||
about: '주제를 바꿔 가며 · 3장 중 고르기, 뒷면은 오늘 날씨',
|
||||
@@ -218,6 +230,102 @@ const tarot: Template = {
|
||||
},
|
||||
}
|
||||
|
||||
export const TEMPLATES: Template[] = [tarot, ootd]
|
||||
const INTRO_GAK_CODES = ['walk', 'camping', 'fishing', 'chimaek', 'jjamppong', 'carwash', 'laundry', 'vent', 'stars', 'hiking', 'date', 'golf']
|
||||
|
||||
const intro: Template = {
|
||||
id: 'intro',
|
||||
name: '날씨각 소개',
|
||||
about: '날씨를 할 일로 바꿔 주는 서비스 소개 · 8장',
|
||||
how: [
|
||||
'소개 카드는 문구가 고정되어 있고 Claude 기획을 쓰지 않는다. 칸에서 직접 고칠 수 있다.',
|
||||
'앱 화면은 src/assets/intro의 스크린샷 4장을 쓴다. 각 이름과 아이콘은 서비스의 GAK_DECK에서 가져온다.',
|
||||
'날씨 데이터와 점수 계산은 쓰지 않는다. 화면의 예시 점수는 소개용 문구다.',
|
||||
],
|
||||
fields: [
|
||||
{ key: 't1', label: '1장 제목' }, { key: 's1', label: '1장 부제' },
|
||||
{ key: 't2', label: '2장 제목' }, { key: 's2', label: '2장 부제' },
|
||||
{ key: 't3', label: '3장 제목' }, { key: 'g1', label: '3장 점수 1' },
|
||||
{ key: 'g2', label: '3장 점수 2' }, { key: 'g3', label: '3장 점수 3' },
|
||||
{ key: 'g4', label: '3장 점수 4' }, { key: 's3', label: '3장 부제' },
|
||||
{ key: 't4', label: '4장 제목' }, { key: 's4', label: '4장 부제' },
|
||||
{ key: 't5', label: '5장 제목' }, { key: 's5', label: '5장 부제' },
|
||||
{ key: 't6', label: '6장 제목' }, { key: 's6', label: '6장 부제' },
|
||||
{ key: 't7', label: '7장 제목' }, { key: 's7', label: '7장 부제' }, { key: 'n7', label: '7장 안내' },
|
||||
{ key: 't8', label: '8장 제목' }, { key: 's8', label: '8장 링크' }, { key: 'n8', label: '8장 안내' },
|
||||
],
|
||||
defaults: () => ({
|
||||
theme: 'sky',
|
||||
t1: '오늘 뭐 하기\n좋은 날이지?', s1: '날씨를 *할 일*로 바꿔 주는 앱, 날씨각',
|
||||
t2: '"흐림, 19도, 습도 70%"\n…그래서 오늘 뭐 하죠?', s2: '숫자만 보면 모르겠는 날,\n날씨각은 바로 답해요',
|
||||
t3: '오늘 날씨에 맞는 일을\n*점수*로', g1: '한강각 91', g2: '드라이브각 89', g3: '세차각 72', g4: '빨래각 45', s3: "'각' = 그걸 하기 딱 좋은 때",
|
||||
t4: '지금 내 동네\n1위는?', s4: '아침·지금·저녁으로 보여 주고,\n동네를 바꾸면 점수도 바뀌어요',
|
||||
t5: '밖에서 놀기부터\n집안일까지 *68가지*', s5: '밖에서 놀기 · 먹고 마시기 · 집안일',
|
||||
t6: '오늘 노을,\n몇 시에 어디서?', s6: '노을 점수 · 피크 시각 · 골든아워\n가까운 노을 명소까지',
|
||||
t7: '주말 행사 · 단풍\n동네 사람들 이야기', s7: '가까운 축제, 단풍 시기,\n우리 동네 날씨 한마디', n7: "'내 각'은 내가 정한 조건으로 점수를 매겨요",
|
||||
t8: '설치 없이 바로,\n*무료*', s8: '프로필 링크 → weather.o2o.kr', n8: '매일 아침 날씨 타로 · 오늘의 코디도 여기서',
|
||||
}),
|
||||
post: () => ({
|
||||
title: '날씨각이 뭐예요?',
|
||||
caption: "날씨각은 오늘 날씨에 맞는 '할 일'을 점수로 알려 주는 날씨 서비스예요. 세차각·빨래각·러닝각… 지금 내 동네 1위 각은 프로필 링크에서 👉",
|
||||
hashtags: '#날씨각 #날씨 #오늘날씨 #날씨앱 #오늘뭐하지 #주말뭐하지 #노을 #노을맛집 #한강 #드라이브 #산책 #날씨타로 #오늘의코디 #서울날씨 #주말나들이 #가을 #일상',
|
||||
}),
|
||||
slides: (_d, c) => {
|
||||
const phone = (src: string, name: string) => <div className={`intro-phone ${name}`}><img src={src} alt="" /></div>
|
||||
const head = (text: string, name = '') => <h1 className={`intro-title ${name}`}><Lines text={tidy(text)} /></h1>
|
||||
const sub = (text: string, name = '') => <p className={`intro-sub ${name}`}><Lines text={tidy(text)} /></p>
|
||||
const frame = (page: number, className: string, children: ReactNode) => <Frame page={page} total={8} theme={c.theme || 'sky'} className={`intro intro-${className}`} key={page}>{children}</Frame>
|
||||
return [
|
||||
frame(0, 'cover', <>
|
||||
{head(c.t1)}{sub(c.s1)}
|
||||
<div className="intro-cover-stage" aria-hidden="true" />
|
||||
<img className="intro-character rabbit" src={iconUrl('rabbit')} alt="" />
|
||||
<img className="intro-character bear" src={iconUrl('bear')} alt="" />
|
||||
<p className="intro-turn">넘겨 보세요 →</p>
|
||||
</>),
|
||||
frame(1, 'problem', <>
|
||||
<img className="intro-cloud" src={iconUrl('cloud')} alt="" />
|
||||
{head(c.t2)}{sub(c.s2)}
|
||||
<div className="intro-answer" aria-hidden="true"><img src={iconUrl('hangang')} alt="" /><span>오늘은 한강각!</span></div>
|
||||
</>),
|
||||
frame(2, 'scores', <>
|
||||
{head(c.t3)}
|
||||
<div className="intro-scores">
|
||||
{[c.g1, c.g2, c.g3, c.g4].map((score, i) => {
|
||||
const match = score.match(/^(.*)\s(\d+)$/)
|
||||
return <div className={`intro-score rank-${i + 1}`} key={i}><span>{match?.[1] || score}</span><b>{match?.[2] || ''}</b></div>
|
||||
})}
|
||||
</div>
|
||||
{sub(c.s3)}
|
||||
</>),
|
||||
frame(3, 'home', <>{head(c.t4)}{sub(c.s4)}{phone(shotHome, 'home')}</>),
|
||||
frame(4, 'kinds', <>
|
||||
{head(c.t5)}
|
||||
<div className="intro-gak-grid">
|
||||
{INTRO_GAK_CODES.map((code) => {
|
||||
const gak = gakByCode(code)
|
||||
return gak && <div className="intro-gak" key={code}><img src={iconUrl(gak.icon)} alt="" /><span>{gak.name}</span></div>
|
||||
})}
|
||||
</div>
|
||||
{sub(c.s5)}
|
||||
</>),
|
||||
frame(5, 'sky', <>{head(c.t6)}{sub(c.s6)}{phone(shotSky, 'sky')}</>),
|
||||
frame(6, 'more', <>
|
||||
{head(c.t7)}{sub(c.s7)}
|
||||
<div className="intro-more-icons" aria-hidden="true"><img src={iconUrl('maple')} alt="" /><img src={iconUrl('camping')} alt="" /><img src={iconUrl('walk')} alt="" /></div>
|
||||
{phone(shotWeek, 'week')}
|
||||
<p className="intro-note"><Lines text={tidy(c.n7)} /></p>
|
||||
</>),
|
||||
frame(7, 'cta', <>
|
||||
{head(c.t8)}{sub(c.s8)}
|
||||
{phone(shotGak, 'gak')}
|
||||
<img className="intro-character rabbit" src={iconUrl('rabbit')} alt="" />
|
||||
<img className="intro-character bear" src={iconUrl('bear')} alt="" />
|
||||
<p className="intro-note"><Lines text={tidy(c.n8)} /></p>
|
||||
</>),
|
||||
]
|
||||
},
|
||||
}
|
||||
|
||||
export const TEMPLATES: Template[] = [tarot, ootd, intro]
|
||||
|
||||
export const templateById = (id: string) => TEMPLATES.find((t) => t.id === id)
|
||||
Reference in new issue
Block a user