From dbd98029f30c987ae8ea9a8e0e2b1360b17afa7c Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Sun, 10 Jul 2011 05:56:58 +0000 Subject: [PATCH] --- fluidbook/icones/1/mobile/search.svg | 10 +++++++ .../Util/packager/class.ws.packager.html5.php | 27 ++++++++++++++----- 2 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 fluidbook/icones/1/mobile/search.svg diff --git a/fluidbook/icones/1/mobile/search.svg b/fluidbook/icones/1/mobile/search.svg new file mode 100644 index 000000000..ed50b69aa --- /dev/null +++ b/fluidbook/icones/1/mobile/search.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/inc/ws/Util/packager/class.ws.packager.html5.php b/inc/ws/Util/packager/class.ws.packager.html5.php index 5e9f26281..d5dd6866f 100644 --- a/inc/ws/Util/packager/class.ws.packager.html5.php +++ b/inc/ws/Util/packager/class.ws.packager.html5.php @@ -97,7 +97,7 @@ class wsPackagerHTML5 extends wsPackager { $arrowsColor = '#' . $this->theme->parametres->arrowsColor; // Set the icon list with the color $icons = array('nav-bookmark' => $couleurI, 'nav-friend' => $couleurI, 'nav-help' => $couleurI, 'nav-index' => $couleurI, 'nav-sommaire' => $couleurI, - 'next' => $arrowsColor, 'previous' => $arrowsColor); + 'next' => $arrowsColor, 'previous' => $arrowsColor, 'search' => $couleurI); foreach ($icons as $icon => $color) { // Get content of the svg @@ -226,7 +226,6 @@ class wsPackagerHTML5 extends wsPackager { protected function writeCSS($file) { $res = array(); - // General theme $h = $this->book->parametres->height . 'px'; $w2 = ($this->book->parametres->width * 2) . 'px'; @@ -234,11 +233,25 @@ class wsPackagerHTML5 extends wsPackager { $wm = ($this->book->parametres->width * $this->multiply) . 'px'; $hm = ($this->book->parametres->height * $this->multiply) . 'px'; + $navTop = ($this->book->parametres->height - 40 - 100) / 2; - $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.background{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; - $res[] = '.background{background-size:100% 100%;}'; - $res[] = '.doublePage,#pages{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; - $res[] = '.page.right{left:' . $w . '}'; + $res[] = '.portrait #pages,.portrait .doublePage.page,.page,.portrait #shadow,#shadow.single{width:' . $w . ';max-width:' . $w . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.background{' . $this->writeCSSUA('transform-origin', 'top left') . ';}'; + foreach (self::$resolutions as $r) { + $ratio = 72 / $r; + $wr = $this->book->parametres->width / $ratio; + $hr = $this->book->parametres->height / $ratio; + + $br = '.background.r' . $r . '{'; + if ($ratio != 1) { + $br.=$this->writeCSSUA('transform', 'scale(' . $ratio . ')') . ';'; + } + $br.='width:' . $wr . 'px;height:' . $hr . 'px;}'; + $res[] = $br; + } + $res[] = '.doublePage,#pages,.landscape #shadow.double{width:' . $w2 . ';max-width:' . $w2 . ';height:' . $h . ';max-height:' . $h . '}'; + $res[] = '.landscape #shadow.single.right{left: ' . $w . ';}'; + $res[] = '.landscape .page.right{left:' . $w . '}'; $texts = '.texts{' . $this->writeCSSUA('transform-origin', 'top left') . ';'; $texts.=$this->writeCSSUA('transform', 'scale(' . (1 / $this->multiply) . ')') . ';'; $texts.='width:' . $wm . '; max-width:' . $wm . ';'; @@ -334,7 +347,7 @@ class wsPackagerHTML5 extends wsPackager { // Book shadow $shadowColor = self::colorToCSS($this->theme->parametres->bookShadeColor); if ($shadowColor != 'transparent') { - $res[] = '#pages{' . $this->writeCSSUA('box-shadow', '0 0 20px ' . $shadowColor) . '}'; + $res[] = '#shadow{' . $this->writeCSSUA('box-shadow', '0 0 20px ' . $shadowColor) . '}'; } // Pages styles -- 2.39.5