feat(lessons): implement comprehensive lesson configurator, session runner and AI debrief (Beta)
This commit is contained in:
1 parent
31e105b2c2
commit
718e9797eb
12 files changed
+4093
-1
No files matched your search
@@ -7229,4 +7229,958 @@ body.drawer-open {
|
||||
}
|
||||
}
|
||||
|
||||
/* =======================================================================
|
||||
Comprehensive Lesson Configurator & Session Runner (Beta)
|
||||
======================================================================= */
|
||||
|
||||
.lesson-view, .lesson-runner-view {
|
||||
padding: 24px 20px;
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.lesson-configurator-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.lesson-header-bar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
|
||||
.lesson-title-wrap h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
margin: 0 0 6px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.lesson-subtitle {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.badge-beta {
|
||||
background: linear-gradient(135deg, #8b5cf6, #3b82f6);
|
||||
color: #fff;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
padding: 2px 8px;
|
||||
border-radius: 999px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.badge-ai {
|
||||
background: rgba(139, 92, 246, 0.15);
|
||||
color: #8b5cf6;
|
||||
border: 1px solid rgba(139, 92, 246, 0.35);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
padding: 4px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
}
|
||||
|
||||
.lesson-header-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.pulse-btn {
|
||||
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
|
||||
animation: btnPulse 2s infinite;
|
||||
}
|
||||
|
||||
@keyframes btnPulse {
|
||||
0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
|
||||
70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
|
||||
100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
|
||||
}
|
||||
|
||||
/* Presets Chips Bar */
|
||||
.lesson-presets-section {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 16px 20px;
|
||||
}
|
||||
|
||||
.presets-section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 12px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.lesson-presets-chips-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 4px;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.lesson-preset-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 9px 16px;
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 999px;
|
||||
font-size: 13.5px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.lesson-preset-chip:hover {
|
||||
border-color: var(--primary);
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.lesson-preset-chip.active {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
.preset-del-btn {
|
||||
margin-left: 6px;
|
||||
opacity: 0.7;
|
||||
font-size: 12px;
|
||||
border-radius: 50%;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
.preset-del-btn:hover {
|
||||
opacity: 1;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.preset-description-text {
|
||||
font-size: 13px;
|
||||
margin: 8px 0 0 0;
|
||||
}
|
||||
|
||||
/* Blocks List & Cards */
|
||||
.blocks-section-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: baseline;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.blocks-section-header h3 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.blocks-tip {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.lesson-steps-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.lesson-step-card {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 16px 18px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.lesson-step-card:hover {
|
||||
border-color: rgba(59, 130, 246, 0.4);
|
||||
}
|
||||
|
||||
.lesson-step-card.step-disabled {
|
||||
opacity: 0.55;
|
||||
background: var(--bg-main);
|
||||
}
|
||||
|
||||
.step-card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.step-card-title-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.step-num {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.step-icon {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.step-title {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.step-card-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* Switch Toggle */
|
||||
.switch-toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.switch-toggle input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.toggle-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
background-color: var(--border-color);
|
||||
transition: .2s;
|
||||
border-radius: 24px;
|
||||
}
|
||||
|
||||
.toggle-slider:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background-color: white;
|
||||
transition: .2s;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked + .toggle-slider {
|
||||
background-color: var(--success);
|
||||
}
|
||||
|
||||
input:checked + .toggle-slider:before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
/* Step Card Body & Params */
|
||||
.step-card-body {
|
||||
margin-top: 14px;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.step-param-row {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.param-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.param-group label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.param-group.flex-2 {
|
||||
flex: 2;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.segmented-control {
|
||||
display: inline-flex;
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 2px;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
.seg-btn {
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 6px 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--text-muted);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.seg-btn:hover {
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.seg-btn.active {
|
||||
background: var(--primary);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ai-debrief-info-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
background: rgba(139, 92, 246, 0.08);
|
||||
border: 1px dashed rgba(139, 92, 246, 0.3);
|
||||
padding: 12px 16px;
|
||||
border-radius: var(--radius-md);
|
||||
font-size: 13.5px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.ai-box-icon {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.lesson-bottom-cta {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
.btn-xl {
|
||||
padding: 14px 24px;
|
||||
font-size: 17px;
|
||||
font-weight: 800;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
/* =======================================================================
|
||||
Lesson Session Runner Stage
|
||||
======================================================================= */
|
||||
|
||||
.lesson-runner-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
padding: 14px 0;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.runner-nav-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.runner-timer-wrap {
|
||||
font-family: var(--font-mono, monospace);
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text-main);
|
||||
background: var(--bg-card);
|
||||
padding: 4px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.runner-breadcrumbs-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
overflow-x: auto;
|
||||
max-width: 550px;
|
||||
padding: 4px 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.runner-crumb {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.crumb-num {
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.runner-crumb.step-done {
|
||||
background: rgba(34, 197, 94, 0.15);
|
||||
border-color: rgba(34, 197, 94, 0.4);
|
||||
color: var(--success);
|
||||
}
|
||||
|
||||
.runner-crumb.step-active {
|
||||
background: var(--primary);
|
||||
border-color: var(--primary);
|
||||
color: #fff;
|
||||
box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
|
||||
}
|
||||
|
||||
.crumb-separator {
|
||||
color: var(--text-dim);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.lesson-runner-progress-track {
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background: var(--bg-hover);
|
||||
overflow: hidden;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.lesson-runner-progress-fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, #3b82f6, #8b5cf6);
|
||||
transition: width 0.3s ease;
|
||||
}
|
||||
|
||||
.step-card-box {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-lg);
|
||||
padding: 28px 24px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
|
||||
max-width: 760px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.step-mini-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 18px;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.step-term-display {
|
||||
text-align: center;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.display-term {
|
||||
font-size: 36px;
|
||||
font-weight: 800;
|
||||
margin: 0 0 6px 0;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.display-phonetic {
|
||||
font-size: 18px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.step-context-box {
|
||||
background: var(--bg-main);
|
||||
border-left: 3px solid var(--primary);
|
||||
padding: 12px 16px;
|
||||
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.translation-reveal-banner {
|
||||
background: rgba(59, 130, 246, 0.1);
|
||||
border: 1px solid rgba(59, 130, 246, 0.3);
|
||||
padding: 14px 18px;
|
||||
border-radius: var(--radius-md);
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
.rating-buttons-row {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.srs-btn-rating {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 12px 6px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.rating-key {
|
||||
font-size: 11px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.rating-label {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* Grammar Questions Stage */
|
||||
.grammar-question-box {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 20px 18px;
|
||||
}
|
||||
|
||||
.grammar-sentence-prompt {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
line-height: 1.5;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.clue-tag {
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.grammar-options-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.grammar-opt-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 14px 18px;
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
transition: all 0.15s ease;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.grammar-opt-btn:hover:not(:disabled) {
|
||||
border-color: var(--primary);
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.grammar-opt-btn.opt-correct {
|
||||
background: rgba(34, 197, 94, 0.18) !important;
|
||||
border-color: var(--success) !important;
|
||||
color: var(--success) !important;
|
||||
}
|
||||
|
||||
.grammar-opt-btn.opt-wrong {
|
||||
background: rgba(239, 68, 68, 0.18) !important;
|
||||
border-color: var(--danger) !important;
|
||||
color: var(--danger) !important;
|
||||
}
|
||||
|
||||
.opt-key {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.feedback-banner {
|
||||
padding: 16px 18px;
|
||||
border-radius: var(--radius-md);
|
||||
}
|
||||
|
||||
.feedback-banner.fb-success {
|
||||
background: rgba(34, 197, 94, 0.12);
|
||||
border: 1px solid rgba(34, 197, 94, 0.35);
|
||||
}
|
||||
|
||||
.feedback-banner.fb-danger {
|
||||
background: rgba(239, 68, 68, 0.12);
|
||||
border: 1px solid rgba(239, 68, 68, 0.35);
|
||||
}
|
||||
|
||||
.fb-title {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.fb-text {
|
||||
font-size: 14px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/* Audio Player Card */
|
||||
.audio-player-card {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.audio-controls-row {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.answer-input-group {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.transcript-box {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 12px 14px;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
/* Reading Article Interactive */
|
||||
.article-paragraph-card {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 16px 18px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.article-para-en {
|
||||
font-size: 17px;
|
||||
line-height: 1.7;
|
||||
margin: 0 0 10px 0;
|
||||
}
|
||||
|
||||
.clickable-reader-word {
|
||||
cursor: pointer;
|
||||
border-radius: 3px;
|
||||
padding: 1px 2px;
|
||||
transition: background 0.15s;
|
||||
}
|
||||
|
||||
.clickable-reader-word:hover {
|
||||
background: rgba(59, 130, 246, 0.25);
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.article-para-ru {
|
||||
font-size: 14px;
|
||||
color: var(--text-muted);
|
||||
border-top: 1px dashed var(--border-color);
|
||||
padding-top: 8px;
|
||||
margin: 8px 0 0 0;
|
||||
}
|
||||
|
||||
.vocab-highlights-bar {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.highlights-title {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.highlights-chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.vh-chip {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
padding: 4px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
/* Word Popup in Lesson */
|
||||
.lesson-popup {
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
width: 250px;
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 12px 14px;
|
||||
box-shadow: 0 8px 30px rgba(0,0,0,0.18);
|
||||
animation: fadeIn 0.15s ease-out;
|
||||
}
|
||||
|
||||
.popup-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.popup-close-btn {
|
||||
border: none;
|
||||
background: transparent;
|
||||
cursor: pointer;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.popup-trans {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: var(--text-main);
|
||||
}
|
||||
|
||||
/* Debrief Final Card */
|
||||
.lesson-debrief-card {
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
.debrief-banner-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
padding-bottom: 20px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.grade-badge-wrap {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
background: var(--bg-main);
|
||||
border: 3px solid var(--primary);
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.grade-badge {
|
||||
font-size: 32px;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
color: var(--primary);
|
||||
}
|
||||
|
||||
.score-pct {
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.debrief-titles {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.debrief-headline {
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.blocks-scores-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.block-score-item {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 10px 12px;
|
||||
}
|
||||
|
||||
.bs-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.bs-bar {
|
||||
width: 100%;
|
||||
height: 6px;
|
||||
background: var(--bg-card);
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bs-bar-fill {
|
||||
height: 100%;
|
||||
background: var(--success);
|
||||
}
|
||||
|
||||
.debrief-list, .tomorrow-focus-list {
|
||||
margin: 8px 0 0 0;
|
||||
padding-left: 20px;
|
||||
font-size: 14.5px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.tomorrow-focus-list {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.tomorrow-focus-list li {
|
||||
padding: 6px 10px;
|
||||
background: var(--bg-main);
|
||||
border-left: 3px solid var(--primary);
|
||||
margin-bottom: 6px;
|
||||
border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
|
||||
}
|
||||
|
||||
.error-cards-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.error-analysis-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
background: rgba(234, 179, 8, 0.1);
|
||||
border: 1px solid rgba(234, 179, 8, 0.3);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 12px 14px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.celebrate-badge {
|
||||
font-size: 48px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.step-completed-box h3 {
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.score-highlight {
|
||||
font-size: 16px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* History Modal items */
|
||||
.lesson-history-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
max-height: 65vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.lesson-history-item {
|
||||
background: var(--bg-main);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: var(--radius-md);
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.lh-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.lh-date {
|
||||
font-size: 12px;
|
||||
color: var(--text-muted);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.lh-stats {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
font-size: 13px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.lh-headline {
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
color: var(--text-dim);
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.grammar-options-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.rating-buttons-row {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
.step-card-box {
|
||||
padding: 18px 14px;
|
||||
}
|
||||
.display-term {
|
||||
font-size: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1052,6 +1052,97 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- VIEW 6: Comprehensive Lesson Configurator (Beta) -->
|
||||
<section id="lesson-view" class="lesson-view hidden">
|
||||
<div class="lesson-configurator-container">
|
||||
<!-- Header with Title & Action -->
|
||||
<div class="lesson-header-bar">
|
||||
<div class="lesson-title-wrap">
|
||||
<h2>🚀 Конструктор комплексного урока <span class="badge badge-beta">Beta</span></h2>
|
||||
<p class="lesson-subtitle text-muted">Соберите персональный ежедневный воркфлоу или запустите готовый шаблон</p>
|
||||
</div>
|
||||
<div class="lesson-header-actions">
|
||||
<button id="lesson-history-btn" class="btn btn-outline" title="История пройденных уроков">
|
||||
📜 История уроков
|
||||
</button>
|
||||
<button id="lesson-save-preset-btn" class="btn btn-secondary" title="Сохранить текущую настройку в мои шаблоны">
|
||||
💾 Сохранить шаблон
|
||||
</button>
|
||||
<button id="lesson-start-btn" class="btn btn-primary btn-lg pulse-btn">
|
||||
🚀 Начать урок (<span id="lesson-preset-duration">~15 мин</span>)
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Presets Carousel / Bar -->
|
||||
<div class="lesson-presets-section mt-3">
|
||||
<div class="presets-section-title">
|
||||
<span>🎯 Готовые шаблоны уроков:</span>
|
||||
</div>
|
||||
<div id="lesson-presets-bar" class="lesson-presets-chips-row">
|
||||
<!-- Loaded dynamically -->
|
||||
</div>
|
||||
<p id="lesson-preset-desc" class="preset-description-text text-muted mt-2"></p>
|
||||
</div>
|
||||
|
||||
<!-- Steps List (Configurable Blocks) -->
|
||||
<div class="lesson-blocks-section mt-4">
|
||||
<div class="blocks-section-header">
|
||||
<h3>🧩 Блоки вашего урока:</h3>
|
||||
<span class="blocks-tip text-muted">Тасуйте порядок стрелками ▲/▼, меняйте объём и включайте нужные блоки</span>
|
||||
</div>
|
||||
<div id="lesson-steps-list" class="lesson-steps-list mt-3">
|
||||
<!-- Rendered by lesson.js -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Bottom Floating Start CTA -->
|
||||
<div class="lesson-bottom-cta mt-4">
|
||||
<button id="lesson-start-btn-bottom" class="btn btn-primary btn-xl w-100" onclick="document.getElementById('lesson-start-btn').click()">
|
||||
🚀 Начать комплексный урок сейчас
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- VIEW 7: Active Lesson Session Runner -->
|
||||
<section id="lesson-runner-view" class="lesson-runner-view hidden">
|
||||
<!-- Top Sticky Control Bar -->
|
||||
<header class="lesson-runner-header">
|
||||
<div class="runner-nav-left">
|
||||
<button id="lesson-runner-exit-btn" class="btn btn-sm btn-outline">✕ Выйти из урока</button>
|
||||
<div class="runner-timer-wrap">
|
||||
⏱️ <span id="lesson-runner-timer" class="runner-timer-val">00:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="runner-nav-center">
|
||||
<div id="lesson-runner-breadcrumbs" class="runner-breadcrumbs-row">
|
||||
<!-- Filled by lesson.js -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="runner-nav-right">
|
||||
<button id="lesson-next-step-btn" class="btn btn-sm btn-ghost">
|
||||
Пропустить этап ⏭️
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<!-- Runner Progress Bar -->
|
||||
<div class="lesson-runner-progress-track">
|
||||
<div id="lesson-runner-progress-fill" class="lesson-runner-progress-fill" style="width: 0%;"></div>
|
||||
</div>
|
||||
|
||||
<!-- Dynamic Step Content Stage -->
|
||||
<main class="lesson-runner-main">
|
||||
<div id="lesson-step-content" class="lesson-step-content-container">
|
||||
<!-- Injected dynamically by step runners -->
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
|
||||
<!-- Sticky Bulk Action Bar for Batch Selection Mode -->
|
||||
<div id="batch-action-bar" class="batch-action-bar hidden">
|
||||
<div class="batch-left">
|
||||
@@ -1155,6 +1246,13 @@
|
||||
<span class="drawer-item-label">Грамматика Мерфи & Тетрадь</span>
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="drawer-nav-item" data-hash="#lesson" id="drawer-nav-lesson">
|
||||
<span class="drawer-item-icon">🚀</span>
|
||||
<span class="drawer-item-label">Комплексный урок</span>
|
||||
<span class="drawer-badge badge-beta">Beta</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- Section 2: Analytics & Progress -->
|
||||
@@ -1585,6 +1683,21 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Lesson History Modal -->
|
||||
<div id="lesson-history-modal" class="modal-backdrop hidden">
|
||||
<div class="modal-window modal-lg lesson-history-modal-window">
|
||||
<div class="modal-header">
|
||||
<h3>📜 История комплексных уроков</h3>
|
||||
<button id="lesson-history-close-btn" class="icon-btn" title="Закрыть">✕</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="lesson-history-list" class="lesson-history-list">
|
||||
<!-- Populated dynamically by lesson.js -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Move Collection Modal -->
|
||||
<div id="move-col-modal" class="modal-backdrop hidden">
|
||||
<div class="modal-window modal-sm">
|
||||
|
||||
@@ -10,6 +10,7 @@ import { initSrs, startSrsTrainingSession, openStatsDashboard } from './modules/
|
||||
import { initReader, loadBookshelf, openBook } from './modules/reader.js';
|
||||
import { initCefr, loadCefrOverview, startCefrQuiz } from './modules/cefr.js';
|
||||
import { initGrammar, loadGrammarUnits, openGrammarUnit } from './modules/grammar.js';
|
||||
import { initLessonModule, openLessonConfigurator } from './modules/lesson.js';
|
||||
|
||||
let currentUser = null;
|
||||
let isRouting = false;
|
||||
@@ -44,6 +45,7 @@ export function updateActiveNavState(viewName) {
|
||||
'reader': 'drawer-nav-reader',
|
||||
'cefr': 'drawer-nav-cefr',
|
||||
'grammar': 'drawer-nav-grammar',
|
||||
'lesson': 'drawer-nav-lesson',
|
||||
};
|
||||
const targetId = drawerMap[viewName];
|
||||
if (targetId) {
|
||||
@@ -73,6 +75,8 @@ export function applyInitialViewPreflight() {
|
||||
hash = '#cefr';
|
||||
} else if (lastView === 'grammar-view') {
|
||||
hash = '#grammar';
|
||||
} else if (lastView === 'lesson-view') {
|
||||
hash = '#lesson';
|
||||
}
|
||||
} catch (e) {}
|
||||
}
|
||||
@@ -82,6 +86,8 @@ export function applyInitialViewPreflight() {
|
||||
const readerView = document.getElementById('reader-view');
|
||||
const cefrView = document.getElementById('cefr-view');
|
||||
const grammarView = document.getElementById('grammar-view');
|
||||
const lessonView = document.getElementById('lesson-view');
|
||||
const lessonRunnerView = document.getElementById('lesson-runner-view');
|
||||
const bookshelfContainer = document.getElementById('bookshelf-container');
|
||||
const readerInterface = document.getElementById('reader-interface');
|
||||
const readerBookTitle = document.getElementById('reader-book-title');
|
||||
@@ -91,6 +97,8 @@ export function applyInitialViewPreflight() {
|
||||
if (srsView) srsView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (readerView) readerView.classList.remove('hidden');
|
||||
updateActiveNavState('reader');
|
||||
if (hash.includes('/book/')) {
|
||||
@@ -103,6 +111,8 @@ export function applyInitialViewPreflight() {
|
||||
if (readerView) readerView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (srsView) srsView.classList.remove('hidden');
|
||||
updateActiveNavState('srs');
|
||||
} else if (hash.startsWith('#cefr')) {
|
||||
@@ -110,6 +120,8 @@ export function applyInitialViewPreflight() {
|
||||
if (readerView) readerView.classList.add('hidden');
|
||||
if (srsView) srsView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.remove('hidden');
|
||||
updateActiveNavState('cefr');
|
||||
} else if (hash.startsWith('#grammar')) {
|
||||
@@ -117,8 +129,19 @@ export function applyInitialViewPreflight() {
|
||||
if (readerView) readerView.classList.add('hidden');
|
||||
if (srsView) srsView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.remove('hidden');
|
||||
updateActiveNavState('grammar');
|
||||
} else if (hash.startsWith('#lesson')) {
|
||||
if (dictionaryView) dictionaryView.classList.add('hidden');
|
||||
if (readerView) readerView.classList.add('hidden');
|
||||
if (srsView) srsView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.remove('hidden');
|
||||
updateActiveNavState('lesson');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,6 +294,36 @@ export function openGrammarView(unitId = null, updateHash = true) {
|
||||
}
|
||||
}
|
||||
|
||||
export function openLessonView(presetId = null, updateHash = true) {
|
||||
const targetHash = presetId ? `#lesson/${presetId}` : '#lesson';
|
||||
if (updateHash && !window.location.hash.startsWith('#lesson')) {
|
||||
window.location.hash = targetHash;
|
||||
return;
|
||||
}
|
||||
|
||||
const dictionaryView = document.getElementById('dictionary-view');
|
||||
const srsView = document.getElementById('srs-view');
|
||||
const readerView = document.getElementById('reader-view');
|
||||
const cefrView = document.getElementById('cefr-view');
|
||||
const grammarView = document.getElementById('grammar-view');
|
||||
const lessonView = document.getElementById('lesson-view');
|
||||
const lessonRunnerView = document.getElementById('lesson-runner-view');
|
||||
|
||||
if (dictionaryView) dictionaryView.classList.add('hidden');
|
||||
if (srsView) srsView.classList.add('hidden');
|
||||
if (readerView) readerView.classList.add('hidden');
|
||||
if (cefrView) cefrView.classList.add('hidden');
|
||||
if (grammarView) grammarView.classList.add('hidden');
|
||||
if (lessonRunnerView) lessonRunnerView.classList.add('hidden');
|
||||
if (lessonView) lessonView.classList.remove('hidden');
|
||||
|
||||
updateActiveNavState('lesson');
|
||||
try { localStorage.setItem('notes_active_view', 'lesson-view'); } catch (e) {}
|
||||
|
||||
openLessonConfigurator(presetId);
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
// Route Handler
|
||||
// -----------------------------------------------------------------------
|
||||
@@ -337,6 +390,10 @@ export async function handleRouting() {
|
||||
} else {
|
||||
openBookshelfView(false);
|
||||
}
|
||||
} else if (cleanHash.startsWith('lesson')) {
|
||||
const parts = cleanHash.split('/');
|
||||
const presetId = parts[1] || null;
|
||||
openLessonView(presetId, false);
|
||||
} else {
|
||||
openDictionaryView(false);
|
||||
}
|
||||
@@ -523,6 +580,13 @@ export function initNavigationDrawer() {
|
||||
window.location.hash = '#grammar';
|
||||
});
|
||||
}
|
||||
const drawerNavLesson = document.getElementById('drawer-nav-lesson');
|
||||
if (drawerNavLesson) {
|
||||
drawerNavLesson.addEventListener('click', () => {
|
||||
closeDrawer();
|
||||
window.location.hash = '#lesson';
|
||||
});
|
||||
}
|
||||
if (drawerNavStats) {
|
||||
drawerNavStats.addEventListener('click', () => {
|
||||
closeDrawer();
|
||||
@@ -721,6 +785,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
initReader();
|
||||
initCefr();
|
||||
initGrammar();
|
||||
initLessonModule();
|
||||
|
||||
// 5. Global Navigation & Header Actions
|
||||
const navBrandHome = document.getElementById('nav-brand-home');
|
||||
|
||||
@@ -422,5 +422,57 @@ export const api = {
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to cancel task: ${resp.status}`);
|
||||
}
|
||||
},
|
||||
|
||||
// Comprehensive Lessons Configurator & Runner (Beta)
|
||||
lessons: {
|
||||
async getPresets() {
|
||||
const resp = await fetch('/api/lessons/presets');
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to get presets: ${resp.status}`);
|
||||
},
|
||||
async savePreset(payload) {
|
||||
const resp = await fetch('/api/lessons/presets', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to save preset: ${resp.status}`);
|
||||
},
|
||||
async deletePreset(presetId) {
|
||||
const resp = await fetch(`/api/lessons/presets/${presetId}`, {
|
||||
method: 'DELETE'
|
||||
});
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to delete preset: ${resp.status}`);
|
||||
},
|
||||
async getGrammarRecommendations() {
|
||||
const resp = await fetch('/api/lessons/grammar-recommendations');
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to get grammar recommendations: ${resp.status}`);
|
||||
},
|
||||
async getArticles(topic = null) {
|
||||
let url = '/api/lessons/articles';
|
||||
if (topic) url += `?topic=${encodeURIComponent(topic)}`;
|
||||
const resp = await fetch(url);
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to get articles: ${resp.status}`);
|
||||
},
|
||||
async submitDebrief(payload) {
|
||||
const resp = await fetch('/api/lessons/debrief', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify(payload)
|
||||
});
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to submit debrief: ${resp.status}`);
|
||||
},
|
||||
async getHistory(limit = 15) {
|
||||
const resp = await fetch(`/api/lessons/history?limit=${limit}`);
|
||||
if (resp.ok) return await resp.json();
|
||||
throw new Error(`Failed to get lesson history: ${resp.status}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user