@php
$widget ??= [];
$posts = (array) data_get($widget, 'posts');
$totalPosts = (int) data_get($widget, 'totalPosts', 0);
$sectionOptions ??= [];
$hideOnMobile = data_get($sectionOptions, 'hide_on_mobile') == '1' ? ' hidden-sm' : '';
$carouselEl = '_' . createRandomString(6);
@endphp
@if ($totalPosts > 0)
@php
$isFromHome = str_contains(Illuminate\Support\Facades\Route::currentRouteAction(), 'Web\HomeController');
@endphp
@if ($isFromHome)
@includeFirst(
[config('larapen.core.customizedViewPath') . 'home.inc.spacer', 'home.inc.spacer'],
['hideOnMobile' => $hideOnMobile]
)
@endif
@foreach ($posts as $key => $post)
@if (data_get($post, 'postType.has_badge') && data_get($post, 'postType.ribbon') != '')
{{ data_get($post, 'postType.short_name') }}
@endif
{{ data_get($post, 'count_pictures') }}
@php
echo imgTag(data_get($post, 'picture.filename'), 'medium', [
'style' => 'border: 1px solid #e7e7e7; margin-top: 2px;',
'alt' => data_get($post, 'title'),
]);
@endphp
{{ str(data_get($post, 'title'))->limit(70) }}
@if (config('plugins.reviews.installed'))
@if (view()->exists('reviews::ratings-list'))
@include('reviews::ratings-list')
@endif
@endif
{!! data_get($post, 'price_formatted') !!}
@endforeach
@endif
@section('after_style')
@parent
@endsection
@section('after_scripts')
@parent
@endsection