From: vincent@cubedesigners.com Date: Tue, 30 Jan 2018 15:07:55 +0000 (+0000) Subject: #1903 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=69b094422b5bfe995168b8be99872f8fd20a9794;p=cubeextranet.git #1903 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 8682fcd39..ffcaa2237 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1286,6 +1286,8 @@ class wsHTML5Compiler { protected function writeCSS($file, $links) { $res = array(); + $lessContents = ''; + $lessVariables = array(); $lessVariables['slider-display'] = $this->_lessBoolean($this->theme->parametres->pagesBar); $lessVariables['slider-thumb-background'] = wsHTML5::colorToCSS($this->theme->parametres->pageBarThumbBack); @@ -1353,11 +1355,9 @@ class wsHTML5Compiler { $res[] = $shade; // SVG - $res[] = 'svg .fill-c-menu-back{fill:' . wsHTML5::colorToCSS($this->theme->parametres->couleurB) . ';}'; $res[] = 'svg .fill-c-menu-text{fill:' . wsHTML5::colorToCSS($this->theme->parametres->subTextColor) . ';}'; - // Background $res[] = $this->_cssBackground(); @@ -1442,6 +1442,20 @@ class wsHTML5Compiler { $lessVariables['icon-color'] = wsHTML5::colorToCSS($this->theme->parametres->couleurI); $lessVariables['menu-overlay'] = wsHTML5::colorToCSS($this->theme->parametres->popupVideoOverlay); + // Chapters + + + foreach ($this->book->chapters as $chapter) { + if (substr($chapter->page, 0, 1) != '#') { + continue; + } + if ($chapter->color == '') { + continue; + } + $color = trim($chapter->color, '#'); + $lessContents .= '.mview.c_' . $color . '{.menu-color(#' . $color . ');}'; + } + // Archives if ($this->book->parametres->externalArchivesBack) { $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack); @@ -1462,7 +1476,7 @@ class wsHTML5Compiler { $res[] = '.zoomPopupClose {background-color:' . wsHTML5::colorToCSS($this->theme->parametres->couleurB) . ';}'; - $this->_writeLess($lessVariables); + $this->_writeLess($lessVariables, $lessContents); $res = array_chunk($res, 3500); foreach ($res as $k => $css) { @@ -1473,7 +1487,7 @@ class wsHTML5Compiler { return count($res); } - protected function _writeLess($variables) { + protected function _writeLess($variables, $lessContents = '') { if ($this->widget) { $this->lessFiles[] = 'widget'; } @@ -1491,9 +1505,9 @@ class wsHTML5Compiler { $bookVariables[] = '@' . trim($k) . ':' . $v . ';'; } file_put_contents($tmp . '/book-variables.less', implode("\n", $bookVariables)); + file_put_contents($tmp . '/additional.less', $lessContents); foreach ($this->lessFiles as $f) { - $source_less = $this->assets . '/style/' . $f . '.less'; $destination_less = $tmp . '/' . $f . '.less'; $destination_css = $tmp . '/' . $f . '.css'; diff --git a/inc/ws/Util/html5/master/class.ws.html5.links.php b/inc/ws/Util/html5/master/class.ws.html5.links.php index 497fc39b1..0e1a1a0f7 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.links.php +++ b/inc/ws/Util/html5/master/class.ws.html5.links.php @@ -91,7 +91,6 @@ class wsHTML5Link { case 11: return new actionLink($id, $init, $compiler); case 12: - return new basketLink($id, $init, $compiler); case 13: // zoom area return new zoomLink($id, $init, $compiler);