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 } } = {
|
||||
en: { label: 'English', countryCode: 'US' },
|
||||
pt: { label: 'Português', countryCode: 'BR' },
|
||||
en: { label: 'English', countryCode: 'US' }
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -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 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>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{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>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import {redirect} from 'next/navigation';
|
||||
|
||||
export default function RootPage() {
|
||||
redirect('/en');
|
||||
redirect('/pt');
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user