Update pagination limit and improve author display in PostListItem
This commit is contained in:
@@ -51,7 +51,7 @@ class GetPostsTask
|
||||
});
|
||||
|
||||
$sort = $filters['sort'] ?? 'desc';
|
||||
return $query->orderBy('publish_at', $sort)->paginate(9)->withQueryString();
|
||||
return $query->orderBy('publish_at', $sort)->paginate(10)->withQueryString();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
<div class="space-y-5 md:space-y-4">
|
||||
<div>
|
||||
<div class="container mx-auto max-w-screen-lg py-5 lg:py-8">
|
||||
<div class="grid gap-10 md:grid-cols-2 lg:gap-10 xl:grid-cols-3">
|
||||
<div class="grid gap-10 md:grid-cols-2 lg:gap-10 xl:grid-cols-2">
|
||||
<template v-for="post in posts.data" :key="post.id">
|
||||
<PostListItem :post="post" />
|
||||
</template>
|
||||
|
||||
@@ -58,20 +58,18 @@
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div
|
||||
class="mt-3 flex items-center space-x-3 text-gray-500 dark:text-gray-400"
|
||||
>
|
||||
<span>
|
||||
<div class="flex items-center gap-3">
|
||||
<span v-if="post && post.authors && post.authors.length > 0" class="truncate text-sm">
|
||||
{{ textLimit(post.authors[0], 20) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="flex items-center gap-3 text-gray-500">
|
||||
|
||||
<span v-if="post?.authors?.length" class="truncate text-sm">
|
||||
{{ textLimit(post.authors[0], 40) }}
|
||||
</span>
|
||||
<span class="text-xs text-gray-300 dark:text-gray-600"
|
||||
>•</span
|
||||
>
|
||||
<span class="truncate text-sm">{{ post.created_post }}</span>
|
||||
|
||||
<span v-if="post?.authors?.length" class="text-xs text-gray-300 dark:text-gray-600">•</span>
|
||||
|
||||
<span class="truncate text-sm">
|
||||
{{ post.created_post }}
|
||||
</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user