diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 2a2bec1..f74bdd1 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -37,16 +37,12 @@ class AppServiceProvider extends ServiceProvider private function addThemeInfoToView() { $themeInfo = Theme::info(); - $themeInfoKeys = array('name', 'version'); - // Add each valid theme info element to the view - prefixing with theme_ + // Add each theme info element to the view - prefixing with theme_ // e.g. $themeInfo['name'] becomes $theme_name in the view - foreach ($themeInfoKeys as $key) + foreach ($themeInfo as $key => $value) { - if (isset($themeInfo[$key])) - { - View::share('theme_' . $key, $themeInfo[$key]); - } + View::share('theme_' . $key, $value); } // Also add a theme_url key diff --git a/resources/views/themes/base/layout.blade.php b/resources/views/themes/base/layout.blade.php index 4ec3888..56bd5e3 100644 --- a/resources/views/themes/base/layout.blade.php +++ b/resources/views/themes/base/layout.blade.php @@ -10,9 +10,10 @@ {{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}} - - - + {{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}} + + + @stack('styles') @@ -23,9 +24,10 @@ {{-- Cannot use $theme_url here: if a theme uses the base layout, it would also have to provide all these dependencies! --}} - - - + {{-- As these files are shipped with core (not a theme) use the main app.version instead of the current theme's version --}} + + + @stack('scripts') diff --git a/resources/views/themes/base/partials/navbar.blade.php b/resources/views/themes/base/partials/navbar.blade.php index 1dd8463..421ce71 100644 --- a/resources/views/themes/base/partials/navbar.blade.php +++ b/resources/views/themes/base/partials/navbar.blade.php @@ -1,4 +1,4 @@ -