complete story 10.2
This commit is contained in:
@@ -33,7 +33,7 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
|
||||
return preg_replace(
|
||||
'/('.preg_quote($escapedSearch, '/').')/iu',
|
||||
'<mark class="bg-gold/30 rounded px-1">$1</mark>',
|
||||
'<mark class="bg-warm-gray/30 rounded px-1">$1</mark>',
|
||||
$escapedText
|
||||
);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
}; ?>
|
||||
|
||||
<div class="max-w-4xl mx-auto px-0">
|
||||
<flux:heading size="xl" class="text-navy text-xl sm:text-2xl lg:text-3xl">{{ __('posts.posts') }}</flux:heading>
|
||||
<flux:heading size="xl" class="text-charcoal text-xl sm:text-2xl lg:text-3xl">{{ __('posts.posts') }}</flux:heading>
|
||||
|
||||
<!-- Search Bar -->
|
||||
<div class="mt-4 sm:mt-6 relative">
|
||||
@@ -95,8 +95,8 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
<div class="mt-6 sm:mt-8 space-y-4 sm:space-y-6">
|
||||
@forelse($posts as $post)
|
||||
<article wire:key="post-{{ $post->id }}" class="bg-white p-4 sm:p-6 rounded-lg shadow-sm hover:shadow-md transition-shadow">
|
||||
<h2 class="text-lg sm:text-xl font-semibold text-navy">
|
||||
<a href="{{ route('posts.show', $post) }}" class="hover:text-gold" wire:navigate>
|
||||
<h2 class="text-lg sm:text-xl font-semibold text-charcoal">
|
||||
<a href="{{ route('posts.show', $post) }}" class="hover:text-warm-gray" wire:navigate>
|
||||
@if($search)
|
||||
{!! $this->highlightSearch($post->getTitle(), $search) !!}
|
||||
@else
|
||||
@@ -117,7 +117,7 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
@endif
|
||||
</p>
|
||||
|
||||
<a href="{{ route('posts.show', $post) }}" class="text-gold hover:underline mt-3 sm:mt-4 inline-flex items-center min-h-[44px]" wire:navigate>
|
||||
<a href="{{ route('posts.show', $post) }}" class="text-warm-gray hover:underline mt-3 sm:mt-4 inline-flex items-center min-h-[44px]" wire:navigate>
|
||||
{{ __('posts.read_more') }} →
|
||||
</a>
|
||||
</article>
|
||||
|
||||
@@ -20,7 +20,7 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
|
||||
<article class="max-w-3xl mx-auto">
|
||||
<header class="mb-8">
|
||||
<flux:heading size="xl" class="text-navy">{{ $post->getTitle() }}</flux:heading>
|
||||
<flux:heading size="xl" class="text-charcoal">{{ $post->getTitle() }}</flux:heading>
|
||||
|
||||
<time class="text-charcoal/70 mt-2 block">
|
||||
{{ $post->published_at?->translatedFormat('l, d F Y') ?? $post->created_at->translatedFormat('l, d F Y') }}
|
||||
@@ -32,7 +32,7 @@ new #[Layout('components.layouts.public')] class extends Component
|
||||
</div>
|
||||
|
||||
<footer class="mt-12 pt-6 border-t border-charcoal/20">
|
||||
<a href="{{ route('posts.index') }}" class="text-gold hover:underline" wire:navigate>
|
||||
<a href="{{ route('posts.index') }}" class="text-warm-gray hover:underline" wire:navigate>
|
||||
← {{ __('posts.back_to_posts') }}
|
||||
</a>
|
||||
</footer>
|
||||
|
||||
Reference in New Issue
Block a user