Update comments design
This commit is contained in:
@@ -1,110 +1,189 @@
|
|||||||
<div>
|
<div id="comment-{{ $comment->id }}">
|
||||||
<div class="flex" id="comment-{{ $comment->id }}">
|
|
||||||
<div class="flex-shrink-0 mr-4">
|
<div class="group flex gap-4">
|
||||||
|
|
||||||
|
{{-- Avatar --}}
|
||||||
|
<div class="shrink-0">
|
||||||
@if($comment->isDeletedByModerator())
|
@if($comment->isDeletedByModerator())
|
||||||
<img class="h-10 w-10 rounded-full" src="{{ asset('images/default-avatar.webp') }}" alt="Deleted comment">
|
<img
|
||||||
|
class="h-10 w-10 rounded-full object-cover opacity-60"
|
||||||
|
src="{{ asset('images/default-avatar.webp') }}"
|
||||||
|
alt="Deleted comment"
|
||||||
|
>
|
||||||
@else
|
@else
|
||||||
<img class="h-10 w-10 rounded-full" src="{{ $comment->user->getAvatar() }}" alt="{{ $comment->user->name }}">
|
<img
|
||||||
|
class="h-10 w-10 rounded-full object-cover ring-2 ring-white dark:ring-neutral-800"
|
||||||
|
src="{{ $comment->user->getAvatar() }}"
|
||||||
|
alt="{{ $comment->user->name }}"
|
||||||
|
>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-grow">
|
|
||||||
<div class="flex gap-2">
|
{{-- Content --}}
|
||||||
|
<div class="min-w-0 flex-1">
|
||||||
|
|
||||||
|
<div class="rounded-2xl border border-neutral-200 bg-white px-5 py-4 shadow-sm transition group-hover:border-neutral-300 dark:border-neutral-800 dark:bg-neutral-800 dark:group-hover:border-neutral-700">
|
||||||
|
|
||||||
|
{{-- Header --}}
|
||||||
|
<div class="mb-3 flex flex-wrap items-center gap-2">
|
||||||
|
|
||||||
@if($comment->isDeletedByModerator())
|
@if($comment->isDeletedByModerator())
|
||||||
|
|
||||||
|
<span class="font-semibold text-neutral-900 dark:text-neutral-100">
|
||||||
@if (Auth::check() && (Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR) || Auth::user()->hasRole(\App\Enums\UserRole::MODERATOR)))
|
@if (Auth::check() && (Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR) || Auth::user()->hasRole(\App\Enums\UserRole::MODERATOR)))
|
||||||
<p class="font-medium text-gray-900 dark:text-gray-100">Deleted ({{ $comment->user->name }})</p>
|
Deleted ({{ $comment->user->name }})
|
||||||
@else
|
@else
|
||||||
<p class="font-medium text-gray-900 dark:text-gray-100">Deleted</p>
|
Deleted
|
||||||
@endif
|
@endif
|
||||||
|
</span>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<p class="font-medium text-gray-900 dark:text-gray-100">{{ $comment->user->name }}</p>
|
|
||||||
|
<span class="font-semibold text-neutral-900 dark:text-neutral-100">
|
||||||
|
{{ $comment->user->name }}
|
||||||
|
</span>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{-- Badges --}}
|
||||||
@if($comment->user->hasRole(\App\Enums\UserRole::ADMINISTRATOR))
|
@if($comment->user->hasRole(\App\Enums\UserRole::ADMINISTRATOR))
|
||||||
<a data-te-toggle="tooltip" title="Admin"><i class="fa-solid fa-crown text-yellow-600"></i></a>
|
<span class="inline-flex items-center rounded-full bg-yellow-100 px-2 py-0.5 text-xs font-medium text-yellow-700 dark:bg-yellow-500/10 dark:text-yellow-400">
|
||||||
|
<i class="fa-solid fa-crown mr-1"></i>
|
||||||
|
Admin
|
||||||
|
</span>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($comment->user->hasRole(\App\Enums\UserRole::MODERATOR))
|
@if($comment->user->hasRole(\App\Enums\UserRole::MODERATOR))
|
||||||
<a data-te-toggle="tooltip" title="Admin" class="text-rose-600">Moderator</a>
|
<span class="inline-flex items-center rounded-full bg-rose-100 px-2 py-0.5 text-xs font-medium text-rose-700 dark:bg-rose-500/10 dark:text-rose-400">
|
||||||
|
Moderator
|
||||||
|
</span>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($comment->user->hasRole(\App\Enums\UserRole::SUPPORTER))
|
@if($comment->user->hasRole(\App\Enums\UserRole::SUPPORTER))
|
||||||
<a data-te-toggle="tooltip" title="Badge of appreciation for the horny people supporting us! :3"><i class="fa-solid fa-hand-holding-heart text-rose-600"></i></a>
|
<span class="inline-flex items-center rounded-full bg-pink-100 px-2 py-0.5 text-xs font-medium text-pink-700 dark:bg-pink-500/10 dark:text-pink-400">
|
||||||
|
<i class="fa-solid fa-heart mr-1"></i>
|
||||||
|
Supporter
|
||||||
|
</span>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-1 flex-grow w-full">
|
|
||||||
|
{{-- Body --}}
|
||||||
|
<div class="prose prose-sm max-w-none dark:prose-invert">
|
||||||
|
|
||||||
@if($comment->isDeletedByModerator())
|
@if($comment->isDeletedByModerator())
|
||||||
<div class="text-gray-700 dark:text-gray-200">Deleted by moderation.</div>
|
|
||||||
|
<p class="italic text-neutral-500 dark:text-neutral-400">
|
||||||
|
Deleted by moderation.
|
||||||
|
</p>
|
||||||
|
|
||||||
@if (Auth::check() && (Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR) || Auth::user()->hasRole(\App\Enums\UserRole::MODERATOR)))
|
@if (Auth::check() && (Auth::user()->hasRole(\App\Enums\UserRole::ADMINISTRATOR) || Auth::user()->hasRole(\App\Enums\UserRole::MODERATOR)))
|
||||||
<div class="text-gray-700 dark:text-gray-300 pt-1">Original comment: {!! $comment->presenter()->markdownBody() !!}</div>
|
<div class="mt-3 rounded-xl bg-neutral-100 p-3 text-sm dark:bg-neutral-800">
|
||||||
@endif
|
{!! $comment->presenter()->markdownBody() !!}
|
||||||
@else
|
|
||||||
@if ($isEditing)
|
|
||||||
<form wire:submit.prevent="editComment">
|
|
||||||
<div>
|
|
||||||
<label for="comment" class="sr-only">Comment body</label>
|
|
||||||
<textarea id="comment" name="comment" rows="3"
|
|
||||||
class="bg-white dark:bg-neutral-700 shadow-sm block w-full focus:ring-rose-500 focus:border-rose-500 border-gray-300 dark:border-gray-400/40 text-gray-900 dark:text-gray-200 placeholder:text-gray-400 rounded-md
|
|
||||||
@error('editState.body') border-red-500 @enderror"
|
|
||||||
placeholder="Write something" wire:model.defer="editState.body"></textarea>
|
|
||||||
@error('editState.body')
|
|
||||||
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 flex items-center justify-between">
|
@endif
|
||||||
<button type="submit"
|
|
||||||
class="inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md shadow-sm text-white bg-rose-600 hover:bg-rose-700 focus:outline-none focus:ring-2 focus:ring-rose-500">
|
@else
|
||||||
Edit
|
|
||||||
|
@if ($isEditing)
|
||||||
|
|
||||||
|
<form wire:submit.prevent="editComment" class="space-y-4">
|
||||||
|
|
||||||
|
<textarea
|
||||||
|
rows="4"
|
||||||
|
wire:model.defer="editState.body"
|
||||||
|
class="w-full rounded-2xl border border-neutral-300 bg-white px-4 py-3 text-sm text-neutral-900 shadow-sm transition focus:border-rose-500 focus:outline-none focus:ring-4 focus:ring-rose-500/10 dark:border-neutral-700 dark:bg-neutral-950 dark:text-neutral-100 @error('editState.body') border-red-500 @enderror"
|
||||||
|
></textarea>
|
||||||
|
|
||||||
|
@error('editState.body')
|
||||||
|
<p class="text-sm text-red-500">
|
||||||
|
{{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="rounded-xl bg-rose-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-rose-700"
|
||||||
|
>
|
||||||
|
Save Changes
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<div class="text-gray-700 dark:text-gray-200">{!! $comment->presenter()->markdownBody() !!}</div>
|
<div class="text-gray-700 dark:text-gray-200">
|
||||||
@endif
|
{!! $comment->presenter()->markdownBody() !!}
|
||||||
@endif
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2 space-x-2 flex flex-row">
|
@endif
|
||||||
<span class="text-gray-500 dark:text-gray-300">
|
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{-- Footer --}}
|
||||||
|
<div class="mt-4 flex flex-wrap items-center gap-4 text-sm">
|
||||||
|
|
||||||
|
<span class="text-neutral-500 dark:text-neutral-400">
|
||||||
{{ $comment->presenter()->relativeCreatedAt() }}
|
{{ $comment->presenter()->relativeCreatedAt() }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
{{-- Like --}}
|
||||||
@guest
|
@guest
|
||||||
<span data-te-toggle="tooltip" title="Please login to like the episode" class="text-gray-800 cursor-pointer dark:text-gray-200">
|
<span class="flex items-center gap-1 text-neutral-500 dark:text-neutral-400">
|
||||||
<i class="fa-regular fa-heart"></i> {{ $comment->likeCount() }}
|
<i class="fa-regular fa-heart"></i>
|
||||||
|
{{ $comment->likeCount() }}
|
||||||
</span>
|
</span>
|
||||||
@endguest
|
@endguest
|
||||||
|
|
||||||
@auth
|
@auth
|
||||||
<!-- Like Button -->
|
<button
|
||||||
<button class="text-gray-800 dark:text-gray-200 leading-tight cursor-pointer whitespace-nowrap" wire:click="like">
|
wire:click="like"
|
||||||
|
class="flex items-center gap-1 text-neutral-500 transition hover:text-rose-600 dark:text-neutral-400 dark:hover:text-rose-400"
|
||||||
|
>
|
||||||
@if ($liked)
|
@if ($liked)
|
||||||
<i class="fa-solid fa-heart text-rose-600"></i> {{ $likeCount }}
|
<i class="fa-solid fa-heart text-rose-600"></i>
|
||||||
@else
|
@else
|
||||||
<i class="fa-solid fa-heart"></i> {{ $likeCount }}
|
<i class="fa-regular fa-heart"></i>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{ $likeCount }}
|
||||||
</button>
|
</button>
|
||||||
@endauth
|
@endauth
|
||||||
|
|
||||||
|
{{-- Actions --}}
|
||||||
@auth
|
@auth
|
||||||
|
|
||||||
@if ($comment->depth() < 2)
|
@if ($comment->depth() < 2)
|
||||||
<button wire:click="$toggle('isReplying')" type="button" class="text-gray-900 dark:text-gray-100 font-medium">
|
<button
|
||||||
|
wire:click="$toggle('isReplying')"
|
||||||
|
class="font-medium text-neutral-600 transition hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100"
|
||||||
|
>
|
||||||
Reply
|
Reply
|
||||||
</button>
|
</button>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@can ('update', $comment)
|
@can ('update', $comment)
|
||||||
<button wire:click="$toggle('isEditing')" type="button" class="text-gray-900 dark:text-gray-100 font-medium">
|
<button
|
||||||
|
wire:click="$toggle('isEditing')"
|
||||||
|
class="font-medium text-neutral-600 transition hover:text-neutral-900 dark:text-neutral-400 dark:hover:text-neutral-100"
|
||||||
|
>
|
||||||
Edit
|
Edit
|
||||||
</button>
|
</button>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@can ('destroy', $comment)
|
@can ('destroy', $comment)
|
||||||
<button x-data="{
|
<button
|
||||||
|
x-data="{
|
||||||
confirmCommentDeletion () {
|
confirmCommentDeletion () {
|
||||||
if (window.confirm('Are you sure you want to delete this comment?')) {
|
if (window.confirm('Delete this comment?')) {
|
||||||
@this.call('deleteComment');
|
@this.call('deleteComment');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@click="confirmCommentDeletion"
|
@click="confirmCommentDeletion"
|
||||||
type="button"
|
class="font-medium text-red-500 transition hover:text-red-600"
|
||||||
class="text-gray-900 dark:text-gray-100 font-medium"
|
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</button>
|
||||||
@@ -113,41 +192,62 @@
|
|||||||
@can ('restore', $comment)
|
@can ('restore', $comment)
|
||||||
<button
|
<button
|
||||||
wire:click="restoreComment"
|
wire:click="restoreComment"
|
||||||
type="button"
|
class="font-medium text-emerald-600 transition hover:text-emerald-700"
|
||||||
class="text-gray-900 dark:text-gray-100 font-medium"
|
|
||||||
>
|
>
|
||||||
Restore
|
Restore
|
||||||
</button>
|
</button>
|
||||||
@endcan
|
@endcan
|
||||||
|
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="ml-14 mt-6">
|
|
||||||
@if ($isReplying)
|
|
||||||
<form wire:submit.prevent="postReply" class="my-4">
|
|
||||||
<div>
|
|
||||||
<label for="comment" class="sr-only">Reply body</label>
|
|
||||||
<textarea id="comment" name="comment" rows="3"
|
|
||||||
class="bg-white dark:bg-neutral-700 shadow-sm block w-full focus:ring-rose-500 focus:border-rose-500 border-gray-300 dark:border-gray-400/40 text-gray-900 dark:text-gray-200 placeholder:text-gray-400 rounded-md
|
|
||||||
@error('replyState.body') border-red-500 @enderror"
|
|
||||||
placeholder="Write something" wire:model.defer="replyState.body"></textarea>
|
|
||||||
@error('replyState.body')
|
|
||||||
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
|
|
||||||
@enderror
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 flex items-center justify-between">
|
|
||||||
<button type="submit"
|
{{-- Reply Form --}}
|
||||||
class="inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md shadow-sm text-white bg-rose-600 hover:bg-rose-700 focus:outline-none focus:ring-2 focus:ring-rose-500">
|
@if ($isReplying)
|
||||||
Comment
|
|
||||||
|
<div class="mt-4 ml-2">
|
||||||
|
<form wire:submit.prevent="postReply" class="space-y-4">
|
||||||
|
|
||||||
|
<textarea
|
||||||
|
rows="3"
|
||||||
|
wire:model.defer="replyState.body"
|
||||||
|
placeholder="Write a reply..."
|
||||||
|
class="w-full rounded-2xl border border-neutral-300 bg-white px-4 py-3 text-sm text-neutral-900 shadow-sm transition focus:border-rose-500 focus:outline-none focus:ring-4 focus:ring-rose-500/10 dark:border-neutral-700 dark:bg-neutral-950 dark:text-neutral-100 @error('replyState.body') border-red-500 @enderror"
|
||||||
|
></textarea>
|
||||||
|
|
||||||
|
@error('replyState.body')
|
||||||
|
<p class="text-sm text-red-500">
|
||||||
|
{{ $message }}
|
||||||
|
</p>
|
||||||
|
@enderror
|
||||||
|
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<button
|
||||||
|
type="submit"
|
||||||
|
class="rounded-xl bg-rose-600 px-4 py-2 text-sm font-medium text-white transition hover:bg-rose-700"
|
||||||
|
>
|
||||||
|
Reply
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{-- Replies --}}
|
||||||
|
@if ($comment->children->count())
|
||||||
|
<div class="mt-2 space-y-2 border-l-2 border-neutral-200 pl-6 dark:border-neutral-700">
|
||||||
@foreach ($comment->children as $child)
|
@foreach ($comment->children as $child)
|
||||||
<livewire:comment :comment="$child" :key="$child->id"/>
|
<livewire:comment :comment="$child" :key="$child->id"/>
|
||||||
@endforeach
|
@endforeach
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -1,57 +1,93 @@
|
|||||||
<section>
|
<section>
|
||||||
<div class="bg-white dark:bg-neutral-800 shadow sm:rounded-xl sm:overflow-hidden">
|
<div class="overflow-hidden rounded-2xl border border-neutral-200 bg-white shadow-sm dark:border-neutral-800 dark:bg-neutral-900">
|
||||||
<div class="px-4 py-5 sm:px-6">
|
|
||||||
<h2 class="leading-normal font-bold text-lg text-gray-900 dark:text-gray-200">Comments</h2>
|
{{-- Header --}}
|
||||||
|
<div class="border-b border-neutral-200 px-6 py-5 dark:border-neutral-800">
|
||||||
|
<h2 class="text-xl font-semibold tracking-tight text-neutral-900 dark:text-neutral-100">
|
||||||
|
Comments
|
||||||
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<!-- Comment Input -->
|
{{-- Comment Form --}}
|
||||||
<div class="bg-gray-50 dark:bg-neutral-800 px-4 py-6 sm:px-6 border-t border-b dark:border-neutral-950 border-neutral-200">
|
<div class="border-b border-neutral-200 bg-neutral-50/80 px-6 py-6 dark:border-neutral-800 dark:bg-neutral-950/40">
|
||||||
@auth
|
@auth
|
||||||
<div class="flex">
|
<div class="flex gap-4">
|
||||||
<div class="flex-shrink-0 mr-4">
|
<img
|
||||||
<img class="h-10 w-10 rounded-full" src="{{ auth()->user()->getAvatar() }}" alt="{{ auth()->user()->name }}">
|
class="h-11 w-11 rounded-full object-cover ring-2 ring-white dark:ring-neutral-800"
|
||||||
</div>
|
src="{{ auth()->user()->getAvatar() }}"
|
||||||
<div class="min-w-0 flex-1">
|
alt="{{ auth()->user()->name }}"
|
||||||
<form wire:submit.prevent="postComment">
|
>
|
||||||
|
|
||||||
|
<div class="flex-1">
|
||||||
|
<form wire:submit.prevent="postComment" class="space-y-4">
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="comment" class="sr-only">Comment body</label>
|
<label for="comment" class="sr-only">
|
||||||
<textarea id="comment" name="comment" rows="3"
|
Comment body
|
||||||
class="peer block min-h-[auto] w-full border-1 bg-transparent px-3 py-[0.32rem] leading-[1.6] outline-none transition-all duration-200 ease-linear dark:placeholder:text-neutral-200 border-gray-300 dark:border-neutral-950 dark:bg-neutral-900 dark:text-gray-300 focus:border-rose-500 dark:focus:border-rose-600 focus:ring-rose-500 dark:focus:ring-rose-600 rounded-md shadow-sm
|
</label>
|
||||||
@error('newCommentState.body') border-red-500 @enderror"
|
|
||||||
placeholder="Write something" wire:model.defer="newCommentState.body"></textarea>
|
<textarea
|
||||||
|
id="comment"
|
||||||
|
rows="4"
|
||||||
|
wire:model.defer="newCommentState.body"
|
||||||
|
placeholder="Write a comment..."
|
||||||
|
class="w-full rounded-2xl border border-neutral-300 bg-white px-4 py-3 text-sm text-neutral-900 placeholder:text-neutral-400 shadow-sm transition focus:border-rose-500 focus:outline-none focus:ring-4 focus:ring-rose-500/10 dark:border-neutral-700 dark:bg-neutral-900 dark:text-neutral-100 dark:placeholder:text-neutral-500 dark:focus:border-rose-500 @error('newCommentState.body') border-red-500 @enderror"
|
||||||
|
></textarea>
|
||||||
|
|
||||||
@error('newCommentState.body')
|
@error('newCommentState.body')
|
||||||
<p class="mt-2 text-sm text-red-500">{{ $message }}</p>
|
<p class="mt-2 text-sm text-red-500">
|
||||||
|
{{ $message }}
|
||||||
|
</p>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-3 flex items-center justify-between">
|
|
||||||
<button type="submit"
|
<div class="flex justify-end">
|
||||||
class="inline-flex items-center justify-center px-4 py-2 border border-transparent font-medium rounded-md shadow-sm text-white bg-rose-600 hover:bg-rose-700 focus:outline-none focus:ring-2 focus:ring-rose-500">
|
<button
|
||||||
Comment
|
type="submit"
|
||||||
|
class="inline-flex items-center rounded-xl bg-rose-600 px-5 py-2.5 text-sm font-medium text-white transition hover:bg-rose-700 focus:outline-none focus:ring-4 focus:ring-rose-500/30"
|
||||||
|
>
|
||||||
|
Post Comment
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endauth
|
@endauth
|
||||||
|
|
||||||
@guest
|
@guest
|
||||||
<p class="text-gray-900 dark:text-gray-200">Log in to comment.</p>
|
<div class="rounded-xl border border-dashed border-neutral-300 p-6 text-center dark:border-neutral-700">
|
||||||
|
<p class="text-sm text-neutral-600 dark:text-neutral-400">
|
||||||
|
Log in to join the discussion.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
@endguest
|
@endguest
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Comments -->
|
{{-- Comments --}}
|
||||||
<div class="px-4 py-6 sm:px-6">
|
<div class="px-6 py-6">
|
||||||
<div class="space-y-8">
|
|
||||||
@if ($comments->isNotEmpty())
|
@if ($comments->isNotEmpty())
|
||||||
|
|
||||||
|
<div class="space-y-6">
|
||||||
@foreach($comments as $comment)
|
@foreach($comments as $comment)
|
||||||
<livewire:comment :comment="$comment" :key="$comment->id"/>
|
<livewire:comment :comment="$comment" :key="$comment->id"/>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mt-8">
|
||||||
{{ $comments->links('pagination::tailwind') }}
|
{{ $comments->links('pagination::tailwind') }}
|
||||||
|
</div>
|
||||||
|
|
||||||
@else
|
@else
|
||||||
<p class="text-gray-900 dark:text-gray-200">No comments yet.</p>
|
|
||||||
|
<div class="rounded-2xl border border-dashed border-neutral-300 py-12 text-center dark:border-neutral-700">
|
||||||
|
<p class="text-neutral-500 dark:text-neutral-400">
|
||||||
|
No comments yet.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
</section>
|
||||||
Reference in New Issue
Block a user