File: D:/HostingSpaces/SBogers10/slenders.komma.pro/resources/views/site/templates/posts_show.blade.php
@extends('site.master')
@section('title', $post->translation->name . ' | ' . $page->translation->meta_title)
@section('meta_description', $post->translation->meta_description)
@section('meta_information')
<meta property="og:url" content="{{\Request::url()}}"/>
<meta property="og:type" content="website"/>
<meta property="og:title"
content="{{$post->translation->meta_title }}"/>
<meta property="og:description" content="{{$post->translation->meta_description}}"/>
@if(isset($post->images) && $post->images->count() != 0)
<meta property="og:image" content="{{\Request::root().$post->images->first()->medium_image_url}}"/>
@endif
@endsection
@section('content')
<article class="o-article">
<div class="l-contain">
<div class="o-article__main">
<div class="o-article__back">
@include('site.components.textButton', [
'textButtonLink' => $previousRoute,
'textButtonText' => __('site/posts.back_to_overview'),
'modifiers' => ['icon', 'icon-back'],
])
</div>
<h1 class="o-article__title">{{$post->translation->name}}</h1>
@if(isset($post->images) && $post->images->count() != 0)
<picture class="o-article__image">
@foreach(['large', 'medium', 'small'] as $imageSize)
@if(!$loop->last)
<source
@switch($imageSize)
@case('medium')
media="(min-width: 425px)"
@break
@case('large')
media="(min-width: 820px)"
@break
@endswitch
srcset="{{ $post->images->first()->{$imageSize.'_image_url'} }}">
@else
<img src="{{ $post->images->first()->{$imageSize.'_image_url'} }}"
alt="{{$post->images->first()->name}}">
@endif
@endforeach
</picture>
@endif
<div class="o-article__content">
@include('site.organisms.components', ['componentLayout' => 'article'])
</div>
<div class="o-article__signed">
<figure class="o-article__signed-image">
<img class="u-object-cover" alt="Contact person" src="{{ config('site.contact_person.img') }}" data-object-fit="cover"/>
</figure>
<div class="o-article__signed-content">
<h4 class="o-article__signed-title">@lang('site/global.contact_person_pay_off')</h4>
<span class="o-article__signed-name">{{ config('site.contact_person.name') }}</span>
</div>
</div>
</div>
</div>
</article>
@if(isset($otherPosts) && $otherPosts->count() != 0)
<section class="o-other-posts">
<div class="l-contain">
<h4 class="o-other-posts__title">@lang('site/posts.read_also')</h4>
<div class="o-other-posts__grid">
@foreach($otherPosts as $otherPost)
<article class="o-other-posts__post">
<div class="o-other-posts__post-contain">
@include('site.components.card', [
'cardImage' => $otherPost->images->isNotEmpty() ? $otherPost->images->first()->medium_image_url : null,
'cardTitle' => $otherPost->translation->name,
'cardLink' => $links->posts->route . '/' . $otherPost->translation->slug,
'cardButtonText' => __('site/posts.to_article'),
'clickable' => true
])
</div>
</article>
@endforeach
</div>
</div>
</section>
@endif
{{-- @include('site.organisms.otherModels', ['resourceRoute' => $links->posts->route, 'otherModelTitle' => __('site/posts.otherModelsTitle')])--}}
@include('site.organisms.cta')
@endsection