feat: update language switcher order, enhance project card links, and localize new page link
This commit is contained in:
@@ -34,8 +34,8 @@ export default function LanguageSwitcher() {
|
|||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const languages: { [key: string]: { label: string; countryCode: string } } = {
|
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 (
|
return (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import {useTranslations, useLocale} from 'next-intl';
|
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';
|
import Image from 'next/image';
|
||||||
|
|
||||||
type ProjectCardProps = {
|
type ProjectCardProps = {
|
||||||
@@ -18,7 +18,7 @@ export default function ProjectCard({ title, description, tech, imageUrl, liveUr
|
|||||||
const locale = useLocale();
|
const locale = useLocale();
|
||||||
|
|
||||||
return (
|
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">
|
<div className="relative w-full h-48">
|
||||||
<Image src={imageUrl} alt={title} layout="fill" objectFit="cover" />
|
<Image src={imageUrl} alt={title} layout="fill" objectFit="cover" />
|
||||||
</div>
|
</div>
|
||||||
@@ -33,20 +33,24 @@ export default function ProjectCard({ title, description, tech, imageUrl, liveUr
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center space-x-8 mt-auto pt-4 border-t border-[var(--color-border)]">
|
<div className="flex items-center space-x-8 mt-auto pt-4 border-t border-[var(--color-border)]">
|
||||||
{liveUrl && (
|
<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">
|
||||||
<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">
|
<FaLink size={20} />
|
||||||
{t('live_link')}
|
{t('page_link')}
|
||||||
<FaArrowUpRightFromSquare size={12} />
|
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
{repoUrl && (
|
{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">
|
<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} />
|
<FaGithub size={20} />
|
||||||
{t('repo_link')}
|
{t('repo_link')}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</div>
|
{liveUrl && (
|
||||||
</div>
|
<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>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import {redirect} from 'next/navigation';
|
import {redirect} from 'next/navigation';
|
||||||
|
|
||||||
export default function RootPage() {
|
export default function RootPage() {
|
||||||
redirect('/en');
|
redirect('/pt');
|
||||||
}
|
}
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
"project_3_title": "Happy",
|
"project_3_title": "Happy",
|
||||||
"project_3_description": "A site to find orphanages to visit. Built with React, TypeScript and Styled-Components.",
|
"project_3_description": "A site to find orphanages to visit. Built with React, TypeScript and Styled-Components.",
|
||||||
"tech_used": "Technologies Used:",
|
"tech_used": "Technologies Used:",
|
||||||
|
"page_link": "See Details",
|
||||||
"live_link": "Live Demo",
|
"live_link": "Live Demo",
|
||||||
"repo_link": "View Code",
|
"repo_link": "View Code",
|
||||||
"back_to_projects": "Back to Projects",
|
"back_to_projects": "Back to Projects",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@
|
|||||||
"project_3_title": "Happy",
|
"project_3_title": "Happy",
|
||||||
"project_3_description": "Um site para encontrar orfanatos para visitar. Construído com React, TypeScript e Styled-Components.",
|
"project_3_description": "Um site para encontrar orfanatos para visitar. Construído com React, TypeScript e Styled-Components.",
|
||||||
"tech_used": "Tecnologias Utilizadas:",
|
"tech_used": "Tecnologias Utilizadas:",
|
||||||
|
"page_link": "Ver Detalhes",
|
||||||
"live_link": "Ver ao Vivo",
|
"live_link": "Ver ao Vivo",
|
||||||
"repo_link": "Ver Código",
|
"repo_link": "Ver Código",
|
||||||
"back_to_projects": "Voltar para Projetos",
|
"back_to_projects": "Voltar para Projetos",
|
||||||
|
|||||||
Reference in New Issue
Block a user