Skip to content

Commit f5d2f09

Browse files
committed
feat(ui): improve Bible reader interface and fix mobile bugs
- Enhanced unloaded highlights with clearer "Text not available, click to refresh" message - Moved book/chapter reference up and removed date display - Removed redundant "Currently selected translation" attribution for cleaner footer - Fixed Unicode toggle bug on mobile by replacing with Font Awesome icons - Updated README with explanations for "Provinent" term and added attribution links - Modified audio player to only show stop button when audio is active - Updated Bible Gateway search header styling
1 parent 9496d28 commit f5d2f09

12 files changed

Lines changed: 46 additions & 76 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
A comprehensive, feature-rich Bible study web application designed for serious scripture engagement with modern tools.
44
The entirety of this project was written using AI tools like [Gab AI](https://gab.ai) and [Lumo](https://lumo.proton.me).
5+
The meaning of "Provinent" is a portmanteau of "providence" and "covenant", each referring to God's divine sovereignty.
56

67
Access the site here: [https://provinent.org](https://provinent.org)
78

@@ -12,7 +13,7 @@ Access the site here: [https://provinent.org](https://provinent.org)
1213
- **Study Notes**: Full Markdown support with live preview and export capabilities
1314
- **Verse Analysis**: Left-click any verse for analyis of a single verse with a side-by-side view of Strong's concordance (provided by [STEP Bible](https://www.stepbible.org)) and a Hebrew or Greek interlinear Bible (provided by [Bible Hub](https://biblehub.com/interlinear/))
1415
- **Verse Highlighting**: Right-click verses to highlight in one of six different colors for study emphasis
15-
- **Reference Bible**: Use the reference Bible to select from multiple translation options to compare with (NASB 1995, NASB 2020, ASV, KJV, ESV, GNV, BSB, NET, CSB, NIV, NKJV, and NLT)
16+
- **Reference Bible**: Use the reference Bible to select from multiple translation options to compare with (NASB 1995, NASB 2020, ASV, KJV, ESV, GNV, BSB, NET, CSB, NIV, NKJV, and NLT); this also sets the translation for Bible Gateway searches and the Verse Analysis popup
1617

1718
### Advanced Features
1819
- **Search Integration**: Built-in [Bible Gateway search](https://www.biblegateway.com/usage/) functionality
@@ -35,7 +36,7 @@ The sidebar provides organized access to extensive theological resources (Reform
3536
- **Libraries**:
3637
- Marked.js for Markdown processing
3738
- Font Awesome for icons
38-
- **API**: Bible.helloao.org for scripture text
39+
- **API**: Bible.helloao.org for scripture text, footnotes, and BSB audio
3940
- **Storage**: LocalStorage for user data persistence
4041
- **Build**: Use the provided scripts for setup and consistency
4142

@@ -78,7 +79,8 @@ Highlights, notes, and settings are stored locally in your browser. Data transmi
7879

7980
- Scripture text provided by [bible.helloao.org](https://bible.helloao.org) API
8081
- Berean Standard Bible translation by [Berean Bible](https://berean.bible)
81-
- Icons by Font Awesome
82+
- Audio files hosted by [Open Bible](https://openbible.com/audio/)
83+
- Icons by [Font Awesome](https://fontawesome.com)
8284
- Markdown processing by [Marked.js](https://cdn.jsdelivr.net/npm/marked/)
8385

8486
## License

index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

main.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,6 @@ if (typeof marked !== 'undefined') {
8282
gfm: true
8383
});
8484
}
85-
function updateDateTime() {
86-
const now = new Date();
87-
document.getElementById('currentDate').textContent =
88-
now.toLocaleDateString('en-US', {
89-
weekday: 'long',
90-
year: 'numeric',
91-
month: 'long',
92-
day: 'numeric'
93-
});
94-
}
9585
class AppError extends Error {
9686
constructor(message, type, originalError) {
9787
super(message);
@@ -530,7 +520,7 @@ function renderHighlights(filterColor = 'all') {
530520
if (filterColor !== 'all' && ref.color !== filterColor) {
531521
return;
532522
}
533-
const verseText = getVerseTextFromStorage(ref.reference) || 'Verse text not available';
523+
const verseText = getVerseTextFromStorage(ref.reference) || 'Text not available, click to refresh';
534524
html += `
535525
<div class="highlight-item ${ref.color}" data-reference="${ref.reference}" data-color="${ref.color}">
536526
<div class="highlight-ref">${ref.reference}</div>
@@ -621,12 +611,10 @@ async function init() {
621611
restoreSidebarState();
622612
restorePanelStates();
623613
updateHeaderTitle();
624-
updateDateTime();
625614
initResizeHandles();
626615
switchNotesView(state.settings.notesView || 'text');
627616
updateBibleGatewayVersion();
628617
setupEventListeners();
629-
setInterval(updateDateTime, 1_000);
630618
console.log('App initialized successfully');
631619
}
632620
if (document.readyState === 'loading') {

modules/api.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,14 @@ function updateAudioPlayerUI(isPlaying, narrator = null) {
223223
if (!audioControls) return;
224224
const playBtn = audioControls.querySelector('.play-audio-btn');
225225
const pauseBtn = audioControls.querySelector('.pause-audio-btn');
226+
const stopBtn = audioControls.querySelector('.stop-audio-btn');
226227
if (playBtn) playBtn.style.display = isPlaying ? 'none' : 'inline-block';
227228
if (pauseBtn) pauseBtn.style.display = isPlaying ? 'inline-block' : 'none';
229+
if (stopBtn) {
230+
const hasAudioStarted = state.audioPlayer &&
231+
(state.audioPlayer.isPlaying || state.audioPlayer.isPaused);
232+
stopBtn.style.display = hasAudioStarted ? 'inline-block' : 'none';
233+
}
228234
if (narrator && !isKJV(state.settings.bibleTranslation)) {
229235
const narratorSelect = audioControls.querySelector('.narrator-select');
230236
if (narratorSelect) {
@@ -327,10 +333,6 @@ export async function loadPassageFromAPI(passageInfo) {
327333
displayPassage(contentItems);
328334
afterContentLoad();
329335
clearError();
330-
if (chapterData.translation && chapterData.translation.name) {
331-
document.getElementById('bibleName').textContent =
332-
chapterData.translation.name;
333-
}
334336
updateAudioControls(chapterData.thisChapterAudioLinks);
335337
} catch (err) {
336338
handleError(err, 'loadPassageFromAPI');

modules/state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { handleError } from '../main.js'
2-
export const APP_VERSION = '1.3.2025.11.11';
2+
export const APP_VERSION = '1.3.01.2025.11.12';
33
let saveTimeout = null;
44
const SAVE_DEBOUNCE_MS = 500;
55
export const BOOK_ORDER = [

src/css/layout.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,28 +73,30 @@ body {
7373
}
7474

7575
.collapse-toggle::before {
76-
content: '\2B9C'; /* (left circle chevron) */
76+
content: '\f100'; /* Font Awesome: fa-angle-double-left */
77+
font-family: 'Font Awesome 6 Free';
78+
font-weight: 900;
7779
transition: transform 0.3s ease;
7880
}
7981

8082
.panel-collapsed .collapse-toggle::before {
81-
content: '\2B9E'; /* ⮞ (right circle chevron) */
83+
content: '\f101'; /* Font Awesome: fa-angle-double-right */
8284
}
8385

8486
#scriptureSection .collapse-toggle::before {
85-
content: '\2B9E'; /* ⮞ (right circle chevron) */
87+
content: '\f101'; /* Font Awesome: fa-angle-double-right */
8688
}
8789

8890
#scriptureSection.panel-collapsed .collapse-toggle::before {
89-
content: '\2B9C'; /* ⮜ (left circle chevron) */
91+
content: '\f100'; /* Font Awesome: fa-angle-double-left */
9092
}
9193

9294
#notesSection .collapse-toggle::before {
93-
content: '\2B9E'; /* (right circle chevron) */
95+
content: '\f101'; /* Font Awesome: fa-angle-double-right */
9496
}
9597

9698
#notesSection.panel-collapsed .collapse-toggle::before {
97-
content: '\2B9C'; /* ⮜ (left circle chevron) */
99+
content: '\f100'; /* Font Awesome: fa-angle-double-left */
98100
}
99101

100102
.scripture-section {

src/css/scripture.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
.passage-header {
3333
background: linear-gradient(135deg, var(--primary-color), var(--primary-color));
3434
color: white;
35-
padding: 20px;
35+
padding: 10px;
3636
border-radius: 8px;
3737
margin-bottom: 20px;
3838
}
@@ -44,16 +44,9 @@
4444
border: none;
4545
}
4646

47-
.passage-header .date {
48-
opacity: 0.9;
49-
font-size: 0.9em;
50-
}
51-
5247
.passage-reference {
5348
font-weight: bold;
5449
font-size: 1.2em;
55-
margin-bottom: 15px;
56-
color: var(--accent-color);
5750
}
5851

5952
/* Verse Display & Styling */

src/index.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2>Bible Study Resources</h2>
8484
<input type="hidden" name="version" id="bgVersion" value="NASB1995" />
8585
<div class="bible-gateway-container">
8686
<div class="bible-gateway-header">
87-
Lookup a word or passage in the Bible
87+
Search the Bible
8888
</div>
8989
<div class="bible-gateway-content">
9090
<div class="bible-gateway-inputs">
@@ -405,19 +405,18 @@ <h1>Provinent Scripture Study</h1>
405405
<section class="scripture-section" id="scriptureSection">
406406
<div id="errorContainer" role="alert"></div>
407407
<div class="passage-header">
408-
<h2 id="passageHeaderTitle">Passage of the Day</h2>
409-
<div class="date" id="currentDate"></div>
408+
<h2 id="passageHeaderTitle"></h2>
409+
<div class="passage-reference" id="passageReference"></div>
410410
</div>
411411

412-
<div class="passage-reference" id="passageReference"></div>
413412
<div id="scriptureContent"></div>
414413

415414
<div class="api-attribution">
416415
<p><strong>Attribution</strong></p>
417416
<p>Scripture quotations are provided by API from <a href="https://bible.helloao.org" target="_blank" rel="noopener noreferrer">bible.helloao.org</a>,
418417
without which this app would not have been possible.
419418
And a thank you to <a href="https://berean.bible" target="_blank" rel="noopener noreferrer">Berean Bible</a> for their excellent translation work.
420-
All copyrights reserved by their respective owners. Currently selected translation: <span id="bibleName">Berean Standard Bible</span>&copy</p>
419+
All copyrights reserved by their respective owners.
421420
<p style="margin-top: 10px;">
422421

423422
</p>

src/main.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -123,23 +123,6 @@ if (typeof marked !== 'undefined') {
123123
});
124124
}
125125

126-
/* ====================================================================
127-
DATE / TIME
128-
Current date display (updates every second)
129-
==================================================================== */
130-
131-
/* Update current date display */
132-
function updateDateTime() {
133-
const now = new Date();
134-
document.getElementById('currentDate').textContent =
135-
now.toLocaleDateString('en-US', {
136-
weekday: 'long',
137-
year: 'numeric',
138-
month: 'long',
139-
day: 'numeric'
140-
});
141-
}
142-
143126
/* ====================================================================
144127
ERROR HANDLING
145128
==================================================================== */
@@ -733,7 +716,7 @@ function renderHighlights(filterColor = 'all') {
733716
return;
734717
}
735718

736-
const verseText = getVerseTextFromStorage(ref.reference) || 'Verse text not available';
719+
const verseText = getVerseTextFromStorage(ref.reference) || 'Text not available, click to refresh';
737720
html += `
738721
<div class="highlight-item ${ref.color}" data-reference="${ref.reference}" data-color="${ref.color}">
739722
<div class="highlight-ref">${ref.reference}</div>
@@ -873,12 +856,10 @@ async function init() {
873856
restoreSidebarState();
874857
restorePanelStates();
875858
updateHeaderTitle();
876-
updateDateTime();
877859
initResizeHandles();
878860
switchNotesView(state.settings.notesView || 'text');
879861
updateBibleGatewayVersion();
880862
setupEventListeners();
881-
setInterval(updateDateTime, 1_000);
882863

883864
console.log('App initialized successfully');
884865
}

src/modules/api.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,19 @@ function updateAudioPlayerUI(isPlaying, narrator = null) {
302302

303303
const playBtn = audioControls.querySelector('.play-audio-btn');
304304
const pauseBtn = audioControls.querySelector('.pause-audio-btn');
305+
const stopBtn = audioControls.querySelector('.stop-audio-btn');
305306

307+
// Show play/pause buttons based on playing state
306308
if (playBtn) playBtn.style.display = isPlaying ? 'none' : 'inline-block';
307309
if (pauseBtn) pauseBtn.style.display = isPlaying ? 'inline-block' : 'none';
308310

311+
// Show stop button only if audio has been started (playing OR paused)
312+
if (stopBtn) {
313+
const hasAudioStarted = state.audioPlayer &&
314+
(state.audioPlayer.isPlaying || state.audioPlayer.isPaused);
315+
stopBtn.style.display = hasAudioStarted ? 'inline-block' : 'none';
316+
}
317+
309318
// Only update narrator select for BSB
310319
if (narrator && !isKJV(state.settings.bibleTranslation)) {
311320
const narratorSelect = audioControls.querySelector('.narrator-select');
@@ -441,11 +450,6 @@ export async function loadPassageFromAPI(passageInfo) {
441450
afterContentLoad();
442451
clearError();
443452

444-
if (chapterData.translation && chapterData.translation.name) {
445-
document.getElementById('bibleName').textContent =
446-
chapterData.translation.name;
447-
}
448-
449453
updateAudioControls(chapterData.thisChapterAudioLinks);
450454

451455
} catch (err) {

0 commit comments

Comments
 (0)