AntonLV 11 лет назад
Родитель
Сommit
1a05a6228f

+ 25 - 0
inc/classes/BxDolTemplate.php

@@ -1426,6 +1426,30 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
      * @return mixed string or an array with CSS file's Path and URL.
      */
     function _lessCss($mixed)
+    {
+    	require_once(BX_DIRECTORY_PATH_PLUGINS . 'less.php/Less.php');
+
+        if(is_array($mixed) && isset($mixed['url']) && isset($mixed['path'])) {
+            $sPathFile = realpath($mixed['path']);
+            $aInfoFile = pathinfo($sPathFile);
+            if (!isset($aInfoFile['extension']) || $aInfoFile['extension'] != 'less')
+                return $mixed;
+
+            require_once(BX_DIRECTORY_PATH_PLUGINS . 'less.php/Cache.php');
+        	$aFiles = array($mixed['path'] => $mixed['url']);
+        	$aOptions = array('cache_dir' => $this->_sCachePublicFolderPath);
+        	$sFile = Less_Cache::Get($aFiles, $aOptions, $this->_oConfigTemplate->aLessConfig);
+
+            return array('url' => $this->_sCachePublicFolderUrl . $sFile, 'path' => $this->_sCachePublicFolderPath . $sFile);
+        }
+
+        $oLess = new Less_Parser();
+        $oLess->ModifyVars($this->_oConfigTemplate->aLessConfig);
+        $oLess->parse($mixed);
+        return $oLess->getCss();
+    }
+    /*
+    function _lessCss($mixed)
     {
         require_once(BX_DIRECTORY_PATH_PLUGINS . 'lessphp/lessc.inc.php');
         $oLess = new lessc();
@@ -1457,6 +1481,7 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
 
         return $oLess->compile($mixed);
     }
+    */
 
     /**
      * Minify CSS

+ 1 - 1
modules/boonex/ocean/data/template/studio/css/default.less

@@ -1 +1 @@
-@import url(../../../../../../../studio/template/css/default.less);
+@import '../../../../../../../studio/template/css/default.less';

+ 1 - 1
modules/boonex/ocean/data/template/system/css/default.less

@@ -1,4 +1,4 @@
-@import url(../../../../../../../template/css/default.less);
+@import '../../../../../../../template/css/default.less';
 
 /* image/thumbnail/gallery default styles */
 .bx-def-ava,

+ 1 - 1
studio/template/css/default.less

@@ -1,4 +1,4 @@
-@import url(../../../template/css/default.less);
+@import '../../../template/css/default.less';
 
 /* margins */
 .bx-def-margin-top-neg {

+ 1 - 1
template/css/_mixins.less

@@ -1,4 +1,4 @@
-@import url(_remixins.less);
+@import '_remixins.less';
 
 .radius(@val) {
     @rem-val: (unit(@val) / @base-font-size-px);

+ 2 - 2
template/css/default.less

@@ -1,4 +1,4 @@
-@import url(_mixins.less);
+@import '_mixins.less';
 
 .bx-def-page-width {
     width:@bx-page-width;
@@ -322,7 +322,7 @@
 
 /* shadow */
 .bx-def-shadow {
-    drop-shadow (0px, 1px, 3px, 0px, rgba(51, 51, 51, 0.1));
+    .drop-shadow (0px, 1px, 3px, 0px, rgba(51, 51, 51, 0.1));
 }
 
 /* round corders */