diff --git a/CHANGELOG.md b/CHANGELOG.md index 450e0fc..3db2f0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ Types of changes Security in case of vulnerabilities. ) +## [1.11.0](https://github.com/contao-themes-net/nature-theme-bundle/tree/1.11.0) – 2022-11-30 + +- [Added] Add multi domain support + ## [1.10.0](https://github.com/contao-themes-net/nature-theme-bundle/tree/1.10.0) – 2022-10-25 - [Added] Add more options to style content slider diff --git a/src/Module/NatureThemeSetup.php b/src/Module/NatureThemeSetup.php index a544e0d..0c2089a 100644 --- a/src/Module/NatureThemeSetup.php +++ b/src/Module/NatureThemeSetup.php @@ -26,7 +26,7 @@ class NatureThemeSetup extends BackendModule { - public const VERSION = '1.10.0'; + public const VERSION = '1.11.0'; protected $strTemplate = 'be_naturetheme_setup'; diff --git a/src/ThemeUtils.php b/src/ThemeUtils.php index 482a758..24d754c 100644 --- a/src/ThemeUtils.php +++ b/src/ThemeUtils.php @@ -24,6 +24,9 @@ class ThemeUtils { + public static string $themeFolder = 'bundles/contaothemesnetnaturetheme/'; + public static string $scssFolder = 'scss/'; + public static function getRootDir() { return System::getContainer()->getParameter('kernel.project_dir'); @@ -34,16 +37,23 @@ public static function getWebDir() return StringUtil::stripRootDir(System::getContainer()->getParameter('contao.web_dir')); } - public static function getCombinedStylesheet() + public static function getCombinedStylesheet($theme = null) { + self::$scssFolder = self::$themeFolder.self::$scssFolder; + + // for multi domain setup + if (null !== $theme) { + self::$scssFolder = 'files/naturetheme/scss/'.$theme.'/'; + } + // add stylesheets $combiner = new Combiner(); $combiner->add('bundles/contaothemesnetnaturetheme/fonts/fontawesome/css/all.min.css'); if ('WIN' === strtoupper(substr(PHP_OS, 0, 3))) { - $combiner->add('bundles/contaothemesnetnaturetheme/scss/nature_win.scss'); + $combiner->add(self::$scssFolder.'nature_win.scss'); } else { - $combiner->add('bundles/contaothemesnetnaturetheme/scss/nature.scss'); + $combiner->add(self::$scssFolder.'nature.scss'); } return $combiner->getCombinedFile();