breakign changes

This commit is contained in:
Mark Gregory
2026-07-24 15:16:10 +01:00
parent 157450cf44
commit 4988cb85bd
15 changed files with 457 additions and 76 deletions
@@ -13,7 +13,10 @@ use Modules\Stylist\Console\ThemeDoctorCommand;
use Modules\Stylist\Console\ValidateThemeCommand;
use Modules\Stylist\Html\ThemeHtmlBuilder;
use Modules\Stylist\Html\ThemeSeoBuilder;
use Modules\Stylist\Support\FrontendNavigation;
use Modules\Stylist\Support\ModuleInfo;
use Modules\Stylist\Services\ThemeSettings;
use Modules\Stylist\Theme\Loader;
use Modules\Stylist\Theme\Stylist;
final class StylistServiceProvider extends ServiceProvider
@@ -62,6 +65,24 @@ final class StylistServiceProvider extends ServiceProvider
$view->with('activeTheme', $this->app->make(Stylist::class)->current());
});
View::composer('stylist-theme-saasland::*', function ($view): void {
$theme = $this->app->make(Loader::class)->find('saasland');
$settings = $this->app->make(ThemeSettings::class)->get($theme);
$navigation = $this->app->make(FrontendNavigation::class);
$view->with([
'siteTitle' => filled($settings['site_title'] ?? null) ? $settings['site_title'] : config('app.name', 'Saasland'),
'siteDescription' => filled($settings['site_description'] ?? null) ? $settings['site_description'] : 'Modern software for modern companies.',
'logoUrl' => $settings['logo_url'] ?? null,
'facebookUrl' => $settings['facebook_url'] ?? null,
'xUrl' => $settings['x_url'] ?? null,
'linkedinUrl' => $settings['linkedin_url'] ?? null,
'primaryNavigation' => $navigation->primary(),
'footerNavigation' => $navigation->footer(),
]);
});
}
private function registerViews(): void