corrigé les pbs sur les encarts + ajouts d'un style de photos + fonts fonctionnent sur chromium

This commit is contained in:
Valentin
2023-07-23 06:13:14 +02:00
parent fd20768958
commit a698a118df
9 changed files with 211 additions and 105 deletions
+10
View File
@@ -52,13 +52,18 @@ saut de ligne dans texte libre (à la fin de chaque ligne) : `<br>`
`[latour]` `[latour]`
`[latour_nohead]`
`[lampe]` `[lampe]`
`[lampe_nohead]`
`[bibliographie]` `[bibliographie]`
### IMAGES ### IMAGES
`[imgsmall]` `[imgsmall]`
`[imgsmall_bottom]`
![imgsmall](screenshots/smallimg.png) ![imgsmall](screenshots/smallimg.png)
`[fullpage2imgs]` `[fullpage2imgs]`
@@ -94,6 +99,11 @@ saut de ligne dans texte libre (à la fin de chaque ligne) : `<br>`
`[imgfullspreadright_bleed]` `[imgfullspreadright_bleed]`
![imgfullspreadright_bleed](screenshots/imgfullspreadright_bleed.png) ![imgfullspreadright_bleed](screenshots/imgfullspreadright_bleed.png)
`[doublepage_bigleft]`
![doublepage_bigleft](screenshots/doublepage_bigleft.png)
`[doublepage_bigright]`
### BREAK-PAGE ### BREAK-PAGE
Pas d'élément avant le bloc : `[breakbefore][/breakbefore]` Pas d'élément avant le bloc : `[breakbefore][/breakbefore]`
Binary file not shown.

After

Width:  |  Height:  |  Size: 752 KiB

@@ -1,4 +1,4 @@
last_checked: 1689988930 last_checked: 1690072671
data: data:
- -
title: 'macOS 13.0 Ventura Apache Setup: Upgrading Homebrew' title: 'macOS 13.0 Ventura Apache Setup: Upgrading Homebrew'
@@ -24,7 +24,7 @@ data:
title: 'Big changes for Email plugin' title: 'Big changes for Email plugin'
url: 'https://getgrav.org/blog/new-email-plugin' url: 'https://getgrav.org/blog/new-email-plugin'
date: 1665048600 date: 1665048600
nicetime: '9 months ago' nicetime: '10 months ago'
- -
title: 'Skeleton Build Automation' title: 'Skeleton Build Automation'
url: 'https://getgrav.org/blog/skeletons-build-automation' url: 'https://getgrav.org/blog/skeletons-build-automation'
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
last_checked: 1689988929 last_checked: 1690085460
data: data:
feed: feed:
- -
Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 22 KiB

