feat: add article page and not found component with markdown rendering
This commit is contained in:
@@ -32,14 +32,17 @@ export const ArticleListPagination = ({
|
||||
const pages = getPageNumbers(currentPage, totalPages);
|
||||
|
||||
return (
|
||||
<nav className='flex items-center gap-1' aria-label='Article pagination'>
|
||||
<nav
|
||||
className='flex items-center gap-1'
|
||||
aria-label='Article pagination'
|
||||
>
|
||||
<Link
|
||||
href={buildUrl(currentPage - 1)}
|
||||
aria-disabled={currentPage <= 1}
|
||||
aria-label='Previous page'
|
||||
className={cn(
|
||||
'flex size-9 items-center justify-center rounded-lg border border-border bg-card transition-colors hover:bg-muted',
|
||||
currentPage <= 1 && 'pointer-events-none opacity-40',
|
||||
currentPage <= 1 && 'pointer-events-none opacity-40'
|
||||
)}
|
||||
>
|
||||
<ChevronLeftIcon className='size-4' />
|
||||
@@ -62,12 +65,12 @@ export const ArticleListPagination = ({
|
||||
'flex size-9 items-center justify-center rounded-lg border text-sm font-medium transition-colors',
|
||||
page === currentPage
|
||||
? 'border-foreground bg-foreground text-background'
|
||||
: 'border-border bg-card hover:bg-muted',
|
||||
: 'border-border bg-card hover:bg-muted'
|
||||
)}
|
||||
>
|
||||
{page}
|
||||
</Link>
|
||||
),
|
||||
)
|
||||
)}
|
||||
|
||||
<Link
|
||||
@@ -76,7 +79,8 @@ export const ArticleListPagination = ({
|
||||
aria-label='Next page'
|
||||
className={cn(
|
||||
'flex size-9 items-center justify-center rounded-lg border border-border bg-card transition-colors hover:bg-muted',
|
||||
currentPage >= totalPages && 'pointer-events-none opacity-40',
|
||||
currentPage >= totalPages &&
|
||||
'pointer-events-none opacity-40'
|
||||
)}
|
||||
>
|
||||
<ChevronRightIcon className='size-4' />
|
||||
|
||||
Reference in New Issue
Block a user