]> _ Git - fluidbook_tools.git/commitdiff
wip #4757
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 14 Oct 2021 14:58:24 +0000 (16:58 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 14 Oct 2021 14:58:24 +0000 (16:58 +0200)
src/Compiler/Styles.php

index e76c0c13dfcde832c83eea8270953411504acf75..5ac43d76a9361f0426b4fa808c34948af5773a10 100644 (file)
@@ -13,7 +13,7 @@ trait Styles
     protected $stylesheets = [];
     protected $lessSource;
     protected $cssfont = [];
-    public $lessFiles = ['fluidbook','videojs/videojs'];
+    public $lessFiles = ['fluidbook', 'videojs/videojs'];
 
     public function isMobileFirst()
     {
@@ -67,8 +67,8 @@ trait Styles
 
         $lessContents = '';
 
-        $this->lessVariables['import-cart-styles']='none';
-        $this->lessVariables['articles-title-color']='#000000';
+        $this->lessVariables['import-cart-styles'] = 'none';
+        $this->lessVariables['articles-title-color'] = '#000000';
 
         $this->lessVariables['font'] = $this->_font($this->config->interfaceFont);
         $this->lessVariables['text-transform'] = $this->_themeBoolean($this->config->interfaceFontUppercase) ? 'uppercase' : 'inherit';
@@ -347,21 +347,23 @@ trait Styles
     protected function checkThemeImage($path)
     {
         return true;
-//        $path = trim($path);
-//        $path = trim($path, '/');
-//        if (!$path) {
-//            return false;
-//        }
-//        $p = $this->themeRoot . '/' . $path;
-//        if (file_exists($p)) {
-//            return $p;
-//        }
-//        $po = str_replace('.svg', '.o.svg', $p);
-//        if (file_exists($po)) {
-//            copy($po, $p);
-//            return $p;
-//        }
-//        return false;
+        $path = trim($path);
+        $path = trim($path, '/');
+        if (!$path) {
+            return false;
+        }
+        $p = $this->stub . '/_theme/' . $path;
+        if (file_exists($p)) {
+            $this->vdir->copy($p, 'data/' . $path);
+            return $p;
+        }
+        $o=str_replace('.svg', '.o.svg', $p);
+        if (file_exists($po)) {
+            copy($po, $p);
+            $this->vdir->copy($p, 'data/' . $path);
+            return $p;
+        }
+        return false;
     }
 
     protected function _lessBoolean($val)