Skip to content

Commit

Permalink
fix: higlighted and full article card images aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
gmolki committed Dec 11, 2024
1 parent 3513df8 commit 59f8ea2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/components/Blog/BlogArticleCard/FeatureImage/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ export const FeatureImage = ({
}) => {
return (
<LoadingBlinkBox loading={loading} loadingHeight="100%" loadingWidth="100%">
<div tw="relative w-full h-full flex justify-center">
<Image src={src} alt="Feature Image" fill />
<div tw="relative w-auto h-full flex items-center justify-center">
<Image
src={src}
alt="Feature Image"
height={0}
width={0}
tw="relative! w-auto h-auto max-w-full max-h-full"
/>
</div>
</LoadingBlinkBox>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/Blog/BlogArticleCard/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const BlogArticleCard = ({
<Headline size={size} loading={loading}>
{headline}
</Headline>
<div tw="lg:hidden w-full h-96 mb-12">
<div tw="lg:hidden w-full mb-8 mt-4">
<FeatureImage src={featureImage} loading={loading} />
</div>
<Description size={size} loading={loading}>
Expand Down Expand Up @@ -76,7 +76,7 @@ export const BlogArticleCard = ({
{headline}
</Headline>
</div>
<div tw="lg:hidden w-full h-96 mb-12">
<div tw="lg:hidden w-full mb-8 mt-4">
<FeatureImage src={featureImage} loading={loading} />
</div>
<div tw="flex flex-col justify-between gap-6">
Expand Down

0 comments on commit 59f8ea2

Please sign in to comment.