feat: 날씨 위젯에서 아침·낮·저녁·밤을 눌러 그 시간대 점수와 한마디 보기

- 서버가 카드 데이터에 시간대별 날씨 점수와 한마디(앱과 같은 65점 규칙: '오늘 낮은 ○○각!'/'…쉬어 가요')를 넣음
- 카드 4칸을 버튼으로: 누르면 점수·하늘·해와 달·한마디가 그 시간대로 바뀌고, 상세형 요약·상태 줄은 숨김(자리는 유지)
- 같은 칸을 다시 누르면 다시 그리지 않음, 누른 칸에 초점 유지, 휴대폰 터치 반짝임 없앰
- ASSET_VERSION 11
This commit is contained in:
skkim committed 2026-11-26 13:43:31 +09:00
1 parent dc8201e5f5
commit c5129d14ed
6 files changed
+259 -40

No files matched your search

+32 -3
View File
@@ -19,6 +19,8 @@
로딩·실패 화면은 상자(.wx) 안에 있어 같은 모서리로 잘린다.
8. 원본은 다 그린 카드 전체가 링크(.wx-go::after 가 카드를 덮음)다. 여기서는 '자세히 보기 ›' 버튼만 링크다 — 붙인 사이트
방문자가 카드를 잘못 눌러 페이지를 떠나지 않게. ::after 는 버튼의 눌리는 자리를 위아래로 넓히는 데만 쓴다.
9. 아래 4칸이 버튼(.wx-cell, card.js 가 누르면 그 시간대로 다시 그린다)이다. 모양은 원본 칸 그대로이고, 원본의 '지금'
칸 강조(li.is-now)를 보이는 칸 강조(.wx-cell.is-on)로 옮겼다. 다른 시간대를 보일 때 상세형 요약·상태 줄은 자리만 남긴다.
배경(상자 클래스 wx-bg-*, card.js 는 몰라도 된다):
- sky: 군산각 그대로, 시간대별 하늘.
- light: 밝은 바탕 사이트용. 시간대별 하늘을 옅은 파스텔로, 어두운 글자, 얇은 안쪽 테두리, 별 없음, 흰 구름.
@@ -539,13 +541,32 @@ html, body {
border-radius: 18px;
background: var(--wx-strip);
}
/* 칸은 버튼(.wx-cell, 원본은 li 자체가 칸). 버튼 기본 테두리·바탕·글자를 지워 원본 칸 모양 그대로 */
.wx-strip li {
display: flex;
min-width: 0;
}
.wx-cell {
flex: 1 1 auto;
display: flex;
flex-direction: column;
align-items: center;
min-width: 0;
margin: 0;
padding: 6px 0;
border: 0;
border-radius: 14px;
background: none;
color: inherit;
font: inherit;
letter-spacing: inherit;
cursor: pointer;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}
.wx-cell:focus-visible {
outline: 3px solid var(--focus);
outline-offset: 2px;
}
.wx-cn {
max-width: 100%;
@@ -566,12 +587,12 @@ html, body {
font-synthesis: none;
letter-spacing: 0;
}
.wx-strip li.is-now {
.wx-cell.is-on {
background: #fff;
color: #28304a;
box-shadow: 0 4px 12px rgba(40, 48, 74, .1);
}
.wx-strip li.is-now .wx-cn {
.wx-cell.is-on .wx-cn {
color: #c2471b;
opacity: 1;
}
@@ -627,7 +648,7 @@ html, body {
margin-top: 6px;
border-radius: 14px;
}
.wx-side .wx-strip li {
.wx-side .wx-cell {
padding: 4px 0;
border-radius: 11px;
}
@@ -796,6 +817,10 @@ html, body {
max-height: 42px;
overflow: hidden;
}
/* 더한 것: 다른 시간대 칸을 고르면 지금 값인 요약·상태 줄을 감춘다. 자리는 남겨 카드가 움직이지 않게 (card.js 가 is-hidden 을 붙인다) */
.wx-sum.is-hidden, .wx-st.is-hidden {
visibility: hidden;
}
/* 움직임 */
@media (prefers-reduced-motion: no-preference) {
@@ -805,6 +830,10 @@ html, body {
.wx-home :is(.wx-cl, .wx-ob) {
animation: wx-drop 1.05s cubic-bezier(.22, .9, .3, 1) var(--d, 0s) backwards;
}
/* 칸을 눌러 다시 그린 카드(is-again, card.js)는 해·구름이 다시 떨어지지 않고 제자리에 있다 */
.wx-home.is-again :is(.wx-cl, .wx-ob) {
animation: none;
}
.wx :is(.wx-cb, .wx-orb) {
animation: wx-float var(--f, 4.8s) ease-in-out calc(var(--d, 0s) + 1.05s) infinite;
}