]> _ Git - cubeextranet.git/commitdiff
#1490
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 13 Dec 2017 10:37:47 +0000 (10:37 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 13 Dec 2017 10:37:47 +0000 (10:37 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 7f13073e7744c9ac8cfa28ae69b8fafbd8789a25..abe416a083eb06397b1a06b7e0aaa5fbfe3e1e17 100644 (file)
@@ -423,9 +423,9 @@ class wsHTML5Compiler {
         * Duplicate paths are ignored.
         * @param $path
         */
-       public function addJs($path,$collection=null) {
+       public function addJs($path, $collection = null) {
 
-               if(null===$collection) {
+               if (null === $collection) {
                        // If JS is external, it will be included via the pluginJs collection
                        // Otherwise, it will be compiled into the main JS file
                        $collection = (preg_match('#^https?://#i', $path) === 1) ? 'pluginJs' : 'jsFiles';
@@ -1400,8 +1400,16 @@ class wsHTML5Compiler {
                $menuBreakpoint = empty($this->book->parametres->menuBreakpoint) ? '1080px' : $this->book->parametres->menuBreakpoint;
 
                $lessVariables['menu-breakpoint'] = $menuBreakpoint;
-               $lessVariables['menu-button-background'] = $this->theme->parametres->subSecondaryColor;
                $lessVariables['menu-background'] = $menuColor->toCSS();
+               if ($this->theme->parametres->subSecondaryColor) {
+                       $lessVariables['menu-button-background'] = wsHTML5::colorToCSS($this->theme->parametres->subSecondaryColor);
+               } else {
+                       $lessVariables['menu-background-green'] = 'max(@max, min(255-45, green(@menu-background)))';
+                       $lessVariables['menu-background-red'] = 'max(@max, min(255-45, red(@menu-background)))';
+                       $lessVariables['menu-background-blue'] = 'max(@max, min(255-45, blue(@menu-background)))';
+                       $lessVariables['menu-button-background'] = 'overlay(rgb(@menu-background-red, @menu-background-green, @menu-background-blue), #c0c0c0)';
+               }
+
                $lessVariables['menu-text'] = $menuTextColor;
                $lessVariables['menu-field-background'] = wsHTML5::colorToCSS($this->theme->parametres->subFieldColor);
                $lessVariables['menu-field-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextFieldColor);
@@ -1409,10 +1417,6 @@ class wsHTML5Compiler {
                $lessVariables['menu-select-text'] = wsHTML5::colorToCSS($this->theme->parametres->subTextSelectColor);
                $lessVariables['icon-color'] = wsHTML5::colorToCSS($this->theme->parametres->couleurI);
 
-               $menuMultiply = $menuColor->multiply($menuColor);
-               $menuMultiply2 = $menuMultiply->multiply($menuColor);
-
-
                // Archives
                if ($this->book->parametres->externalArchivesBack) {
                        $this->vdir->copy($this->wdir . '/' . $this->book->parametres->externalArchivesBack, 'data/images/' . $this->book->parametres->externalArchivesBack);