Skip to content

Commit f65125c

Browse files
committed
feat: move company logo outside margins and reveal on hover
1 parent e33c0ba commit f65125c

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/components/Tiles/ExperienceTile.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,22 @@ export function ExperienceTile({
2828
'flex items-center'
2929
}
3030
>
31-
<div className="relative flex-grow md:pl-12">
32-
<div className="absolute left-[5px] top-3 aspect-square rounded-lg bg-white">
33-
{/* // center the bullet : `top-1/2 transform -translate-y-1/2` */}
34-
<img
35-
src={companyLogo}
36-
alt={`${companyName} logo`}
37-
width={isDesktop ? 80 : 45}
38-
height={isDesktop ? 80 : 45}
39-
className="rounded-md"
40-
/>
41-
</div>
42-
<div className="py-3 pl-16">
31+
<div className="group relative flex-grow lg:-ml-[132px] xl:-ml-40 2xl:-ml-52">
32+
{isDesktop && (
33+
<div className="opacity-0 transition-opacity delay-100 md:group-hover:opacity-100">
34+
<div className="absolute top-1/2 aspect-square -translate-y-1/2 transform rounded-lg bg-white">
35+
{/* // center the bullet : `top-1/2 transform -translate-y-1/2` */}
36+
<img
37+
src={companyLogo}
38+
alt={`${companyName} logo`}
39+
width={80}
40+
height={80}
41+
className="rounded-md"
42+
/>
43+
</div>
44+
</div>
45+
)}
46+
<div className="py-3 lg:pl-[132px] xl:pl-40 2xl:pl-52">
4347
<div className="mb-4 flex flex-col justify-between sm:flex-row md:items-start">
4448
<div>
4549
<h2 className="text-xl font-bold">{position}</h2>

0 commit comments

Comments
 (0)