fix(play): show quiz_carry question inside 3-2-1 countdown overlay
- syncQuizCarryEmbedCountdownQuestionLine + DOM kicker/q above big num - clear lines in hideQuizCarryEmbedCountdownOverlay - play.js v=0.091 Made-with: Cursor
This commit is contained in:
@@ -1882,6 +1882,27 @@
|
||||
ov.classList.add('is-hidden');
|
||||
ov.setAttribute('aria-hidden', 'true');
|
||||
}
|
||||
const cq = document.getElementById('quiz-carry-embed-countdown-q');
|
||||
const ck = document.getElementById('quiz-carry-embed-countdown-kicker');
|
||||
if (cq) {
|
||||
cq.textContent = '';
|
||||
cq.style.display = 'none';
|
||||
}
|
||||
if (ck) ck.style.display = 'none';
|
||||
}
|
||||
|
||||
/** ข้อความคำถามใน overlay 3–2–1 (กลางจอ — ไม่พึ่งแถบด้านบนที่อาจถูกครอป) */
|
||||
function syncQuizCarryEmbedCountdownQuestionLine() {
|
||||
const cq = document.getElementById('quiz-carry-embed-countdown-q');
|
||||
const ck = document.getElementById('quiz-carry-embed-countdown-kicker');
|
||||
if (!cq) return;
|
||||
const pq = quizCarryEmbedPendingQuestion;
|
||||
const t = pq ? formatQuizCarryQuestionHud(pq).trim() : '';
|
||||
cq.textContent = t || '(ยังไม่มีข้อความคำถาม — ตั้ง text / question ใน quizQuestions หรือ carryQuestions)';
|
||||
cq.style.display = 'block';
|
||||
if (ck) {
|
||||
ck.style.display = 'block';
|
||||
}
|
||||
}
|
||||
|
||||
function tickQuizCarryEmbedCountdown() {
|
||||
@@ -1916,6 +1937,7 @@
|
||||
ov.classList.remove('is-hidden');
|
||||
ov.setAttribute('aria-hidden', 'false');
|
||||
}
|
||||
syncQuizCarryEmbedCountdownQuestionLine();
|
||||
syncQuizCarryEmbedQuestionStrip();
|
||||
}
|
||||
|
||||
|
||||
@@ -113,8 +113,33 @@
|
||||
}
|
||||
#quiz-carry-embed-countdown.is-hidden { display: none !important; }
|
||||
#quiz-carry-embed-countdown-inner {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.5rem;
|
||||
max-width: min(94vw, 760px);
|
||||
padding: 0 14px;
|
||||
text-align: center;
|
||||
}
|
||||
#quiz-carry-embed-countdown-kicker {
|
||||
display: none;
|
||||
margin: 0;
|
||||
font: 800 0.68rem / 1.2 system-ui, "Kanit", sans-serif;
|
||||
letter-spacing: 0.12em;
|
||||
text-transform: uppercase;
|
||||
color: #7aa2f7;
|
||||
text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
#quiz-carry-embed-countdown-q {
|
||||
display: none;
|
||||
margin: 0;
|
||||
font: 600 clamp(0.88rem, 3.2vmin, 1.28rem) / 1.45 system-ui, "Kanit", sans-serif;
|
||||
color: #f8fafc;
|
||||
text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75);
|
||||
max-height: min(32vh, 220px);
|
||||
overflow: auto;
|
||||
}
|
||||
#quiz-carry-embed-countdown-num {
|
||||
font: 800 min(28vw, 132px) / 1.05 system-ui, "Kanit", sans-serif;
|
||||
color: #ffe066;
|
||||
@@ -672,7 +697,11 @@
|
||||
</div>
|
||||
<div id="play-quiz-feedback" class="is-hidden play-quiz-feedback" role="status" aria-atomic="true"></div>
|
||||
<div id="quiz-carry-embed-countdown" class="is-hidden" role="alert" aria-live="assertive" aria-atomic="true" aria-hidden="true">
|
||||
<div id="quiz-carry-embed-countdown-inner"><span id="quiz-carry-embed-countdown-num">3</span></div>
|
||||
<div id="quiz-carry-embed-countdown-inner">
|
||||
<p id="quiz-carry-embed-countdown-kicker" class="quiz-carry-embed-countdown-kicker">คำถาม · Question</p>
|
||||
<p id="quiz-carry-embed-countdown-q" class="quiz-carry-embed-countdown-q"></p>
|
||||
<span id="quiz-carry-embed-countdown-num">3</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="quiz-carry-embed-q-strip" class="is-hidden" role="status" aria-live="polite" aria-atomic="true" aria-hidden="true">
|
||||
<span class="quiz-carry-embed-q-strip-kicker">คำถาม · Question</span>
|
||||
@@ -736,7 +765,7 @@
|
||||
</div>
|
||||
<script src="/Game/socket.io/socket.io.js"></script>
|
||||
<script src="js/version.js?v=0.0166"></script>
|
||||
<script src="js/play.js?v=0.090"></script>
|
||||
<script src="js/play.js?v=0.091"></script>
|
||||
<div class="version-tag">v —</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user