]> _ Git - cubeextranet.git/commitdiff
fix #2419 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 10 Dec 2018 15:24:06 +0000 (15:24 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 10 Dec 2018 15:24:06 +0000 (15:24 +0000)
inc/ws/Util/html5/3dflip/class.ws.html5.compiler.php

index 2e0ab85fc6e2e86c1113958d9b042d121a27a84f..97c185e44728725af65fa132e1228735834e266f 100644 (file)
@@ -706,7 +706,7 @@ class wsHTML5Compiler
                        if ($this->theme->parametres->iosicon != '') {
                                $hasIos = true;
                                $this->vdir->copy($this->themeRoot . '/' . $this->theme->parametres->iosicon, 'data/apple-touch-icon.png');
-                               $favicon .= '<link rel="apple-touch-icon" href="data/apple-touch-icon.png" />'."\n\t";
+                               $favicon .= '<link rel="apple-touch-icon" href="data/apple-touch-icon.png" />' . "\n\t";
                        }
                        if ($this->theme->parametres->favicon != '') {
 
@@ -732,9 +732,9 @@ class wsHTML5Compiler
                                $dataico = 'data:image/vnd.microsoft.icon;base64,' . base64_encode(file_get_contents($icoFile));
                                $datapng = 'data:image/png;base64,' . base64_encode(file_get_contents($pngFile));
 
-                               $favicon .= '<link rel="shortcut icon" href="' . $dataico . '" />'."\n\t";
-                               $favicon .= '<link rel="icon" type="image/vnd.microsoft.icon" href="' . $dataico . '" />'."\n\t";
-                               $favicon .= '<link rel="icon" type="image/png" href="' . $datapng . '" />'."\n\t";
+                               $favicon .= '<link rel="shortcut icon" href="' . $dataico . '" />' . "\n\t";
+                               $favicon .= '<link rel="icon" type="image/vnd.microsoft.icon" href="' . $dataico . '" />' . "\n\t";
+                               $favicon .= '<link rel="icon" type="image/png" href="' . $datapng . '" />' . "\n\t";
                                if (!$hasIos) {
                                        $favicon .= '<link rel="apple-touch-icon" href="data/favicon.png" />';
                                }
@@ -756,7 +756,7 @@ class wsHTML5Compiler
                        $svg = '';
                        foreach ($svgfiles as $svgfile) {
                                if (file_exists($svgfile)) {
-                                       $svg .= file_get_contents($svgfile);
+                                       $svg .= str_replace('$bookmark-color',wsHTML5::colorToCSS($this->theme->parametres->bookmarkBackgroundColor),file_get_contents($svgfile));
                                } else {
                                        die($svgfile . ' does not exist');
                                }
@@ -1377,17 +1377,13 @@ class wsHTML5Compiler
 
                $couleurM = $this->theme->parametres->subTextColor;
 
-               $bookmarksDisabledColors = array('star' => $this->theme->parametres->bookmarkStarDisabledColor, 'bookmark' => $this->theme->parametres->bookmarkBackgroundColor);
-               $bookmarksEnabledColors = array('star' => $this->theme->parametres->bookmarkStarEnabledColor, 'bookmark' => $this->theme->parametres->bookmarkBackgroundColor);
                $subTextColor = $this->theme->parametres->subTextColor;
 
                $arrowsColor = $this->theme->parametres->arrowsColor;
                // Set the icon list with the color
                $icons = array('interface-down' => $arrowsColor, 'interface-close' => $arrowsColor,
                        'interface-audio-description-on' => $arrowsColor, 'interface-audio-description-off' => $arrowsColor,
-                       'help-fingers' => $couleurI, 'help-mouse' => $couleurI,
-                       'bookmark-left-off' => $bookmarksDisabledColors, 'bookmark-left-on' => $bookmarksEnabledColors,
-                       'bookmark-right-off' => $bookmarksDisabledColors, 'bookmark-right-on' => $bookmarksEnabledColors
+                       'help-fingers' => $couleurI, 'help-mouse' => $couleurI
                );
 
                $this->config->iconsDimensions = array();
@@ -1711,6 +1707,10 @@ class wsHTML5Compiler
                if (!isset($this->book->parametres->bookmarkCornerSize)) {
                        $this->book->parametres->bookmarkCornerSize = 10;
                }
+
+               $lessVariables['bookmark-star-disabled-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkStarDisabledColor);
+               $lessVariables['bookmark-star-enabled-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkStarEnabledColor);
+               $lessVariables['bookmark-color'] = wsHTML5::colorToCSS($this->theme->parametres->bookmarkBackgroundColor);
                $lessVariables['bookmark-corner-size'] = round($this->width * $this->book->parametres->bookmarkCornerSize * 0.0075 * $this->z) . 'px';
                $lessVariables['bookmark-corner-offset'] = $this->book->parametres->bookmarkOffset . 'px';