feat: update language switcher order, enhance project card links, and localize new page link

This commit is contained in:
2025-08-29 01:50:21 -03:00
parent 9724b81c28
commit 0c02dcdad0
5 changed files with 18 additions and 12 deletions

View File

@@ -34,8 +34,8 @@ export default function LanguageSwitcher() {
}, []);
const languages: { [key: string]: { label: string; countryCode: string } } = {
en: { label: 'English', countryCode: 'US' },
pt: { label: 'Português', countryCode: 'BR' },
pt: { label: 'Português', countryCode: 'BR' },
en: { label: 'English', countryCode: 'US' }
};
return (

View File

@@ -1,6 +1,6 @@
import Link from 'next/link';
import {useTranslations, useLocale} from 'next-intl';
import { FaGithub, FaArrowUpRightFromSquare } from 'react-icons/fa6';
import { FaGithub, FaArrowUpRightFromSquare, FaLink } from 'react-icons/fa6';
import Image from 'next/image';
type ProjectCardProps = {
@@ -18,7 +18,7 @@ export default function ProjectCard({ title, description, tech, imageUrl, liveUr
const locale = useLocale();
return (
<Link href={`/${locale}/project/${id}`} className="h-full bg-[var(--color-background)] rounded-lg overflow-hidden flex flex-col border border-[var(--color-border)] hover:border-[var(--color-primary)]/50 transition-all duration-300 hover:shadow-xl hover:-translate-y-1">
<div className="h-full bg-[var(--color-background)] rounded-lg overflow-hidden flex flex-col border border-[var(--color-border)] hover:border-[var(--color-primary)]/50 transition-all duration-300 hover:shadow-xl hover:-translate-y-1">
<div className="relative w-full h-48">
<Image src={imageUrl} alt={title} layout="fill" objectFit="cover" />
</div>
@@ -33,20 +33,24 @@ export default function ProjectCard({ title, description, tech, imageUrl, liveUr
))}
</div>
<div className="flex items-center space-x-8 mt-auto pt-4 border-t border-[var(--color-border)]">
{liveUrl && (
<Link href={liveUrl} target="_blank" className="flex gap-2 items-center text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-primary)] transition-colors">
{t('live_link')}
<FaArrowUpRightFromSquare size={12} />
</Link>
)}
<Link href={`/${locale}/project/${id}`} className="flex gap-2 items-center text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-primary)] transition-colors">
<FaLink size={20} />
{t('page_link')}
</Link>
{repoUrl && (
<Link href={repoUrl} target="_blank" className="flex gap-2 items-center text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-primary)] transition-colors">
<FaGithub size={20} />
{t('repo_link')}
</Link>
)}
{liveUrl && (
<Link href={liveUrl} target="_blank" className="flex gap-2 items-center text-sm text-[var(--color-text-secondary)] hover:text-[var(--color-primary)] transition-colors">
{t('live_link')}
<FaArrowUpRightFromSquare size={12} />
</Link>
)}
</div>
</div>
</Link>
</div>
);
}

View File

@@ -1,5 +1,5 @@
import {redirect} from 'next/navigation';
export default function RootPage() {
redirect('/en');
redirect('/pt');
}

View File

@@ -45,6 +45,7 @@
"project_3_title": "Happy",
"project_3_description": "A site to find orphanages to visit. Built with React, TypeScript and Styled-Components.",
"tech_used": "Technologies Used:",
"page_link": "See Details",
"live_link": "Live Demo",
"repo_link": "View Code",
"back_to_projects": "Back to Projects",

View File

@@ -45,6 +45,7 @@
"project_3_title": "Happy",
"project_3_description": "Um site para encontrar orfanatos para visitar. Construído com React, TypeScript e Styled-Components.",
"tech_used": "Tecnologias Utilizadas:",
"page_link": "Ver Detalhes",
"live_link": "Ver ao Vivo",
"repo_link": "Ver Código",
"back_to_projects": "Voltar para Projetos",