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