feat: 홈 화면 추가 배너를 포스트 사이 한 줄 띠로 — 버튼 하나(추가)·닫기는 ×, 설명 한 줄로 줄임

This commit is contained in:
minaChoi committed 2026-10-27 13:14:29 +09:00
1 parent 882c7f06dc
commit fcc4163e15
1 file changed
+20 -19
+20 -19
View File
@@ -1,6 +1,8 @@
import { useEffect, useState, type ReactNode } from 'react'
import { track } from '../lib/analytics'
import { cx } from '../lib/utils'
import { dismiss, dismissed, platform, promptInstall, useCanPrompt, useInstall, useInstallable } from './install'
import { TAP44 } from './ui'
const SITE = 'https://weather.o2o.kr'
@@ -17,27 +19,26 @@ export function InstallBanner() {
if (hidden) return null
return (
<aside aria-label="홈 화면에 추가" className="mx-3 mt-3.5 flex items-center gap-3 rounded-[22px] bg-white p-3.5 shadow-[inset_0_-5px_0_var(--shade)]">
<img src="/app/icon-192.png" alt="" className="size-12 shrink-0 rounded-[14px]" />
<aside aria-label="홈 화면에 추가" className="mt-3.5 flex items-center gap-2.5 border-y border-(--line) bg-white py-2.5 pr-1.5 pl-3">
<img src="/app/icon-192.png" alt="" className="size-10 shrink-0 rounded-[11px]" />
<div className="min-w-0 flex-1">
<p className="m-0 font-jua text-[16.5px] leading-snug">내일도 우산각·빨래각, 바로 확인하세요</p>
<p className="m-0 mt-0.5 text-[12.5px] font-semibold text-(--ink2)">날씨각을 홈 화면에 추가하고 한 번에 열어보세요.</p>
<div className="mt-2 flex gap-1.5">
<button type="button" onClick={() => install('banner')} className="cursor-pointer rounded-full bg-(--orange) px-3.5 py-1.5 text-[13px] font-extrabold text-white">
📲 홈 화면에 추가
</button>
<button
type="button"
onClick={() => {
dismiss()
setClosed(true)
}}
className="cursor-pointer rounded-full bg-[#eef4fc] px-3 py-1.5 text-[13px] font-extrabold text-(--ink2)"
>
닫기
</button>
</div>
<p className="m-0 font-jua text-[15px] leading-snug">내일도 우산각·빨래각, 바로 확인하세요</p>
<p className="m-0 text-xs leading-snug font-semibold text-(--ink2)">홈 화면에서 바로 열어 보세요.</p>
</div>
<button type="button" onClick={() => install('banner')} className="shrink-0 cursor-pointer rounded-full bg-(--orange) px-3.5 py-1.5 text-[13px] font-extrabold text-white">
추가
</button>
<button
type="button"
onClick={() => {
dismiss()
setClosed(true)
}}
aria-label="닫기"
className={cx('relative grid size-[30px] shrink-0 cursor-pointer place-items-center text-xl text-(--ink3)', TAP44)}
>
×
</button>
</aside>
)
}