-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from mateuseap/develop
Add new section to `Home` page and remove unused components and pages
- Loading branch information
Showing
13 changed files
with
263 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import clsx from 'clsx'; | ||
import React from 'react'; | ||
|
||
export interface LinkProps { | ||
to: string; | ||
leftIcon?: React.ReactElement; | ||
rightIcon?: React.ReactElement; | ||
size?: 'sm' | 'base' | 'lg' | 'xl'; | ||
variant?: 'primary' | 'link' | 'icon-button'; | ||
children?: React.ReactNode; | ||
external?: boolean; | ||
className?: string; | ||
}; | ||
|
||
function Link({ | ||
to, | ||
leftIcon, | ||
rightIcon, | ||
size = 'base', | ||
variant = 'primary', | ||
children, | ||
external, | ||
className, | ||
...restProps | ||
}: LinkProps) { | ||
const iconWithStyles = ( | ||
icon: React.ReactElement, | ||
size: 'sm' | 'base' | 'lg' | 'xl', | ||
) => | ||
React.cloneElement(icon, { | ||
className: clsx( | ||
'bg-rose-100/30 p-1', | ||
'shadow-md rounded-md', | ||
'group-hover:scale-[1.2] group-hover:shadow-[#b0b0b0] group-active:translate-y-[2px]', | ||
'transition-all duration-300 ease-out', | ||
), | ||
size: size === 'sm' ? 24 : 32, | ||
...icon.props, | ||
}); | ||
|
||
return ( | ||
<a | ||
href={to} | ||
className={clsx( | ||
'group flex w-fit items-center gap-2', | ||
`text-${size}`, | ||
{ | ||
'hover:underline': variant === 'link', | ||
}, | ||
className, | ||
)} | ||
{...(external && { | ||
target: '_blank', | ||
rel: 'noopener noreferrer', | ||
})} | ||
{...restProps} | ||
> | ||
{leftIcon && iconWithStyles(leftIcon, size)} | ||
{children} | ||
{rightIcon && iconWithStyles(rightIcon, size)} | ||
</a> | ||
); | ||
} | ||
|
||
export default Link; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
import clsx from 'clsx'; | ||
import Link from '../../components/Link/Link'; | ||
import { AiFillGithub } from 'react-icons/ai'; | ||
import { FiExternalLink } from 'react-icons/fi'; | ||
|
||
export interface ProjectCardProps { | ||
name: string; | ||
description: string; | ||
githubRepoUrl?: string; | ||
deployedAppUrl?: string; | ||
technologiesUsed: Array<string>; | ||
thumbnail: string; | ||
} | ||
|
||
function ProjectCard({ | ||
name, | ||
description, | ||
githubRepoUrl = undefined, | ||
deployedAppUrl = undefined, | ||
technologiesUsed, | ||
thumbnail, | ||
}: ProjectCardProps) { | ||
return ( | ||
<div | ||
className={clsx( | ||
'relative rounded-lg border-[1px] border-none bg-white/5 p-4', | ||
'transition-all duration-500 ease-out', | ||
'hover:bg-white/10', | ||
)} | ||
> | ||
<div className='flex flex-col space-y-3'> | ||
{deployedAppUrl ? ( | ||
<Link | ||
to={deployedAppUrl} | ||
external | ||
rightIcon={<FiExternalLink size={22} />} | ||
size='lg' | ||
className='w-fit font-semibold' | ||
> | ||
<img | ||
src={thumbnail} | ||
alt={`${name} logo`} | ||
width='32' | ||
height='32' | ||
className='rounded-md' | ||
/> | ||
<span>{name}</span> | ||
</Link> | ||
) : ( | ||
<p className='group flex w-fit items-center gap-2 text-lg font-semibold'> | ||
<img | ||
src={thumbnail} | ||
alt={`${name} logo`} | ||
width='32' | ||
height='32' | ||
className='rounded-md' | ||
/> | ||
<span>{name}</span> | ||
</p> | ||
)} | ||
<p className='text-base'>{description}</p> | ||
|
||
<div className='flex flex-wrap items-center'> | ||
{technologiesUsed.map(technology => ( | ||
<span | ||
key={technology} | ||
className='mr-2 mt-2 inline-block rounded-md border-[1px] border-zinc-700 px-2 py-1 font-mono text-xs font-semibold' | ||
> | ||
{technology} | ||
</span> | ||
))} | ||
</div> | ||
</div> | ||
{githubRepoUrl && ( | ||
<a | ||
href={githubRepoUrl} | ||
target='_blank' | ||
rel='noopener noreferrer' | ||
className={clsx( | ||
'group', | ||
'absolute top-4 right-4 rounded-lg px-2 py-1', | ||
)} | ||
> | ||
<AiFillGithub | ||
size={28} | ||
color='#ffe4e64d' | ||
className={clsx( | ||
'fill-rose-100/30', | ||
'transition-all duration-300 ease-out', | ||
'group-hover:scale-[1.2] group-hover:fill-white', | ||
)} | ||
/> | ||
</a> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default ProjectCard; |
Oops, something went wrong.