Merge branch 'translation-selection'
This commit is contained in:
commit
317d70d4ff
5 changed files with 45 additions and 17 deletions
|
|
@ -70,8 +70,9 @@ const meta = `{
|
|||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="mt-6">
|
||||
<select class="translation text-sm mt-0 p-2 text-gray-400 bg-gray-700 border-1 dark:border-gray-800 rounded-sm w-full">
|
||||
<div class="mt-2">
|
||||
<label for="translation">Translation</label>
|
||||
<select id="translation" class="translation">
|
||||
<option value="BSB">Berean Standard Bible (BSB)</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -148,8 +148,21 @@ dialog.scripture {
|
|||
p.poem-2 {
|
||||
@apply mt-0 pl-14;
|
||||
}
|
||||
label[for=translation] {
|
||||
@apply text-gray-500 text-sm bg-white;
|
||||
@apply dark:bg-gray-600 dark:text-gray-400;
|
||||
}
|
||||
select.translation {
|
||||
@apply text-sm mt-0 p-2 text-gray-600 bg-gray-100 border-gray-300 border-1 rounded-sm w-full;
|
||||
@apply dark:text-gray-400 dark:bg-gray-700 dark:border-gray-800;
|
||||
@apply overflow-hidden;
|
||||
}
|
||||
select.translation:focus, select.translation:focus-visible {
|
||||
border: 1px solid rgb(79, 136, 206);
|
||||
outline: 1px solid rgb(79, 136, 206);
|
||||
}
|
||||
button[data-close] {
|
||||
@apply absolute top-0 right-0 pr-2 pb-4 pt-2 text-sm text-gray-500 cursor-pointer hover:text-red-900;
|
||||
@apply absolute top-0 right-0 pr-2 pb-2 pt-2 text-sm text-gray-500 cursor-pointer hover:text-red-900;
|
||||
@apply dark:text-gray-400 dark:hover:text-red-500;
|
||||
span {
|
||||
text-transform: uppercase;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -80,6 +80,10 @@ class RenderScripture {
|
|||
constructor(dialog) {
|
||||
this.dialog = dialog;
|
||||
|
||||
window.addEventListener('popstate', (evt) => {
|
||||
this.closeDialog();
|
||||
});
|
||||
|
||||
if (hasLocalStorage()) {
|
||||
this.ls = true;
|
||||
this.translation = localStorage.getItem('__translation') || 'BSB';
|
||||
|
|
@ -122,6 +126,11 @@ class RenderScripture {
|
|||
.classList.remove('hidden');
|
||||
this.buildTranslationList(this.sel);
|
||||
this.readScripture(refs);
|
||||
history.pushState({
|
||||
dialog: true,
|
||||
scripture: scripture.value,
|
||||
tx: this.translation
|
||||
}, '');
|
||||
}
|
||||
|
||||
buildTranslationList(sel) {
|
||||
|
|
|
|||
|
|
@ -494,8 +494,15 @@ use_translations = {
|
|||
"eng_rv5": ["Revised Version with Apocrypha (1895)", "RVA", ["OT", "NT", "APO"]],
|
||||
"eng_ylt": ["Young's Literal Translation", "YLT", ["OT", "NT"]],
|
||||
"AAB": ["Accessible Ancients Bible", "AAB", ["OT", "NT"]],
|
||||
"eng_bbe": ["Bible in Basic English", "BBE", ["OT", "NT"]],
|
||||
"eng_emtv": ["English Majority Text Version", "EMTV", ["NT"]],
|
||||
"eng_fbv": ["Free Bible Version", "FBV", ["OT", "NT"]],
|
||||
"eng_wbs": ["Noah Webster Bible", "NWB", ["OT", "NT"]],
|
||||
"eng_t4t": ["Translation for Translators", "T4T", ["OT", "NT"]],
|
||||
# Parser: Spacing issues. Matthew 16:13.
|
||||
# Footnotes may need to be implemented.
|
||||
# See: /sundays/notes/2026/07/19/
|
||||
#"eng_tce": ["Text-Critical English New Testament", "TCENT", ["NT"]],
|
||||
"eng_ulb": ["Unlocked Literal Bible", "ULB", ["OT", "NT"]],
|
||||
"ENGWEBP": ["World English Bible", "WEB", ["OT", "NT"]],
|
||||
"eng_web": ["World English Bible Classic", "WEBC", ["OT", "NT"]],
|
||||
|
|
@ -503,25 +510,23 @@ use_translations = {
|
|||
"eng_lxx": ["Septuagint in American English (2012)", "LXXSA", ["OT", "APO"]],
|
||||
"eng_bre": ["Brenton Septuagint Translation", "BST", ["OT", "APO"]],
|
||||
"eng_boy": ["Updated Brenton English Septuagint", "UBES", ["OT", "APO"]],
|
||||
# May be too literal and difficult to read.
|
||||
#"GHT": ["Garth's Hyper-literal Translation", "GHT", ["NT"]],
|
||||
# Broken: Parser?
|
||||
#"GHT": ["Garth's Hyper-literal Translation", "GHT"],
|
||||
#"eng_bbe": ["Bible in Basic English BBE"],
|
||||
# Broken: Parser?
|
||||
#"eng_emtv": ["English Majority Text Version", "EMTV"],
|
||||
#"eng_f35": ["The New Testament with Commentary TNTC"],
|
||||
# Broken: Parser?
|
||||
#"eng_glw": ["God's Living Word", "GLW"],
|
||||
# Mostly useful if footnotes are implemented in the parser.
|
||||
#"eng_f35": ["The New Testament with Commentary", "TNTC", ["NT"]],
|
||||
# Broken: URI returns 404.
|
||||
#"eng_glw": ["God's Living Word", "GLW", ["OT", "NT"]],
|
||||
#"eng_gnv": ["Geneva Bible 1599 GNV"],
|
||||
# Broken: Reads like heresy.
|
||||
#"eng_pev": ["Plain English Version", "PEV"],
|
||||
#"eng_pev": ["Plain English Version", "PEV", ["OT", "NT"]],
|
||||
# Broken: Empty content.
|
||||
#"eng_t4t": ["Translation for Translators", "T4T"],
|
||||
# Broken: Parser?
|
||||
#"eng_tce": ["Text-Critical English New Testament", "TCENT"],
|
||||
#"eng_tnt": ["Tyndale New Testament TNT"],
|
||||
# Archaic English.
|
||||
#"eng_tnt": ["Tyndale New Testament TNT", "TNT", ["NT"]],
|
||||
#"eng_w88": ["Wycliffe Bible", "W88"],
|
||||
# The following two are "modernized" but awkward to read.
|
||||
#"eng_wyc2017": ["Wycliffe's Bible with Modern Spelling", "WBMS"],
|
||||
#"eng_wyc2018": ["Wycliffe's Bible with Modern Spelling(Enhanced)", "WBMSE"],
|
||||
#"eng_wyc2018": ["Wycliffe's Bible with Modern Spelling", "WBMSE", ["OT", "NT"]],
|
||||
}
|
||||
|
||||
bookmeta = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue