Skip to content

Commit

Permalink
Update images sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
salimi-my committed Apr 22, 2024
1 parent 4d164d7 commit e0059e1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
7 changes: 6 additions & 1 deletion components/landing/about.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ export default function About({ about }: AboutProps) {
className='lg:col-span-3 w-4/5 md:w-1/2 mx-auto lg:w-full aspect-square rounded-2xl bg-gradient-to-tr from-transparent via-primary to-transparent'
>
<div className='rounded-2xl overflow-hidden rotate-[10deg] transition duration-300 ease-in-out hover:rotate-0 relative'>
<Image src={tilted} alt='about' placeholder='blur' />
<Image
src={tilted}
alt='about'
placeholder='blur'
sizes='(max-width: 768px) 50vw, 100vw'
/>
</div>
</m.div>
<div className='lg:col-span-4 flex flex-col gap-8'>
Expand Down
8 changes: 7 additions & 1 deletion components/landing/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ export default function Header({ miscellaneous }: HeaderProps) {
</div>
<div className='grow flex justify-center'>
<div className='me w-60 h-96 xs:w-72 xs:h-96 md:w-[22rem] md:h-[30rem]'>
<Image src={profile} alt='me' placeholder='blur' priority />
<Image
src={profile}
alt='me'
placeholder='blur'
sizes='(max-width: 768px) 50vw, 100vw'
priority
/>
</div>
</div>
<div className='flex flex-col items-center justify-center gap-4'>
Expand Down
4 changes: 2 additions & 2 deletions components/landing/portfolio-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ export default function PortfolioCard({
fill
placeholder='blur'
blurDataURL={portfolio.blurDataUrl}
sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw'
sizes='(max-width: 1024px) 50vw, 30vw'
className='object-cover object-top group-hover:object-bottom transition-all duration-6000 ease-in-out rounded-t-2xl border-t border-x'
/>
) : portfolio.image ? (
<Image
src={portfolio.image}
alt='portfolio'
fill
sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw'
sizes='(max-width: 1024px) 50vw, 30vw'
className='object-cover object-top group-hover:object-bottom transition-all duration-6000 ease-in-out rounded-t-2xl border-t border-x'
/>
) : null}
Expand Down

0 comments on commit e0059e1

Please sign in to comment.