Repository navigation
Expand file tree
/
Copy pathfeed.css
More file actions
417 lines (361 loc) · 11.2 KB
/
Copy pathfeed.css
File metadata and controls
417 lines (361 loc) · 11.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
/* ==========================================================
feed.css — "나의 다이어리" 메인 화면 (/feed/)
클래스는 전부 cd-feed- 로 네임스페이스해서, 다른 페이지의
cd-* 클래스와 이름이 겹치지 않게 했다.
색상·폰트·간격 값은 base.css의 --cd-* 토큰을 그대로 참조한다.
========================================================== */
/* .cd-main은 base.css가 정의하는 전역 클래스지만, 이 페이지에서만
로드되는 feed.css에서 덮어써서 "이 화면 안에서만" 콘텐츠를 정중앙에 둔다.
다른 페이지(base.css만 로드하는 곳)에는 영향 없다. */
.cd-main {
display: flex;
align-items: center;
justify-content: center;
}
/* 히어로 전체를 감싸는 컨테이너.
position: relative */
.cd-feed-hero {
display: inline-flex;
align-items: flex-start;
position: relative;
max-width: 620px;
transform: translateX(70px); /* 오른쪽으로 40px — 값 조절해서 원하는 만큼 */
}
.cd-feed-main-wrapper{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 0px;
}
/* ---- 상태 표시: "오늘의 카페인 마감 시간은 8:00" ---- */
/* CALC-002(마감시간 초과)/CALC-006(한계효용) 등 /feed-status/의 warnings를 보여주는 줄.
본문 폰트를 써서 위 라벨(display 폰트, 손글씨 톤)과 구분되는 "알림"으로 읽히게 한다. */
.cd-feed-hero__warning {
text-align: center;
font-family: var(--cd-font-body);
font-size: 14px;
font-weight: 500;
color: #C0392B;
margin-bottom: 20px;
white-space: pre-line;
}
.cd-feed-hero__label {
text-align: center;
font-size: 25px;
font-style: normal;
font-weight: 400;
line-height: normal;
font-family:var(--cd-font-display);
text-align: center;
margin-bottom: 10px;
color: var(--cd-brown-dark);
}
.cd-feed-hero__time {
font-family: var(--cd-font-display);
font-weight: 800;
font-size: 60px;
text-align: center;
line-height: 1;
color: var(--cd-brown-dark);
}
.cd-feed-hero__time .cd-numeric {
font-family: var(--cd-font-display);
}
/* ---- "커스텀 마시기" 버튼 ---- */
.cd-feed-bubble {
margin-top: 30px;/* 시간 표시 오른쪽에 나란히 오도록 고정 좌표 */
background: none;
border: none;
padding: 0;
cursor: pointer;
transition: transform 0.15s ease;
}
.cd-feed-bubble:hover { transform: translateY(-2px); }
.cd-feed-bubble:focus-visible {
outline: 2px solid var(--cd-brown-deep);
outline-offset: 3px;
border-radius: 12px;
}
.cd-feed-bubble__img {
display: block;
width: 220.463px;
height: 97px;
}
/* 컵 버튼 (한잔 마시기 / 즐겨찾는 음료 공통) */
.cd-feed-cup {
background: none;
border: none;
padding: 0;
cursor: pointer;
position: relative; /* .cd-feed-cup__label을 내부 absolute로 겹쳐 올리기 위한 기준점 */
color: var(--cd-feed-cup-color, #9DC4C0); /* 타입 클래스가 없으면 기본 민트색 */
transition: transform 0.15s ease;
}
.cd-feed-cup:hover { transform: translateY(-3px); }
.cd-feed-cup:focus-visible {
outline: 2px solid var(--cd-brown-deep);
outline-offset: 6px;
border-radius: 12px; /* 아웃라인도 컵 실루엣처럼 둥글게 */
}
/* ---- 큰 컵: 한잔 마시기 (오늘 마실/마신 음료를 바로 기록하는 메인 CTA) ---- */
.cd-feed-cup-wrap { margin-top: var(--cd-space-6); }
.cd-feed-cup--lg {
width: 240px;
height: 224px;
color: var(--cd-feed-cup-color, #9DC4C0); /* 타입 클래스(cd-feed-cup--coffee 등)가 없으면 기본 민트 */
}
.cd-feed-cup__label {
/* 컵 몸통 안쪽, 살짝 아래 위치에 텍스트를 겹쳐 올림.
기본 컵 SVG는 오른쪽에 손잡이가 있어 그림 자체가 비대칭이라, 그림의
시각적 중심(40%)에 맞춘다 — 완전한 중앙(50%)에 두면 손잡이 쪽으로 치우쳐 보인다.
즐겨찾는 음료 아이콘(대칭)을 선택하면 .cd-feed-cup--has-selection이 50%로 덮어쓴다. */
position: absolute;
left: 40%;
bottom: 40%;
transform: translateX(-50%);
text-align: center;
white-space: nowrap;
font-size: 25px;
font-style: normal;
font-weight: 400;
line-height: normal;
font-family: var(--cd-font-display);
color: var(--cd-brown-deep);
z-index: 1; /* 즐겨찾는 음료 선택 시 아이콘(cd-feed-cup__selected-icon) 위에 글자가 뜨도록 */
/* 즐겨찾는 음료 아이콘마다 배경색이 달라 글자색 하나로는 대비가 보장되지 않는다.
옅은 크림색 알약 배경을 깔아 어떤 아이콘 위에서도 항상 읽히게 한다. */
background: rgba(238, 225, 217, 0.88); /* --cd-cream 반투명 */
border-radius: 999px;
padding: 4px 14px;
}
.cd-feed-cup--has-selection .cd-feed-cup__label {
left: 50%; /* 즐겨찾는 음료 아이콘은 대칭이라 진짜 중앙에 맞춘다 */
}
/* 즐겨찾는 음료를 선택하면 기본 컵 SVG 대신 그 음료의 아이콘으로 바뀐다.
"한잔 마시기" 글자(.cd-feed-cup__label)는 그대로 겹쳐 유지된다. */
.cd-feed-cup__selected-icon {
position: absolute;
padding: 10px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/* 기본 컵(.cd-feed-cup--lg)과 같은 크기로 — 버튼이 반응형으로 작아지면
(480px 미만 미디어쿼리) 이 크기도 %라서 자동으로 같이 줄어든다. */
width: 100%;
height: 100%;
object-fit: contain;
pointer-events: none;
}
/* 버튼 하단에 뜨는 선택된 음료 이름 */
.cd-feed-cup__selected-name {
margin-top: 8px;
text-align: center;
font-family: var(--cd-font-body);
font-size: 16px;
color: var(--cd-brown-dark);
word-break: keep-all;
margin-bottom: 15px;
}
/* ---- 작은 컵들: 즐겨찾는 음료 3개 ---- */
.cd-feed-cup-row {
display: flex;
align-items: flex-start;
gap: 12px;
}
.cd-feed-cup--sm {
width: 86px;
height: auto;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.cd-feed-cup--sm .cd-feed-cup__icon {
width: 72px;
height: 62px;
object-fit: contain;
}
.cd-feed-cup__name {
font-family: var(--cd-font-body);
font-size: 12px;
line-height: 1.25;
color: var(--cd-brown-dark);
text-align: center;
word-break: keep-all;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* ---- 커스텀 마시기 모달 ---- */
.cd-custom-overlay {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
/* author 스타일의 "display: flex"가 브라우저 기본 [hidden]{display:none}보다
우선 적용돼(origin이 specificity보다 먼저 비교됨) hidden 속성만으로는 안 감춰진다.
더 구체적인 선택자로 명시적으로 다시 감춘다. */
.cd-custom-overlay[hidden] {
display: none;
}
.cd-custom-card {
position: relative;
width: 90%;
max-width: 360px;
background: var(--cd-cream);
border-radius: 20px;
padding: 40px 28px 28px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.cd-custom-close {
position: absolute;
top: 12px;
right: 16px;
width: 32px;
height: 32px;
border: none;
background: none;
font-size: 24px;
line-height: 1;
color: var(--cd-brown-dark);
cursor: pointer;
}
.cd-custom-title {
text-align: center;
font-size: 24px;
margin-bottom: 24px;
}
.cd-custom-field {
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 18px;
}
.cd-custom-field label {
font-size: 14px;
color: var(--cd-brown-dark);
}
.cd-custom-field input {
border: 1px solid var(--cd-brown-light);
border-radius: 10px;
padding: 10px 12px;
font-size: 16px;
color: var(--cd-brown-ink);
background: #fff;
}
.cd-custom-field input:focus {
outline: 2px solid var(--cd-brown-deep);
outline-offset: 1px;
}
.cd-custom-submit {
width: 100%;
margin-top: 8px;
padding: 12px;
border: none;
border-radius: 999px;
background: var(--cd-brown-deep);
color: #fff;
font-size: 16px;
font-family: var(--cd-font-body);
cursor: pointer;
transition: opacity 0.15s ease;
}
.cd-custom-submit:hover {
opacity: 0.9;
}
/* ---- 일일 권장 상한 초과 확인 모달 ---- */
.cd-limit-overlay {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
/* .cd-custom-overlay와 같은 이유(author display:flex가 [hidden]보다 우선 적용)로 명시적으로 감춘다. */
.cd-limit-overlay[hidden] {
display: none;
}
.cd-limit-card {
width: 90%;
max-width: 320px;
background: var(--cd-cream);
border-radius: 20px;
padding: 32px 28px 28px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
text-align: center;
}
.cd-limit-card__total {
font-family: var(--cd-font-display);
font-size: 18px;
font-weight: 800;
line-height: 1.4;
color: var(--cd-brown-dark);
margin-bottom: 10px;
}
.cd-limit-card__message {
font-family: var(--cd-font-body);
font-size: 14px;
line-height: 1.5;
color: var(--cd-brown-ink);
margin-bottom: 24px;
}
/* 이 잔까지 마시면 일일 권장 상한을 넘는 경우에만 붙는다 */
.cd-limit-card__message--warning {
color: #C0392B;
}
.cd-limit-card__actions {
display: flex;
gap: 12px;
}
.cd-limit-card__btn {
flex: 1;
padding: 10px;
border: none;
border-radius: 999px;
font-size: 15px;
font-family: var(--cd-font-body);
cursor: pointer;
transition: opacity 0.15s ease;
}
.cd-limit-card__btn:hover { opacity: 0.9; }
.cd-limit-card__btn--no {
background: var(--cd-brown-light);
color: var(--cd-brown-ink);
}
.cd-limit-card__btn--yes {
background: var(--cd-brown-deep);
color: #fff;
}
/* ==========================================================
반응형 — 화면이 좁아질 때 카드/화살표/옵션 영역 크기 조정
========================================================== */
@media (max-width: 768px) {
/* 변경사항 없음 */
}
@media (max-width: 480px) {
/* 전체적인 비율 조정 */
.cd-feed-hero {max-width: 350px; transform: translateX(0px);}
/* 오늘의 마감 시간은 부분 */
.cd-feed-hero__warning {font-size: 12px;transform: translateX(20px);}
.cd-feed-hero__label {font-size: 18px;transform: translateX(20px);}
/* 마감 시간 숫자 */
.cd-feed-hero__time {font-size: 40px; transform: translateX(20px);}
/* 그림 크기 조절 */
.cd-feed-cup { width: 70px; transform: translateX(20px); }
.cd-feed-cup--lg { width: 200px; height: 184px; transform: translateX(20px); }
/* 한잔 마시기 글자 크기 */
.cd-feed-cup__label {font-size: 20px;}
.cd-feed-bubble { margin-top: 10px; transform: translateX(-10px);}
.cd-feed-bubble__img {
content: url('../images/custom_drinking_button2.png');
}
}