diff --git a/packages/dashboard/index.html b/packages/dashboard/index.html index 1af21e4..7049ae4 100644 --- a/packages/dashboard/index.html +++ b/packages/dashboard/index.html @@ -10833,7 +10833,7 @@ function initTraining() { taRenderCategories(cats); if (cats.length > 0) taSelectCategory(cats[0].id); }).catch(function(e) { - buildDOM('ta-cat-tabs', '
Failed to load training content. Is the API running?
'); + buildDOM(el('ta-cat-tabs'), '
Failed to load training content. Is the API running?
'); }); } @@ -10853,7 +10853,7 @@ function taRenderCategories(cats) { + '' + cat.lesson_count + '' + ''; }).join(''); - buildDOM('ta-cat-tabs', html); + buildDOM(el('ta-cat-tabs'), html); } function taSelectCategory(catId) { @@ -10861,7 +10861,7 @@ function taSelectCategory(catId) { _ta.currentLesson = null; taShowView('home'); taRenderCategories(_ta.cats); - buildDOM('ta-lesson-list', '
Loading lessons…
'); + buildDOM(el('ta-lesson-list'), '
Loading lessons…
'); var quizBar = document.getElementById('ta-cat-quiz-bar'); if (quizBar) quizBar.style.display = 'none'; fetch('/api/training/lessons?category=' + catId).then(function(r) { return r.json(); }).then(function(lessons) { @@ -10879,13 +10879,13 @@ function taSelectCategory(catId) { if (meta) meta.textContent = cat.quiz_count + ' questions · all lessons in this category'; } }).catch(function() { - buildDOM('ta-lesson-list', '
Error loading lessons.
'); + buildDOM(el('ta-lesson-list'), '
Error loading lessons.
'); }); } function taRenderLessons(lessons, catId) { if (!lessons.length) { - buildDOM('ta-lesson-list', '
No lessons found.
'); + buildDOM(el('ta-lesson-list'), '
No lessons found.
'); return; } var progress = taGetProgress(); @@ -10920,14 +10920,14 @@ function taRenderLessons(lessons, catId) { + '
' + ''; }).join(''); - buildDOM('ta-lesson-list', html); + buildDOM(el('ta-lesson-list'), html); } // ── Lesson viewer ───────────────────────────────────────────────────────────── function taOpenLesson(lessonId, idx) { _ta.currentLessonIdx = idx; taShowView('lesson'); - buildDOM('ta-lesson-content', '
Loading lesson…
'); + buildDOM(el('ta-lesson-content'), '
Loading lesson…
'); fetch('/api/training/lessons/' + lessonId).then(function(r) { return r.json(); }).then(function(lesson) { _ta.currentLesson = lesson; taRenderLessonContent(lesson); @@ -10951,7 +10951,7 @@ function taOpenLesson(lessonId, idx) { completeBtn.textContent = done ? '✓ Completed' : '✓ Mark Complete'; } }).catch(function() { - buildDOM('ta-lesson-content', '
Failed to load lesson content.
'); + buildDOM(el('ta-lesson-content'), '
Failed to load lesson content.
'); }); } @@ -10968,7 +10968,7 @@ function taRenderLessonContent(lesson) { }); html += ''; }); - buildDOM('ta-lesson-content', html); + buildDOM(el('ta-lesson-content'), html); } function taRenderBlock(block, lang) { @@ -11071,12 +11071,12 @@ function taStartCategoryQuiz() { function taFetchAndShowQuiz(url, title) { taShowView('quiz'); - buildDOM('ta-quiz-content', '
Loading quiz…
'); + buildDOM(el('ta-quiz-content'), '
Loading quiz…
'); var titleEl = document.getElementById('ta-quiz-title'); if (titleEl) titleEl.textContent = title; fetch(url).then(function(r) { return r.json(); }).then(function(questions) { if (!questions.length) { - buildDOM('ta-quiz-content', '
No quiz questions available for this selection.
'); + buildDOM(el('ta-quiz-content'), '
No quiz questions available for this selection.
'); return; } // Shuffle questions, cap at 20 @@ -11086,7 +11086,7 @@ function taFetchAndShowQuiz(url, title) { _ta.quizSubmitted = false; taShowQuizQuestion(0); }).catch(function() { - buildDOM('ta-quiz-content', '
Failed to load quiz questions.
'); + buildDOM(el('ta-quiz-content'), '
Failed to load quiz questions.
'); }); } @@ -11170,7 +11170,7 @@ function taShowQuizQuestion(idx) { }); html += ''; - buildDOM('ta-quiz-content', html); + buildDOM(el('ta-quiz-content'), html); } function taAnswerQuestion(qIdx, optIdx) { @@ -11232,7 +11232,7 @@ function taShowQuizResult() { html += ''; } - buildDOM('ta-quiz-content', html); + buildDOM(el('ta-quiz-content'), html); var progressEl = document.getElementById('ta-quiz-progress'); if (progressEl) progressEl.textContent = ''; var titleEl = document.getElementById('ta-quiz-title');