fix: center game controls in playground mode
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
@@ -147,6 +147,7 @@ const elements = {
|
||||
previewSection: document.querySelector(".preview-section"),
|
||||
prevBtn: document.getElementById("prev-btn"),
|
||||
nextBtn: document.getElementById("next-btn"),
|
||||
gameControls: document.querySelector(".game-controls"),
|
||||
levelIndicator: document.getElementById("level-indicator"),
|
||||
headerLevelPill: document.getElementById("header-level-pill"),
|
||||
|
||||
@@ -708,9 +709,10 @@ function updateNavigationButtons() {
|
||||
const engineState = lessonEngine.getCurrentState();
|
||||
const isPlayground = engineState.lesson?.mode === "playground";
|
||||
|
||||
// Hide nav buttons in playground mode
|
||||
// Hide nav buttons and center controls in playground mode
|
||||
elements.prevBtn.classList.toggle("hidden", isPlayground);
|
||||
elements.nextBtn.classList.toggle("hidden", isPlayground);
|
||||
elements.gameControls?.classList.toggle("centered", isPlayground);
|
||||
|
||||
if (!isPlayground) {
|
||||
elements.prevBtn.disabled = !engineState.canGoPrev;
|
||||
|
||||
@@ -891,6 +891,10 @@ kbd {
|
||||
box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
|
||||
.game-controls.centered {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ================= SIDEBAR ================= */
|
||||
.sidebar-backdrop {
|
||||
position: fixed;
|
||||
|
||||
Reference in New Issue
Block a user