From: vincent@cubedesigners.com Date: Mon, 19 Jun 2017 12:02:13 +0000 (+0000) Subject: #1472 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=2a2124db2e553337a43e5fa8bf748308b13f6f88;p=cubeextranet.git #1472 --- diff --git a/inc/ws/Util/html5/slider/class.ws.html5.compiler.php b/inc/ws/Util/html5/slider/class.ws.html5.compiler.php index 78e9bfa9b..285db98a4 100644 --- a/inc/ws/Util/html5/slider/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/slider/class.ws.html5.compiler.php @@ -1175,11 +1175,15 @@ class wsHTML5Compiler { return true; } + protected function _lessBoolean($val) { + return $val ? 'true' : 'false'; + } + protected function writeCSS($file, $links) { $res = array(); $lessVariables = array(); - $lessVariables['slider-display'] = $this->theme->parametres->pagesBar ? 'true' : 'false'; + $lessVariables['slider-display'] = $this->_lessBoolean($this->theme->parametres->pagesBar); $lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack); // General theme @@ -1201,7 +1205,8 @@ class wsHTML5Compiler { $leftOfRightPage = (floor($cssWidth) - 1) . 'px'; $lessVariables['z'] = $this->z; - + $lessVariables['book-page-width'] = $w; + $lessVariables['book-page-height'] = $h; $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.doublePage._3d,#shadow>div{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; $res[] = '.doublePage,#pages,#links{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; @@ -1216,12 +1221,10 @@ class wsHTML5Compiler { $res[] = '#links.right{left:-' . $w . ';}'; $res[] = '.landscape #shadow>div.right{left: ' . $w . ';}'; $res[] = '.landscape .page.right{left:' . $w . '}'; - if ($this->theme->parametres->displayPageNumber) { - $res[] = '#pagesnumbers{font-size: ' . (11 * $this->z) . 'px;margin: ' . (5 * $this->z) . 'px 0 0 0;top:' . $h . ';color:' . wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber) . '}'; - $res[] = '#pagesnumbers div{width:' . $w . '}'; - } else { - $res[] = '#pagesnumbers{display:none;}'; - } + + $lessVariables['page-number-color'] = wsHTML5::colorToCSS($this->theme->parametres->colorPageNumber); + $lessVariables['display-page-number'] = $this->_lessBoolean($this->theme->parametres->displayPageNumber); + $res[] = '.doublePage._2d,.doublePage._3d{' . wsHTML5::writeCSSUA('transition', 'all ' . $this->book->parametres->mobileTransitionDuration . 's ease-in-out') . '}'; $res[] = '.background{' . wsHTML5::writeCSSUA('transform-origin', 'top left') . ';}';