Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kristi11 committed Sep 24, 2024
1 parent 4ed8510 commit 745b971
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
23 changes: 17 additions & 6 deletions app/Filament/Resources/HeroResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use Filament\Forms\Form;
use Filament\Infolists\Components\ColorEntry;
use Filament\Infolists\Components\IconEntry;
use Filament\Infolists\Components\ImageEntry;
use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Resources\Resource;
Expand Down Expand Up @@ -234,12 +235,22 @@ public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->schema([
// \Filament\Infolists\Components\Section::make('Hero image')
// ->schema([
// SpatieMediaLibraryImageEntry::make('image')
// ->disk('hero')
// ->placeholder('No image'),
// ]),
\Filament\Infolists\Components\Section::make('Hero image')
->columns(1)
->schema([
ImageEntry::make('image')
->disk('DO-SPACES')
->placeholder('No image')
->columnSpanFull()
->extraImgAttributes([
'class' => 'rounded-lg',
'loading' => 'lazy',
'style' => 'object-fit: cover; object-position: center;
width: 100%; height: 100%;
transition: transform 0.2s ease-in-out; transition: filter 0.2s ease-in-out;
',
]),
]),
\Filament\Infolists\Components\Section::make('Hero quotes')
->columns(2)
->schema([
Expand Down
1 change: 1 addition & 0 deletions app/Models/Hero.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

/**
* @method static first()
* @method static exists()
*/
class Hero extends Model
{
Expand Down

0 comments on commit 745b971

Please sign in to comment.