File tree Expand file tree Collapse file tree 3 files changed +18
-9
lines changed
app/Livewire/Pages/Articles
resources/views/livewire/pages/articles Expand file tree Collapse file tree 3 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 10
10
use App \Traits \WithLocale ;
11
11
use Illuminate \Contracts \View \View ;
12
12
use Livewire \Component ;
13
+ use Livewire \WithoutUrlPagination ;
14
+ use Livewire \WithPagination ;
13
15
14
16
final class Index extends Component
15
17
{
16
- use WithInfiniteScroll;
17
18
use WithLocale;
19
+ use WithoutUrlPagination;
20
+ use WithPagination;
18
21
19
22
public function mount (): void
20
23
{
@@ -31,7 +34,7 @@ public function render(): View
31
34
->published ()
32
35
->notPinned ()
33
36
->forLocale ($ this ->locale )
34
- ->paginate ( $ this -> perPage ),
37
+ ->simplePaginate ( 5 ),
35
38
'tags ' => Tag::query ()->whereHas ('articles ' , function ($ query ): void {
36
39
$ query ->published ();
37
40
})->orderBy ('name ' )->get (),
Original file line number Diff line number Diff line change @@ -119,11 +119,8 @@ class="flex size-8 items-center justify-center rounded-full text-gray-400 transi
119
119
@endforeach
120
120
</div >
121
121
122
- @if ($articles -> hasMorePages () )
123
- <p x-intersect =" @this .call('loadMore')" class =" mt-10 flex items-center justify-center gap-2" >
124
- <x-loader class =" text-primary-600" aria-hidden =" true" />
125
- {{ __ (' global.loading' ) } }
126
- </p >
127
- @endif
122
+ <div class =" mt-4" >
123
+ {{ $articles -> links () } }
124
+ </div >
128
125
</x-container >
129
126
</div >
Original file line number Diff line number Diff line change @@ -108,12 +108,21 @@ class="object-cover size-full"
108
108
</div >
109
109
110
110
<div class =" lg:grid lg:grid-cols-4 lg:gap-16" >
111
- <div class =" overflow-x- hidden lg:col-span-3" >
111
+ <div class =" overflow-hidden lg:col-span-3" >
112
112
<x-markdown-content
113
113
id =" content"
114
114
class =" prose prose-green text-gray-500 dark:text-gray-400 dark:prose-invert lg:max-w-none"
115
115
:content =" $article->body"
116
116
/>
117
+
118
+ <div class =" relative inline-flex mt-5 space-x-4" >
119
+ <livewire:components .reactions
120
+ wire:key =" {{ $article -> id } }"
121
+ :model =" $article"
122
+ :with-place-holder =" false"
123
+ :with-background =" false"
124
+ />
125
+ </div >
117
126
</div >
118
127
<div class =" hidden lg:block" >
119
128
<x-sticky-content class =" space-y-10" >
You can’t perform that action at this time.
0 commit comments