Refactor TemplateService and Blog Views: Updated TemplateService to utilize a generic model for placeholder replacement, enhancing flexibility in content rendering. Modified blog views to use the new featured image URL property, improving image handling and ensuring consistency across templates.
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
<div class="grid">
|
||||
@forelse($posts as $post)
|
||||
<article class="card">
|
||||
@if(!empty($post->featured_image))
|
||||
@if(!empty($post->featured_image_url))
|
||||
<a href="{{ route('blog.show', $post->slug) }}">
|
||||
<img src="{{ asset($post->featured_image) }}" alt="{{ method_exists($post, 'translate') ? $post->translate('title') : $post->title }}">
|
||||
<img src="{{ $post->featured_image_url }}" alt="{{ method_exists($post, 'translate') ? $post->translate('title') : $post->title }}">
|
||||
</a>
|
||||
@endif
|
||||
<h3>
|
||||
|
||||
Reference in New Issue
Block a user