From b2979d70a8de495c4f2fd086039e6f88e9f14982 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 14 Oct 2021 16:58:24 +0200 Subject: [PATCH] wip #4757 --- src/Compiler/Styles.php | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/Compiler/Styles.php b/src/Compiler/Styles.php index e76c0c1..5ac43d7 100644 --- a/src/Compiler/Styles.php +++ b/src/Compiler/Styles.php @@ -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) -- 2.39.5