page titre et loader
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
|
||||
// transformer les balises [...] en <div class="...">
|
||||
let bodyContent = $('#body').html()
|
||||
.replace(/\[([^\/\]]+)\]/g, '<div class="$1">')
|
||||
@@ -72,4 +73,14 @@ for(let i = 0; i < contentToParse.length; i++) {
|
||||
contentToParse[i].childNodes[j].innerHTML = contentToParse[i].childNodes[j].innerHTML.replaceAll(' min', ' min');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PAGES TITRES
|
||||
let h3s = document.querySelectorAll('h3');
|
||||
for (let h3 of h3s) {
|
||||
if (h3.nextElementSibling.firstChild.tagName == 'IMG') {
|
||||
h3.style.width = "50%";
|
||||
h3.nextElementSibling.firstChild.style.width = "60%";
|
||||
h3.innerHTML = h3.innerHTML.replace(/[^\s]*/, `<div class="gros-chiffre">${1}</div>`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user