aboutsummaryrefslogtreecommitdiff
path: root/docs/play/player.js
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-06-05 21:08:07 +0800
committer魏曹先生 <1992414357@qq.com>2026-06-05 21:08:07 +0800
commitd3b4027f5926569cb9371b2ea62b6be9387ea650 (patch)
treed6c9de16cea03253273ad7c89eadc401e5e105b2 /docs/play/player.js
parent97853f47489ab58b63e08854f579ae776e5a2d1f (diff)
Add example pages and sync-examples tool for docs
Diffstat (limited to 'docs/play/player.js')
-rw-r--r--docs/play/player.js9
1 files changed, 7 insertions, 2 deletions
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, "<code>$1</code>")
.replace(
/\*\*([^*]+)\*\*/g,
- '<strong style="color:#7dcfff">$1</strong>',
+ '<strong style="color:#d4a84b">$1</strong>',
);
return `<p>${html}</p>`;
})
@@ -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);