|
@@ -147,9 +147,9 @@ export default {
|
|
|
this.$nextTick(function() {
|
|
|
Promise.all(allPromises).then(() => {
|
|
|
let previewer = new Previewer();
|
|
|
- previewer.preview().then((flow)=>{
|
|
|
+ previewer.preview().then((flow) => {
|
|
|
let layouts = Array.from(document.querySelectorAll(".layout"));
|
|
|
- layouts.forEach(l=>{
|
|
|
+ layouts.forEach(l => {
|
|
|
l.classList.add("full-layout");
|
|
|
});
|
|
|
// Centrer les citations
|
|
@@ -157,14 +157,22 @@ export default {
|
|
|
citations.forEach((citation, i) => {
|
|
|
let l = citation.closest(".layout");
|
|
|
l.classList.add("pagequote");
|
|
|
- console.log(l);
|
|
|
+ });
|
|
|
+ // Suppression des pages vides
|
|
|
+ let pages = Array.from(document.querySelectorAll(".pagedjs_blank_page"));
|
|
|
+ pages.forEach((page, i) => {
|
|
|
+ let nextPage = document.querySelector(`.pagedjs_page[data-page-number='${parseInt(page.dataset.pageNumber) + 1}']`);
|
|
|
+ if (nextPage.querySelector(".blank-page") !== null &&
|
|
|
+ nextPage.classList.contains("pagedjs_left_page")
|
|
|
+ ) {
|
|
|
+ nextPage.parentNode.removeChild(nextPage);
|
|
|
+ }
|
|
|
+ page.parentNode.removeChild(page);
|
|
|
});
|
|
|
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
};
|