diff --git a/.gitignore b/.gitignore index 5d7eea7..661e5f0 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ yarn-error.log* # local env files .env*.local +.env # vercel .vercel diff --git a/public/locales/en-US.json b/public/locales/en-US.json index 1046a96..cfea212 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -23,8 +23,10 @@ }, "About": { "Title": "About", - "Text": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident.", - "TextFull": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident. Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident." + "Text": "Hello! My name is Miguel, I am 19 years old, and I am a Backend developer.

I have experience in developing applications using NestJS, TypeScript, JavaScript, and NodeJS.", + "TextFull": "Hello! My name is Miguel, I am 19 years old, and I am a backend developer.

I have experience in developing applications using NestJS, TypeScript, JavaScript, and NodeJS.



My passion for technology and programming started early, as my father owned a computer store. This exposure led me to the field of programming, and since then, I have been specializing in creating efficient and scalable solutions. I enjoy tackling challenges and am always looking to learn and improve my skills.



I focus on delivering high-quality code, following best practices, and maintaining clear communication with the team. I believe that collaboration and continuous learning are essential for success in software development projects.



I am interested in expanding my skills and working with C# and Rust, exploring new languages and technologies.



If you are interested in learning more about my work or collaborating on a project, feel free to contact me!", + "Button": "Expand...", + "Button2": "Retract..." }, "Error": { "Copy": "Copy", diff --git a/public/locales/pt-BR.json b/public/locales/pt-BR.json index 38f580b..b4f6379 100644 --- a/public/locales/pt-BR.json +++ b/public/locales/pt-BR.json @@ -23,8 +23,9 @@ }, "About": { "Title": "Sobre", - "Text": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident.", - "TextFull": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident. Lorem ipsum dolor sit amet consectetur adipisicing elit. Consectetur, voluptatum culpa odio optio earum deserunt nulla alias sint eum accusamus commodi ipsum, eveniet sed similique explicabo nesciunt quo non! Provident.", + "Text": "Olá! Meu nome é Miguel, tenho 19 anos e sou programador Backend.

Tenho experiência no desenvolvimento de aplicações utilizando NestJS, TypeScript, JavaScript e NodeJS.", + "TextFull": "Olá! Meu nome é Miguel, tenho 19 anos e sou programador backend.

Tenho experiência no desenvolvimento de aplicações utilizando NestJS, TypeScript, JavaScript e NodeJS.



Minha paixão por tecnologia e programação começou cedo, pois meu pai tinha uma loja de informática. Essa exposição me levou à área de programação, e desde então venho me especializando em criar soluções eficientes e escaláveis. Gosto de enfrentar desafios e estou sempre buscando aprender e aprimorar minhas habilidades.



Trabalho com foco em entregar código de alta qualidade, seguindo boas práticas e mantendo uma comunicação clara com a equipe. Acredito que a colaboração e o aprendizado contínuo são essenciais para o sucesso em projetos de desenvolvimento de software.



Tenho interesse em expandir minhas habilidades e trabalhar com C# e Rust, explorando novas linguagens e tecnologias.



Se você está interessado em saber mais sobre meu trabalho ou colaborar em algum projeto, sinta-se à vontade para entrar em contato!", + "Button": "Expandir...", "Button2": "Recolher..." }, diff --git a/src/components/about/about-text.tsx b/src/components/about/about-text.tsx index 9a211d0..77cde85 100644 --- a/src/components/about/about-text.tsx +++ b/src/components/about/about-text.tsx @@ -2,26 +2,36 @@ import { Button } from "@/components/ui"; import { useTranslations } from "next-intl"; -import { useState, useEffect } from "react"; +import { useState } from "react"; +import { HeaderAnchor } from "../header/header-anchor"; export function AboutText() { const t = useTranslations("About"); const [isExpanded, setIsExpanded] = useState(false); - useEffect(() => { - const element = document.getElementById("about_text"); - if (element) { - element.textContent = isExpanded ? t("TextFull") : t("Text"); - } - }, [isExpanded, t]); - function handleClick() { - setIsExpanded((isExpanded) => !isExpanded); + setIsExpanded((prev) => !prev); } return ( - + <> +
+ {isExpanded ? ( + <> + {t.rich("TextFull", { + br: () =>
, + contact: (text) => + })} + + ) : ( + t.rich("Text", { + br: () =>
+ }) + )} +
+ + ); } diff --git a/src/components/about/about.tsx b/src/components/about/about.tsx index ef940d7..4f1f5e8 100644 --- a/src/components/about/about.tsx +++ b/src/components/about/about.tsx @@ -16,9 +16,6 @@ export function About() { className="size-80 mt-2 mr-8 inline-block rounded-xl" />
-

- {t("Text")} -

diff --git a/src/components/header/header-anchor.tsx b/src/components/header/header-anchor.tsx index 3ad070c..fa95f46 100644 --- a/src/components/header/header-anchor.tsx +++ b/src/components/header/header-anchor.tsx @@ -6,10 +6,10 @@ import { ComponentProps, MouseEvent, useEffect, useState } from "react" interface Props extends ComponentProps<"a"> { target: string - active?: boolean + text?: string } -export function HeaderAnchor({ target }: Readonly) { +export function HeaderAnchor({ target, text }: Readonly) { const t = useTranslations("Header"); const [anchorTarget, setAnchorTarget] = useState(null); @@ -23,5 +23,5 @@ export function HeaderAnchor({ target }: Readonly) { anchorTarget?.scrollIntoView({ behavior: "smooth", block: "start" }) } - return {t(target)} + return {text ?? t(target)} } \ No newline at end of file