File: D:/HostingSpaces/SBogers10/ste.komma.pro/resources/views/templates/posts_index.blade.php
@extends('master')
@section('title', !empty($page->translation->meta_title) ? $page->translation->meta_title : config('site.company.name'))
@section('meta_description', $page->translation->meta_description)
@section('content')
<div class="l-body l-body--rounded-tr">
<div class="l-block l-contain u-spacing-pt5">
<div class="u-spacing-pb5">
@include('components.breadcrumb')
</div>
<div>
<h2 class="c-page-title u-spacing-mb5">{{$page->translation->name}}</h2>
@if($posts->count() != 0)
<div class="l-triple-grid">
@foreach($posts as $post)
<article class="l-triple-grid__item" data-kal="fade" style="--kal-delay: {{($loop->index % 3)*0.15}}s">
@if($post->translation)
@include('components.card', [
'cardImage' => (isset($post->images) && $post->images->count() != 0) ? $post->images->first()->medium_image_url : '',
'cardTitle' => $post->translation->name,
'cardDate' => $post->date->format('j') . ' ' . __('calendar.month_names.' . ( $post->date->format('n') - 1) ) . ' ' . $post->date->format('Y'),
'cardDescription' => $post->translation->teaser,
'cardLink' => $links->posts->route . '/' . $post->translation->slug,
'cardButtonText' => __('site/global.readMore'),
])
@endif
</article>
@endforeach
</div>
@else
<h3>@lang('site/posts.no_posts')</h3>
@endif
</div>
@if($posts->links())
<div class="l-block u-spacing-mt8">
{{-- Default Komma Pagination 1 ... 2 c 2 .. 1 = 7 --}}
@include('components.pagination.list', ['paginator' => $posts])
{{-- Default Laravel Pagination 2 ... 3 c 3 ... 2 = 11 --}}
{{-- {{$posts->links()}}--}}
</div>
@endif
</div>
</div>
@endsection