feat: Add Logos page, refactor Testimonials to RelationManager, and improve designs
This commit is contained in:
@@ -9,6 +9,7 @@ use App\Filament\Admin\Resources\Pages\Schemas\Sections\SectionBuilderSection;
|
||||
use App\Filament\Admin\Resources\Pages\Schemas\Sections\SectionTemplatesSection;
|
||||
use App\Filament\Admin\Resources\Pages\Schemas\Sections\SeoSection;
|
||||
use App\Filament\Admin\Resources\Pages\Schemas\Sections\TranslationsSection;
|
||||
use App\Filament\Admin\Resources\Pages\Schemas\Sections\LogosSection;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
@@ -49,6 +50,9 @@ class PageForm
|
||||
SectionTemplatesSection::make(),
|
||||
FooterTemplateSection::make(),
|
||||
|
||||
// Full Width - Logos (Only for Logolarımız template)
|
||||
LogosSection::make(),
|
||||
|
||||
// Full Width - Translations
|
||||
TranslationsSection::make(),
|
||||
]);
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\Pages\Schemas\Sections;
|
||||
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
|
||||
class LogosSection
|
||||
{
|
||||
public static function make(): Section
|
||||
{
|
||||
return Section::make(__('Logolar'))
|
||||
->description(__('Bu sayfada gösterilecek logoları buradan yönetebilirsiniz.'))
|
||||
->schema([
|
||||
Grid::make(3)
|
||||
->schema([
|
||||
FileUpload::make('data.logo_1')
|
||||
->label(__('Logo 1'))
|
||||
->disk('public'),
|
||||
|
||||
FileUpload::make('data.logo_2')
|
||||
->label(__('Logo 2'))
|
||||
->disk('public'),
|
||||
|
||||
FileUpload::make('data.logo_3')
|
||||
->label(__('Logo 3'))
|
||||
->disk('public'),
|
||||
]),
|
||||
])
|
||||
->visible(fn (Get $get): bool => $get('template') === 'corporate.logos')
|
||||
->columnSpanFull()
|
||||
->collapsible();
|
||||
}
|
||||
}
|
||||
@@ -21,12 +21,6 @@ class PageSettingsSection
|
||||
->disk('public')
|
||||
->directory('pages/featured')
|
||||
->visibility('public')
|
||||
->imageEditor()
|
||||
->imageEditorAspectRatios([
|
||||
'16:9',
|
||||
'4:3',
|
||||
'1:1',
|
||||
])
|
||||
->helperText(__('pages.featured_image_helper_text'))
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -70,6 +64,8 @@ class PageSettingsSection
|
||||
'blog' => __('pages.template_blog'),
|
||||
'contact' => __('pages.template_contact'),
|
||||
'home' => 'Home',
|
||||
'corporate.testimonials' => 'Müşteri Görüşleri (Kurumsal)',
|
||||
'corporate.logos' => 'Logolarımız (Kurumsal)',
|
||||
])
|
||||
->default('default')
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -233,7 +233,7 @@ class SectionBuilderSection
|
||||
->image()
|
||||
->disk('public')
|
||||
->directory('pages/sections')
|
||||
->imageEditor()
|
||||
->directory('pages/sections')
|
||||
->live()
|
||||
->afterStateUpdated(fn ($state, callable $set) => $set('value', $state))
|
||||
->afterStateHydrated(function ($component, $state, Get $get) {
|
||||
|
||||
Reference in New Issue
Block a user