diff --git a/fluffy-theme/src/FluffyThemePlugin.php b/fluffy-theme/src/FluffyThemePlugin.php index 046ee2ef..5de6a33d 100644 --- a/fluffy-theme/src/FluffyThemePlugin.php +++ b/fluffy-theme/src/FluffyThemePlugin.php @@ -2,30 +2,45 @@ namespace Boy132\FluffyTheme; -use Filament\Contracts\Plugin; +use App\Contracts\Plugins\HasTheme; use Filament\Panel; use Filament\Support\Colors\Color; -class FluffyThemePlugin implements Plugin +class FluffyThemePlugin implements HasTheme { public function getId(): string { return 'fluffy-theme'; } - public function register(Panel $panel): void + public function register(Panel $panel): void {} + + public function boot(Panel $panel): void {} + + public function getThemeColors(): array { - $panel - ->font('Finger Paint') - ->colors([ - 'danger' => Color::Rose, - 'gray' => Color::generateV3Palette('#b974c3'), // Fuchsia but desaturated - 'info' => Color::Violet, - 'primary' => Color::Indigo, - 'success' => Color::Teal, - 'warning' => Color::Pink, - ]); + return [ + 'danger' => Color::Rose, + 'gray' => Color::generateV3Palette('#b974c3'), // Fuchsia but desaturated + 'info' => Color::Violet, + 'primary' => Color::Indigo, + 'success' => Color::Teal, + 'warning' => Color::Pink, + ]; } - public function boot(Panel $panel): void {} + public function getThemeFont(): ?string + { + return 'Finger Paint'; + } + + public function getThemeViteEntry(): string|array|null + { + return null; + } + + public function getThemeRenderHooks(): array + { + return []; + } } diff --git a/neobrutalism-theme/src/NeobrutalismThemePlugin.php b/neobrutalism-theme/src/NeobrutalismThemePlugin.php index c06e29d1..13b07577 100644 --- a/neobrutalism-theme/src/NeobrutalismThemePlugin.php +++ b/neobrutalism-theme/src/NeobrutalismThemePlugin.php @@ -2,20 +2,37 @@ namespace Boy132\NeobrutalismTheme; -use Filament\Contracts\Plugin; +use App\Contracts\Plugins\HasTheme; use Filament\Panel; -class NeobrutalismThemePlugin implements Plugin +class NeobrutalismThemePlugin implements HasTheme { public function getId(): string { return 'neobrutalism-theme'; } - public function register(Panel $panel): void + public function register(Panel $panel): void {} + + public function boot(Panel $panel): void {} + + public function getThemeColors(): array { - $panel->viteTheme('plugins/neobrutalism-theme/resources/css/theme.css'); + return []; } - public function boot(Panel $panel): void {} + public function getThemeFont(): ?string + { + return null; + } + + public function getThemeViteEntry(): string|array|null + { + return 'plugins/neobrutalism-theme/resources/css/theme.css'; + } + + public function getThemeRenderHooks(): array + { + return []; + } } diff --git a/nord-theme/src/NordThemePlugin.php b/nord-theme/src/NordThemePlugin.php index d73b0886..78f78741 100644 --- a/nord-theme/src/NordThemePlugin.php +++ b/nord-theme/src/NordThemePlugin.php @@ -2,22 +2,24 @@ namespace Boy132\NordTheme; -use Filament\Contracts\Plugin; +use App\Contracts\Plugins\HasTheme; use Filament\Panel; use Filament\Support\Colors\Color; -class NordThemePlugin implements Plugin +class NordThemePlugin implements HasTheme { public function getId(): string { return 'nord-theme'; } - public function register(Panel $panel): void - { - $panel->viteTheme('plugins/nord-theme/resources/css/theme.css'); + public function register(Panel $panel): void {} + + public function boot(Panel $panel): void {} - $panel->colors([ + public function getThemeColors(): array + { + return [ 'gray' => [ 50 => '#eceff4', 100 => '#e5e9f0', @@ -49,8 +51,21 @@ public function register(Panel $panel): void 'success' => Color::hex('#a3be8c'), 'warning' => Color::hex('#ebcb8b'), 'danger' => Color::hex('#bf616a'), - ]); + ]; } - public function boot(Panel $panel): void {} + public function getThemeFont(): ?string + { + return null; + } + + public function getThemeViteEntry(): string|array|null + { + return 'plugins/nord-theme/resources/css/theme.css'; + } + + public function getThemeRenderHooks(): array + { + return []; + } } diff --git a/pterodactyl-theme/src/PterodactylThemePlugin.php b/pterodactyl-theme/src/PterodactylThemePlugin.php index 13932234..0f7d84f9 100644 --- a/pterodactyl-theme/src/PterodactylThemePlugin.php +++ b/pterodactyl-theme/src/PterodactylThemePlugin.php @@ -2,11 +2,11 @@ namespace Boy132\PterodactylTheme; -use Filament\Contracts\Plugin; +use App\Contracts\Plugins\HasTheme; use Filament\Panel; use Filament\Support\Colors\Color; -class PterodactylThemePlugin implements Plugin +class PterodactylThemePlugin implements HasTheme { public function getId(): string { @@ -27,17 +27,30 @@ public function getId(): string 950 => 'oklch(0.2484 0.0128 248.51)', ]; - public function register(Panel $panel): void + public function register(Panel $panel): void {} + + public function boot(Panel $panel): void {} + + public function getThemeColors(): array { - $panel - ->font('IBM Plex Sans') - ->monoFont('system-ui') - ->serifFont('sans-serif') - ->colors([ - 'gray' => self::PTERO_GRAY, - 'primary' => Color::Blue, - ]); + return [ + 'gray' => self::PTERO_GRAY, + 'primary' => Color::Blue, + ]; } - public function boot(Panel $panel): void {} + public function getThemeFont(): ?string + { + return 'IBM Plex Sans'; + } + + public function getThemeViteEntry(): string|array|null + { + return null; + } + + public function getThemeRenderHooks(): array + { + return []; + } }