122 lines
4.8 KiB
TypeScript
122 lines
4.8 KiB
TypeScript
import { IconArrowBackUp } from "@tabler/icons-react";
|
|
import { Link } from "react-router";
|
|
|
|
import { SiteShell } from "@/components/site/SiteShell";
|
|
import { footerIcon } from "@/components/site/footer-icons";
|
|
import { APP_TITLE } from "@/lib/app-config";
|
|
import { useContent } from "@/lib/content-context";
|
|
import { COLORS } from "@/lib/design-tokens";
|
|
import { useI18n } from "@/lib/i18n";
|
|
import { DEFAULT_LOCALE, MESSAGES } from "@/lib/i18n/messages";
|
|
|
|
const HEAD_MESSAGES = MESSAGES[DEFAULT_LOCALE];
|
|
|
|
export function meta() {
|
|
return [
|
|
{ title: `${HEAD_MESSAGES.about.title} — ${APP_TITLE}` },
|
|
{ name: "description", content: HEAD_MESSAGES.about.lead },
|
|
];
|
|
}
|
|
|
|
/**
|
|
* หน้า "เกี่ยวกับเรา" — เนื้อหามาจากหลังบ้าน (data/content) แยกตามภาษา
|
|
* ภาษาภาพเดียวกับหน้าแรก/หน้ารายละเอียด: กรอบ 1440 + px-[108px], การ์ดขอบโทน #332B2B,
|
|
* chip แดง, ตัวเลขในวงกลมไล่แสง (glowSoft) และไอคอนโซเชียลชุดเดียวกับ footer
|
|
*/
|
|
export default function AboutRoute() {
|
|
const { messages, locale } = useI18n();
|
|
const { site, about } = useContent();
|
|
const content = about[locale];
|
|
|
|
return (
|
|
<SiteShell variant="detail">
|
|
<main className="relative z-10 mx-auto flex w-full max-w-[1440px] flex-col gap-10 px-5 pb-16 pt-4 md:px-[108px] md:pt-6">
|
|
<Link
|
|
to="/"
|
|
className="inline-flex w-fit items-center gap-2 text-xl font-medium transition hover:text-[#D47272]"
|
|
>
|
|
<IconArrowBackUp size={24} />
|
|
{messages.nav.home}
|
|
</Link>
|
|
|
|
<header className="flex flex-col gap-4">
|
|
<h1 className="text-[32px] font-bold leading-[1.3] md:text-[40px]">
|
|
{content.title}
|
|
</h1>
|
|
<p className="font-content max-w-[860px] text-[19px] leading-[1.8] text-[#C4C4C4] md:text-[21px]">
|
|
{content.lead}
|
|
</p>
|
|
</header>
|
|
|
|
<section className="gap-6 lg:columns-2">
|
|
{content.sections.map((section, index) => (
|
|
<article
|
|
key={`${section.heading}-${index}`}
|
|
className="mb-8 flex break-inside-avoid flex-col gap-5 rounded-xl bg-[#1B1B1B]/70 p-7 backdrop-blur-sm transition hover:bg-[#1B1B1B] md:p-8"
|
|
style={{ border: `1px solid ${COLORS.border}` }}
|
|
>
|
|
<div className="flex items-center gap-3">
|
|
<span
|
|
className="flex size-12 shrink-0 items-center justify-center rounded-full text-sm font-semibold text-[#D47272]"
|
|
style={{
|
|
background: "rgba(143,8,8,0.16)",
|
|
border: "1px solid rgba(169,38,38,0.45)",
|
|
}}
|
|
aria-hidden="true"
|
|
>
|
|
{String(index + 1).padStart(2, "0")}
|
|
</span>
|
|
<h2 className="text-2xl font-semibold leading-[1.3]">
|
|
{section.heading}
|
|
</h2>
|
|
</div>
|
|
<p className="font-content text-[17px] leading-[1.95] text-[#C7C7C7] md:text-[18px]">
|
|
{section.body}
|
|
</p>
|
|
</article>
|
|
))}
|
|
</section>
|
|
|
|
<section
|
|
className="flex flex-col gap-6 rounded-xl p-6 backdrop-blur-sm lg:flex-row lg:items-center lg:justify-between"
|
|
style={{
|
|
border: "1px solid rgba(169,38,38,0.45)",
|
|
background:
|
|
"linear-gradient(180deg, rgba(143,8,8,0.18) 0%, rgba(27,27,27,0.85) 65%, rgba(13,13,13,0.7) 100%)",
|
|
}}
|
|
>
|
|
<div className="flex flex-col gap-3">
|
|
<h2 className="text-2xl font-semibold leading-[1.3]">
|
|
{content.contactHeading}
|
|
</h2>
|
|
<p className="font-content max-w-[720px] text-[16px] leading-[1.9] text-[#C4C4C4] md:text-[17px]">
|
|
{content.contactNote}
|
|
</p>
|
|
</div>
|
|
|
|
{site.footer.length > 0 ? (
|
|
<div className="flex flex-wrap items-center gap-2">
|
|
{site.footer.map((item) => {
|
|
const Icon = footerIcon(item.icon_name);
|
|
return (
|
|
<a
|
|
key={item.id}
|
|
href={item.href}
|
|
aria-label={item.label}
|
|
title={item.label}
|
|
target="_blank"
|
|
rel="noreferrer"
|
|
className="flex size-11 items-center justify-center rounded-full bg-white/90 text-[#0D0D0D] transition hover:bg-white"
|
|
>
|
|
<Icon size={20} />
|
|
</a>
|
|
);
|
|
})}
|
|
</div>
|
|
) : null}
|
|
</section>
|
|
</main>
|
|
</SiteShell>
|
|
);
|
|
}
|