Skip to content

Commit e9dddb0

Browse files
authored
Polish experience tile layout with hover logo and cleaner list styling (#5)
2 parents c5b01ef + cdab2c5 commit e9dddb0

File tree

4 files changed

+35
-36
lines changed

4 files changed

+35
-36
lines changed

src/components/Education.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useMediaQuery } from '@/hooks/useMediaQuery';
44
import { cn } from '@/lib/utils';
55

66
export function Education() {
7-
const isDesktop = useMediaQuery('(min-width: 768px)');
7+
const isTablet = useMediaQuery('(min-width: 768px)');
88
return (
99
<section id="education" className="mb-12">
1010
<BlurFade delay={BLUR_FADE_DELAY * 7}>
@@ -25,12 +25,12 @@ export function Education() {
2525
<img
2626
src="/images/uwaterlooLogo.png"
2727
alt={'University of Waterloo logo'}
28-
width={isDesktop ? 80 : 45}
29-
height={isDesktop ? 80 : 45}
28+
width={isTablet ? 80 : 45}
29+
height={isTablet ? 80 : 45}
3030
className="rounded-md"
3131
/>
3232
</div>
33-
<div className={'pl-16 ' + (isDesktop && 'py-3')}>
33+
<div className={'pl-16 ' + (isTablet && 'py-3')}>
3434
<div className="mb-2 flex flex-col justify-between sm:flex-row md:items-start">
3535
<div>
3636
<LinkWithArrow
@@ -46,13 +46,13 @@ export function Education() {
4646
<h3 className="text-lg font-semibold">
4747
Bachelor of Mathematics, Computational Mathematics Major
4848
</h3>
49-
{!isDesktop && (
49+
{!isTablet && (
5050
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
5151
Sept 2022 - Present
5252
</h3>
5353
)}
5454
</div>
55-
{isDesktop && (
55+
{isTablet && (
5656
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">
5757
Sept 2022 - Present
5858
</h3>

src/components/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const Header = ({
3232
email,
3333
resumeFile,
3434
}: HeaderProps) => {
35-
const isDesktop = useMediaQuery('(min-width: 768px)');
35+
const isTablet = useMediaQuery('(min-width: 768px)');
3636
const [copied, setCopiedId] = useState<string>();
3737
useEffect(() => {
3838
setTimeout(() => {
@@ -44,7 +44,7 @@ const Header = ({
4444
<div className="container mx-auto mb-10">
4545
<div className="flex flex-col items-center justify-between md:flex-row">
4646
<BlurFade delay={BLUR_FADE_DELAY}>
47-
{!isDesktop && (
47+
{!isTablet && (
4848
<div className="mb-4 flex-shrink-0 md:mb-0 md:mr-8">
4949
<img
5050
src="/images/headshot.jpg"
@@ -145,7 +145,7 @@ const Header = ({
145145
</div>
146146
</div>
147147
<BlurFade delay={BLUR_FADE_DELAY} inView={true}>
148-
{isDesktop && (
148+
{isTablet && (
149149
<div className="flex-shrink-0">
150150
<img
151151
src="/images/headshot.jpg"

src/components/Tiles/ExperienceTile.tsx

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,27 @@ export function ExperienceTile({
1919
period,
2020
responsibilities,
2121
}: ExperienceTileProps) {
22-
const isDesktop = useMediaQuery('(min-width: 768px)');
22+
const isTablet = useMediaQuery('(min-width: 768px)');
23+
const isDesktop = useMediaQuery('(min-width: 1280px)');
2324
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">
4443
<div>
4544
<h2 className="text-xl font-bold">{position}</h2>
4645
<LinkWithArrow
@@ -51,19 +50,19 @@ export function ExperienceTile({
5150
>
5251
<h3 className="text-lg font-semibold">{companyName}</h3>
5352
</LinkWithArrow>
54-
{!isDesktop && (
53+
{!isTablet && (
5554
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">{period}</h3>
5655
)}
5756
</div>
58-
{isDesktop && (
57+
{isTablet && (
5958
<h3 className="font-typewriter text-gray-600 dark:text-gray-400">{period}</h3>
6059
)}
6160
</div>
6261
{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">
6564
{responsibilities.map((responsibility, index) => (
66-
<li key={index}>- {responsibility}</li>
65+
<li key={index}>{responsibility}</li>
6766
))}
6867
</ul>
6968
</div>

src/components/Tiles/ProjectTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function ProjectTile({
2929
liveUrl,
3030
techStack,
3131
}: ProjectTileProps) {
32-
// const isDesktop = useMediaQuery('(min-width: 768px)')
32+
// const isTablet = useMediaQuery('(min-width: 768px)')
3333
return (
3434
<div className="items-center">
3535
<div className="mb-2 flex flex-col justify-between sm:flex-row md:items-start">

0 commit comments

Comments
 (0)