Skip to content

Commit

Permalink
feat(about-me): add profile picture relative to color theme
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 authored Mar 14, 2024
1 parent 8d55172 commit 8b8fa1b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 13 deletions.
Binary file added src/app/about/_components/dark-pic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 28 additions & 13 deletions src/app/about/_components/image-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ import Image from 'next/image'
import Tilt from 'react-parallax-tilt'
import { placeholder } from '../../../lib/placeholder'

import lightPic from './light-pic.jpg'
import darkPic from './dark-pic.png'

export function ImageCard({ mobile = false }) {
if (mobile) {
return (
<Image
src="https://github.com/mateusfg7.png"
height={460}
width={460}
alt="Mateus Felipe's picture"
className="my-5 rounded-3xl border border-neutral-800 object-cover dark:border-neutral-500"
placeholder={placeholder(460, 460) as `data:image/${string}`}
priority
/>
<>
<Image
src={lightPic}
alt="Mateus Felipe's picture"
className="my-5 rounded-3xl border border-neutral-800 object-cover dark:hidden"
placeholder={placeholder(460, 460) as `data:image/${string}`}
priority
/>
<Image
src={darkPic}
alt="Mateus Felipe's picture"
className="my-5 hidden rounded-3xl border border-neutral-500 object-cover dark:block"
placeholder={placeholder(460, 460) as `data:image/${string}`}
priority
/>
</>
)
}

Expand All @@ -34,11 +44,16 @@ export function ImageCard({ mobile = false }) {
tiltReverse
>
<Image
src="https://github.com/mateusfg7.png"
height={460}
width={460}
src={lightPic}
alt="Mateus Felipe's picture"
className="h-[30rem] w-96 object-cover dark:hidden"
placeholder={placeholder(460, 460) as `data:image/${string}`}
priority
/>
<Image
src={darkPic}
alt="Mateus Felipe's picture"
className="h-[30rem] w-96 object-cover dark:brightness-90"
className="hidden h-[30rem] w-96 object-cover brightness-90 dark:block"
placeholder={placeholder(460, 460) as `data:image/${string}`}
priority
/>
Expand Down
Binary file added src/app/about/_components/light-pic.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8b8fa1b

Please sign in to comment.