MODIF ADMIN : footnotes, suppression lien x, accès ressources éditor, menu burger scrollable

This commit is contained in:
2026-01-12 19:16:17 +01:00
parent 310ff06463
commit 39ed94c029
7 changed files with 122 additions and 55 deletions

View File

@@ -435,6 +435,45 @@
var rellax = new Rellax('.bgImg', {
wrapper: 'body',
});
// footnotes
if (document.querySelector('.retour_projets')) {
const textContent = document.querySelector('.text-content');
if (textContent) {
const paragraphs = textContent.querySelectorAll('p');
const footnotes = [];
let footnoteNumber = 1;
// Process each paragraph to find and replace [...] with superscripts
paragraphs.forEach(p => {
p.innerHTML = p.innerHTML.replace(/\[(.*?)\]/g, (match, content) => {
footnotes.push({
number: footnoteNumber,
text: content
});
return `<sup style="font-size: 0.7rem; vertical-align: top; font-weight: bold;">${footnoteNumber++}</sup>`;
});
});
// Create footnotes div if there are any footnotes
if (footnotes.length > 0) {
const fullpageContent = document.querySelector('.fullpage_content');
if (fullpageContent) {
const footnotesDiv = document.createElement('div');
footnotesDiv.className = 'footnotes';
footnotes.forEach(footnote => {
const footnoteItem = document.createElement('p');
footnoteItem.innerHTML = `<strong>${footnote.number}.</strong> ${footnote.text}`;
footnoteItem.style.fontSize = '0.8rem';
footnotesDiv.appendChild(footnoteItem);
});
fullpageContent.appendChild(footnotesDiv);
}
}
}
}
}
}