Merge remote-tracking branch 'origin/main' into feat/apps-in-toss
# Conflicts: # TODO.md # docs/QA_체크리스트.md # frontend/src/b/BLayout.tsx # frontend/vite.config.ts
This commit is contained in:
commit
07290597a0
114 files changed
+5027
-890
No files matched your search
+14
-4
@@ -7,10 +7,13 @@ import { AVATAR_COLORS, iconSrc, moodEmoji, naverMap, type Load } from './lib'
|
||||
|
||||
type IcProps = { name: string; className?: string; alt?: string; style?: CSSProperties }
|
||||
|
||||
// 거의 검은 아이콘. 밤 화면에선 테두리 빛을 둘러 보이게 한다
|
||||
const DARK_ICONS = new Set(['walk', 'dog'])
|
||||
|
||||
export function Ic({ name, className, alt = '', style }: IcProps) {
|
||||
const src = iconSrc(name)
|
||||
if (!src) return <span aria-hidden className={cx('block', className)} style={style} />
|
||||
return <img src={src} alt={alt} className={cx('block', className)} style={style} decoding="async" />
|
||||
return <img src={src} alt={alt} className={cx('block', className)} style={style} decoding="async" data-dark={DARK_ICONS.has(name) || undefined} />
|
||||
}
|
||||
|
||||
/** 사진 출처 표기 (공공누리 조건). 사진 위에서도 읽히게 반투명 배경. 위치는 className 으로 */
|
||||
@@ -209,13 +212,20 @@ export function MapLink({ place, children, className }: { place: string; childre
|
||||
)
|
||||
}
|
||||
|
||||
export function Rows({ rows, dark = false }: { rows: { label: string; value: string; place?: string | null }[]; dark?: boolean }) {
|
||||
/** 자외선 단계(1 낮음 ~ 5 위험) 칩 색 */
|
||||
const LEVEL_CHIP = ['bg-[#1f9d62] text-white', 'bg-[#ffc21a] text-[#3a2a00]', 'bg-[#f0700a] text-white', 'bg-[#e03131] text-white', 'bg-[#8e3bc4] text-white']
|
||||
|
||||
export function Rows({ rows, dark = false }: { rows: { label: string; value: string; place?: string | null; level?: number | null }[]; dark?: boolean }) {
|
||||
return (
|
||||
<div className="mt-auto flex flex-col">
|
||||
{rows.map((r) => (
|
||||
<div key={r.label} className={cx('flex justify-between gap-2.5 border-b-2 py-2.5 font-bold last:border-b-0', dark ? 'border-white/18' : 'border-[rgb(40_48_74/0.08)]')}>
|
||||
<div key={r.label} className={cx('flex items-center justify-between gap-2.5 border-b-2 py-2.5 font-bold last:border-b-0', dark ? 'border-white/18' : 'border-[rgb(40_48_74/0.08)]')}>
|
||||
<span>{r.label}</span>
|
||||
<b className="text-right font-jua text-[17px] font-normal">{r.place ? <MapLink place={r.place}>{r.value}</MapLink> : r.value}</b>
|
||||
{r.level ? (
|
||||
<b className={cx('rounded-full px-2.5 py-[3px] font-jua text-[15px] font-normal', LEVEL_CHIP[r.level - 1])}>{r.value}</b>
|
||||
) : (
|
||||
<b className="text-right font-jua text-[17px] font-normal">{r.place ? <MapLink place={r.place}>{r.value}</MapLink> : r.value}</b>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user