From: Vincent Vanwaelscappel Date: Wed, 26 Feb 2025 10:47:25 +0000 (+0100) Subject: wip #7340 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=09d337fa6b849cbee494775a024198e12476c770;p=fluidbook-toolbox.git wip #7340 @1 --- diff --git a/app/Fluidbook/Compiler/Compiler.php b/app/Fluidbook/Compiler/Compiler.php index e41ea995c..16bfef22f 100644 --- a/app/Fluidbook/Compiler/Compiler.php +++ b/app/Fluidbook/Compiler/Compiler.php @@ -1828,7 +1828,7 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->lessVariables['slider-handle'] = Color::colorToCSS(!$this->themeSettings->sliderHandle ? '#ffffff' : $this->themeSettings->sliderHandle); $this->lessVariables['slider-display'] = $this->_lessBoolean($this->themeSettings->pagesBar); $this->lessVariables['slider-thumb-background'] = Color::colorToCSS($this->themeSettings->pageBarThumbBack); - $this->lessVariables['pages-background'] = $this->fluidbookSettings->forceWhiteBackground ? '#ffffff' : 'transparent'; + $this->lessVariables['pages-background'] = $this->fluidbookSettings->forceWhiteBackground && !$this->transparent ? '#ffffff' : 'transparent'; $this->log('CSS 1'); @@ -2650,9 +2650,13 @@ class Compiler extends Base implements CompilerInterface, IVirtualDirectoryError $this->addIssue(FluidbookHealthIssues::TYPE_COMPILE_FILES, ['error' => $message]); } - public function addPageBackgroundColor($page, $color, $arrowsColor) + public function addPageBackground($page, $color, $arrowsColor, $image) { - $this->config->set('dynamicBackgroundColor.' . $page, [$color, $arrowsColor]); + $image = $image && file_exists($this->wdir . '/' . $image) ? $image : ''; + if ($image) { + $this->vdir->copy($this->wdir . '/' . $image, 'data/links/' . $image); + } + $this->config->set('dynamicBackgroundColor.' . $page, [$color, $arrowsColor, $image]); } public function getExternalMultimediaContents($to)