images lowres + modifs pages titres
This commit is contained in:
@@ -116,9 +116,15 @@ for(let i = 0; i < contentToParse.length; i++) {
|
||||
// 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>`);
|
||||
if (/^\d/.test(h3.innerText)) {
|
||||
h3.innerHTML = h3.innerHTML.replace(/[^\s]*/, function(match) {
|
||||
return `<div class="gros-chiffre">${match}</div>`;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let dessinsPreH3 = document.querySelectorAll('h3 + p img');
|
||||
for (let dessin of dessinsPreH3) {
|
||||
dessin.style.width = '0px';
|
||||
dessin.style.height = '0px';
|
||||
}
|
||||
Reference in New Issue
Block a user