feat: topbar legacy-sync button, card view mode with cover fallback, year/month/day archives, richer page cache admin, stylevar repeater editor
Build and Deploy / verify (push) Successful in 32s
Build and Deploy / deploy (push) Successful in 17s

- topbar: Livewire LegacySyncButton next to 写文章 (moved from user menu)
- view modes: add 图文(card) grid with cover fallback chain (cover → attachment → first content image → placeholder); list mode now title-only compact
- archives: year/month/day index grid
- page cache admin: size + expiry columns, total size, cache policy note
- theme inject: stylevars switch from KeyValue to Repeater with multi-line HTML editing
- import: html_entity_decode for category/post-title/link/keywords/comment author
This commit is contained in:
2026-10-13 09:01:46 +00:00
parent 2d8752f863
commit 16dac8b568
24 changed files with 608 additions and 136 deletions
+26 -14
View File
@@ -8,20 +8,32 @@
@include('partials.theme-inject', ['point' => 'content_top'])
@forelse($archives as $year => $months)
<h2 class="archive-year">{{ $year }} 年</h2>
<ul class="archive-list">
@foreach($months as $month => $monthPosts)
<li>
<a wire:navigate href="{{ route('archives.month', $year.$month) }}">{{ (int) $month }} 月</a>
<span class="count">({{ $monthPosts->count() }} 篇)</span>
<ul class="archive-posts">
@foreach($monthPosts as $post)
<li><a wire:navigate href="{{ route('posts.show', $post->id) }}">{{ $post->title }}</a> <time>{{ $post->published_at->format(blog_setting('listtime', 'm-d')) }}</time></li>
@endforeach
</ul>
</li>
@endforeach
</ul>
<section class="archive-year-block">
<h2 class="archive-year">{{ $year }} 年</h2>
<div class="archive-months">
@foreach(range(1, 12) as $month)
@php $days = $months[$month] ?? []; @endphp
<div class="archive-month {{ count($days) ? 'has-posts' : 'is-empty' }}">
@if(count($days))
<a wire:navigate class="archive-month-title" href="{{ route('archives.month', $year.str_pad((string) $month, 2, '0', STR_PAD_LEFT)) }}">
{{ $month }} 月 <span class="count">({{ collect($days)->flatten(1)->count() }})</span>
</a>
<div class="archive-days">
@foreach($days as $day => $dayPosts)
@if(count($dayPosts) === 1)
<a wire:navigate href="{{ route('posts.show', $dayPosts[0]->id) }}" class="archive-day" title="{{ $dayPosts[0]->title }}">{{ $day }}</a>
@else
<a wire:navigate href="{{ route('archives.month', $year.str_pad((string) $month, 2, '0', STR_PAD_LEFT)) }}" class="archive-day" title="{{ implode('、', array_map(fn ($p) => $p->title, $dayPosts)) }}">{{ $day }}</a>
@endif
@endforeach
</div>
@else
<span class="archive-month-title">{{ $month }} 月</span>
@endif
</div>
@endforeach
</div>
</section>
@empty
<div class="empty">暂无归档</div>
@endforelse