New reading surface with paper/sepia/dark themes, slim top and bottom bars, and sheets for navigation, search, settings, audio and per-verse study tools. Plan progress is built into the reader. Page-flip mode removed. ESV added via the server-side proxy (ESV_API_KEY). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e8420a1ae
commit
9e722a296d
17 files changed
+903
-791
No files matched your search
@@ -7,6 +7,8 @@ import { BIBLE_IDB_TTL, getBibleIndexFromIDB, saveBibleIndexToIDB } from '../uti
|
||||
|
||||
export const READER_TRANSLATIONS = [
|
||||
{ id: 'BSB', name: 'Berean Standard Bible' },
|
||||
{ id: 'ESV', name: 'English Standard Version', licensed: true,
|
||||
notice: 'Scripture quotations are from the ESV® Bible (The Holy Bible, English Standard Version®), © 2001 by Crossway, a publishing ministry of Good News Publishers. Used by permission. All rights reserved.' },
|
||||
{ id: 'NET', name: 'NET Bible', helloao: 'eng_net',
|
||||
notice: 'Scripture quoted by permission. Quotations designated (NET) are from the NET Bible® copyright ©1996-2017 by Biblical Studies Press, L.L.C. http://netbible.com All rights reserved.' },
|
||||
{ id: 'NLT', name: 'New Living Translation', licensed: true,
|
||||
@@ -29,6 +31,16 @@ export function useBibleReader(currentPage) {
|
||||
} catch { return 'BSB'; }
|
||||
});
|
||||
const [readerCopyright, setReaderCopyright] = useState('');
|
||||
const [readerTheme, setReaderThemeState] = useState(() => {
|
||||
try {
|
||||
const saved = localStorage.getItem('reader-theme');
|
||||
return ['paper', 'sepia', 'dark'].includes(saved) ? saved : 'paper';
|
||||
} catch { return 'paper'; }
|
||||
});
|
||||
// 'flow' = verses run together like a printed page; 'verses' = one verse per line
|
||||
const [readerLayout, setReaderLayoutState] = useState(() => {
|
||||
try { return localStorage.getItem('reader-layout') === 'verses' ? 'verses' : 'flow'; } catch { return 'flow'; }
|
||||
});
|
||||
const [readerVerses, setReaderVerses] = useState([]);
|
||||
const [readerTotalChapters, setReaderTotalChapters] = useState(1);
|
||||
const [readerLoading, setReaderLoading] = useState(false);
|
||||
@@ -108,6 +120,16 @@ export function useBibleReader(currentPage) {
|
||||
}
|
||||
};
|
||||
|
||||
const setReaderTheme = (id) => {
|
||||
setReaderThemeState(id);
|
||||
try { localStorage.setItem('reader-theme', id); } catch {}
|
||||
};
|
||||
|
||||
const setReaderLayout = (id) => {
|
||||
setReaderLayoutState(id);
|
||||
try { localStorage.setItem('reader-layout', id); } catch {}
|
||||
};
|
||||
|
||||
const setReaderTranslation = (id) => {
|
||||
setReaderTranslationState(id);
|
||||
try { localStorage.setItem('reader-translation', id); } catch {}
|
||||
@@ -336,6 +358,8 @@ export function useBibleReader(currentPage) {
|
||||
readerChapter, setReaderChapter,
|
||||
readerTranslation, setReaderTranslation,
|
||||
readerCopyright,
|
||||
readerTheme, setReaderTheme,
|
||||
readerLayout, setReaderLayout,
|
||||
readerVerses,
|
||||
readerTotalChapters,
|
||||
readerLoading,
|
||||
|
||||
Reference in new issue
Block a user