mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-24 11:11:29 +08:00
refactor: Improve layout and styling across multiple components
This commit is contained in:
@ -15,7 +15,7 @@ export const getStaticPaths: GetStaticPaths = async ({ paginate }) => {
|
||||
return uniqueCategories.flatMap((category) => {
|
||||
const filterPosts = sortedPosts.filter((post) => post.data.category === category);
|
||||
return paginate(filterPosts, {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
params: { category },
|
||||
});
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ export const getStaticPaths: GetStaticPaths = async ({ paginate }) => {
|
||||
return uniqueCategories.flatMap((category) => {
|
||||
const filterPosts = sortedPosts.filter((post) => post.data.category === category);
|
||||
return paginate(filterPosts, {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
params: { category },
|
||||
});
|
||||
});
|
||||
|
@ -85,12 +85,14 @@ const descYearKeys = Object.keys(groupedByYear).sort((a, b) => +b - +a);
|
||||
<Pagination {...paginationProps} />
|
||||
</div>
|
||||
|
||||
<aside class="flex flex-col gap-2">
|
||||
<aside class="flex flex-col gap-8">
|
||||
{
|
||||
!!uniqueTags.length && (
|
||||
<div>
|
||||
<h2 class="title mb-4 flex items-center gap-2 text-lg">
|
||||
Tags
|
||||
<a href="/tags/" class="hover:text-link cactus-link">
|
||||
Tags
|
||||
</a>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="h-6 w-6"
|
||||
@ -119,12 +121,6 @@ const descYearKeys = Object.keys(groupedByYear).sort((a, b) => +b - +a);
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<span class="mt-4 block sm:text-end">
|
||||
<a class="hover:text-link" href="/tags/">
|
||||
View all <span aria-hidden="true">→</span>
|
||||
<span class="sr-only">blog tags</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@ -133,7 +129,9 @@ const descYearKeys = Object.keys(groupedByYear).sort((a, b) => +b - +a);
|
||||
!!uniqueCategories.length && (
|
||||
<div>
|
||||
<h2 class="title mb-4 flex items-center gap-2 text-lg">
|
||||
Categories
|
||||
<a href="/categories/" class="hover:text-link cactus-link">
|
||||
Categories
|
||||
</a>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="h-6 w-6"
|
||||
@ -165,12 +163,6 @@ const descYearKeys = Object.keys(groupedByYear).sort((a, b) => +b - +a);
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<span class="mt-4 block sm:text-end">
|
||||
<a class="hover:text-link" href="/categories/">
|
||||
View all <span aria-hidden="true">→</span>
|
||||
<span class="sr-only">blog categories</span>
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ export const getStaticPaths: GetStaticPaths = async ({ paginate }) => {
|
||||
return uniqueTags.flatMap((tag) => {
|
||||
const filterPosts = sortedPosts.filter((post) => post.data.tags.includes(tag));
|
||||
return paginate(filterPosts, {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
params: { tag },
|
||||
});
|
||||
});
|
||||
|
@ -15,7 +15,7 @@ export const getStaticPaths: GetStaticPaths = async ({ paginate }) => {
|
||||
return uniqueTags.flatMap((tag) => {
|
||||
const filterPosts = sortedPosts.filter((post) => post.data.tags.includes(tag));
|
||||
return paginate(filterPosts, {
|
||||
pageSize: 10,
|
||||
pageSize: 20,
|
||||
params: { tag },
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user