{{-- Image --}}
@if ($files['images'])
@foreach($files['images'] as $image)
@if (Route::is('fresns.post.detail'))
@if (count($files['images']) == 1)
{{-- One Image --}}
@if (Route::is('fresns.post.detail'))
{{-- Detail Style --}}
<a class="position-relative image-box" style="width:auto;" data-fancybox="post-{{ $pid }}" data-src="{{ $image['imageBigUrl'] }}">
<img src="{{ $image['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image" style="max-height:none;">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@else
{{-- List Style --}}
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{ $image['imageBigUrl'] }}">
<img src="{{ $image['imageLong'] ? $image['imageSquareUrl'] : $image['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@endif
@else
{{-- Multiple Images --}}
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{ $image['imageBigUrl'] }}">
<img src="{{ $image['imageSquareUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@endif
@else
@if (count($files['images']) == 1)
{{-- One Image --}}
@if (Route::is('fresns.post.detail'))
{{-- Detail Style --}}
<a class="position-relative image-box" style="width:auto;" data-fancybox="post-{{ $pid }}" data-src="{{ $image['imageBigUrl'] }}">
<img src="{{ $image['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image" style="max-height:none;">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@else
{{-- List Style --}}
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{ $image['imageBigUrl'] }}">
<img src="{{ $image['imageLong'] ? $image['imageSquareUrl'] : $image['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@endif
@endif
@endif
@endforeach
@if (count($files['images']) == 2)
{{-- List Style --}}
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{$files['images'][0]['imageBigUrl'] }}">
<img src="{{ $files['images'][0]['imageLong'] ? $image['imageSquareUrl'] :$files['images'][0]['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{$files['images'][1]['imageBigUrl'] }}">
<img src="{{ $files['images'][1]['imageLong'] ? $image['imageSquareUrl'] :$files['images'][1]['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@endif
@if (count($files['images']) >= 3)
{{-- List Style --}}
{{-- List Style --}}
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{$files['images'][0]['imageBigUrl'] }}">
<img src="{{ $files['images'][0]['imageLong'] ? $image['imageSquareUrl'] :$files['images'][0]['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{$files['images'][1]['imageBigUrl'] }}">
<img src="{{ $files['images'][1]['imageLong'] ? $image['imageSquareUrl'] :$files['images'][1]['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
<a class="position-relative image-box" data-fancybox="post-{{ $pid }}" data-src="{{$files['images'][2]['imageBigUrl'] }}">
<img src="{{ $files['images'][2]['imageLong'] ? $image['imageSquareUrl'] :$files['images'][2]['imageRatioUrl'] }}" loading="lazy" alt="{{ $image['name'] }}" class="img-fluid zoom-image">
@if ($image['imageLong'])
<span class="position-absolute bottom-0 end-0 badge bg-light text-dark me-3 mb-2">{{ fs_lang('contentImageLong') }}</span>
@endif
</a>
@endif
@endif