feat(frontend): enable Livewire SPA navigation (wire:navigate)
Build and Deploy / verify (push) Failing after 39m48s
Build and Deploy / deploy (push) Skipped

This commit is contained in:
2026-10-12 12:30:58 +00:00
parent b062e09db0
commit 6adfacc4e5
23 changed files with 58 additions and 58 deletions
+5 -5
View File
@@ -6,19 +6,19 @@
@endphp
<article class="post-card {{ $post->isPinned() ? 'sticky' : '' }} post-card-{{ $viewMode }}">
@if($url = $post->coverImageUrl())
<a href="{{ route('posts.show', $post->id) }}" class="post-cover">
<a wire:navigate href="{{ route('posts.show', $post->id) }}" class="post-cover">
<img src="{{ $url }}" alt="{{ $post->title }}" loading="lazy">
</a>
@endif
<h2 class="post-title">
@if($label = $post->stickyLabel())<span class="badge">{{ $label }}</span>@endif
<a href="{{ route('posts.show', $post->id) }}">{{ $post->title }}</a>
<a wire:navigate href="{{ route('posts.show', $post->id) }}">{{ $post->title }}</a>
</h2>
<div class="post-meta">
<time datetime="{{ $post->published_at->toIso8601String() }}">{{ $post->published_at->format(blog_setting('normaltime', 'Y-m-d H:i')) }}</time>
@if($post->category)
<span>·</span>
<a href="{{ route('category.show', $post->category->id) }}">{{ $post->category->name }}</a>
<a wire:navigate href="{{ route('category.show', $post->category->id) }}">{{ $post->category->name }}</a>
@endif
<span>· 阅读 {{ $post->views }}</span>
<span>· 评论 {{ $post->comment_count }}</span>
@@ -33,9 +33,9 @@
</div>
@endif
<div class="post-footer">
<a href="{{ route('posts.show', $post->id) }}" class="read-more">阅读全文 &raquo;</a>
<a wire:navigate href="{{ route('posts.show', $post->id) }}" class="read-more">阅读全文 &raquo;</a>
@foreach($post->tags as $tag)
<a href="{{ route('tags.show', $tag->name) }}" class="tag-link">#{{ $tag->name }}</a>
<a wire:navigate href="{{ route('tags.show', $tag->name) }}" class="tag-link">#{{ $tag->name }}</a>
@endforeach
</div>
</article>