30 lines
1.1 KiB
PHP
30 lines
1.1 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>
|
|
|
|
@forelse($comments as $comment)
|
|
<div class="comment" id="comment-{{ $comment->id }}">
|
|
<div class="comment-head">
|
|
<strong>{{ $comment->author_name }}</strong>
|
|
<span>· 评论于 <a href="{{ route('posts.show', $comment->post->slug ?: $comment->post->id) }}#comment-{{ $comment->id }}">{{ $comment->post->title }}</a></span>
|
|
<span class="comment-time">· {{ $comment->created_at->format(blog_setting('comment_timeformat', 'Y-m-d H:i')) }}</span>
|
|
</div>
|
|
<div class="comment-body">{!! nl2br(e($comment->content)) !!}</div>
|
|
</div>
|
|
@empty
|
|
<div class="empty">暂无评论</div>
|
|
@endforelse
|
|
|
|
{{ $comments->links('partials.pagination-links') }}
|
|
</main>
|
|
@include('partials.sidebar')
|
|
</div>
|
|
@include('partials.footer')
|
|
@stack('theme:body_end')
|
|
</body>
|
|
</html>
|