- 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
48 lines
2.4 KiB
PHP
48 lines
2.4 KiB
PHP
@php $pageTitle = '归档 - '.$siteName; @endphp
|
|
@include('partials.head')
|
|
<body>
|
|
@include('partials.header')
|
|
<div class="container main-layout">
|
|
<main class="content">
|
|
<h1 class="list-title">文章归档</h1>
|
|
@include('partials.theme-inject', ['point' => 'content_top'])
|
|
|
|
@forelse($archives as $year => $months)
|
|
<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
|
|
@include('partials.theme-inject', ['point' => 'content_bottom'])
|
|
</main>
|
|
@include('partials.sidebar')
|
|
</div>
|
|
@include('partials.footer')
|
|
@stack('theme:body_end')
|
|
</body>
|
|
</html>
|