diff --git a/src/components/molecules/PostTeaser.module.scss b/src/components/molecules/PostTeaser.module.scss index 5b9d254e..97f08899 100644 --- a/src/components/molecules/PostTeaser.module.scss +++ b/src/components/molecules/PostTeaser.module.scss @@ -4,7 +4,7 @@ .title { padding-left: 0.2rem; padding-right: 0.2rem; - margin-top: $spacer / 2; + margin-top: $spacer / 3; margin-bottom: 0; font-size: $font-size-base; transition: color 0.2s ease-out; @@ -22,6 +22,8 @@ font-style: italic; font-size: $font-size-small; color: $text-color-light; + padding-left: 0.2rem; + padding-right: 0.2rem; } .empty { diff --git a/src/components/molecules/PostTeaser.tsx b/src/components/molecules/PostTeaser.tsx index f4cc74fc..6bd3d859 100644 --- a/src/components/molecules/PostTeaser.tsx +++ b/src/components/molecules/PostTeaser.tsx @@ -49,7 +49,6 @@ export default function PostTeaser({ > {image ? ( {title} 0.5 - Math.random()) + .slice(0, 6) + ) function refreshPosts() { - setFilteredPosts(getPosts()) + const newPosts = getPosts() + setFilteredPosts(newPosts.sort(() => 0.5 - Math.random()).slice(0, 6)) } return ( )