M2: 主题系统(sablog经典+modern简约)+ 前台全部页面 + 老 URL 301 兼容 + markdown 双份导入
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@php $pageTitle = '归档 - '.$siteName; @endphp
|
||||
@include('partials.head')
|
||||
<body>
|
||||
@include('partials.header')
|
||||
<div class="container main-layout">
|
||||
<main class="content">
|
||||
<h1 class="list-title">文章归档</h1>
|
||||
|
||||
@forelse($archives as $year => $months)
|
||||
<h2 class="archive-year">{{ $year }} 年</h2>
|
||||
<ul class="archive-list">
|
||||
@foreach($months as $month => $monthPosts)
|
||||
<li>
|
||||
<a 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 href="{{ route('posts.show', $post->slug ?: $post->id) }}">{{ $post->title }}</a> <time>{{ $post->published_at->format('m-d') }}</time></li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@empty
|
||||
<div class="empty">暂无归档</div>
|
||||
@endforelse
|
||||
</main>
|
||||
@include('partials.sidebar')
|
||||
</div>
|
||||
@include('partials.footer')
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user