browsing in progress

This commit is contained in:
cesare 2022-11-08 12:25:59 +01:00
parent 6fe5a1cd3e
commit 37be1e502c
2 changed files with 18 additions and 3 deletions

View File

@ -23,6 +23,9 @@ h6, .h6 {
color: #333;
}
p{
font-size: clamp(1px, 2.2vw, 20px);
}
/*
* Override Bootstrap's default container.

View File

@ -107,6 +107,17 @@ $(document).ready(function() {
$("#CantiParadiso").attr('style', 'display:none')
}
// utils
function managePunctuation(stringa) {
var tempstringa=stringa.replaceAll(" ,", ",")
tempstringa=tempstringa.replaceAll(" .", ".")
tempstringa=tempstringa.replaceAll(" :", ":")
tempstringa=tempstringa.replaceAll(" !", "!")
tempstringa=tempstringa.replaceAll(" ?", "?")
tempstringa=tempstringa.replaceAll(" ;", ";")
return tempstringa
}
//minimap management
let minimap = document.createElement('div');
@ -231,13 +242,14 @@ $(document).ready(function() {
divListaCanti.appendTo('#listacanti')
for (verso of orderedListaVersi) {
var elementoverso = $('<p />')
elementoverso.append(verso.numverso + ". " + verso.verso)
elementoverso.append(verso.numverso + ". " + managePunctuation(verso.verso))
elementoverso.attr("style", "line-height: 0.5em")
elementoverso.appendTo('#' + cantica + verso.canto.replace(" ", "_"))
}