Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
25 lines
1.1 KiB
PHP
25 lines
1.1 KiB
PHP
@extends('theme::layout')
|
|
|
|
@section('content')
|
|
<div class="post-list">
|
|
@forelse($articles as $article)
|
|
<article class="post-item">
|
|
<h2><a href="{{ url('/show-'.$article->id.'.shtml') }}">{{ $article->title }}</a></h2>
|
|
<p class="meta">
|
|
{{ optional($article->published_at)->format('Y-m-d') }}
|
|
@if($article->category) · {{ $article->category->name }} @endif
|
|
· {{ strtoupper($article->content_format) }}
|
|
@if($article->stick) · 置顶 @endif
|
|
</p>
|
|
<p class="excerpt">{{ app(\App\Domain\Blog\ArticleExcerpt::class)->forList($article) }}</p>
|
|
</article>
|
|
@empty
|
|
<div class="panel">
|
|
<h1 class="page-title">还没有文章</h1>
|
|
<p class="meta">去后台发布第一篇,或运行 <code>php artisan db:seed</code> 载入演示内容。</p>
|
|
</div>
|
|
@endforelse
|
|
</div>
|
|
<div class="pagination">{{ $articles->links() }}</div>
|
|
@endsection
|