|
@@ -17,13 +17,38 @@ let labeurs = document.getElementsByClassName("labeur");
|
|
for(let i = 0; i < labeurs.length; i++) {
|
|
for(let i = 0; i < labeurs.length; i++) {
|
|
contentToParse.push(labeurs[i]);
|
|
contentToParse.push(labeurs[i]);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// créer header icons pour encarts
|
|
let latours = document.getElementsByClassName("latour");
|
|
let latours = document.getElementsByClassName("latour");
|
|
for(let i = 0; i < latours.length; i++) {
|
|
for(let i = 0; i < latours.length; i++) {
|
|
contentToParse.push(latours[i]);
|
|
contentToParse.push(latours[i]);
|
|
|
|
+
|
|
|
|
+ let headContent = latours[i].firstChild
|
|
|
|
+ let headerEl = document.createElement('div');
|
|
|
|
+ headerEl.setAttribute('class', 'latour-header')
|
|
|
|
+ let iconImg = document.createElement('img');
|
|
|
|
+ iconImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/map.png');
|
|
|
|
+ headerEl.append(iconImg);
|
|
|
|
+ headerEl.append(headContent);
|
|
|
|
+
|
|
|
|
+ latours[i].firstChild.remove();
|
|
|
|
+ latours[i].prepend(headerEl);
|
|
}
|
|
}
|
|
|
|
+
|
|
let lampes = document.getElementsByClassName("lampe");
|
|
let lampes = document.getElementsByClassName("lampe");
|
|
for(let i = 0; i < lampes.length; i++) {
|
|
for(let i = 0; i < lampes.length; i++) {
|
|
contentToParse.push(lampes[i]);
|
|
contentToParse.push(lampes[i]);
|
|
|
|
+
|
|
|
|
+ let headContent = lampes[i].firstChild
|
|
|
|
+ let headerEl = document.createElement('div');
|
|
|
|
+ headerEl.setAttribute('class', 'lampe-header')
|
|
|
|
+ let iconImg = document.createElement('img');
|
|
|
|
+ iconImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/lampe.png');
|
|
|
|
+ headerEl.append(iconImg);
|
|
|
|
+ headerEl.append(headContent);
|
|
|
|
+
|
|
|
|
+ lampes[i].firstChild.remove();
|
|
|
|
+ lampes[i].prepend(headerEl);
|
|
}
|
|
}
|
|
|
|
|
|
for(let i = 0; i < contentToParse.length; i++) {
|
|
for(let i = 0; i < contentToParse.length; i++) {
|
|
@@ -32,12 +57,7 @@ for(let i = 0; i < contentToParse.length; i++) {
|
|
} else {
|
|
} else {
|
|
contentToParse[i].innerHTML = "<p>" + contentToParse[i].innerHTML.replace("<p>", "");
|
|
contentToParse[i].innerHTML = "<p>" + contentToParse[i].innerHTML.replace("<p>", "");
|
|
}
|
|
}
|
|
- // headers latour / lampe
|
|
|
|
- if (contentToParse[i].classList.contains("latour")) {
|
|
|
|
- contentToParse[i].childNodes[0].innerHTML = "<div class='latour-header'><div><img src='{{ url('theme://assets/map.png') }}' alt='carte'></div><div>" + contentToParse[i].childNodes[0].innerHTML + "</div></div>";
|
|
|
|
- } else if (contentToParse[i].classList.contains("lampe")) {
|
|
|
|
- contentToParse[i].childNodes[0].innerHTML = "<div class='lampe-header'><div><img src='{{ url('theme://assets/lampe.png') }}' alt='lampe'></div><div>" + contentToParse[i].childNodes[0].innerHTML + "</div></div>";
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
// micro-typo
|
|
// micro-typo
|
|
for(j = 0; j < contentToParse[i].childNodes.length; j++) {
|
|
for(j = 0; j < contentToParse[i].childNodes.length; j++) {
|
|
let contentHTML = contentToParse[i].childNodes[j].innerHTML;
|
|
let contentHTML = contentToParse[i].childNodes[j].innerHTML;
|