]> _ Git - fluidbook-toolbox.git/commitdiff
wip #7340 @1
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Feb 2025 10:47:25 +0000 (11:47 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Feb 2025 10:47:25 +0000 (11:47 +0100)
app/Fluidbook/Compiler/Compiler.php

index e41ea995c621f07a8f3178657586e8af435bfeae..16bfef22f2a7137df66d83b54951455d4ce61d4a 100644 (file)
@@ -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)