File tree Expand file tree Collapse file tree 3 files changed +39
-2
lines changed
Expand file tree Collapse file tree 3 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 3434 'icon ' => 'star-feature ' ,
3535 'component ' => 'a17-block-film-review ' ,
3636 ],
37-
37+ 'image ' => [
38+ 'title ' => 'Image ' ,
39+ 'icon ' => 'image ' ,
40+ 'component ' => 'a17-block-image ' ,
41+ ]
3842 ],
3943 'block_views_path ' => 'blocks ' ,
4044 'block_single_layout ' => 'admin/block-preview ' ,
Original file line number Diff line number Diff line change 1+ @formField (' medias' , [
2+ ' name' => ' image' , // role
3+ ' label' => ' Image' ,
4+ ' withVideoUrl' => false ,
5+ ' translated' => false ,
6+ ] )
7+
8+ @formField (' radios' , [
9+ ' name' => ' float' ,
10+ ' label' => ' Pull' ,
11+ ' inline' => true ,
12+ ' default' => null ,
13+ ' options' => [
14+ [' value' => null , ' label' => ' No Text Wrap' ],
15+ [' value' => ' left' , ' label' => ' Left' ],
16+ [' value' => ' right' , ' label' => ' Right' ],
17+ ]
18+ ] )
19+
20+ @formField (' input' , [
21+ ' name' => ' width' ,
22+ ' label' => ' Width (%)' ,
23+ ' default' => 100 ,
24+ ' type' => ' number' ,
25+ ] )
Original file line number Diff line number Diff line change 33 $hasImage = ! empty ($media );
44 $credit = $hasImage ? $media -> getMetadata (' credit' ) : null ;
55@endphp
6- <figure >
6+ <figure style =" width : {{ $block->input(' width' ) }}%;
7+ @if ($block- >input ('float ') == 'left ')
8+ float : left ;
9+ margin-right : 2em ;
10+ @elseif ($block- >input ('float ') == 'right ')
11+ float : right ;
12+ margin-left : 2em ;
13+ @endif
14+ " >
715 <img src =" {{ $block -> image (' image' , ' flexible' ) } }"
816 alt =" {{ $block -> imageAltText (' image' ) } }" />
917 <?php $caption = $block -> imageCaption (' image' ); ? >
You can’t perform that action at this time.
0 commit comments