Skip to content

Commit d564a81

Browse files
authored
Merge pull request #23 from mateuseap/develop
Add new section to `Home` page and remove unused components and pages
2 parents d32b80a + e1da528 commit d564a81

File tree

13 files changed

+263
-456
lines changed

13 files changed

+263
-456
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. T
2727

2828
## 🧙‍♂️ Useful commands
2929

30-
#### $\textcolor{blue}{\textsf{Build the project:}}$
30+
Build the project:
3131

3232
```bash
3333
npm run build
3434
```
3535

36-
#### $\textcolor{blue}{\textsf{Commit build folder to}}$ $\textcolor{green}{\textsf{gh-pages}}$ $\textcolor{blue}{\textsf{branch:}}$
36+
Commit build folder to ``gh-pages`` branch:
3737

3838
```bash
3939
npm run deploy

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mateuseap.github.io",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"private": true,
55
"homepage": "https://mateuseap.github.io",
66
"dependencies": {

src/components/Card/Card.tsx

Lines changed: 0 additions & 91 deletions
This file was deleted.

src/components/DefaultPage/DefaultPage.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { ReactNode } from 'react';
2-
import Sidebar from '../../components/Sidebar/Sidebar';
32
import Starfield from '../../components/Starfield/Starfield';
43

54
export interface DefaultPageProps {
65
className?: string;
76
childrenClassName?: string;
87
children?: ReactNode;
98
HtmlTag?: keyof JSX.IntrinsicElements;
10-
sidebar?: boolean;
119
starfield?: boolean;
1210
}
1311

@@ -16,13 +14,11 @@ function DefaultPage({
1614
childrenClassName = 'h-full w-full flex flex-col flex-1 gap-y-8',
1715
children = null,
1816
HtmlTag = 'div',
19-
sidebar = true,
2017
starfield = true,
2118
}: DefaultPageProps) {
2219
return (
2320
<HtmlTag className={className}>
2421
{starfield && <Starfield />}
25-
{sidebar && <Sidebar />}
2622
{children && <div className={childrenClassName}>{children}</div>}
2723
</HtmlTag>
2824
);

src/components/FrogNinjaModal/FrogNinjaModal.tsx

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/components/Link/Link.tsx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import clsx from 'clsx';
2+
import React from 'react';
3+
4+
export interface LinkProps {
5+
to: string;
6+
leftIcon?: React.ReactElement;
7+
rightIcon?: React.ReactElement;
8+
size?: 'sm' | 'base' | 'lg' | 'xl';
9+
variant?: 'primary' | 'link' | 'icon-button';
10+
children?: React.ReactNode;
11+
external?: boolean;
12+
className?: string;
13+
};
14+
15+
function Link({
16+
to,
17+
leftIcon,
18+
rightIcon,
19+
size = 'base',
20+
variant = 'primary',
21+
children,
22+
external,
23+
className,
24+
...restProps
25+
}: LinkProps) {
26+
const iconWithStyles = (
27+
icon: React.ReactElement,
28+
size: 'sm' | 'base' | 'lg' | 'xl',
29+
) =>
30+
React.cloneElement(icon, {
31+
className: clsx(
32+
'bg-rose-100/30 p-1',
33+
'shadow-md rounded-md',
34+
'group-hover:scale-[1.2] group-hover:shadow-[#b0b0b0] group-active:translate-y-[2px]',
35+
'transition-all duration-300 ease-out',
36+
),
37+
size: size === 'sm' ? 24 : 32,
38+
...icon.props,
39+
});
40+
41+
return (
42+
<a
43+
href={to}
44+
className={clsx(
45+
'group flex w-fit items-center gap-2',
46+
`text-${size}`,
47+
{
48+
'hover:underline': variant === 'link',
49+
},
50+
className,
51+
)}
52+
{...(external && {
53+
target: '_blank',
54+
rel: 'noopener noreferrer',
55+
})}
56+
{...restProps}
57+
>
58+
{leftIcon && iconWithStyles(leftIcon, size)}
59+
{children}
60+
{rightIcon && iconWithStyles(rightIcon, size)}
61+
</a>
62+
);
63+
}
64+
65+
export default Link;
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import clsx from 'clsx';
2+
import Link from '../../components/Link/Link';
3+
import { AiFillGithub } from 'react-icons/ai';
4+
import { FiExternalLink } from 'react-icons/fi';
5+
6+
export interface ProjectCardProps {
7+
name: string;
8+
description: string;
9+
githubRepoUrl?: string;
10+
deployedAppUrl?: string;
11+
technologiesUsed: Array<string>;
12+
thumbnail: string;
13+
}
14+
15+
function ProjectCard({
16+
name,
17+
description,
18+
githubRepoUrl = undefined,
19+
deployedAppUrl = undefined,
20+
technologiesUsed,
21+
thumbnail,
22+
}: ProjectCardProps) {
23+
return (
24+
<div
25+
className={clsx(
26+
'relative rounded-lg border-[1px] border-none bg-white/5 p-4',
27+
'transition-all duration-500 ease-out',
28+
'hover:bg-white/10',
29+
)}
30+
>
31+
<div className='flex flex-col space-y-3'>
32+
{deployedAppUrl ? (
33+
<Link
34+
to={deployedAppUrl}
35+
external
36+
rightIcon={<FiExternalLink size={22} />}
37+
size='lg'
38+
className='w-fit font-semibold'
39+
>
40+
<img
41+
src={thumbnail}
42+
alt={`${name} logo`}
43+
width='32'
44+
height='32'
45+
className='rounded-md'
46+
/>
47+
<span>{name}</span>
48+
</Link>
49+
) : (
50+
<p className='group flex w-fit items-center gap-2 text-lg font-semibold'>
51+
<img
52+
src={thumbnail}
53+
alt={`${name} logo`}
54+
width='32'
55+
height='32'
56+
className='rounded-md'
57+
/>
58+
<span>{name}</span>
59+
</p>
60+
)}
61+
<p className='text-base'>{description}</p>
62+
63+
<div className='flex flex-wrap items-center'>
64+
{technologiesUsed.map(technology => (
65+
<span
66+
key={technology}
67+
className='mr-2 mt-2 inline-block rounded-md border-[1px] border-zinc-700 px-2 py-1 font-mono text-xs font-semibold'
68+
>
69+
{technology}
70+
</span>
71+
))}
72+
</div>
73+
</div>
74+
{githubRepoUrl && (
75+
<a
76+
href={githubRepoUrl}
77+
target='_blank'
78+
rel='noopener noreferrer'
79+
className={clsx(
80+
'group',
81+
'absolute top-4 right-4 rounded-lg px-2 py-1',
82+
)}
83+
>
84+
<AiFillGithub
85+
size={28}
86+
color='#ffe4e64d'
87+
className={clsx(
88+
'fill-rose-100/30',
89+
'transition-all duration-300 ease-out',
90+
'group-hover:scale-[1.2] group-hover:fill-white',
91+
)}
92+
/>
93+
</a>
94+
)}
95+
</div>
96+
);
97+
}
98+
99+
export default ProjectCard;

0 commit comments

Comments
 (0)