Skip to content

Commit 10b6363

Browse files
committed
Last tweaks for release of the first version
1 parent 5dc0025 commit 10b6363

12 files changed

Lines changed: 72 additions & 83 deletions

File tree

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@types/react-dom": "18.0.9",
1515
"axios": "^1.2.1",
1616
"clsx": "^1.2.1",
17+
"date-fns": "^2.29.3",
1718
"dotenv-load": "^2.0.1",
1819
"eslint": "8.29.0",
1920
"eslint-config-next": "13.0.6",

src/@Types/api.github.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export type PropsCardBox = {
55
repoDescription: string
66
amountStars: number
77
language: string
8-
lastEdition: string
9-
githubUrl: string
8+
lastEdition: string | date | number
9+
githubURL: string
1010
}

src/components/card-project.tsx

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,55 @@ import Link from "next/link";
22
import { Star } from "phosphor-react";
33
import { PropsCardBox } from "../@Types/api.github";
44

5+
import { intlFormatDistance, parseISO } from 'date-fns';
56
import cx from "clsx";
67

8+
import { useEffect, useState } from "react";
9+
710
export default function CardBox({
811
repoTitle,
912
vercelURL,
1013
repoDescription,
1114
amountStars,
1215
language,
1316
lastEdition,
14-
githubUrl,
17+
githubURL,
1518
}: PropsCardBox) {
16-
19+
1720
return (
1821
<div className="w-full sm:w-96 md:w-96 lg:w-[350px] h-48 dark:bg-black/45 bg-white/45 flex flex-col px-4 py-2.5 rounded backdrop-blur-sm ring-1 dark:ring-white/25 ring-black/25">
1922
<div className="flex justify-between items-center px-1">
2023
<div className="text-2xl text-black dark:text-white">{repoTitle}</div>
21-
<Link
22-
href={cx(vercelURL)}
23-
className="text-4xl text-zinc-500 hover:text-black dark:hover:text-zinc-100 hover:transition-colors ease-in select-none"
24-
target="__blank"
25-
></Link>
24+
{
25+
vercelURL && <Link
26+
href={cx(vercelURL)}
27+
className="text-4xl text-zinc-500 hover:text-black dark:hover:text-zinc-100 hover:transition-colors ease-in select-none"
28+
target="__blank"
29+
></Link>
30+
}
2631
</div>
2732

2833
<div className="flex-1 overflow-hidden text-ellipsis py-3 pl-2">{repoDescription}</div>
2934

3035
<div className="flex justify-between items-center text-zinc-500">
3136
<div className="flex justify-items-stretch items-center">
32-
<span className="w-3 h-3 bg-blue-600 rounded-full mr-1"></span>
37+
<span className={cx("w-3 h-3", "bg-zinc-500", "rounded-full mr-1")}></span>
3338

3439
<div className="text-xs">{language}</div>
3540

3641
<span className="w-1 h-1 rounded-full dark:bg-white bg-black rounded-full mx-2"></span>
3742
<div className="text-xs flex">
3843
<Star size={15} />
39-
<div className="ml-px">{cx(amountStars ?? "0")}</div>
44+
<div className="ml-1">{cx(amountStars ? amountStars : "0")}</div>
4045
</div>
4146
<span className="w-1 h-1 rounded-full dark:bg-white bg-black rounded-full mx-2"></span>
4247

43-
<div className="text-xs">Update {cx("49 min")} ago</div>
48+
<div className="text-xs">Atualizado {
49+
intlFormatDistance(parseISO(lastEdition), new Date)
50+
}</div>
4451
</div>
4552

46-
<Link href={githubUrl} target="__blank">
53+
<Link href={githubURL} target="__blank">
4754
<svg viewBox="0 0 24 24" aria-hidden="true" className="h-6 w-6 fill-zinc-500 hover:transition hover:fill-zinc-600 dark:fill-zinc-400 dark:hover:fill-zinc-300"><path fillRule="evenodd" clipRule="evenodd" d="M12 2C6.475 2 2 6.588 2 12.253c0 4.537 2.862 8.369 6.838 9.727.5.09.687-.218.687-.487 0-.243-.013-1.05-.013-1.91C7 20.059 6.35 18.957 6.15 18.38c-.113-.295-.6-1.205-1.025-1.448-.35-.192-.85-.667-.013-.68.788-.012 1.35.744 1.538 1.051.9 1.551 2.338 1.116 2.912.846.088-.666.35-1.115.638-1.371-2.225-.256-4.55-1.14-4.55-5.062 0-1.115.387-2.038 1.025-2.756-.1-.256-.45-1.307.1-2.717 0 0 .837-.269 2.75 1.051.8-.23 1.65-.346 2.5-.346.85 0 1.7.115 2.5.346 1.912-1.333 2.75-1.05 2.75-1.05.55 1.409.2 2.46.1 2.716.637.718 1.025 1.628 1.025 2.756 0 3.934-2.337 4.806-4.562 5.062.362.32.675.936.675 1.897 0 1.371-.013 2.473-.013 2.82 0 .268.188.589.688.486a10.039 10.039 0 0 0 4.932-3.74A10.447 10.447 0 0 0 22 12.253C22 6.588 17.525 2 12 2Z"></path></svg>
4855
</Link>
4956
</div>

src/components/navbar.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,22 @@ export default function NavBar({
2121
<nav className="flex justify-center items-center">
2222
<ul className="hidden sm:flex sm:justify-stretch sm:items-cente sm:gap-x-3">
2323
<li className={cx(router.pathname == "/" && "text-zinc-900/90 dark:fill-zinc-400/90 font-semibold", "font-medium sm:min-w-max sm:w-16 sm:flex sm:justify-center hover:text-violet-900/80 hover:transition hover:duration-75 hover:ease-in-out md:text-base md:w-20 select-none")}>
24-
<Link href="/">Home</Link>
24+
<Link href="/">Inicio</Link>
2525
</li>
2626
<li className={cx(router.pathname == "/about" && "text-zinc-900/90 dark:fill-zinc-400/90 font-semibold", "font-medium sm:min-w-max sm:w-16 sm:flex sm:justify-center hover:text-violet-900/80 hover:transition hover:duration-75 hover:ease-in-out md:text-base md:w-20 select-none")}>
27-
<Link href="/about">About</Link>
27+
<Link href="/about">Sobre</Link>
2828
</li>
2929
<li className={cx(router.pathname == "/projects" && "text-zinc-900/90 dark:fill-zinc-400/90 font-semibold", "font-medium sm:min-w-max sm:w-16 sm:flex sm:justify-center hover:text-violet-900/80 hover:transition hover:duration-75 hover:ease-in-out md:text-base md:w-20 select-none")}>
30-
<Link href="/projects">Projects</Link>
31-
</li>
32-
<li className={cx(router.pathname == "/contact" && "text-zinc-900/90 dark:fill-zinc-400/90 font-semibold", "font-medium sm:min-w-max sm:w-16 sm:flex sm:justify-center hover:text-violet-900/80 hover:transition hover:duration-75 hover:ease-in-out md:text-base md:w-20 select-none")}>
33-
<Link href="/contact">Contact</Link>
30+
<Link href="/projects">Projetos</Link>
3431
</li>
32+
{/* <li className={cx(router.pathname == "/contact" && "text-zinc-900/90 dark:fill-zinc-400/90 font-semibold", "font-medium sm:min-w-max sm:w-16 sm:flex sm:justify-center hover:text-violet-900/80 hover:transition hover:duration-75 hover:ease-in-out md:text-base md:w-20 select-none")}>
33+
<Link href="/contact">Contato</Link>
34+
</li> */}
3535
</ul>
3636

3737
<hr className="hidden sm:block w-0.5 h-5 bg-separator/80 dark:bg-white/25 mx-5 md:mx-7 shadow-md rounded-full" />
3838

39-
<button
39+
{/* <button
4040
className={cx("relative z-50 text-2xl hover:text-violet-900/80 dark:hover:text-violet-300/70", effect && "animate-effect", "mr-3")}
4141
onClick={() => {
4242
setEffect(true);
@@ -47,7 +47,7 @@ export default function NavBar({
4747
{
4848
effect ? <CirclesFour size={25} /> : (isOpenedModal ? <X size={25} /> : <CirclesThreePlus size={25} />)
4949
}
50-
</button>
50+
</button> */}
5151

5252
<ToggleThemeBtn hasAnimation />
5353
</nav>

src/intl/HomePage.ts

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

src/intl/LanguageProvider.tsx

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

src/pages/about.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,31 @@
1+
import Link from "next/link";
12
import Layout from "../components/layout";
23

34
export default function About() {
45
return (
56
<Layout>
6-
<p className={"leading-loose"}><strong className={"font-bold"}>Desenvolvedor de sistemas</strong>, estudante de programação 👨‍🎓,</p>
7-
<p>interessado em conhecer e sempre aprender novas tecnologias.</p>
7+
<p>Oi menu nome e Diego Silva,</p>
8+
<p>sou programador, <strong className={"text-black/70 dark:text-white/70 font-bold"}>Desenvolvedor Full-Stack.</strong></p>
9+
<p>Procuro sempre aprender novas tecnologias com pessoas programadoras</p>
10+
<p>mas me estimulo sempre ao autodidatismo.</p>
11+
<br />
12+
<p>Gosto do conceito de programação investigativa de ter um problema</p>
13+
<p>e ter que buscar a solução para resolve-lo. Atualmente focado na stack <strong className={"text-black/70 dark:text-white/70 font-bold"}>JavaScript</strong>,</p>
14+
<p>mas sempre aberto a aprender novas tecnologias, novas linguagens,</p>
15+
<p>novos conceitos.</p>
16+
<br />
17+
<p>Busco sempre construir código com o melhor que a linguagem oferece,</p>
18+
<p>idependete da tecnologia. Tenho como foco dominar a arte da programação</p>
19+
<p>utilizando não so as melhores ferramentas como as mais adequadas para os contextos especificos.</p>
20+
<br />
21+
<p>Estou sempre estudando, programando e aprendendo</p>
22+
<p>pode ver mais sobre alguns projetos que fiz e que estou desenvolvendo <Link href="/projects" className={"underline text-black/70 dark:text-white/70 hover:text-black/90 dark:hover:text-white/90 hover:transition-colors hover:ease-in"}>clicando aqui!</Link>
23+
</p>
24+
25+
<br /><hr className="w-7 mx-auto lg:ml-80"/><br />
26+
27+
<p>Gosto de historias, não so mais como são contadas.</p>
28+
<p>Pretendo construir uma, e que seja contada da forma mais intrigante possivel!</p>
829
</Layout>
930
)
1031
}

src/pages/index.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ export default function Home() {
99
<div className="flex flex-col gap-10 md:gap-5 px-4">
1010
<h2 className="flex flex-col text-zinc md:gap-[3px]">
1111
<div className="text-4xl font-semibold">
12-
Hi! my name is
12+
Oi! meu nome e
1313
</div>
1414
<div className="text-5xl md:text-7xl md:ml-5 font-extralight">
1515
DIEGO SILVA
1616
</div>
1717
</h2>
1818
<p
1919
className="text-xl md:ml-5"
20-
>I'm a software <strong>
20+
>Eu sou um <strong>
2121
<Link
2222
href="https://www.google.com/search?q=what+is+developer"
2323
className="underline dark:hover:text-white/70 hover:text-zinc-700 hover:transition-colors hover:ease-in"
2424
target="__blank"
2525
>
26-
developer
26+
desenvolvedor
2727
</Link>
28-
</strong>!</p>
28+
</strong> de software!</p>
2929
<button className="max-w-max h-8 px-2 text-xl hover:text-zinc-700 dark:hover:text-white/70 font-regular rounded-lg bg-black/25 dark:bg-white/25 md:ml-5 dark:border-1 md:shadow-sm hover:shadow-violet-500/25 bakcdrop-blur ring-4 dark:ring-2 ring-violet-300/10 border border-transparent hover:transition-colors hover:ease-in hover:border-zinc-700 dark:hover:border-white/50">
3030
<Link href="/about">
31-
about me...
31+
sobre min...
3232
</Link>
3333
</button>
3434
</div>

src/pages/projects.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import Layout from "../components/layout";
22
import CardBox from "../components/card-project";
33
import { useEffect, useState } from "react";
4-
import api from "../service/api";
4+
import { gh_api } from "../service/api";
55

66
import { PropsCardBox } from "../@Types/api.github";
77

88
export default function Projects() {
99
const [repositories, setRepositories] = useState<PropsCardBox[]>([]);
1010

1111
useEffect(() => {
12-
api.get("/users/dc7devs/repos")
12+
gh_api.get("/users/dc7devs/repos")
1313
.then((repos: any) => {
1414
setRepositories(
1515
repos.data.map((repo: any) => {
@@ -20,14 +20,14 @@ export default function Projects() {
2020
amountStars: repo.stargazers_count,
2121
language: repo.language,
2222
lastEdition: repo.updated_at,
23-
githubUrl: repo.html_url,
23+
githubURL: repo.html_url,
2424
};
2525

2626
return nowDataFormat;
2727
})
2828
);
2929
}).catch((err) => {
30-
console.error("ops! ocorreu um erro" + err);
30+
console.error("ops! ocorreu um erro: " + err);
3131
})
3232
}, [])
3333

@@ -43,7 +43,7 @@ export default function Projects() {
4343
amountStars={dataProps.amountStars}
4444
language={dataProps.language}
4545
lastEdition={dataProps.lastEdition}
46-
githubUrl={dataProps.githubUrl}
46+
githubURL={dataProps.githubURL}
4747
/>
4848
))
4949
}</div>

src/service/api.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import axios from 'axios';
22

3-
const api = axios.create({
3+
export const gh_api = axios.create({
44
baseURL: 'https://api.github.com',
55
});
66

7-
export default api;
7+
export const gh_lang_colors = axios.create({
8+
baseURL: 'https://raw.githubusercontent.com',
9+
});

0 commit comments

Comments
 (0)