diff --git a/kjvstudy_org/static/base.js b/kjvstudy_org/static/base.js index 79a489d..bd7f7e0 100644 --- a/kjvstudy_org/static/base.js +++ b/kjvstudy_org/static/base.js @@ -218,6 +218,11 @@ function updateReadingPlansBadge() { // Page speech toggle (for breadcrumb button) - triggers spacebar speech function togglePageSpeech() { + // Clear suppressSpace flag since this is a button click, not a keyboard repeat + if (window.KJVResourceSpeech) { + window.KJVResourceSpeech.suppressSpace = false; + } + // Simulate spacebar press to use existing speech system var event = new KeyboardEvent('keydown', { key: ' ', code: 'Space', bubbles: true }); document.dispatchEvent(event); @@ -230,7 +235,11 @@ function updateSpeechButtonState() { var btn = document.getElementById('speech-toggle-btn'); if (!btn) return; - if (window.KJVResourceSpeech && window.KJVResourceSpeech.speaking) { + var isSpeaking = (window.KJVResourceSpeech && window.KJVResourceSpeech.speaking) || + (window.KJVSpeech && window.KJVSpeech.speaking) || + ('speechSynthesis' in window && (speechSynthesis.speaking || speechSynthesis.pending)); + + if (isSpeaking) { btn.classList.add('speaking'); } else { btn.classList.remove('speaking'); diff --git a/kjvstudy_org/templates/base.html b/kjvstudy_org/templates/base.html index 79c2305..2a12b2a 100644 --- a/kjvstudy_org/templates/base.html +++ b/kjvstudy_org/templates/base.html @@ -403,12 +403,14 @@ } .breadcrumb-action-btn.font-toggle { - font-size: 0.85rem; - font-weight: 700; + font-size: 0.9rem; + font-weight: 600; + text-transform: lowercase; } [data-font-size="large"] .breadcrumb-action-btn.font-toggle { - font-size: 1.1rem; + font-size: 0.9rem; + text-transform: uppercase; } .breadcrumb-action-btn.dark-toggle::before {