diff --git a/app/Filament/Pages/HomePageSettings.php b/app/Filament/Pages/HomePageSettings.php index 7532d99..7a478a4 100644 --- a/app/Filament/Pages/HomePageSettings.php +++ b/app/Filament/Pages/HomePageSettings.php @@ -8,6 +8,7 @@ use Filament\Forms\Components\Section; use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\FileUpload; +use Filament\Forms\Components\Repeater; use Filament\Forms\Form; use Filament\Pages\Page; use Filament\Pages\SettingsPage; @@ -62,8 +63,7 @@ class HomePageSettings extends SettingsPage ->maxLength(255), Textarea::make('about_paragraph') ->label('About Paragraph') - ->rows(5) - ->maxLength(65535), + ->rows(5) ->maxLength(65535), Grid::make()->schema([ TextInput::make('about_projects_text') ->label('Projects Text') @@ -130,6 +130,110 @@ class HomePageSettings extends SettingsPage ->maxLength(255) ->url(), ]), + + Section::make('Industry Area') + ->description('Manage the content for the industry area section.') + ->icon('heroicon-o-building-office') + ->schema([ + TextInput::make('industry_subtitle') + ->label('Subtitle') + ->maxLength(100), + TextInput::make('industry_header') + ->label('Header') + ->required() + ->maxLength(255), + Textarea::make('industry_paragraph') + ->label('Paragraph') + ->rows(3) + ->maxLength(65535), + Grid::make()->schema([ + TextInput::make('industry_button_text') + ->label('Button Text') + ->maxLength(50), + TextInput::make('industry_button_url') + ->label('Button URL') + ->maxLength(255) + ->url(), + ])->columns(2), + FileUpload::make('industry_image_one') + ->label('Industry Image One (520x400)') + ->image() + ->maxSize(2048) + ->disk('public') + ->directory('industry-images'), + Repeater::make('industry_items') + ->label('Industry Items') + ->schema([ + FileUpload::make('icon') + ->label('Icon (SVG)') + ->directory('industry-icons') + ->acceptedFileTypes(['image/svg+xml']) + ->maxSize(1024) // 1MB + ->required(), + TextInput::make('title') + ->label('Title') + ->required() + ->maxLength(100), + Textarea::make('description') + ->label('Description') + ->rows(2) + ->maxLength(255), + ]) + ->columns(2) + ->minItems(1) + ->maxItems(5) + ->defaultItems(2) + ->reorderable() + ->collapsible(), + ]), + + Section::make('Text Slide Area') + ->description('Manage the content for the text slide area section.') + ->icon('heroicon-o-chat-bubble-bottom-center-text') + ->schema([ + TextInput::make('text_slide_subtitle') + ->label('Subtitle') + ->maxLength(100), + TextInput::make('text_slide_header') + ->label('Header') + ->required() + ->maxLength(255), + FileUpload::make('text_slide_image') + ->label('Text Slide Image (540x350)') + ->image() + ->maxSize(2048) + ->disk('public') + ->directory('text-slide-images'), + TextInput::make('text_slide_counter_number') + ->label('Counter Number') + ->numeric() + ->default(29), + Repeater::make('text_slide_items') + ->label('Text Slide Items') + ->schema([ + FileUpload::make('icon') + ->label('Icon (SVG)') + ->directory('text-slide-icons') + ->acceptedFileTypes(['image/svg+xml']) + ->maxSize(1024) // 1MB + ->required(), + TextInput::make('link') + ->label('Link') + ->required() + ->url() + ->maxLength(255), + TextInput::make('text') + ->label('Text') + ->required() + ->maxLength(100), + ]) + ->columns(3) + ->minItems(1) + ->maxItems(10) + ->defaultItems(6) + ->reorderable() + ->collapsible(), + ]), ]) ->columns(1) ->statePath('data'); diff --git a/app/Settings/HomeSettings.php b/app/Settings/HomeSettings.php index d86df4e..376d203 100644 --- a/app/Settings/HomeSettings.php +++ b/app/Settings/HomeSettings.php @@ -44,6 +44,30 @@ class HomeSettings extends Settings public string $about_image_two; + public string $industry_subtitle; + + public string $industry_header; + + public string $industry_paragraph; + + public string $industry_button_text; + + public string $industry_button_url; + + public string $industry_image_one; + + public array $industry_items; + + public string $text_slide_subtitle; + + public string $text_slide_header; + + public string $text_slide_image; + + public int $text_slide_counter_number; + + public array $text_slide_items; + public static function group(): string { return 'cms_homepage'; diff --git a/database/settings/2025_07_28_152534_add_industry_and_text_slide_to_home_settings.php b/database/settings/2025_07_28_152534_add_industry_and_text_slide_to_home_settings.php new file mode 100644 index 0000000..4d4a351 --- /dev/null +++ b/database/settings/2025_07_28_152534_add_industry_and_text_slide_to_home_settings.php @@ -0,0 +1,33 @@ +migrator->add('cms_homepage.industry_subtitle', 'Industry Certifications'); + $this->migrator->add('cms_homepage.industry_header', 'We Drive Client Success with Creative Building Designs'); + $this->migrator->add('cms_homepage.industry_paragraph', 'At BuildGo, we pride ourselves on transforming our clients\' visions into reality. Our innovative and client-focused designs ensure that every project stands out.'); + $this->migrator->add('cms_homepage.industry_button_text', 'Contact Us'); + $this->migrator->add('cms_homepage.industry_button_url', 'contact.html'); + $this->migrator->add('cms_homepage.industry_image_one', 'page/image-2.jpg'); + $this->migrator->add('cms_homepage.industry_items', [ + ['icon' => 'icon/icon-3.svg', 'title' => 'Custom Designs', 'description' => 'Tailored building solutions that reflect your vision style'], + ['icon' => 'icon/icon-2.svg', 'title' => 'Interior Plans', 'description' => 'Creating aesthetically pleasing functional interior spaces'], + ]); + + $this->migrator->add('cms_homepage.text_slide_subtitle', 'Construction design'); + $this->migrator->add('cms_homepage.text_slide_header', 'Digital Consulting The Key to Smarter Building'); + $this->migrator->add('cms_homepage.text_slide_image', 'page/cta.jpg'); + $this->migrator->add('cms_homepage.text_slide_counter_number', 29); + $this->migrator->add('cms_homepage.text_slide_items', [ + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Residential'], + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Architecture'], + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Community'], + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Healthcare'], + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Seaside Resort'], + ['icon' => 'icon/star-dark.svg', 'link' => 'portfolio-details', 'text' => 'Modern'], + ]); + } +}; diff --git a/resources/views/web/pages/home/index.blade.php b/resources/views/web/pages/home/index.blade.php index 416dbe0..4beaebc 100644 --- a/resources/views/web/pages/home/index.blade.php +++ b/resources/views/web/pages/home/index.blade.php @@ -240,32 +240,27 @@
+ Tailored building solutions that reflect your vision style
+ @foreach($homeSettings->industry_items as $item) +{{ $item['description'] }}
+Creating aesthetically pleasing functional interior spaces
-At BuildGo, we pride ourselves on transforming our clients' visions into reality. Our innovative and client-focused designs ensure that every project stands out.
+ {{ $homeSettings->industry_subtitle }} +{{ $homeSettings->industry_paragraph }}