}
body, html {
- background-color: #<!-- $bgcolor -->;
+ background-color: # <!-- $ bgcolor -->;
width: 100%;
height: 100%;
}
<div id="currentDoublePage" class="doublePage" aria-hidden="true"></div>
<div id="searchHighlights" aria-hidden="true"></div>
<div id="links"></div>
+ <div id="shade" aria-hidden="true">
+ <div class="left"></div>
+ <div class="right"></div>
+ </div>
</div>
</div>
</div>
})
var page;
- var shade;
// Si la page existe déjà, on la place à la bonne position et on l'affiche
if ($("#page_" + pageNr).length > 0) {
page = $("#page_" + pageNr);
$(page).show();
}
- $(page).children(".shade").html(this.loadPageShade(position));
$(page).children('.clinks').html(this.fluidbook.settings.clinks[pageNr]);
callback();
return;
$(doublePage).append(page);
$(page).show();
$(page).addClass(position);
- var back = $(page).children(".background")[0];
var $this = this;
this.loadDatas(pageNr, function () {
$(page).addClass(position);
-
- shade = 'shade' + position;
- if ($this.fluidbook.settings.pageReflection) {
- shade += '-reflet';
- }
- shade += '.png';
$(page).children('.clinks').html($this.fluidbook.settings.clinks[pageNr]);
- $(page).children(".shade").html($this.loadPageShade(position));
callback();
});
},
this.fluidbook.mobilefirst.beforeTransition(page);
}
+ if (turning.flip.indexOf(1) >= 0 && turning.dir === -1) {
+ $("#shade .left").hide();
+ }
+ if (turning.flip.indexOf(this.fluidbook.contentlock.maxPage) >= 0 && this.fluidbook.contentlock.maxPage % 2 === 0 && turning.dir === 1) {
+ $("#shade .right").hide();
+ }
+
this.fluidbook.hideLoader();
this.fluidbook.hideUnnecessaryButtons(page);
var animationDuration = transition <= 1 ? 0 : parseFloat(this.fluidbook.settings.mobileTransitionDuration);
$("#down").css('opacity', 0);
}
+ // Manage shade visibility
+ if (this.fluidbook.getPhysicalPageNumberOfSide('left', true) === false) {
+ $("#shade .left").hide();
+ } else {
+ $("#shade .left").show();
+ }
+
+ if (this.fluidbook.getPhysicalPageNumberOfSide('right', true) === false) {
+ $("#shade .right").hide();
+ } else {
+ $("#shade .right").show();
+ }
+
setTimeout(function () {
$this.transitionning = false;
/* Orientation */
.portrait #fluidbook {
- .shade, .page.right {
+ #shade .right, .page.right {
display: none;
}
}
height: 100%;
}
- .shade {
- position: absolute;
- top: 0px;
- z-index: 4;
- }
-
&.right {
z-index: 1;
-
- .shade {
- left: 0px;
- }
- }
-
- &.left {
- .shade {
- right: 0px;
- }
}
}
overflow-y: hidden;
}
+#shade {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 5;
+ pointer-events: none;
+ opacity: @page-shade-opacity;
+
+ .portrait & {
+ display: none;
+ }
+
+ > div {
+ position: absolute;
+ top: 0;
+ height: 100%;
+ width: 12.5%;
+ background-size: 100% 100%;
+
+ &.left {
+ right: 50%;
+ background-image: url("../images/shadows/pages/left.png");
+ }
+
+ &.right {
+ left: 50%;
+ background-image: url("../images/shadows/pages/right.png");
+ }
+ }
+}
+
/* Search */
#searchHighlights {
position: absolute;