refactor(evolver): Lotto 탭으로 통합 + 다크 테마 + activity 스크롤
- EvolverTab.jsx 신규 생성: evolver 컴포넌트를 탭 body로 추출 - Evolver.jsx → Lotto 페이지 thin wrapper로 교체 (/lotto/evolver URL 유지) - Lotto.jsx: useLocation으로 pathname 감지 → initialTab 결정 - Functions.jsx: 4번째 탭 '🧬 자율 학습' 추가 + initialTab prop 수용 - Evolver.css: light → dark 테마 전환 (rgba/slate 팔레트), activity-list max-height+scroll 적용 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,51 +1,194 @@
|
||||
.evolver { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
|
||||
.evolver-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 24px; gap: 16px; }
|
||||
.evolver-kicker { letter-spacing: 0.12em; color: #6b7280; font-size: 0.75rem; margin: 0 0 4px; }
|
||||
.evolver-header h1 { margin: 0 0 8px; font-size: 2rem; }
|
||||
.evolver-sub { color: #6b7280; margin: 0; }
|
||||
.refresh-btn { padding: 8px 14px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; cursor: pointer; }
|
||||
/* Evolver tab — dark theme matching Lotto.css patterns */
|
||||
|
||||
.evolver-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin-bottom: 16px; }
|
||||
.evolver-card.empty .muted { color: #9ca3af; }
|
||||
.evolver-card h2 { margin: 0 0 12px; font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
|
||||
.evolver-card .badge { background: #ecfdf5; color: #065f46; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: normal; }
|
||||
.lotto-evolver { display: flex; flex-direction: column; gap: 16px; }
|
||||
.lotto-evolver-muted { color: #94a3b8; }
|
||||
|
||||
.winner-card .winner-meta { display: flex; gap: 16px; flex-wrap: wrap; color: #6b7280; font-size: 0.9rem; margin-bottom: 12px; }
|
||||
.winner-card .winner-meta strong { color: #111827; }
|
||||
.lotto-evolver-intro {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
gap: 12px; flex-wrap: wrap;
|
||||
}
|
||||
.lotto-evolver-sub { margin: 0; color: #94a3b8; font-size: 0.9rem; flex: 1; }
|
||||
.lotto-evolver-refresh {
|
||||
padding: 6px 12px;
|
||||
background: rgba(255,255,255,0.06);
|
||||
border: 1px solid rgba(255,255,255,0.1);
|
||||
border-radius: 6px;
|
||||
color: #cbd5e1;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.lotto-evolver-refresh:hover { background: rgba(255,255,255,0.1); }
|
||||
|
||||
.trials-grid .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; height: 140px; align-items: end; }
|
||||
.trial-cell { border: none; background: #f9fafb; border-radius: 6px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; justify-content: end; cursor: pointer; height: 100%; }
|
||||
.trial-cell.winner { background: #ecfdf5; }
|
||||
.trial-cell .bar { width: 80%; background: #34d399; border-radius: 3px 3px 0 0; min-height: 4px; }
|
||||
.trial-cell.winner .bar { background: #059669; }
|
||||
.trial-cell .label { font-size: 0.85rem; margin-top: 6px; }
|
||||
.trial-cell .max-correct { font-size: 0.7rem; color: #6b7280; }
|
||||
.trial-detail { margin-top: 16px; padding: 12px; background: #f9fafb; border-radius: 6px; }
|
||||
/* Generic card */
|
||||
.evolver-card {
|
||||
background: rgba(255,255,255,0.04);
|
||||
border: 1px solid rgba(255,255,255,0.08);
|
||||
border-radius: 12px;
|
||||
padding: 18px 20px;
|
||||
color: #e2e8f0;
|
||||
}
|
||||
.evolver-card h2 {
|
||||
margin: 0 0 12px;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: #f1f5f9;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.evolver-card .badge {
|
||||
background: rgba(52,211,153,0.15);
|
||||
color: #34d399;
|
||||
padding: 2px 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
.evolver-card.empty .muted, .evolver-card .muted { color: #64748b; }
|
||||
|
||||
.lotto-evolver-empty h3 { margin: 0 0 6px; color: #f1f5f9; }
|
||||
.lotto-evolver-empty p { color: #94a3b8; margin: 0 0 12px; }
|
||||
|
||||
/* WinnerCard */
|
||||
.winner-card .winner-meta {
|
||||
display: flex; gap: 16px; flex-wrap: wrap;
|
||||
color: #94a3b8; font-size: 0.85rem; margin-bottom: 14px;
|
||||
}
|
||||
.winner-card .winner-meta strong { color: #f1f5f9; font-weight: 600; }
|
||||
.winner-card .winner-chart { background: rgba(0,0,0,0.15); border-radius: 8px; padding: 8px; }
|
||||
|
||||
/* TrialsGrid */
|
||||
.trials-grid .grid {
|
||||
display: grid; grid-template-columns: repeat(6, 1fr);
|
||||
gap: 8px; height: 140px; align-items: end;
|
||||
}
|
||||
.trial-cell {
|
||||
border: 1px solid rgba(255,255,255,0.06);
|
||||
background: rgba(255,255,255,0.03);
|
||||
border-radius: 6px;
|
||||
padding: 8px 4px;
|
||||
display: flex; flex-direction: column;
|
||||
align-items: center; justify-content: end;
|
||||
cursor: pointer;
|
||||
height: 100%;
|
||||
color: #cbd5e1;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
.trial-cell:hover { background: rgba(255,255,255,0.06); }
|
||||
.trial-cell.winner { background: rgba(52,211,153,0.12); border-color: rgba(52,211,153,0.3); }
|
||||
.trial-cell .bar {
|
||||
width: 80%;
|
||||
background: #475569;
|
||||
border-radius: 3px 3px 0 0;
|
||||
min-height: 4px;
|
||||
}
|
||||
.trial-cell.winner .bar { background: #34d399; }
|
||||
.trial-cell .label { font-size: 0.85rem; margin-top: 6px; color: #e2e8f0; }
|
||||
.trial-cell .max-correct { font-size: 0.7rem; color: #94a3b8; }
|
||||
.trial-detail {
|
||||
margin-top: 14px; padding: 12px;
|
||||
background: rgba(0,0,0,0.15);
|
||||
border-radius: 6px;
|
||||
color: #cbd5e1;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.trial-detail h3 { margin: 0 0 8px; font-size: 0.9rem; color: #f1f5f9; }
|
||||
.trial-detail ul { margin: 8px 0 0; padding-left: 18px; }
|
||||
.trial-detail li { margin-bottom: 4px; }
|
||||
|
||||
.base-diff .diff-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
|
||||
.metric-card { padding: 12px; background: #f9fafb; border-radius: 8px; text-align: center; }
|
||||
.metric-card .metric-name { color: #6b7280; font-size: 0.75rem; text-transform: uppercase; }
|
||||
.metric-card .metric-values { margin: 6px 0; font-size: 0.85rem; }
|
||||
.metric-card .metric-diff { font-weight: bold; }
|
||||
.metric-card.up .metric-diff, .metric-card.up-big .metric-diff { color: #059669; }
|
||||
.metric-card.down .metric-diff, .metric-card.down-big .metric-diff { color: #dc2626; }
|
||||
.metric-card.eq .metric-diff { color: #9ca3af; }
|
||||
/* BaseDiff */
|
||||
.base-diff .diff-grid {
|
||||
display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px;
|
||||
}
|
||||
.metric-card {
|
||||
padding: 12px 8px;
|
||||
background: rgba(255,255,255,0.03);
|
||||
border: 1px solid rgba(255,255,255,0.06);
|
||||
border-radius: 8px;
|
||||
text-align: center;
|
||||
color: #cbd5e1;
|
||||
}
|
||||
.metric-card .metric-name {
|
||||
color: #94a3b8;
|
||||
font-size: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.metric-card .metric-values { margin: 6px 0; font-size: 0.8rem; }
|
||||
.metric-card .metric-values strong { color: #f1f5f9; }
|
||||
.metric-card .metric-diff { font-weight: 600; font-size: 0.8rem; }
|
||||
.metric-card.up .metric-diff, .metric-card.up-big .metric-diff { color: #34d399; }
|
||||
.metric-card.down .metric-diff, .metric-card.down-big .metric-diff { color: #f87171; }
|
||||
.metric-card.eq .metric-diff { color: #64748b; }
|
||||
|
||||
.activity-card .activity-list { list-style: none; padding: 0; margin: 0; }
|
||||
.activity-item { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
|
||||
.activity-item .ts { color: #9ca3af; font-size: 0.75rem; white-space: nowrap; }
|
||||
.activity-item .status.ok { color: #059669; }
|
||||
.activity-item .status.err { color: #dc2626; }
|
||||
.activity-item .detail { color: #6b7280; font-size: 0.85rem; }
|
||||
/* BaseHistory chart container */
|
||||
.base-history { background: rgba(255,255,255,0.04); }
|
||||
|
||||
/* ActivityCard — scrollable */
|
||||
.activity-card .activity-list {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
max-height: 420px;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
.activity-card .activity-list::-webkit-scrollbar { width: 6px; }
|
||||
.activity-card .activity-list::-webkit-scrollbar-thumb {
|
||||
background: rgba(255,255,255,0.15); border-radius: 3px;
|
||||
}
|
||||
.activity-item {
|
||||
display: grid;
|
||||
grid-template-columns: 24px 1fr auto;
|
||||
gap: 10px;
|
||||
padding: 10px 4px;
|
||||
border-bottom: 1px solid rgba(255,255,255,0.05);
|
||||
color: #cbd5e1;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.activity-item:last-child { border-bottom: none; }
|
||||
.activity-item .icon { font-size: 1rem; text-align: center; }
|
||||
.activity-item .body .line { color: #e2e8f0; }
|
||||
.activity-item .body strong { color: #f1f5f9; }
|
||||
.activity-item .ts {
|
||||
color: #64748b;
|
||||
font-size: 0.75rem;
|
||||
white-space: nowrap;
|
||||
align-self: center;
|
||||
}
|
||||
.activity-item .status.ok { color: #34d399; }
|
||||
.activity-item .status.err { color: #f87171; }
|
||||
.activity-item .status.pending { color: #fbbf24; }
|
||||
.activity-item .detail { color: #94a3b8; font-size: 0.78rem; margin-top: 2px; }
|
||||
|
||||
/* EvolverActions */
|
||||
.actions-card .action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||
.actions-card button { padding: 8px 14px; background: #1f2937; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
|
||||
.actions-card button {
|
||||
padding: 8px 14px;
|
||||
background: rgba(52,211,153,0.15);
|
||||
color: #34d399;
|
||||
border: 1px solid rgba(52,211,153,0.3);
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
.actions-card button:hover:not(:disabled) { background: rgba(52,211,153,0.25); }
|
||||
.actions-card button:disabled { opacity: 0.5; cursor: wait; }
|
||||
.action-output { background: #1f2937; color: #d1d5db; padding: 12px; border-radius: 6px; margin-top: 12px; max-height: 200px; overflow: auto; font-size: 0.8rem; }
|
||||
.action-output {
|
||||
background: rgba(0,0,0,0.3);
|
||||
color: #94a3b8;
|
||||
padding: 12px;
|
||||
border-radius: 6px;
|
||||
margin-top: 12px;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.trials-grid .grid { grid-template-columns: repeat(3, 1fr); height: auto; }
|
||||
.base-diff .diff-grid { grid-template-columns: repeat(2, 1fr); }
|
||||
.evolver-header { flex-direction: column; }
|
||||
.base-diff .diff-grid { grid-template-columns: repeat(3, 1fr); }
|
||||
.lotto-evolver-intro { flex-direction: column; align-items: stretch; }
|
||||
.activity-card .activity-list { max-height: 360px; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user