feat: enable horizontal scroll for the five most recent posts on the landing page

This commit is contained in:
Hossein Mehrabi 2023-08-24 20:51:26 +03:30
parent 1315d9c7f1
commit 187c6de312
No known key found for this signature in database
GPG Key ID: 45C04964191AFAA1
1 changed files with 19 additions and 1 deletions

View File

@ -34,7 +34,25 @@ export const HomePage: React.FC<HomePageProps> = ({
return (
<Root {...props}>
<Hero tags={tags} />
<PostsGrid posts={group1} pattern={[{ cols: 5, size: 'xxsmall' }]} />
<PostsGrid
posts={group1}
horizontal
pattern={[{ cols: 5, size: 'xxsmall' }]}
breakpoints={[
{
breakpoint: 'xs',
pattern: [{ cols: 1.5, size: 'xxsmall', maxWidth: '192px' }],
},
{
breakpoint: 'sm',
pattern: [{ cols: 4, size: 'xxsmall' }],
},
{
breakpoint: 'md',
pattern: [{ cols: 4, size: 'xxsmall' }],
},
]}
/>
<PostsGrid
bordered
posts={highlighted.slice(0, 1)}