@@ -177,6 +177,10 @@ h4 {
hyphens: auto; hyphens: auto;
} }
.free {
margin-bottom: 12px;
}
.labeur p:before { .labeur p:before {
content: '+ '; content: '+ ';
font-weight: bold; font-weight: bold;
@@ -196,20 +200,39 @@ h4 {
padding-left: 3mm; padding-left: 3mm;
} }
.latour, .lampe { .latour, .lampe,
.latour_nohead, .lampe_nohead {
font-family: 'Novel'; font-family: 'Novel';
font-weight: normal; font-weight: normal;
margin-top: 20mm; margin-top: 0mm !important;
margin-left: calc(var(--pagedjs-pagebox-width) / var(--cols)); margin-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
margin-right: -16mm; margin-right: -16mm;
margin-bottom: 20mm; margin-bottom: 0mm !important;
line-height: 12pt; line-height: 12pt;
font-size: 8pt; font-size: 8pt;
padding-right: 18mm; padding-right: 23mm;
width: 142mm;
padding-left: calc(var(--pagedjs-pagebox-width) / var(--cols)); padding-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
padding-bottom: 10mm; padding-bottom: 8mm;
padding-top: 10mm; padding-top: 8mm;
background-color: beige; background-color: beige;
max-height: 198mm;
}
.latour p:last-of-type,
.lampe p:last-of-type,
.latour_nohead p:last-of-type,
.lampe_nohead p:last-of-type {
padding-bottom: 0;
margin-bottom: 0;
}
.latour ul, .latour ol,
.lampe ul, .lampe ol,
.latour_nohead ul, .latour_nohead ol,
.lampe_nohead ul, .lampe_nohead ol {
padding-left: 0;
list-style-position: inside;
} }
.encart-split { .encart-split {
@@ -218,20 +241,13 @@ h4 {
background-color: beige; background-color: beige;
} }
.pagedjs_left_page .latour, .pagedjs_left_page .lampe { .pagedjs_left_page .latour, .pagedjs_left_page .lampe,
.pagedjs_left_page .latour_nohead, .pagedjs_left_page .lampe_nohead {
padding-right: 10mm; padding-right: 10mm;
width: 128.375mm; width: 128.375mm;
} }
.latour[data-split-original="true"] { .encart-header {
padding-bottom: 1mm !important;
}
.latour[data-split-from] {
padding-top: 1mm !important;
}
.latour-header, .lampe-header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
@@ -239,18 +255,12 @@ h4 {
font-weight: bold; font-weight: bold;
} }
.latour-header img:first-of-type, .encart-header img:first-of-type {
.lampe-header img:first-of-type {
margin-top: 1mm; margin-top: 1mm;
margin-right: 2mm; margin-right: 2mm;
width: 8mm; width: 8mm;
} }
.lampe {
padding-top: 3mm;
padding-bottom: 3mm;
}
.bibliographie { .bibliographie {
column-count: 2; column-count: 2;
column-gap: var(--guts); column-gap: var(--guts);
@@ -264,11 +274,17 @@ img {
width: 100%; width: 100%;
} }
.imgsmall { .imgsmall,
.imgsmall_bottom {
padding-left: calc(var(--pagedjs-pagebox-width) / var(--cols)); padding-left: calc(var(--pagedjs-pagebox-width) / var(--cols));
} }
.imgsmall img { .imgsmall_bottom {
break-after: page;
}
.imgsmall img,
.imgsmall_bottom img {
width: 100%; width: 100%;
} }
@@ -329,10 +345,14 @@ img {
width: calc(62.5% - 2mm); width: calc(62.5% - 2mm);
} }
.imgfullspreadleft, .imgfullspreadleft,
.imgfullspreadright, .imgfullspreadright,
.imgfullspreadright_bleedtop, .imgfullspreadright_bleedtop,
.imgfullspreadright_bleed { .imgfullspreadright_bleed,
.doublepage_bigleft,
.doublepage_bigright {
break-before: left; break-before: left;
break-after: left; break-after: left;
width: 149mm; width: 149mm;
@@ -409,3 +429,59 @@ img {
width: auto; width: auto;
margin-left: -141mm; margin-left: -141mm;
} }
.doublepage_bigleft,
.doublepage_bigright {
height: 128mm !important;
}
.doublepage_bigleft img,
.doublepage_bigright img {
height: 100%;
width: auto;
}
.overflow_bigimgleft,
.overflow_bigimgright {
height: 128mm !important;
}
.overflow_bigimgleft {
margin-left: -157mm;
}
.overflow_bigimgright {
display: flex;
justify-content: flex-end;
}
.doublepage_bigright img {
margin-left: 106mm;
}
.overflow_bigimgleft img,
.overflow_bigimgright img {
height: 100%;
width: auto;
}
.dp_sm_img {
position: absolute;
width: calc((var(--pagedjs-pagebox-width) / var(--cols)) * 4);
height: 71mm !important;
}
.pagedjs_right_page .dp_sm_img {
right: 0;
}
.pagedjs_left_page .dp_sm_img {
left: 0;
}
.dp_sm_img img {
position: absolute;
bottom: 0;
width: 100%;
}
+55 -44
View File
@@ -43,9 +43,19 @@ class setMarginTexts extends Paged.Handler {
} }
// images collées en bas // images collées en bas
let bottomImgs = document.querySelectorAll('.bottomimg, .tripleimgs_bottom, .tripleimgs2_bottom'); let bottomImgs = document.querySelectorAll('.bottomimg, .tripleimgs_bottom, .tripleimgs2_bottom');
for (let i = 0; i < bottomImgs.length; i++) { for (let bottomImg of bottomImgs) {
let page = bottomImgs[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode; let pageBottom = bottomImg.closest('.pagedjs_area').getBoundingClientRect().bottom;
bottomImgs[i].style.transform = 'translateY(' + (page.getBoundingClientRect().bottom - bottomImgs[i].lastElementChild.getBoundingClientRect().bottom) + 'px)'; bottomImg.style.transform = 'translateY(' + (pageBottom - bottomImg.lastElementChild.getBoundingClientRect().bottom) + 'px)';
}
let bottomVignettes = document.querySelectorAll('.imgsmall_bottom'); // pour les images en bas dans les pages avec du texte
for (let bottomVignette of bottomVignettes) {
let pageBottom = bottomVignette.closest('.pagedjs_area').getBoundingClientRect().bottom;
let textBottom = bottomVignette.previousElementSibling.getBoundingClientRect().bottom;
let vignetteSize = bottomVignette.getBoundingClientRect().height;
if (bottomVignette.previousElementSibling.classList.contains('labeur')) {
bottomVignette.style.marginTop = `${(pageBottom - textBottom) - vignetteSize}px`;
}
bottomVignette.style.transform = 'translateY(12px)';
} }
// éléments justifiés pas nécessaires // éléments justifiés pas nécessaires
let justifiedSplitEl = document.querySelectorAll("[data-align-last-split-element='justify']"); let justifiedSplitEl = document.querySelectorAll("[data-align-last-split-element='justify']");
@@ -58,10 +68,10 @@ class setMarginTexts extends Paged.Handler {
} }
} }
// images fullspread // images fullspread
let fullspreadEl = document.querySelectorAll('.imgfullspreadleft, .imgfullspreadright, .imgfullspreadright_bleedtop, .imgfullspreadright_bleed'); let fullspreadEl = document.querySelectorAll('.imgfullspreadleft, .imgfullspreadright, .imgfullspreadright_bleedtop, .imgfullspreadright_bleed, .doublepage_bigleft, .doublepage_bigright');
for (let i = 0; i < fullspreadEl.length; i++) { for (let i = 0; i < fullspreadEl.length; i++) {
let imgSrc = fullspreadEl[i].firstElementChild.getAttribute('src'); let imgSrc = fullspreadEl[i].firstElementChild.getAttribute('src');
let nextPage = fullspreadEl[i].closest('.pagedjs_page').nextElementSibling.querySelectorAll('.pagedjs_page_content'); let nextPage = fullspreadEl[i].closest('.pagedjs_page').nextElementSibling.querySelector('.pagedjs_page_content');
let imgOverflowEl = document.createElement('div'); let imgOverflowEl = document.createElement('div');
if (fullspreadEl[i].classList.contains('imgfullspreadleft')) { if (fullspreadEl[i].classList.contains('imgfullspreadleft')) {
imgOverflowEl.setAttribute('class', 'imgfullspreadleft-right'); imgOverflowEl.setAttribute('class', 'imgfullspreadleft-right');
@@ -71,18 +81,37 @@ class setMarginTexts extends Paged.Handler {
imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleedtop-right'); imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleedtop-right');
} else if (fullspreadEl[i].classList.contains('imgfullspreadright_bleed')) { } else if (fullspreadEl[i].classList.contains('imgfullspreadright_bleed')) {
imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleed-right'); imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleed-right');
} else if (fullspreadEl[i].classList.contains('doublepage_bigleft')) {
imgOverflowEl.setAttribute('class', 'overflow_bigimgleft');
} else if (fullspreadEl[i].classList.contains('doublepage_bigright')) {
imgOverflowEl.setAttribute('class', 'overflow_bigimgright');
} }
let imgOverflow = document.createElement('img'); let imgOverflow = document.createElement('img');
imgOverflow.src = imgSrc; imgOverflow.src = imgSrc;
imgOverflowEl.append(imgOverflow); imgOverflowEl.append(imgOverflow);
nextPage[0].append(imgOverflowEl); nextPage.append(imgOverflowEl);
if (fullspreadEl[i].classList.contains('imgfullspreadright') if (fullspreadEl[i].classList.contains('imgfullspreadright')
|| fullspreadEl[i].classList.contains('imgfullspreadright_bleedtop') || fullspreadEl[i].classList.contains('imgfullspreadright_bleedtop')
|| fullspreadEl[i].classList.contains('imgfullspreadright_bleed')) { || fullspreadEl[i].classList.contains('imgfullspreadright_bleed')) {
let imgMargin = imgOverflowEl.getBoundingClientRect().right - fullspreadEl[i].firstElementChild.getBoundingClientRect().right; let imgMargin = imgOverflowEl.getBoundingClientRect().right - fullspreadEl[i].firstElementChild.getBoundingClientRect().right;
fullspreadEl[i].firstElementChild.style.marginLeft = imgMargin + 'px'; fullspreadEl[i].firstElementChild.style.marginLeft = imgMargin + 'px';
} }
if (fullspreadEl[i].classList.contains('doublepage_bigleft') || fullspreadEl[i].classList.contains('doublepage_bigright')) {
let smallImgSrc = fullspreadEl[i].lastElementChild.getAttribute('src');
fullspreadEl[i].lastElementChild.remove();
let smallImg = document.createElement('img');
smallImg.setAttribute('src', smallImgSrc);
let smallImgEl = document.createElement('div');
smallImgEl.classList.add('dp_sm_img');
smallImgEl.append(smallImg);
if (fullspreadEl[i].classList.contains('doublepage_bigleft')) {
nextPage.append(smallImgEl);
} else {
fullspreadEl[i].parentElement.append(smallImgEl);
}
}
} }
// fullpage img page gauche // fullpage img page gauche
let fullPageImg = document.getElementsByClassName('fullpageimage'); let fullPageImg = document.getElementsByClassName('fullpageimage');
for (let i = 0; i < fullPageImg.length; i++) { for (let i = 0; i < fullPageImg.length; i++) {
@@ -91,54 +120,40 @@ class setMarginTexts extends Paged.Handler {
fullPageImg[i].style.marginLeft = '-22mm'; fullPageImg[i].style.marginLeft = '-22mm';
} }
} }
// encarts bleed // encarts
let encarts = document.querySelectorAll('.latour, .lampe'); let encarts = document.querySelectorAll('.latour, .lampe, .latour_nohead, .lampe_nohead');
for (let i = 0; i < encarts.length; i++) { for (let encart of encarts) {
if (encarts[i].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode if (encart.previousElementSibling != null) {
.classList.contains('pagedjs_right_page')) { encart.style.marginTop = '10mm';
encarts[i].style.marginRight = '-22mm';
encarts[i].style.paddingRight = '22mm';
} }
if (encarts[i].hasAttribute('data-split-original')) { if (encart.nextElementSibling != null) {
encart.style.marginBottom = '10mm';
}
if (encart.hasAttribute('data-split-to')) {
let plainColor = document.createElement('div'); let plainColor = document.createElement('div');
let plainHeight = encarts[i]
.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
.getBoundingClientRect().bottom - encarts[i].getBoundingClientRect().bottom;
plainColor.setAttribute('class', 'encart-split'); plainColor.setAttribute('class', 'encart-split');
if (encarts[i] let plainHeight = encart.closest('.pagedjs_sheet').getBoundingClientRect().bottom - encart.getBoundingClientRect().bottom;
.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode if (encart.closest('.pagedjs_page').classList.contains('pagedjs_right_page')) {
.classList.contains('pagedjs_right_page')) {
plainColor.style.width = "149mm"; plainColor.style.width = "149mm";
} else { } else {
plainColor.style.width = "129mm"; plainColor.style.width = "129mm";
} }
plainColor.style.height = plainHeight + "px"; plainColor.style.height = `${plainHeight}px`;
encarts[i].parentNode.append(plainColor); encart.parentNode.append(plainColor);
} else if (encarts[i].hasAttribute('data-split-from')) { }
if (encart.hasAttribute('data-split-from')) {
let plainColor = document.createElement('div'); let plainColor = document.createElement('div');
plainColor.setAttribute('class', 'encart-split'); plainColor.setAttribute('class', 'encart-split');
if (encarts[i] if (encart.closest('.pagedjs_page').classList.contains('pagedjs_right_page')) {
.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode
.classList.contains('pagedjs_right_page')) {
plainColor.style.width = "149mm"; plainColor.style.width = "149mm";
} else { } else {
plainColor.style.width = "129mm"; plainColor.style.width = "129mm";
} }
plainColor.style.height = "22mm"; plainColor.style.height = "22mm";
plainColor.style.top = "-22mm"; plainColor.style.top = "-22mm";
encarts[i].parentNode.prepend(plainColor); encart.parentNode.prepend(plainColor);
}
if (encarts[i].previousElementSibling === null) {
encarts[i].style.marginTop = '0';
if (encarts[i].hasAttribute('data-split-original')) {
encarts[i].parentElement.style.height = '214mm';
encarts[i].style.paddingBottom = '0 !important';
encarts[i].style.height = "100%";
encarts[i].nextElementSibling.style.height = '22mm';
encarts[i].nextElementSibling.style.bottom = '-22mm';
encarts[i].nextElementSibling.style.right = '-28.5mm';
}
} }
} }
@@ -149,7 +164,6 @@ class setMarginTexts extends Paged.Handler {
let coverPhoto; let coverPhoto;
let photoContainer = h3.nextElementSibling; let photoContainer = h3.nextElementSibling;
if (h3.nextSibling?.children.length === 2) { if (h3.nextSibling?.children.length === 2) {
console.log('2 toffs');
coverPhoto = h3.nextElementSibling.children[1]; coverPhoto = h3.nextElementSibling.children[1];
let coverDessin = document.createElement('img'); let coverDessin = document.createElement('img');
coverDessin.setAttribute('src', photoContainer.firstElementChild.getAttribute('src')); coverDessin.setAttribute('src', photoContainer.firstElementChild.getAttribute('src'));
@@ -158,7 +172,6 @@ class setMarginTexts extends Paged.Handler {
coverDessin.style.height = 'auto'; coverDessin.style.height = 'auto';
photoContainer.firstElementChild.remove(); photoContainer.firstElementChild.remove();
} else { } else {
console.log('1 toff');
coverPhoto = h3.nextElementSibling.firstChild; coverPhoto = h3.nextElementSibling.firstChild;
} }
photoContainer.style.position = 'absolute'; photoContainer.style.position = 'absolute';
@@ -189,8 +202,6 @@ class setMarginTexts extends Paged.Handler {
nextContainer.append(nextImg); nextContainer.append(nextImg);
h3.closest('.pagedjs_page').nextElementSibling?.querySelector('.pagedjs_page_content').append(nextContainer); h3.closest('.pagedjs_page').nextElementSibling?.querySelector('.pagedjs_page_content').append(nextContainer);
} else {
console.log('0 toff');
} }
h3.style.position = 'absolute'; h3.style.position = 'absolute';
h3.style.top = `${(h3.closest('.pagedjs_page_content').offsetHeight - h3.offsetHeight) / 3}px`; h3.style.top = `${(h3.closest('.pagedjs_page_content').offsetHeight - h3.offsetHeight) / 3}px`;
@@ -335,7 +346,7 @@ class setMarginTexts extends Paged.Handler {
link.style.color = partieColor; link.style.color = partieColor;
} }
let lightColor = partieColor.slice(0, -1) + ', 0.1)'; let lightColor = partieColor.slice(0, -1) + ', 0.1)';
let encarts = page.querySelectorAll('.lampe, .latour, .encart-split'); let encarts = page.querySelectorAll('.lampe, .latour, .lampe_nohead, .latour_nohead, .encart-split');
for (let encart of encarts) { for (let encart of encarts) {
encart.style.backgroundColor = lightColor; encart.style.backgroundColor = lightColor;
} }
+39 -30
View File
@@ -6,9 +6,12 @@ let baliseWords = [
'temps', 'temps',
'moment', 'moment',
'latour', 'latour',
'latour_nohead',
'lampe', 'lampe',
'lampe_nohead',
'bibliographie', 'bibliographie',
'imgsmall', 'imgsmall',
'imgsmall_bottom',
'fullpage2imgs', 'fullpage2imgs',
'fullpageimage', 'fullpageimage',
'tripleimgs', 'tripleimgs',
@@ -21,7 +24,9 @@ let baliseWords = [
'imgfullspreadright_bleedtop', 'imgfullspreadright_bleedtop',
'imgfullspreadright_bleed', 'imgfullspreadright_bleed',
'breakbefore', 'breakbefore',
'breakafter' 'breakafter',
`doublepage_bigright`,
`doublepage_bigleft`
]; ];
var bodyContent = $('#body').html(); var bodyContent = $('#body').html();
@@ -52,42 +57,46 @@ for(let i = 0; i < moments.length; i++) {
// cleaner le balisage des éléments contenant plusieurs paragraphes // cleaner le balisage des éléments contenant plusieurs paragraphes
let contentToParse = []; let contentToParse = [];
let labeurs = document.getElementsByClassName("labeur"); let labeurs = document.querySelectorAll('.labeur');
for(let i = 0; i < labeurs.length; i++) { for(let labeur of labeurs) {
contentToParse.push(labeurs[i]); contentToParse.push(labeur);
} }
// créer header icons pour encarts // créer header icons pour encarts
let latours = document.getElementsByClassName("latour"); let encarts = document.querySelectorAll('.latour, .latour_nohead, .lampe, .lampe_nohead');
for(let i = 0; i < latours.length; i++) { for(let encart of encarts) {
contentToParse.push(latours[i]); contentToParse.push(encart);
let headContent = latours[i].firstChild let headContent = encart.firstChild
let headerEl = document.createElement('div'); let headerEl = document.createElement('div');
headerEl.setAttribute('class', 'latour-header') headerEl.setAttribute('class', 'encart-header')
let iconImg = document.createElement('img'); let iconImg = document.createElement('img');
if (encart.classList.contains('latour') || encart.classList.contains('latour')) {
iconImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/map.png'); iconImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/map.png');
headerEl.append(iconImg); } else if (encart.classList.contains('lampe') || encart.classList.contains('lampe_nohead')) {
headerEl.append(headContent);
latours[i].firstChild?.remove();
latours[i].prepend(headerEl);
}
let lampes = document.getElementsByClassName("lampe");
for(let i = 0; i < lampes.length; 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'); iconImg.setAttribute('src', '/user/themes/carnet-atterrissage/assets/lampe.png');
headerEl.append(iconImg); }
headerEl.append(headContent);
lampes[i].firstChild?.remove(); if (encart.classList.contains('latour_nohead') || encart.classList.contains('lampe_nohead')) {
lampes[i].prepend(headerEl); headerEl.style.flexDirection = 'column';
headerEl.style.alignItems = 'flex-start';
headerEl.style.fontWeight = 'normal';
iconImg.style.marginBottom = '2mm';
encart.style.paddingTop = '5mm';
encart.style.paddingBottom = '5mm';
iconImg.style.margin = '0';
iconImg.style.marginBottom = '2.5mm';
}
headerEl.append(iconImg);
headerEl.append(headContent);
encart.firstChild?.remove();
encart.prepend(headerEl);
if (encart.querySelector('.encart-header').nextElementSibling == null) {
encart.querySelector('.encart-header').style.marginBottom = '0';
}
} }
for(let i = 0; i < contentToParse.length; i++) { for(let i = 0; i < contentToParse.length; i++) {