From d3b4027f5926569cb9371b2ea62b6be9387ea650 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Fri, 5 Jun 2026 21:08:07 +0800 Subject: Add example pages and sync-examples tool for docs --- docs/play/player.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'docs/play/player.js') diff --git a/docs/play/player.js b/docs/play/player.js index 6e01ce5..691957c 100644 --- a/docs/play/player.js +++ b/docs/play/player.js @@ -111,7 +111,7 @@ function renderSpeech(paragraphs) { .replace(/`([^`]+)`/g, "$1") .replace( /\*\*([^*]+)\*\*/g, - '$1', + '$1', ); return `

${html}

`; }) @@ -219,6 +219,11 @@ const layoutEl = document.getElementById("layout"); const speechPanel = document.querySelector(".speech-panel"); const codePanel = document.querySelector(".code-panel"); layoutEl.append(speechPanel, codePanel); -layoutEl.classList.add("layout--tb"); +// layoutEl.classList.add("layout--tb"); + +// On narrow screens, switch to vertical +if (window.innerWidth < 800) { + layoutEl.classList.add("layout--tb"); +} loadTutorial(tutorialFile); -- cgit