diff options
author | Julius Haertl <jus@bitgrid.net> | 2017-02-17 16:42:07 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-04-25 11:39:45 +0200 |
commit | 68a63ad3f33c683d726219a508bb31de7b9ab1d0 (patch) | |
tree | 910932971b761689c8ca843860119a1df6e29573 /lib/private/TemplateLayout.php | |
parent | 133f3fdc9aec28383dba323d58569eddd160b0df (diff) | |
download | nextcloud-server-68a63ad3f33c683d726219a508bb31de7b9ab1d0.tar.gz nextcloud-server-68a63ad3f33c683d726219a508bb31de7b9ab1d0.zip |
Implement scss variable injection by OC_Defaults
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Add Scss variables to example theme and theming app
Signed-off-by: Julius Haertl <jus@bitgrid.net>
Use SCSSCacher to build theming css
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Update theming.scss
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Code cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Fix tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Inject SCSSCacher for easier testing
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Fix typehint
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Generate absolute URLs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Fix tests to always use absolute urls for theming images
Signed-off-by: Julius Härtl <jus@bitgrid.net>
MailheaderColor -> ColorPrimary
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/TemplateLayout.php')
-rw-r--r-- | lib/private/TemplateLayout.php | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 7a5984a4924..64d21186f69 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -58,6 +58,7 @@ class TemplateLayout extends \OC_Template { // yes - should be injected .... $this->config = \OC::$server->getConfig(); + // Decide which page we show if($renderAs == 'user') { parent::__construct( 'core', 'layout.user' ); @@ -209,16 +210,7 @@ class TemplateLayout extends \OC_Template { $theme = \OC_Util::getTheme(); if($compileScss) { - /** @var \OC\Memcache\Factory $cache */ - $cache = \OC::$server->query('MemCacheFactory'); - $SCSSCacher = new SCSSCacher( - \OC::$server->getLogger(), - \OC::$server->getAppDataDir('css'), - \OC::$server->getURLGenerator(), - \OC::$server->getConfig(), - \OC::$SERVERROOT, - $cache->createLocal('SCSS') - ); + $SCSSCacher = \OC::$server->query(SCSSCacher::class); } else { $SCSSCacher = null; } @@ -228,7 +220,8 @@ class TemplateLayout extends \OC_Template { $theme, array( \OC::$SERVERROOT => \OC::$WEBROOT ), array( \OC::$SERVERROOT => \OC::$WEBROOT ), - $SCSSCacher); + $SCSSCacher + ); $locator->find($styles); return $locator->getResources(); } |