Files
Evandro Fonseca Junior 4ba3339df7 feat: customize README for Tibia Trade marketplace and enhance page accessibility
- Rewrote README.md to describe the Tibia Trade project, including features, setup instructions, technologies, and SEO keywords in Portuguese
- Removed "Pagodera" from thank you page text for rebranding
- Added role and aria-label to main element in home page for better accessibility
- Added metadata generation with localized titles and descriptions to prices page for improved SEO and user experience
2025-10-27 00:35:35 -03:00

173 lines
5.2 KiB
TypeScript

import type { Metadata } from "next";
import { Geist, Geist_Mono, Nunito_Sans } from "next/font/google";
import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import { ThemeProvider } from "@/components/theme-provider";
import "../globals.css";
const nunitoSans = Nunito_Sans({
variable: "--font-nunito-sans",
subsets: ["latin"],
weight: ["200", "300", "400", "500", "600", "700", "800", "900"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>;
}): Promise<Metadata> {
const { locale } = await params;
const titles = {
pt: "Tibia Trade - Marketplace Seguro para Compra e Venda de Itens",
en: "Tibia Trade - Secure Marketplace for Buying and Selling Items",
};
const descriptions = {
pt: "Marketplace oficial multi-servidor para negociar itens de Tibia com segurança total. Sistema escrow protege 100% das transações. Compre e venda gold, TC, armaduras raras e equipamentos.",
en: "Official multi-server marketplace to trade Tibia items with total security. Escrow system protects 100% of transactions. Buy and sell gold, TC, rare armors and equipment.",
};
return {
title: {
default: titles[locale as keyof typeof titles],
template: `%s | Tibia Trade`,
},
description: descriptions[locale as keyof typeof descriptions],
keywords: [
"tibia marketplace",
"tibia trade",
"comprar itens tibia",
"vender itens tibia",
"tibia escrow",
"tibia gold",
"tibia coins",
"tc tibia",
"marketplace tibia seguro",
"tibia bid system",
"tibia item escrow",
"tibia multi-server marketplace",
],
authors: [{ name: "Tibia Trade Team" }],
creator: "Tibia Trade",
publisher: "Tibia Trade",
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
alternates: {
canonical: `https://tibiatrade.evandro.dev.br/${locale}`,
languages: {
"pt-BR": `https://tibiatrade.evandro.dev.br/pt`,
"en-US": `https://tibiatrade.evandro.dev.br/en`,
},
},
openGraph: {
type: "website",
locale: locale === "pt" ? "pt_BR" : "en_US",
url: `https://tibiatrade.evandro.dev.br/${locale}`,
title: titles[locale as keyof typeof titles],
description: descriptions[locale as keyof typeof descriptions],
siteName: "Tibia Trade",
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Tibia Trade - Marketplace Seguro",
},
],
},
twitter: {
card: "summary_large_image",
title: titles[locale as keyof typeof titles],
description: descriptions[locale as keyof typeof descriptions],
images: ["/og-image.png"],
creator: "@tibiatrade",
},
};
}
export default async function LocaleLayout({
children,
params,
}: {
children: React.ReactNode;
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
const messages = await getMessages();
const baseUrl = "https://tibiatrade.evandro.dev.br";
return (
<html lang={locale} suppressHydrationWarning>
<head>
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" href="/icon.svg" type="image/svg+xml" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "Organization",
name: "Tibia Trade",
url: baseUrl,
logo: `${baseUrl}/logo.png`,
description:
"Marketplace multi-servidor seguro para negociação de itens de Tibia",
sameAs: ["https://discord.gg/tibiatrade"],
contactPoint: {
"@type": "ContactPoint",
contactType: "Customer Support",
availableLanguage: ["Portuguese", "English"],
},
}),
}}
/>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
name: "Tibia Trade",
url: baseUrl,
potentialAction: {
"@type": "SearchAction",
target: {
"@type": "EntryPoint",
urlTemplate: `${baseUrl}/market?q={search_term_string}`,
},
"query-input": "required name=search_term_string",
},
}),
}}
/>
</head>
<body
className={`${nunitoSans.variable} ${geistMono.variable} antialiased`}
>
<NextIntlClientProvider messages={messages}>
<ThemeProvider attribute="class" defaultTheme="dark">
{children}
</ThemeProvider>
</NextIntlClientProvider>
</body>
</html>
);
}