feat(trainer): add GitHub activity heatmap, 4-option quiz mode, active typing, and duplicate checks

This commit is contained in:
Antigravity committed 2026-09-23 10:02:29 +00:00
1 parent d31c77fdd0
commit 2294121777
16 files changed
+4318 -685

No files matched your search

+385
View File
@@ -1905,6 +1905,382 @@ body {
justify-content: center;
}
/* Duplicate Warning Banner */
.duplicate-warning-box {
margin-top: 10px;
padding: 10px 14px;
background: rgba(234, 179, 8, 0.12);
border: 1px solid rgba(234, 179, 8, 0.35);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
animation: fadeIn 0.2s ease-in-out;
}
.dup-left {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #facc15;
}
.dup-icon {
font-size: 16px;
}
/* Multiple Choice Quiz Mode */
.quiz-card {
max-width: 680px;
margin: 0 auto;
}
.quiz-hero {
text-align: center;
padding: 20px 0 16px 0;
border-bottom: 1px solid var(--border-color);
margin-bottom: 20px;
}
.quiz-prompt-row {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
}
.quiz-term-display {
font-size: 32px;
font-weight: 800;
color: var(--text-main);
letter-spacing: -0.02em;
}
.quiz-context-hint {
margin-top: 8px;
font-size: 14px;
color: var(--text-muted);
font-style: italic;
}
.quiz-options-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 14px;
margin-bottom: 16px;
}
.quiz-option-btn {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 18px;
background: var(--bg-main);
border: 2px solid var(--border-color);
border-radius: var(--radius-md);
color: var(--text-main);
font-size: 15px;
font-weight: 600;
text-align: left;
cursor: pointer;
transition: all 0.15s ease;
user-select: none;
}
.quiz-option-btn:hover:not(:disabled) {
border-color: var(--primary);
background: var(--bg-surface-hover);
transform: translateY(-1px);
}
.quiz-option-btn:disabled {
cursor: default;
}
.quiz-opt-num {
width: 26px;
height: 26px;
border-radius: 50%;
background: var(--bg-surface);
border: 1px solid var(--border-color);
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 700;
color: var(--text-muted);
flex-shrink: 0;
}
.quiz-opt-text {
flex: 1;
line-height: 1.35;
}
.quiz-option-btn.opt-correct {
background: rgba(34, 197, 94, 0.15) !important;
border-color: var(--success) !important;
color: var(--success) !important;
}
.quiz-option-btn.opt-correct .quiz-opt-num {
background: var(--success);
color: #ffffff;
border-color: var(--success);
}
.quiz-option-btn.opt-wrong {
background: rgba(239, 68, 68, 0.15) !important;
border-color: var(--danger) !important;
color: var(--danger) !important;
animation: shake 0.3s ease;
}
.quiz-option-btn.opt-wrong .quiz-opt-num {
background: var(--danger);
color: #ffffff;
border-color: var(--danger);
}
.quiz-next-bar {
margin-top: 16px;
}
/* Active Typing Mode */
.typing-hero {
text-align: center;
padding: 16px 0 20px 0;
}
.typing-prompt-ru {
font-size: 28px;
font-weight: 800;
color: var(--primary);
margin: 8px 0;
}
.typing-context-hint {
font-size: 14px;
color: var(--text-muted);
font-style: italic;
background: var(--bg-main);
padding: 8px 12px;
border-radius: var(--radius-sm);
display: inline-block;
max-width: 90%;
margin-top: 4px;
}
/* Analytics & Activity Heatmap Modal */
.stats-modal-window {
max-width: 820px;
width: 95%;
}
.stats-hero-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
margin-bottom: 24px;
}
.stat-kpi-card {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 14px 12px;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
}
.streak-kpi {
border-color: rgba(249, 115, 22, 0.4);
background: rgba(249, 115, 22, 0.05);
}
.kpi-icon {
font-size: 24px;
}
.kpi-value {
font-size: 26px;
font-weight: 800;
line-height: 1.1;
}
.kpi-label {
font-size: 12px;
font-weight: 600;
color: var(--text-muted);
}
.kpi-sub {
font-size: 11px;
color: var(--text-dim);
}
.text-accent {
color: #38bdf8;
}
/* GitHub Heatmap Section */
.heatmap-section {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px;
margin-bottom: 20px;
}
.heatmap-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 14px;
flex-wrap: wrap;
gap: 8px;
}
.heatmap-header h4 {
font-size: 15px;
font-weight: 700;
}
.heatmap-legend {
display: flex;
align-items: center;
gap: 5px;
font-size: 11px;
color: var(--text-dim);
}
.legend-cell {
width: 12px;
height: 12px;
border-radius: 2px;
display: inline-block;
}
.heatmap-container-wrap {
overflow-x: auto;
padding-bottom: 6px;
}
.heatmap-grid {
display: grid;
grid-auto-flow: column;
grid-template-rows: repeat(7, 12px);
gap: 4px;
min-width: 600px;
}
.heatmap-cell {
width: 12px;
height: 12px;
border-radius: 2px;
background: rgba(255, 255, 255, 0.05);
cursor: pointer;
transition: transform 0.1s ease;
position: relative;
}
.heatmap-cell:hover {
transform: scale(1.3);
z-index: 10;
outline: 1px solid var(--text-main);
}
/* Heatmap Levels (GitHub-style intensity) */
.lvl-0 { background: rgba(255, 255, 255, 0.06); }
.lvl-1 { background: #166534; } /* 1 review: soft green */
.lvl-2 { background: #22c55e; } /* 2-3 reviews: vibrant green */
.lvl-3 { background: #4ade80; } /* 4+ reviews: bright intense green */
[data-theme="light"] .lvl-0 { background: #e2e8f0; }
[data-theme="light"] .lvl-1 { background: #86efac; }
[data-theme="light"] .lvl-2 { background: #22c55e; }
[data-theme="light"] .lvl-3 { background: #15803d; }
.heatmap-footer-note {
margin-top: 10px;
color: var(--text-dim);
font-size: 11px;
}
/* Segmented Mastery Progress Bar */
.mastery-section {
background: var(--bg-main);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 16px;
}
.mastery-section h4 {
font-size: 15px;
font-weight: 700;
margin-bottom: 12px;
}
.segmented-progress-bar {
display: flex;
height: 14px;
background: var(--bg-surface);
border-radius: var(--radius-full);
overflow: hidden;
margin-bottom: 12px;
border: 1px solid var(--border-color);
}
.prog-segment {
height: 100%;
transition: width 0.3s ease;
}
.seg-mastered { background: #22c55e; }
.seg-review { background: #38bdf8; }
.seg-learning { background: #f59e0b; }
.seg-new { background: #64748b; }
.mastery-legend-row {
display: flex;
gap: 16px;
flex-wrap: wrap;
font-size: 12px;
}
.m-legend-item {
display: flex;
align-items: center;
gap: 6px;
color: var(--text-muted);
}
.dot {
width: 8px;
height: 8px;
border-radius: 50%;
display: inline-block;
}
.dot-mastered { background: #22c55e; }
.dot-review { background: #38bdf8; }
.dot-learning { background: #f59e0b; }
.dot-new { background: #64748b; }
.dot-leech { background: #ef4444; }
.text-danger { color: #ef4444; }
@keyframes shake {
0%, 100% { transform: translateX(0); }
25% { transform: translateX(-4px); }
75% { transform: translateX(4px); }
}
/* Responsive */
@media (max-width: 640px) {
.navbar {
@@ -1939,12 +2315,14 @@ body {
min-width: 0;
width: 100%;
}
.fc-flip-btn-wrap {
display: block;
}
.srs-topbar {
padding: 10px 12px;
flex-direction: column;
align-items: stretch;
gap: 8px;
}
.srs-topbar-left, .srs-topbar-right {
justify-content: space-between;
@@ -1955,6 +2333,12 @@ body {
.srs-rating-bar {
grid-template-columns: 1fr 1fr;
}
.quiz-options-grid {
grid-template-columns: 1fr;
}
.stats-hero-grid {
grid-template-columns: 1fr 1fr;
}
.export-grid {
grid-template-columns: 1fr;
}
@@ -1972,3 +2356,4 @@ body {
}
}