]> _ Git - cubeextranet.git/commitdiff
wip #4358 @0.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 Mar 2021 18:16:51 +0000 (18:16 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 31 Mar 2021 18:16:51 +0000 (18:16 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index 086acdea2a7d54bbbae1d76012133cb032204332..e54d0859ebc74aa7ccb4bf88cd1d8ffb5a763b3b 100644 (file)
@@ -2259,6 +2259,7 @@ class wsHTML5Compiler
         } else {
             $texts = '.texts{width:' . floor(floatval($w) + $corrText) . 'px;height:' . floor(floatval($h) + $corrText) . 'px;}';
         }
+
         $res[] = $texts;
 
         // Theme
@@ -2480,8 +2481,17 @@ class wsHTML5Compiler
 
     protected function _cssBackground()
     {
-        $body = '#background,#splash{';
-        $body .= 'background-color:#' . $this->theme->parametres->backgroundColor . ' !important;';
+        $body = '';
+
+        if ($this->theme->parametres->displayBackgroundDuringLoading) {
+            $body .= '#background,#splash{background-color:#' . $this->theme->parametres->backgroundColor . ' !important;}';
+        } else {
+            $body .= '#background{transition:500ms opacity;visibility:hidden;opacity:0;background-color:#' . $this->theme->parametres->backgroundColor . ' !important;}';
+            $body .= '#splash{background-color:' . $this->theme->parametres->loadingBackColor . ' !important;}';
+        }
+
+        $body .= '#background,#splash{';
+
         switch ($this->theme->parametres->repeat) {
             case wsTheme::REPEAT:
                 $body .= 'background-repeat:repeat;';