Skip to content

Commit 10d2497

Browse files
committed
Fixing publication image alignment
1 parent 626a773 commit 10d2497

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/components/publications/Publication.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ import { Publication as Props } from "@/content/publications";
88
const Publication: React.FC<Props> = (props) => {
99
return (
1010
<li className="stack stack-sm sm:stack-reset sm:stack-h sm:stack-h-sm">
11-
<Image
12-
src={props.hero}
13-
alt={props.title}
14-
className="h-48 w-full rounded-sm object-cover shadow sm:h-24 sm:w-36"
15-
/>
11+
<div className="relative shrink-0 h-48 w-full sm:h-24 sm:w-36">
12+
<Image
13+
src={props.hero}
14+
alt={props.title}
15+
fill
16+
className="rounded-sm object-cover shadow"
17+
sizes="(max-width: 640px) 9rem, 100vw"
18+
/>
19+
</div>
1620
<div>
1721
<PublicationTitle {...props}>{props.title}</PublicationTitle>
1822
<PublicationInfo {...props} />

0 commit comments

Comments
 (0)