- บทความจากหลังบ้าน: /for-film-lovers, /for-cinemas (ArticlePage + ArticleEditor แบบบล็อกย่อหน้า/รูป) - แชร์: ปุ่มบนการ์ดและท้ายหน้ารายละเอียด · ลิงก์ย่อ /c/<slug> (302) · ธีมแก้วตาม DESIGN.md - PWA: manifest/sw/offline + ถอดการล็อกซูม (WCAG 1.4.4) + touch target ≥44px - แอนิเมชัน reveal: IntersectionObserver + gate ด้วย html.fx-motion · เคารพ prefers-reduced-motion - ค้นหา: normalize/ตัดวรรณยุกต์ + AND หลายคำ + จัดอันดับ · รองรับ /?q= จาก SearchAction - SEO: pageMeta (canonical/OG/Twitter) + JSON-LD (WebSite/Organization/BreadcrumbList/MovieTheater/Article) - ไม่ฝังโดเมนในโค้ด: origin มาจาก request (x-forwarded-host/proto) ทั้ง canonical, sitemap, robots, ลิงก์แชร์ - กัน AI: robots.txt (Nitro route, บล็อก AI 21 ตัว) + ai.txt + OG image 1200x630 - เอกสาร: README สรุปโปรเจกต์, DESIGN.md (motion/PWA/SEO/ข้อมูล), architecture.html, admin-guide - tests: 135 ผ่าน (16 ไฟล์)
68 lines
2.5 KiB
TypeScript
68 lines
2.5 KiB
TypeScript
import { Link } from "react-router";
|
|
|
|
import { footerIcon } from "@/components/site/footer-icons";
|
|
import { Logo } from "@/components/site/Logo";
|
|
import { useContent } from "@/lib/content-context";
|
|
import { useI18n } from "@/lib/i18n";
|
|
|
|
/**
|
|
* Footer ใช้คอนเทนเนอร์เดียวกับ <main> ของทุกหน้า (max-w-[1440px] + px เดียวกัน)
|
|
* ขอบซ้าย/ขวาจึงตรงกับกริดการ์ดโรงหนังเป๊ะ ไม่ว่าหน้าจะแสดงการ์ดกี่ใบ
|
|
*/
|
|
export function SiteFooter() {
|
|
const { site } = useContent();
|
|
const { messages } = useI18n();
|
|
|
|
return (
|
|
<footer className="relative z-10 mx-auto w-full max-w-[1440px] px-5 pb-6 md:px-[108px]">
|
|
<div className="flex flex-col items-center gap-3 border-t border-white/10 pt-4 sm:flex-row sm:justify-between">
|
|
<div className="flex items-center gap-4">
|
|
<Logo size="sm" />
|
|
<nav aria-label="เมนูล่าง" className="flex items-center gap-3 text-xs">
|
|
<Link
|
|
to="/for-film-lovers"
|
|
className="text-[#B3B3B3] transition hover:text-white"
|
|
>
|
|
{messages.nav.forFilmLovers}
|
|
</Link>
|
|
<Link
|
|
to="/for-cinemas"
|
|
className="text-[#B3B3B3] transition hover:text-white"
|
|
>
|
|
{messages.nav.forCinemas}
|
|
</Link>
|
|
<Link
|
|
to="/about"
|
|
className="text-[#B3B3B3] transition hover:text-white"
|
|
>
|
|
{messages.nav.about}
|
|
</Link>
|
|
</nav>
|
|
</div>
|
|
|
|
<div className="flex flex-wrap items-center justify-center gap-1.5">
|
|
{site.footer.map((item) => {
|
|
const Icon = footerIcon(item.icon_name);
|
|
const isExternal = item.href.startsWith("http");
|
|
return (
|
|
<a
|
|
key={item.id}
|
|
href={item.href || "#"}
|
|
aria-label={item.label}
|
|
title={item.label}
|
|
target={isExternal ? "_blank" : undefined}
|
|
rel={isExternal ? "noreferrer" : undefined}
|
|
className="flex size-8 items-center justify-center rounded-full bg-white/90 text-[#0D0D0D] transition hover:bg-white"
|
|
>
|
|
<Icon size={18} />
|
|
</a>
|
|
);
|
|
})}
|
|
</div>
|
|
|
|
<p className="text-xs text-[#999]">Copyright © AlterFlixHub</p>
|
|
</div>
|
|
</footer>
|
|
);
|
|
}
|