on master help sign in
ecosystem/indexcard: rewrangle flexboxes
556cd20Matilde Park
components/ecosystem/IndexCard.js+11−9
@@ -4,23 +4,25 @@ export default function IndexCard({ slug, feat }) {
4 return (
4 return (
5 <Link href={slug}>
5 <Link href={slug}>
6 <div className="cursor-pointer bg-wall-100 rounded-xl min-h-0 flex-1">
6 <div className="cursor-pointer bg-wall-100 rounded-xl min-h-0 flex-1">
7− <div className="flex flex-col p-4 justify-between items-between h-full relative">
7+ <div className="flex flex-col p-4 h-full relative">
8 {feat.image ? (
8 {feat.image ? (
9− <img
9+ <div
10− className="rounded-xl w-full flex-1 object-cover"
10+ className="rounded-xl object-cover overflow-hidden basis-1/3"
11− src={feat.image}
11+ style={{
12− style={{ aspectRatio: "4 / 3" }}
12+ backgroundColor: feat?.matchedPost?.bgColor || "rgba(0,0,0,0)",
13− />
13+ }}
14+ >
15+ <img className="h-full w-full object-cover" src={feat.image} />
16+ </div>
14 ) : (
17 ) : (
15 <div
18 <div
16− className="rounded-xl w-full flex-1"
19+ className="rounded-xl w-full"
17 style={{
20 style={{
18− aspectRatio: "4 / 3",
19 backgroundColor: feat?.matchedPost?.bgColor || "rgba(0,0,0,0)",
21 backgroundColor: feat?.matchedPost?.bgColor || "rgba(0,0,0,0)",
20 }}
22 }}
21 />
23 />
22 )}
24 )}
23− <div className="grow-1 shrink-0 flex flex-col h-full min-h-0 pt-4">
25+ <div className="pt-4">
24 <p className="mb-2 font-semibold leading-5">{feat.title}</p>
26 <p className="mb-2 font-semibold leading-5">{feat.title}</p>
25 {badge(feat.type)}
27 {badge(feat.type)}
26 <p className="text-sm leading-5">{feat?.description}</p>
28 <p className="text-sm leading-5">{feat?.description}</p>