fix: 각 포스트·밤 화면·히어로 아이콘·동네 글 묶음 손봄
- 각 포스트: 각마다 같던 근거 표·요약 줄을 빼고 오늘·내일·주말 점수 칸(각 상세와 같은 값), 작은 화면에서 점수·그림 줄임 - 밤 화면에서도 포스트 본문은 낮 색 그대로, 어두운 각 배경(캠핑·별보기·산책)과 행사 밤하늘 배경 뺌 - 히어로 좋아요·댓글·보내기 간격·높이 맞춤 - 동네 사람들 묶음을 글 1개부터 보이게 (3개 미만이면 자기 글도 안 보이던 문제) - QA 체크리스트에 쇼츠·각 포스트 결과, TODO 에 쇼츠 공유 링크 빈 화면
This commit is contained in:
1 parent
019b018bfa
commit
1557ba42c4
11 files changed
+109
-98
No files matched your search
@@ -62,6 +62,7 @@
|
||||
| [ ] | 오늘 화면 쇼츠 줄 — YouTube Data API 키(`YOUTUBE_API_KEY`) 발급해 운영 .env 에 넣기. 없으면 `youtube_shorts`(영상 ID 3개 고정)만 나와 새 쇼츠가 자동으로 안 붙음 (https://console.cloud.google.com/apis/library/youtube.googleapis.com) | 채널 RSS가 404라 키 없이 채널 목록을 못 받음 | `backend/config/settings.py`, `backend/services/shorts_service.py` |
|
||||
| [ ] | **[결정 필요]** 쇼츠 문구 검토: '소리 켜기'/'소리 끄기' (줄 제목은 없앰) | 화면 문구 규칙 | `frontend/src/b/Shorts.tsx` |
|
||||
| [ ] | 쇼츠를 올린 직후 목록 갱신(`ShortsService.refresh`) 부르기 — 지금은 워커가 07·12·18시 10분에만 받아 18시 넘어 올리면 다음 날 아침에 뜸. 자동 업로드면 끝난 뒤 호출, 손으로 올리면 관리자 갱신 API | 올리는 방식 확인 필요 | `backend/services/shorts_service.py`, `backend/worker_main.py` |
|
||||
| [ ] | 쇼츠 API 실패·빈 목록일 때 공유 링크로 들어오면 남색 빈 화면만 보임 — 그 영상 ID 하나라도 띄우거나 × 버튼·안내 문구 보이기 | 10/27 QA 실패 (`items` 가 비면 빈 div 만 그림) | `frontend/src/b/Shorts.tsx` |
|
||||
| [ ] | 쇼츠 자동재생 아이폰 사파리 실기기 확인 — 소리 꺼도 자동재생을 막는다는 보고 있음 | 헤드리스 크롬에서만 확인 | `frontend/src/b/Shorts.tsx` |
|
||||
| [ ] | 인스타 운영 관리자 페이지(자동 게시 전 승인 메일) + 초기 이야기형 피드(각 100개·빨래각·소맥각·점수 산정법) | 10/21 회의 | |
|
||||
| [ ] | 레이어 공유 아이디어 — 사용자 사진 위에 날씨각 정보를 얹어 공유(캐시워크식), 앱 기능으로 | 10/21 회의 (황 본부장 의견, 대표 방향) | |
|
||||
|
||||
@@ -5,6 +5,7 @@ from pydantic import Field
|
||||
|
||||
from common.enums import PostType, SkySituation, SlotTone
|
||||
from common.models.gmodel import Res_WebPacketProtocol, WebPacketProtocol
|
||||
from router.v1.index.protocol import TrendPoint
|
||||
|
||||
|
||||
class Row(WebPacketProtocol):
|
||||
@@ -49,8 +50,8 @@ class GakSlide(WebPacketProtocol):
|
||||
score: int
|
||||
line: str
|
||||
summary: str
|
||||
rows: list[Row] = Field(default=[], description="점수 근거: 비중 큰 날씨 조건부터 네 개와 지금 값 (기온 · 체감 18°)")
|
||||
say: Optional[str] = Field(default=None, description="점수 구간 설명 문장 (seed sentences)")
|
||||
trend: list[TrendPoint] = Field(default=[], description="오늘 · 내일 · 이번 주말 점수 (각 상세 날짜 칸과 같은 값)")
|
||||
|
||||
|
||||
class Cut(WebPacketProtocol):
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import asyncio
|
||||
import random
|
||||
import re
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import date, datetime, time, timedelta
|
||||
from typing import Optional
|
||||
@@ -25,6 +24,7 @@ from router.v1.feed.protocol import (
|
||||
BandArticle, BandEvent, Bands, Cut, GakSlide, Hero, HeroStat, HeroTomorrow, HourCell, HoursSlide, ImageSlide, PostData, PostReaction, Res_Feed, Row, RowsSlide, SunsetSlide,
|
||||
PlanSlide, PlanStep, TopIndex, WeatherWhy, WeekDay, WeekGak, WeekSlide,
|
||||
)
|
||||
from router.v1.index.protocol import TrendPoint
|
||||
from services.air_service import GRADE_LABEL as AIR_GRADE_LABEL
|
||||
from services.air_service import pm10_grade, pm25_grade
|
||||
from services.calc.day_slot import NIGHT_AFTER_SUNSET, slot_of
|
||||
@@ -33,7 +33,7 @@ from services.calc.moon import MoonNight, nearest, night, view_line
|
||||
from services.calc.sky_score import GRADE_LABEL, sky_title
|
||||
from services.calc.sun import sun_times
|
||||
from services.hero_stats import UV_HIGH, HeroInput, discomfort_label, hero_stats, hero_status, uv_label, uv_level
|
||||
from services.index_service import IndexBoard, IndexItem, IndexService
|
||||
from services.index_service import IndexBoard, IndexItem, IndexService, slot_label
|
||||
from services.now_service import NowService, NowWeather
|
||||
from services.season_service import SeasonService
|
||||
from services.sky_service import SkyService, SkyView, day_verdict
|
||||
@@ -422,7 +422,7 @@ class FeedService:
|
||||
cards.append(data)
|
||||
gak_posts = sorted((p for p in posts or [] if PostType(p.post_type) is PostType.GAK), key=lambda p: p.index_rank or 0)
|
||||
for p, item in zip(gak_posts, gak):
|
||||
cards.append(self._gak(p, item))
|
||||
cards.append(self._gak(p, item, board.day))
|
||||
has_warning = bool(now_w and now_w.warnings)
|
||||
# 오늘 이야기 줄엔 제철인 각만 (철 지난 각은 각 탭 목록 끝에만)
|
||||
items = [i for i in board.items if i.in_season] if board else []
|
||||
@@ -501,10 +501,11 @@ class FeedService:
|
||||
return dict(post_id=p.post_id, post_type=PostType(p.post_type), like_count=p.like_count, comment_count=p.comment_count,
|
||||
published_at=p.published_at.astimezone(KST))
|
||||
|
||||
def _gak(self, p: Post, i: IndexItem) -> PostData:
|
||||
def _gak(self, p: Post, i: IndexItem, today: date) -> PostData:
|
||||
d = i.definition
|
||||
return PostData(**self._base(p), title=f"{d.name} {i.score.score}점", icon=d.icon, caption=_gak_caption(i),
|
||||
slides=[GakSlide(kind="gak", index_id=d.index_id, code=d.code, name=d.name, rank=i.rank, score=i.score.score, line=d.description, summary=i.score.summary, rows=gak_rows(i), say=_band_sentence(d.sentences, i.score.score))],
|
||||
slides=[GakSlide(kind="gak", index_id=d.index_id, code=d.code, name=d.name, rank=i.rank, score=i.score.score, line=d.description, summary=i.score.summary, say=_band_sentence(d.sentences, i.score.score),
|
||||
trend=[TrendPoint(day=t.score_date, label=slot_label(t.score_date, today), score=t.score, estimated=t.estimated) for t in i.trend])],
|
||||
share_messages=[f"오늘 {d.name} 어때? {d.name} {i.score.score}점이래"])
|
||||
|
||||
def _render(self, p: Post, c: "_Ctx") -> Optional[PostData]:
|
||||
@@ -776,30 +777,6 @@ def _band_sentence(sentences: Optional[dict], score: int) -> Optional[str]:
|
||||
return sentences[str(lo)] if lo is not None else None
|
||||
|
||||
|
||||
# 각 포스트에 보일 근거 줄 이름. 시간(요일·노을 점수)은 계산 방식 설명이라 뺀다
|
||||
_AXIS_NAME = {"temp": "기온", "rain": "비", "wind": "바람", "humidity": "습도", "air": "미세먼지", "uv": "자외선", "sun": "햇볕", "view": "시야"}
|
||||
_NOTE_HEAD = {"wind": "바람 ", "humidity": "습도 ", "air": "초미세먼지 "}
|
||||
|
||||
|
||||
def gak_rows(i: IndexItem, n: int = 4) -> list[Row]:
|
||||
"""비중이 큰 조건부터 n개와 지금 값. 점수에 안 쓰는 조건도 n개가 될 때까지 지금 날씨로 채운다. 값은 계산 근거 문구의 첫 마디 (체감 18°, 확률 20%, 초속 3m)."""
|
||||
d, notes = i.definition, i.score.notes or {}
|
||||
weighted = sorted((a for a in _AXIS_NAME if getattr(d, f"weight_{a}", 0) and notes.get(a)), key=lambda a: -getattr(d, f"weight_{a}"))
|
||||
axes = weighted + [a for a in ("temp", "rain", "wind", "air", "humidity") if a not in weighted and notes.get(a)]
|
||||
rows = []
|
||||
for a in axes[:n]:
|
||||
head, _, tail = notes[a].partition(", ")
|
||||
prob = re.search(r"확률 \d+%", notes[a]) if a == "rain" else None
|
||||
if prob:
|
||||
value = prob.group(0)
|
||||
elif a == "air" and tail:
|
||||
value = tail
|
||||
else:
|
||||
value = head.removeprefix(_NOTE_HEAD.get(a, ""))
|
||||
rows.append(Row(label=_AXIS_NAME[a], value=value))
|
||||
return rows
|
||||
|
||||
|
||||
def _gak_caption(i: IndexItem) -> str:
|
||||
"""슬라이드에 없는 내일 점수(없으면 하기 좋은 시간). 점수 구간 설명 문장은 슬라이드에 있다."""
|
||||
nxt = next((x for x in i.trend if x.score_date > i.score.score_date), None)
|
||||
|
||||
@@ -416,18 +416,3 @@ def test_uv_post_only_when_moderate_or_higher():
|
||||
assert FeedService._uv_post(None, base, ctx([(9, 1.0), (12, 2.5)])) is None
|
||||
assert FeedService._uv_post(None, base, ctx([])) is None
|
||||
|
||||
|
||||
def test_gak_rows_shows_heaviest_conditions_with_short_values():
|
||||
from types import SimpleNamespace
|
||||
|
||||
from services.feed_service import gak_rows
|
||||
|
||||
d = SimpleNamespace(weight_temp=30, weight_rain=25, weight_wind=10, weight_humidity=0, weight_air=15, weight_uv=0, weight_sun=0, weight_view=0, weight_time=20)
|
||||
notes = {"temp": "체감 18°, 편한 범위 15~25° 안", "rain": "비 확률 20%", "wind": "바람 초속 3.1m", "air": "초미세먼지 16㎍/㎥, 좋음", "time": "수요일"}
|
||||
item = SimpleNamespace(definition=d, score=SimpleNamespace(notes=notes))
|
||||
assert [(r.label, r.value) for r in gak_rows(item, 3)] == [("기온", "체감 18°"), ("비", "확률 20%"), ("미세먼지", "좋음")]
|
||||
# 점수에 안 쓰는 조건은 뒤에 지금 날씨로 채운다
|
||||
d.weight_wind = 0
|
||||
assert [r.label for r in gak_rows(item)] == ["기온", "비", "미세먼지", "바람"]
|
||||
item.score.notes = {**notes, "rain": "비 소식, 내일까지 비 확률 70%"}
|
||||
assert gak_rows(item)[1].value == "확률 70%"
|
||||
@@ -152,3 +152,29 @@
|
||||
- [ ] 작은 버튼이 잘 눌리는지: 포스트 하트·댓글·보내기, 댓글 하트, 시트 ×
|
||||
- [ ] 댓글 입력칸을 누르면 키보드 위로 입력칸·게시 버튼이 보인다 (확인)
|
||||
- [ ] 로그인 시트 비밀번호 칸·버튼, 지역 검색 목록이 키보드에 가려지지 않는다 (확인)
|
||||
|
||||
## 17. 오늘 탭: 쇼츠 줄·쇼츠 페이지
|
||||
|
||||
10/27 헤드리스 크롬(iPhone 13·SE·데스크톱 1280)으로 자동 점검한 결과. `[x]` 통과, `[ ]` 실패·미확인.
|
||||
|
||||
- [x] 히어로 바로 아래 세로 카드 줄(3개), 제목 줄 없음
|
||||
- [x] 줄이 화면에 보이면 첫 카드만 소리 없이 재생, 화면 밖으로 나가면 플레이어를 내림
|
||||
- [x] 카드 누름 → `/shorts/영상ID`, 영상이 헤더·버튼 줄과 하단 탭 사이에 9:16으로 맞고, 앞뒤 영상까지 3개만 띄움
|
||||
- [x] 쇼츠 페이지에선 뒤 페이지가 스크롤되지 않고, 닫으면 다시 스크롤됨
|
||||
- [x] '소리 켜기' 누름 → '소리 끄기'로 바뀜
|
||||
- [x] 위아래로 넘기면 주소가 그 영상으로 바뀜(뒤로 가기 기록은 안 쌓임 → 뒤로 가기 한 번에 오늘 화면)
|
||||
- [x] 영상 탭 → 일시정지, 다시 탭 → 재생 (모바일·마우스 둘 다)
|
||||
- [x] × · Esc · 하단 탭 누름 → 쇼츠 페이지를 닫고 이동
|
||||
- [x] 공유 링크로 바로 들어오면 그 영상부터, 닫으면 오늘 화면으로(뒤로 가기에 남지 않음)
|
||||
- [x] 목록에 없는 영상 ID 링크 → 그 영상을 맨 앞에 붙여 보임 / `/shorts`(ID 없음) → 첫 영상부터 / 새로고침해도 그대로
|
||||
- [x] 마우스로 20px 끌면 제자리, 30px 넘게 끌면 다음·이전, 첫 영상에서 아래로 끌면 그대로
|
||||
- [x] 마우스 휠·키보드 ↓로도 넘어감
|
||||
- [x] 쇼츠 API 실패·빈 목록 → 오늘 화면에서 줄이 통째로 숨음
|
||||
- [ ] **실패** 쇼츠 API 실패·빈 목록일 때 공유 링크(`/shorts/영상ID`)로 들어오면 남색 빈 화면만 계속 보임. 영상·× 버튼·안내 문구 없음(하단 탭으로만 나갈 수 있음)
|
||||
- [ ] 미확인: 밤 테마에서 쇼츠 카드 그림·영상이 남색 판에 가려지지 않는지 (자동 캡처가 다른 곳을 찍음, 눈으로 확인 필요)
|
||||
- [ ] 미확인: 아이폰 사파리 실기기 자동재생, 손가락으로 위아래 넘길 때 한 장씩 딱 멈추는지 (헤드리스는 터치 스크롤 재현 불가)
|
||||
|
||||
## 18. 각 포스트 카드
|
||||
|
||||
- [x] 아이폰 13·SE에서 점수·각 이름·'계산 근거 보기' 버튼이 카드 밖으로 잘리지 않는다 (10/27 근거 표·요약 줄 뺀 뒤, SE는 점수 글씨를 작게)
|
||||
- [x] 카드마다 같은 내용이 반복되지 않는다: 기온·비·바람·미세먼지 표와 '오전 10시 13°, 바람 조금' 줄 없음, 말풍선 문장은 각마다 다름
|
||||
@@ -611,18 +611,18 @@ export type GakSlide = {
|
||||
* Summary
|
||||
*/
|
||||
summary: string;
|
||||
/**
|
||||
* Rows
|
||||
*
|
||||
* 점수 근거: 비중 큰 날씨 조건부터 네 개와 지금 값 (기온 · 체감 18°)
|
||||
*/
|
||||
rows?: Array<Row>;
|
||||
/**
|
||||
* Say
|
||||
*
|
||||
* 점수 구간 설명 문장 (seed sentences)
|
||||
*/
|
||||
say?: string | null;
|
||||
/**
|
||||
* Trend
|
||||
*
|
||||
* 오늘 · 내일 · 이번 주말 점수 (각 상세 날짜 칸과 같은 값)
|
||||
*/
|
||||
trend?: Array<TrendPoint>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
+25
-16
@@ -51,7 +51,7 @@ function slideBg(post: PostData, slide: Slide): SlideBg {
|
||||
if (slide.kind === 'plan') return slide.eyebrow.startsWith('일') ? 'peach' : 'butter'
|
||||
if (slide.kind === 'gak') return GAK_BG[post.post_id % GAK_BG.length]
|
||||
if (slide.kind === 'image') return 'sky'
|
||||
if (post.post_type === PostType.EVENT) return 'night'
|
||||
if (post.post_type === PostType.EVENT) return slide.image ? 'night' : 'peach'
|
||||
if (post.post_type === PostType.TIP) return 'sky'
|
||||
if (post.post_type === PostType.AIR) return slide.icon === 'vent' ? 'mint' : 'lilac'
|
||||
if (post.post_type === PostType.DAY_TRIP) return slide.image ? 'night' : 'mint'
|
||||
@@ -61,18 +61,16 @@ function slideBg(post: PostData, slide: Slide): SlideBg {
|
||||
const DARK = new Set<SlideBg>(['dusk', 'night'])
|
||||
|
||||
// 그림 배경이 있는 각(code)과 장 수. 여러 장이면 글마다 돌려 쓴다
|
||||
const BG_IMAGES: Record<string, number> = { bike: 4, picnic: 1, hiking: 1, camping: 1, stars: 1, walk: 1, hangang: 1 }
|
||||
const EVENT_BG_N = 4
|
||||
const BG_IMAGES: Record<string, number> = { bike: 4, picnic: 1, hiking: 1, hangang: 1 }
|
||||
|
||||
function bgImage(name: string, n: number, seed: number): CSSProperties {
|
||||
const file = n > 1 ? `${name}-${'abcd'[seed % n]}` : name
|
||||
return { backgroundImage: `url(/post-bg/${file}.webp)`, backgroundSize: 'cover', backgroundPosition: 'center' }
|
||||
}
|
||||
|
||||
/** 그림 배경: 각은 각마다, 사진 없는 행사는 행사용. 없으면 색 배경만 */
|
||||
/** 그림 배경: 각은 각마다. 없으면 색 배경만 */
|
||||
function slideImage(post: PostData, slide: Slide): CSSProperties | undefined {
|
||||
if (slide.kind === 'gak') return BG_IMAGES[slide.code] ? bgImage(slide.code, BG_IMAGES[slide.code], post.post_id) : undefined
|
||||
if (post.post_type === PostType.EVENT && slide.kind === 'rows' && !slide.image) return bgImage('event', EVENT_BG_N, post.post_id)
|
||||
return undefined
|
||||
}
|
||||
|
||||
@@ -141,17 +139,28 @@ function SlideView({ slide, bg, img }: { slide: Slide; bg: SlideBg; img?: CSSPro
|
||||
<div className={cx(slideBase, `b-bg-${bg}`)} style={img}>
|
||||
<Eyebrow>오늘의 각 · {slide.rank}위</Eyebrow>
|
||||
<Big>{slide.line}</Big>
|
||||
<Pic name={slide.code} />
|
||||
<Pic name={slide.code} className="[@media(max-height:700px)]:top-[26%] [@media(max-height:700px)]:w-[34%]" />
|
||||
{slide.say && <p className="relative z-[1] m-0 mt-2.5 w-[56%] rounded-[16px] rounded-tl-[4px] bg-white/80 px-3 py-2 text-[14px] leading-snug font-bold">{slide.say}</p>}
|
||||
{/* 점수 근거: 비중 큰 조건과 지금 값. 오른쪽 아이콘과 겹치지 않게 왼쪽 반만 */}
|
||||
{!!slide.rows?.length && (
|
||||
<div className="relative z-[1] mt-2 w-[56%] rounded-[16px] bg-white/70 px-3 text-[14px] [&_b]:text-[15px] [&>div>div]:py-1.5 [&>div]:mt-0">
|
||||
<Rows rows={slide.rows} />
|
||||
{/* 오른쪽 아래 빈 곳에 오늘·내일·주말 점수 (각 상세 날짜 칸과 같은 값) */}
|
||||
<div className="relative z-[1] mt-auto flex items-end justify-between gap-3">
|
||||
<div>
|
||||
<b className="block font-bagel text-[82px] leading-[0.9] font-normal text-(--orange) [@media(max-height:700px)]:text-[64px]">{slide.score}</b>
|
||||
<p className="m-0 font-jua text-[29px] leading-tight">{slide.name}</p>
|
||||
</div>
|
||||
)}
|
||||
<b className="mt-auto font-bagel text-[82px] leading-[0.9] font-normal text-(--orange)">{slide.score}</b>
|
||||
<p className="m-0 font-jua text-[29px] leading-tight">{slide.name}</p>
|
||||
<Eyebrow className="mt-1">{slide.summary}</Eyebrow>
|
||||
{!!slide.trend?.length && (
|
||||
<div className="grid w-[46%] grid-cols-2 gap-1.5">
|
||||
{slide.trend.map((t) => (
|
||||
<div key={t.day} className="rounded-xl bg-white/80 px-1 py-1.5 text-center">
|
||||
<small className="block text-[11px] font-extrabold whitespace-nowrap text-(--ink2)">
|
||||
{t.label}
|
||||
{t.estimated && ' 예상'}
|
||||
</small>
|
||||
<b className="block font-bagel text-lg leading-tight font-normal text-(--orange)">{t.score}</b>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<button type="button" onClick={() => open({ type: 'gak', indexId: slide.index_id })} className="mt-3 cursor-pointer self-start rounded-full bg-(--orange) px-4 py-[9px] font-jua text-[15px] text-white shadow-[inset_0_-5px_0_var(--orange-deep)]">
|
||||
계산 근거 보기
|
||||
</button>
|
||||
@@ -414,7 +423,7 @@ function FullCard({ post }: PostProps) {
|
||||
<small className="text-xs font-semibold text-(--ink2)">{account}</small>
|
||||
</span>
|
||||
</div>
|
||||
<div className="relative aspect-[4/5] overflow-hidden" onClick={onTap}>
|
||||
<div className="b-day 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}
|
||||
@@ -524,7 +533,7 @@ export function PostFrame({ title, account, avatar, caption, more, shot, pinned,
|
||||
<small className="text-xs font-semibold text-(--ink2)">{account}</small>
|
||||
</span>
|
||||
</div>
|
||||
<div ref={bodyRef}>{children}</div>
|
||||
<div ref={bodyRef} className="b-day">{children}</div>
|
||||
<div className="flex items-center gap-3.5 px-3 pt-2.5 pb-1 [&_svg]:size-[26px] [&_svg]:stroke-[1.9]">
|
||||
{postId != null && (
|
||||
<>
|
||||
|
||||
@@ -157,8 +157,8 @@ const WEATHER_ICON: Record<Weather, string> = {
|
||||
sleet: 'snow',
|
||||
}
|
||||
// 구름 수: 구름 많음 둘, 흐림·비·눈 셋
|
||||
// 히어로 오른쪽 위 좋아요·댓글·보내기: 셋 다 같은 32px 칸에 아이콘 가운데, 수는 아이콘 옆
|
||||
const HERO_ACT = 'relative flex h-8 min-w-8 cursor-pointer items-center justify-center gap-1 text-[13px] font-extrabold'
|
||||
// 히어로 오른쪽 위 좋아요·댓글·보내기: 수는 아이콘 옆. 그림 칸 안 여백(약 3px)만큼 숫자 뒤에도 띄워, 아이콘·숫자가 섞여도 보이는 간격이 같게
|
||||
const HERO_ACT = 'relative flex h-8 cursor-pointer items-center gap-1 text-[13px] font-extrabold'
|
||||
const CLOUDS = [
|
||||
{ cls: 'top-9 left-[5%] h-8 w-[84px]', d: '.1s', f: '6s' },
|
||||
{ cls: 'top-[96px] left-[63%] h-9 w-[96px]', d: '.25s', f: '6.4s' },
|
||||
@@ -335,7 +335,7 @@ function Hero({ hero, post, today, ranked, all, feedLoad, todayLoad }: HeroProps
|
||||
{t.mo}월 {t.d}일 {WEEKDAYS[t.wd]}요일
|
||||
</span>
|
||||
</span>
|
||||
<span className="flex items-center gap-1 [&_svg]:size-[22px] [&_svg]:stroke-[2]">
|
||||
<span className="flex items-center gap-3 [&_svg]:size-[22px] [&_svg]:stroke-[2]">
|
||||
{post && (
|
||||
<>
|
||||
<button
|
||||
@@ -346,7 +346,7 @@ function Hero({ hero, post, today, ranked, all, feedLoad, todayLoad }: HeroProps
|
||||
className={cx(HERO_ACT, TAP44, !like.liked && 'opacity-80')}
|
||||
>
|
||||
<HeartIcon className={like.liked ? 'fill-(--heart) stroke-(--heart)' : 'fill-none stroke-current'} />
|
||||
{like.count > 0 && like.count.toLocaleString()}
|
||||
{like.count > 0 && <span className="pr-[3px]">{like.count.toLocaleString()}</span>}
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
@@ -355,7 +355,7 @@ function Hero({ hero, post, today, ranked, all, feedLoad, todayLoad }: HeroProps
|
||||
className={cx(HERO_ACT, 'opacity-80', TAP44)}
|
||||
>
|
||||
<CommentIcon className="fill-none stroke-current [stroke-linejoin:round]" />
|
||||
{post.comment_count > 0 && post.comment_count.toLocaleString()}
|
||||
{post.comment_count > 0 && <span className="pr-[3px]">{post.comment_count.toLocaleString()}</span>}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
||||
+35
-21
@@ -589,72 +589,86 @@ html.b-sheet-open .b-app :is(.b-fall, .b-bob, .b-blob, .b-skystars i, .b-shoot,
|
||||
.b-app[data-t='night'] .b-tabbar {
|
||||
--ink: #fff;
|
||||
}
|
||||
.b-app[data-t='night'] .bg-white {
|
||||
.b-app[data-t='night'] .bg-white:not(.b-day, .b-day *) {
|
||||
background-color: var(--card);
|
||||
}
|
||||
.b-app[data-t='night'] [class*='bg-white/'] {
|
||||
.b-app[data-t='night'] [class*='bg-white/']:not(.b-day, .b-day *) {
|
||||
background-color: rgb(34 42 92 / 0.85);
|
||||
}
|
||||
.b-app[data-t='night'] :is([class*='bg-[#f'], [class*='bg-[#e'], [class*='bg-[#d'], [class*='bg-[#c'], [class*='bg-[linear-gradient']):not(.b-keep-bg) {
|
||||
.b-app[data-t='night'] :is([class*='bg-[#f'], [class*='bg-[#e'], [class*='bg-[#d'], [class*='bg-[#c'], [class*='bg-[linear-gradient']):not(.b-keep-bg, .b-day, .b-day *) {
|
||||
background: var(--chip);
|
||||
}
|
||||
.b-app[data-t='night'] [class*='border-[#dfe5ee]'] {
|
||||
.b-app[data-t='night'] [class*='border-[#dfe5ee]']:not(.b-day, .b-day *) {
|
||||
border-color: rgb(255 255 255 / 0.12);
|
||||
}
|
||||
.b-app[data-t='night'] [class*='rgb(217_229_244'] {
|
||||
.b-app[data-t='night'] [class*='rgb(217_229_244']:not(.b-day, .b-day *) {
|
||||
box-shadow: inset 0 -5px 0 var(--shade);
|
||||
}
|
||||
.b-app[data-t='night'] .bg-\(--ink\) {
|
||||
.b-app[data-t='night'] .bg-\(--ink\):not(.b-day, .b-day *) {
|
||||
background-color: #4b56b5;
|
||||
color: #fff;
|
||||
}
|
||||
.b-app[data-t='night'] .bg-\(--ink\) .text-\[\#ffb3c4\] {
|
||||
.b-app[data-t='night'] .bg-\(--ink\) .text-\[\#ffb3c4\]:not(.b-day, .b-day *) {
|
||||
color: #ffd0dc;
|
||||
}
|
||||
/* b-keep-bg(밤에도 밝은 바탕 그대로) 안은 글자도 그대로 */
|
||||
.b-app[data-t='night'] .text-\[\#28304a\]:not(.b-keep-bg, .b-keep-bg *) {
|
||||
.b-app[data-t='night'] .text-\[\#28304a\]:not(.b-keep-bg, .b-keep-bg *, .b-day, .b-day *) {
|
||||
color: var(--ink);
|
||||
}
|
||||
.b-app[data-t='night'] :is(.text-\[\#1f9d62\], .text-\[\#1f7a4f\]) {
|
||||
.b-app[data-t='night'] :is(.text-\[\#1f9d62\], .text-\[\#1f7a4f\]):not(.b-day, .b-day *) {
|
||||
color: #4fd39a;
|
||||
}
|
||||
.b-app[data-t='night'] .text-\[\#d6457a\] {
|
||||
.b-app[data-t='night'] .text-\[\#d6457a\]:not(.b-day, .b-day *) {
|
||||
color: #ff8db5;
|
||||
}
|
||||
.b-app[data-t='night'] .text-\[\#c2471b\] {
|
||||
.b-app[data-t='night'] .text-\[\#c2471b\]:not(.b-day, .b-day *) {
|
||||
color: #ffab85;
|
||||
}
|
||||
.b-app[data-t='night'] .bg-\[\#dff5ea\] {
|
||||
.b-app[data-t='night'] .bg-\[\#dff5ea\]:not(.b-day, .b-day *) {
|
||||
background: rgb(79 211 154 / 0.16);
|
||||
}
|
||||
.b-app[data-t='night'] .bg-\[\#ffe8dc\] {
|
||||
.b-app[data-t='night'] .bg-\[\#ffe8dc\]:not(.b-day, .b-day *) {
|
||||
background: rgb(255 138 87 / 0.16);
|
||||
}
|
||||
.b-app[data-t='night'] .b-bg-sky {
|
||||
.b-app[data-t='night'] .b-bg-sky:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, #2a4384, #1f2c62);
|
||||
}
|
||||
.b-app[data-t='night'] .b-bg-butter {
|
||||
.b-app[data-t='night'] .b-bg-butter:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, #4d4128, #2c2a3e);
|
||||
}
|
||||
.b-app[data-t='night'] .b-bg-peach {
|
||||
.b-app[data-t='night'] .b-bg-peach:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, #553632, #2e2840);
|
||||
}
|
||||
.b-app[data-t='night'] .b-bg-mint {
|
||||
.b-app[data-t='night'] .b-bg-mint:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, #1f4a45, #1d2d4a);
|
||||
}
|
||||
.b-app[data-t='night'] .b-bg-lilac {
|
||||
.b-app[data-t='night'] .b-bg-lilac:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, #3d3480, #262a5e);
|
||||
}
|
||||
.b-app[data-t='night'] .b-band-1 {
|
||||
.b-app[data-t='night'] .b-band-1:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, rgb(255 160 110 / 0.12), rgb(255 255 255 / 0));
|
||||
}
|
||||
.b-app[data-t='night'] .b-band-2 {
|
||||
.b-app[data-t='night'] .b-band-2:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, rgb(255 214 110 / 0.12), rgb(255 255 255 / 0));
|
||||
}
|
||||
.b-app[data-t='night'] .b-band-3 {
|
||||
.b-app[data-t='night'] .b-band-3:not(.b-day, .b-day *) {
|
||||
background: linear-gradient(180deg, rgb(110 230 180 / 0.12), rgb(255 255 255 / 0));
|
||||
}
|
||||
|
||||
/* 밤에도 포스트 카드 본문은 낮 색 그대로 (어두운 카드가 줄줄이 이어지지 않게). 위 밤 덮어쓰기는 이 안을 뺀다 */
|
||||
.b-app[data-t='night'] .b-day {
|
||||
--ink: #28304a;
|
||||
--ink2: #5a6380;
|
||||
--ink3: #8a92aa;
|
||||
--line: #e6ecf4;
|
||||
--shade: #d9e5f4;
|
||||
--orange: #ff7a45;
|
||||
--heart: #ff3b5c;
|
||||
--skel: color-mix(in oklab, currentColor 13%, transparent);
|
||||
color: var(--ink);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
.b-app[data-t='night'] img[data-dark] {
|
||||
filter: drop-shadow(0 0 1px rgb(255 255 255 / 0.9)) drop-shadow(0 0 6px rgb(255 255 255 / 0.3));
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ const line = { fill: 'none', stroke: 'currentColor', strokeLinecap: 'round', str
|
||||
// 좋아요·댓글·보내기 세 아이콘이 나란히 놓일 때 크기가 같아 보이게: 하트는 원래 그림이 작아 10% 키우고(보이는 칸을 좁힘), 보내기는 커서 5% 줄인다
|
||||
export function HeartIcon({ className }: P) {
|
||||
return (
|
||||
<svg viewBox="1.1 2.75 21.8 21.8" className={className} aria-hidden="true">
|
||||
<svg viewBox="1.1 1.95 21.8 21.8" className={className} aria-hidden="true">
|
||||
<path d="M12 20.5s-8-4.9-8-11A4.6 4.6 0 0 1 12 6.8a4.6 4.6 0 0 1 8 2.7c0 6.1-8 11-8 11z" />
|
||||
</svg>
|
||||
)
|
||||
|
||||
@@ -31,8 +31,6 @@ const WRITE_ERRORS: Record<string, string> = {
|
||||
INVALID_INPUT: '100자 안으로 써 주세요.',
|
||||
}
|
||||
|
||||
// 글이 이보다 적으면 '동네 사람들' 묶음 대신 첫 글 쓰기 카드
|
||||
const GROUP_MIN = 3
|
||||
const COMPOSE_ID = 'talk-compose'
|
||||
|
||||
const REASONS = [
|
||||
@@ -364,10 +362,10 @@ export function FirstTalkCard() {
|
||||
)
|
||||
}
|
||||
|
||||
/** '동네 사람들' 자리: 글이 GROUP_MIN 개 이상이면 묶음, 아니면 첫 글 쓰기 */
|
||||
/** '동네 사람들' 자리: 글이 하나라도 있으면 묶음, 없으면 첫 글 쓰기 */
|
||||
export function NearTalks({ talks, loaded }: { talks: TalkData[]; loaded: boolean }) {
|
||||
if (!loaded) return null
|
||||
return talks.length >= GROUP_MIN ? <TalkGroup title="동네 사람들" talks={talks} /> : <FirstTalkCard />
|
||||
return talks.length ? <TalkGroup title="동네 사람들" talks={talks} /> : <FirstTalkCard />
|
||||
}
|
||||
|
||||
/** 내 정보 창의 내가 쓴 글 */
|
||||
|
||||
Reference in new issue
Block a user