Skip to content

Commit

Permalink
fix image for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Nov 7, 2023
1 parent a4317c6 commit 5b52822
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/views/themes/zeus/sky/page.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</li>
</x-slot>

@if($post->image() !== null)
<img alt="{{ $post->title }}" src="{{ $post->image() }}" class="my-10 w-full aspect-video shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@if($post->image('pages') !== null)
<img alt="{{ $post->title }}" src="{{ $post->image('pages') }}" class="my-10 w-full aspect-video shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@endif

<div class="bg-white dark:bg-gray-800 rounded-[2rem] rounded-tl-none shadow-md px-10 pb-6 ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
@foreach($pages as $post)
<a href="{{ route('page',$post->slug) }}" class="border-b border-t border-white hover:border-primary-600 transition duration-300 px-1 py-4">
<div class="flex items-center space-x-3 rtl:space-x-reverse">
@if($post->image() !== null)
<img alt="{{ $post->title }}" src="{{ $post->image() }}" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@if($post->image('pages') !== null)
<img alt="{{ $post->title }}" src="{{ $post->image('pages') }}" class="h-6 w-6 shadow-md rounded-[2rem] rounded-bl-none z-0 object-cover"/>
@endif
<div class="w-full text-lg">{!! $post->title !!}</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Livewire/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setSeo(): void
->twitter();

if (! $this->page->getMedia('posts')->isEmpty()) {
seo()->image($this->page->getFirstMediaUrl('posts'));
seo()->image($this->page->getFirstMediaUrl('pages'));
}
}
}

0 comments on commit 5b52822

Please sign in to comment.