Skip to content

Commit 5adcc31

Browse files
Copilotcbremer
andcommitted
Fix code review: dynamic progress label, CSS classes instead of inline styles
Co-authored-by: cbremer <4009517+cbremer@users.noreply.github.com>
1 parent 1910d7b commit 5adcc31

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h1>Git &amp; GitHub Basics</h1>
1616
<p class="hero-subtitle">A quick, interactive guide for TPMs — no engineering degree required!</p>
1717
<div class="progress-bar-container" aria-label="Course progress">
1818
<div class="progress-bar" id="progressBar"></div>
19-
<span class="progress-label" id="progressLabel">0 / 6 topics completed</span>
19+
<span class="progress-label" id="progressLabel"></span>
2020
</div>
2121
</div>
2222
</header>

script.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function showRepoDetail(key) {
7272
if (!box) return;
7373
const d = repoDetails[key];
7474
if (!d) return;
75-
box.innerHTML = `<strong>${d.title}</strong><br/><span style="color:var(--muted)">${d.text}</span>`;
75+
box.innerHTML = `<strong>${d.title}</strong><br/><span class="text-muted">${d.text}</span>`;
7676
}
7777

7878
// ── Commit part highlight ──
@@ -135,7 +135,7 @@ function explainWorkflow(step) {
135135
const d = workflowExplanations[step];
136136
const box = document.getElementById('workflowDetail');
137137
if (box && d) {
138-
box.innerHTML = `<strong>${d.icon} Step ${step}: ${d.title}</strong><br/><span style="color:var(--muted)">${d.text}</span>`;
138+
box.innerHTML = `<strong>${d.icon} Step ${step}: ${d.title}</strong><br/><span class="text-muted">${d.text}</span>`;
139139
}
140140
}
141141

@@ -280,11 +280,11 @@ function showQuizResults() {
280280

281281
container.innerHTML = `
282282
<div class="quiz-complete">
283-
<div style="font-size:2.5rem">${emoji}</div>
283+
<div class="quiz-result-emoji">${emoji}</div>
284284
<div class="score">${score} / ${QUESTIONS.length}</div>
285-
<p style="font-size:1.05rem;margin:.5rem 0">${message}</p>
286-
<p style="color:var(--muted);font-size:.9rem">Score: ${pct}%</p>
287-
<button class="quiz-next-btn" onclick="restartQuiz()" style="margin-top:.75rem">Retry Quiz 🔄</button>
285+
<p class="quiz-result-message">${message}</p>
286+
<p class="quiz-result-pct">Score: ${pct}%</p>
287+
<button class="quiz-next-btn quiz-retry-btn" onclick="restartQuiz()">Retry Quiz 🔄</button>
288288
</div>
289289
`;
290290
}

styles.css

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,11 @@ code {
455455
}
456456
.quiz-next-btn:hover { background: var(--primary-dark); }
457457
.quiz-progress { font-size: .82rem; color: var(--muted); margin-top: .5rem; }
458-
.quiz-complete { text-align: center; padding: 1rem 0; }
459-
.quiz-complete .score { font-size: 2rem; font-weight: 700; color: var(--primary); }
458+
.quiz-result-emoji { font-size: 2.5rem; }
459+
.quiz-result-message { font-size: 1.05rem; margin: .5rem 0; }
460+
.quiz-result-pct { color: var(--muted); font-size: .9rem; }
461+
.quiz-retry-btn { margin-top: .75rem; }
462+
.text-muted { color: var(--muted); }
460463

461464
/* ── Footer ── */
462465
.site-footer {

0 commit comments

Comments
 (0)