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>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-6">
|
<div class="mt-2">
|
||||||
<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">
|
<label for="translation">Translation</label>
|
||||||
|
<select id="translation" class="translation">
|
||||||
<option value="BSB">Berean Standard Bible (BSB)</option>
|
<option value="BSB">Berean Standard Bible (BSB)</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -148,8 +148,21 @@ dialog.scripture {
|
||||||
p.poem-2 {
|
p.poem-2 {
|
||||||
@apply mt-0 pl-14;
|
@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] {
|
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;
|
@apply dark:text-gray-400 dark:hover:text-red-500;
|
||||||
span {
|
span {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -80,6 +80,10 @@ class RenderScripture {
|
||||||
constructor(dialog) {
|
constructor(dialog) {
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
|
|
||||||
|
window.addEventListener('popstate', (evt) => {
|
||||||
|
this.closeDialog();
|
||||||
|
});
|
||||||
|
|
||||||
if (hasLocalStorage()) {
|
if (hasLocalStorage()) {
|
||||||
this.ls = true;
|
this.ls = true;
|
||||||
this.translation = localStorage.getItem('__translation') || 'BSB';
|
this.translation = localStorage.getItem('__translation') || 'BSB';
|
||||||
|
|
@ -122,6 +126,11 @@ class RenderScripture {
|
||||||
.classList.remove('hidden');
|
.classList.remove('hidden');
|
||||||
this.buildTranslationList(this.sel);
|
this.buildTranslationList(this.sel);
|
||||||
this.readScripture(refs);
|
this.readScripture(refs);
|
||||||
|
history.pushState({
|
||||||
|
dialog: true,
|
||||||
|
scripture: scripture.value,
|
||||||
|
tx: this.translation
|
||||||
|
}, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTranslationList(sel) {
|
buildTranslationList(sel) {
|
||||||
|
|
|
||||||
|
|
@ -494,8 +494,15 @@ use_translations = {
|
||||||
"eng_rv5": ["Revised Version with Apocrypha (1895)", "RVA", ["OT", "NT", "APO"]],
|
"eng_rv5": ["Revised Version with Apocrypha (1895)", "RVA", ["OT", "NT", "APO"]],
|
||||||
"eng_ylt": ["Young's Literal Translation", "YLT", ["OT", "NT"]],
|
"eng_ylt": ["Young's Literal Translation", "YLT", ["OT", "NT"]],
|
||||||
"AAB": ["Accessible Ancients Bible", "AAB", ["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_fbv": ["Free Bible Version", "FBV", ["OT", "NT"]],
|
||||||
"eng_wbs": ["Noah Webster Bible", "NWB", ["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"]],
|
"eng_ulb": ["Unlocked Literal Bible", "ULB", ["OT", "NT"]],
|
||||||
"ENGWEBP": ["World English Bible", "WEB", ["OT", "NT"]],
|
"ENGWEBP": ["World English Bible", "WEB", ["OT", "NT"]],
|
||||||
"eng_web": ["World English Bible Classic", "WEBC", ["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_lxx": ["Septuagint in American English (2012)", "LXXSA", ["OT", "APO"]],
|
||||||
"eng_bre": ["Brenton Septuagint Translation", "BST", ["OT", "APO"]],
|
"eng_bre": ["Brenton Septuagint Translation", "BST", ["OT", "APO"]],
|
||||||
"eng_boy": ["Updated Brenton English Septuagint", "UBES", ["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?
|
# Broken: Parser?
|
||||||
#"GHT": ["Garth's Hyper-literal Translation", "GHT"],
|
# Mostly useful if footnotes are implemented in the parser.
|
||||||
#"eng_bbe": ["Bible in Basic English BBE"],
|
#"eng_f35": ["The New Testament with Commentary", "TNTC", ["NT"]],
|
||||||
# Broken: Parser?
|
# Broken: URI returns 404.
|
||||||
#"eng_emtv": ["English Majority Text Version", "EMTV"],
|
#"eng_glw": ["God's Living Word", "GLW", ["OT", "NT"]],
|
||||||
#"eng_f35": ["The New Testament with Commentary TNTC"],
|
|
||||||
# Broken: Parser?
|
|
||||||
#"eng_glw": ["God's Living Word", "GLW"],
|
|
||||||
#"eng_gnv": ["Geneva Bible 1599 GNV"],
|
#"eng_gnv": ["Geneva Bible 1599 GNV"],
|
||||||
# Broken: Reads like heresy.
|
# Broken: Reads like heresy.
|
||||||
#"eng_pev": ["Plain English Version", "PEV"],
|
#"eng_pev": ["Plain English Version", "PEV", ["OT", "NT"]],
|
||||||
# Broken: Empty content.
|
# Broken: Empty content.
|
||||||
#"eng_t4t": ["Translation for Translators", "T4T"],
|
# Archaic English.
|
||||||
# Broken: Parser?
|
#"eng_tnt": ["Tyndale New Testament TNT", "TNT", ["NT"]],
|
||||||
#"eng_tce": ["Text-Critical English New Testament", "TCENT"],
|
|
||||||
#"eng_tnt": ["Tyndale New Testament TNT"],
|
|
||||||
#"eng_w88": ["Wycliffe Bible", "W88"],
|
#"eng_w88": ["Wycliffe Bible", "W88"],
|
||||||
|
# The following two are "modernized" but awkward to read.
|
||||||
#"eng_wyc2017": ["Wycliffe's Bible with Modern Spelling", "WBMS"],
|
#"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 = {
|
bookmeta = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue