feat(exam9): link tasks to textbook + difficulty-ordered random + topic exclusion
Practice (random) now picks tasks by ascending difficulty so the first slot is always level 1 and the session ramps up. Adds ?exclude= to drop specific subtopics from the random pool, with a per-section checkbox modal in the UI. Each task carries a topic_ref (textbook chapter + paragraph) shown as a 'Учить тему · §N' button next to the solution, deep-linking to the right section of /textbook/<slug>. Mapping seeded for all 15 math9 subtopics in migration 028. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1054,3 +1054,84 @@
|
||||
.tc-input-row { gap: 8px; }
|
||||
.tc-ans-input { max-width: 100%; }
|
||||
}
|
||||
|
||||
/* ── "Учить тему" link inside a task card ───────────────────────── */
|
||||
.tc-sol-row {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.tc-ref-btn {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
margin-left: auto;
|
||||
padding: 6px 12px;
|
||||
border: 1.5px solid var(--violet, #7c3aed);
|
||||
border-radius: 9px;
|
||||
background: rgba(124, 58, 237, 0.08);
|
||||
color: var(--violet, #7c3aed);
|
||||
font-family: 'Manrope', sans-serif; font-size: .82rem; font-weight: 700;
|
||||
text-decoration: none;
|
||||
transition: background .15s, color .15s;
|
||||
}
|
||||
.tc-ref-btn:hover {
|
||||
background: var(--violet, #7c3aed); color: #fff;
|
||||
}
|
||||
.tc-ref-btn svg { width: 14px; height: 14px; }
|
||||
|
||||
/* ── Difficulty-progression note above the task list ─────────────── */
|
||||
.pr-difficulty-note {
|
||||
display: flex; align-items: center; gap: 8px;
|
||||
margin-top: 10px;
|
||||
padding: 8px 12px;
|
||||
background: rgba(6, 214, 160, 0.08);
|
||||
border-left: 3px solid #06D6A0;
|
||||
border-radius: 6px;
|
||||
font-size: .82rem;
|
||||
color: var(--text-2);
|
||||
}
|
||||
.pr-difficulty-note i, .pr-difficulty-note svg { width: 14px; height: 14px; flex-shrink: 0; }
|
||||
|
||||
/* ── Exclude-topics button + count badge ─────────────────────────── */
|
||||
.pr-exclude-btn {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
position: relative;
|
||||
}
|
||||
.pr-exclude-count {
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
min-width: 18px; height: 18px;
|
||||
padding: 0 5px;
|
||||
border-radius: 9px;
|
||||
background: var(--violet, #7c3aed); color: #fff;
|
||||
font-size: .7rem; font-weight: 800; line-height: 1;
|
||||
}
|
||||
|
||||
/* ── Exclude-topics modal ────────────────────────────────────────── */
|
||||
.pr-ex-form { display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; }
|
||||
.pr-ex-hint { font-size: .82rem; color: var(--text-3); margin: 0; }
|
||||
.pr-ex-section { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
|
||||
.pr-ex-section-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
font-family: 'Unbounded', sans-serif; font-size: .82rem; font-weight: 800;
|
||||
letter-spacing: .02em; color: var(--text);
|
||||
}
|
||||
.pr-ex-toggle-all {
|
||||
border: 1px solid var(--border-h); background: transparent; color: var(--text-2);
|
||||
padding: 3px 10px; border-radius: 6px;
|
||||
font-family: 'Manrope', sans-serif; font-size: .72rem; font-weight: 700;
|
||||
cursor: pointer; transition: all .12s;
|
||||
}
|
||||
.pr-ex-toggle-all:hover { border-color: var(--violet); color: var(--violet); }
|
||||
.pr-ex-items { display: flex; flex-direction: column; gap: 4px; }
|
||||
.pr-ex-item {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
padding: 6px 8px;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: .9rem;
|
||||
transition: background .12s;
|
||||
}
|
||||
.pr-ex-item:hover { background: var(--border); }
|
||||
.pr-ex-item input { accent-color: var(--violet); flex-shrink: 0; }
|
||||
.pr-ex-title { flex: 1; }
|
||||
.pr-ex-meta { font-size: .76rem; color: var(--text-3); }
|
||||
.pr-ex-empty { padding: 16px; text-align: center; color: var(--text-3); font-size: .85rem; }
|
||||
|
||||
Reference in New Issue
Block a user