@@ -19,28 +19,27 @@ export function ExperienceTile({
19
19
period,
20
20
responsibilities,
21
21
} : ExperienceTileProps ) {
22
- const isDesktop = useMediaQuery ( '(min-width: 768px)' ) ;
22
+ const isTablet = useMediaQuery ( '(min-width: 768px)' ) ;
23
+ const isDesktop = useMediaQuery ( '(min-width: 1280px)' ) ;
23
24
return (
24
- < div
25
- className = {
26
- ( ! ( responsibilities && responsibilities . length > 0 ) && ! isDesktop ? '-mb-6' : 'mb-6' ) +
27
- ' ' +
28
- 'flex items-center'
29
- }
30
- >
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" >
43
- < div className = "mb-4 flex flex-col justify-between sm:flex-row md:items-start" >
25
+ < div className = "-mb-2 flex items-center" >
26
+ < div className = "group relative flex-grow lg:-ml-[132px] xl:-ml-40 2xl:-ml-52" >
27
+ { isTablet && (
28
+ < div className = "opacity-0 transition-opacity delay-100 md:group-hover:opacity-100" >
29
+ < div className = "absolute top-1/2 aspect-square -translate-y-1/2 transform rounded-lg bg-transparent" >
30
+ { /* // center the bullet : `top-1/2 transform -translate-y-1/2` */ }
31
+ < img
32
+ src = { companyLogo }
33
+ alt = { `${ companyName } logo` }
34
+ width = { isDesktop ? 80 : 70 }
35
+ height = { isDesktop ? 80 : 70 }
36
+ className = "rounded-md"
37
+ />
38
+ </ div >
39
+ </ div >
40
+ ) }
41
+ < div className = "py-3 lg:pl-[132px] xl:pl-40 2xl:pl-52" >
42
+ < div className = "flex flex-col justify-between sm:flex-row md:items-start" >
44
43
< div >
45
44
< h2 className = "text-xl font-bold" > { position } </ h2 >
46
45
< LinkWithArrow
@@ -51,19 +50,19 @@ export function ExperienceTile({
51
50
>
52
51
< h3 className = "text-lg font-semibold" > { companyName } </ h3 >
53
52
</ LinkWithArrow >
54
- { ! isDesktop && (
53
+ { ! isTablet && (
55
54
< h3 className = "font-typewriter text-gray-600 dark:text-gray-400" > { period } </ h3 >
56
55
) }
57
56
</ div >
58
- { isDesktop && (
57
+ { isTablet && (
59
58
< h3 className = "font-typewriter text-gray-600 dark:text-gray-400" > { period } </ h3 >
60
59
) }
61
60
</ div >
62
61
{ responsibilities && responsibilities . length > 0 && (
63
- < div className = "mt-4 " >
64
- < ul className = "list-inside space-y-1 text-gray-700 dark:text-gray-300" >
62
+ < div className = "mt-3 " >
63
+ < ul className = "list-inside list-['-_'] space-y-1 text-gray-700 dark:text-gray-300" >
65
64
{ responsibilities . map ( ( responsibility , index ) => (
66
- < li key = { index } > - { responsibility } </ li >
65
+ < li key = { index } > { responsibility } </ li >
67
66
) ) }
68
67
</ ul >
69
68
</ div >
0 commit comments