* 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';
$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);
$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);