diff --git a/Application/ApplicationManager.php b/Application/ApplicationManager.php index fd9770090..42185372c 100644 --- a/Application/ApplicationManager.php +++ b/Application/ApplicationManager.php @@ -103,6 +103,7 @@ final class ApplicationManager $this->applications[$app->getInternalName()] = $app; $this->installFiles($source, $destination); + $this->installTheme($destination, 'Akebi'); $this->installFromModules($app); } @@ -121,6 +122,31 @@ final class ApplicationManager Directory::copy($source, $destination); } + /** + * Install the theme + * + * @param string $destination Destination of the application + * @param string $theme Theme name + * + * @return void + * + * @since 1.0.0 + */ + private function installTheme(string $destination, string $theme) : void + { + if (\file_exists($destination . '/css')) { + Directory::delete($destination . '/css'); + } + + if (\file_exists($destination . '/Themes/' . $theme . '/css')) { + Directory::copy( + $destination . '/Themes/' . $theme . '/css', + $destination . '/css', + true + ); + } + } + /** * Install routes and hooks from modules for application *