diff --git a/www/core b/www/core index 78ee459f8..41715a0b3 160000 --- a/www/core +++ b/www/core @@ -1 +1 @@ -Subproject commit 78ee459f88f66072dde0f8d3279b8b0d8b7f3a6f +Subproject commit 41715a0b31fa389710b9f9754dbc163f49653b21 diff --git a/www/js/defaults.json b/www/js/defaults.json index dc7c5fe84..1a4343765 100644 --- a/www/js/defaults.json +++ b/www/js/defaults.json @@ -13,6 +13,9 @@ "display-translation": true, "display-transliteration": true, "display-teeka": true + }, + "display-options": { + "larivaar": false } } }, diff --git a/www/js/viewer.js b/www/js/viewer.js index 038f012e6..e59803857 100644 --- a/www/js/viewer.js +++ b/www/js/viewer.js @@ -57,11 +57,24 @@ module.exports = { if (rows.length > 0) { const cards = []; rows.forEach((row) => { + const gurmukhiShabads = row.Gurmukhi.split(' '); + let taggedGurmukhi = ''; + gurmukhiShabads.forEach((val) => { + let tag; + if (val.indexOf(']') !== -1) { + tag = 'i'; + } else { + tag = 'span'; + } + taggedGurmukhi += `<${tag}>${val}${tag === 'i' ? ' ' : ''} `; + }); + const gurmukhiContainer = document.createElement('div'); + gurmukhiContainer.innerHTML = taggedGurmukhi; cards.push( h( `div#slide${row.ID}.slide${row.ID === lineID ? '.active' : ''}`, [ - h('h1.gurbani.gurmukhi', row.Gurmukhi), + h('h1.gurbani.gurmukhi', gurmukhiContainer), h('h2.translation', row.English), h('h2.transliteration', row.Transliteration), h('h2.teeka', row.PunjabiUni), diff --git a/www/src/scss/viewer.scss b/www/src/scss/viewer.scss index f88dc79c8..25ecc7545 100644 --- a/www/src/scss/viewer.scss +++ b/www/src/scss/viewer.scss @@ -88,6 +88,25 @@ h2 { font-size: 9vh; font-weight: normal; line-height: 1.3em; + + i { + font-style: normal; + } +} + +.larivaar { + .gurbani { + div { + font-size: 0; + } + + i, + span { + font-size: 9vh; + vertical-align: bottom; + white-space: nowrap; + } + } } .translation,