|
@@ -161,21 +161,27 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// images fullspread
|
|
// images fullspread
|
|
- let fullspreadEl = document.querySelectorAll('.imgfullspreadleft, .imgfullspreadright');
|
|
|
|
|
|
+ let fullspreadEl = document.querySelectorAll('.imgfullspreadleft, .imgfullspreadright, .imgfullspreadright_bleedtop, .imgfullspreadright_bleed');
|
|
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.querySelectorAll('.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');
|
|
- } else {
|
|
|
|
|
|
+ } else if (fullspreadEl[i].classList.contains('imgfullspreadright')) {
|
|
imgOverflowEl.setAttribute('class', 'imgfullspreadright-right');
|
|
imgOverflowEl.setAttribute('class', 'imgfullspreadright-right');
|
|
|
|
+ } else if (fullspreadEl[i].classList.contains('imgfullspreadright_bleedtop')) {
|
|
|
|
+ imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleedtop-right');
|
|
|
|
+ } else if (fullspreadEl[i].classList.contains('imgfullspreadright_bleed')) {
|
|
|
|
+ imgOverflowEl.setAttribute('class', 'imgfullspreadright_bleed-right');
|
|
}
|
|
}
|
|
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[0].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_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';
|
|
}
|
|
}
|