Initial commit
This commit is contained in:
33
resources/views/livewire/main-post.blade.php
Normal file
33
resources/views/livewire/main-post.blade.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-12">
|
||||
@if($image)
|
||||
<div class="md:col-span-2 flex items-center justify-center sm:h-64 md:h-80 overflow-hidden">
|
||||
<img src="{{ $image }}"
|
||||
alt="{{ $posts->getFirstMedia('*')->getCustomProperty('caption') }}"
|
||||
class="w-full h-full object-cover object-center" />
|
||||
</div>
|
||||
@endif
|
||||
<div class="{{ $image ? 'col-span-1 md:col-span-2' : 'col-span-4' }}">
|
||||
<div class="post" id="post-id-{{ $posts->id ?? 'no-id' }}">
|
||||
<h3 class="text-lg font-medium leading-6 text-theme-primary">
|
||||
{{ $posts->translations[0]->title ?? '' }}
|
||||
</h3>
|
||||
</div>
|
||||
@if ($posts)
|
||||
<div class="my-2 text-sm font-bold text-theme-primary">
|
||||
{{ $posts->translations[0]->excerpt ?? '' }}
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-sm text-theme-secondary">
|
||||
{!! \App\Helpers\StringHelper::sanitizeHtml($posts->translations[0]->content ?? '') !!}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<h3 class="text-lg font-medium leading-6 text-theme-primary">
|
||||
{{ $fallbackTitle ?? '' }}
|
||||
</h3>
|
||||
<div class="text-sm text-theme-secondary">
|
||||
{{ $fallbackDescription ?? '' }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user