mirror of
https://github.com/bspeice/speice.io
synced 2025-09-07 23:25:06 -04:00
Initial docusaurus
This commit is contained in:
44
src/theme/BlogPostPaginator/index.tsx
Normal file
44
src/theme/BlogPostPaginator/index.tsx
Normal file
@ -0,0 +1,44 @@
|
||||
import React from 'react';
|
||||
import Translate, {translate} from '@docusaurus/Translate';
|
||||
import PaginatorNavLink from '@theme/PaginatorNavLink';
|
||||
import type {Props} from '@theme/BlogPostPaginator';
|
||||
|
||||
export default function BlogPostPaginator(props: Props): JSX.Element {
|
||||
const {nextItem, prevItem} = props;
|
||||
|
||||
return (
|
||||
<nav
|
||||
className="pagination-nav docusaurus-mt-lg"
|
||||
aria-label={translate({
|
||||
id: 'theme.blog.post.paginator.navAriaLabel',
|
||||
message: 'Blog post page navigation',
|
||||
description: 'The ARIA label for the blog posts pagination',
|
||||
})}>
|
||||
{nextItem && (
|
||||
<PaginatorNavLink
|
||||
{...nextItem}
|
||||
subLabel={
|
||||
<Translate
|
||||
id="theme.blog.post.paginator.olderPost"
|
||||
description="The blog post button label to navigate to the older/next post">
|
||||
Older post
|
||||
</Translate>
|
||||
}
|
||||
/>
|
||||
)}
|
||||
{prevItem && (
|
||||
<PaginatorNavLink
|
||||
{...prevItem}
|
||||
subLabel={
|
||||
<Translate
|
||||
id="theme.blog.post.paginator.newerPost"
|
||||
description="The blog post button label to navigate to the newer/previous post">
|
||||
Newer post
|
||||
</Translate>
|
||||
}
|
||||
isNext
|
||||
/>
|
||||
)}
|
||||
</nav>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user