import { IconArrowBackUp } from "@tabler/icons-react"; import { Link } from "react-router"; import { footerIcon } from "@/components/site/footer-icons"; import { Reveal } from "@/components/site/Reveal"; import { SiteShell } from "@/components/site/SiteShell"; import { useContent } from "@/lib/content-context"; import type { ArticleBlock, ArticleContent } from "@/lib/content-types"; /** บล็อกบทความหนึ่งชิ้น — ย่อหน้าหรือรูป (รูปมีคำบรรยายได้) */ function ArticleBlockView({ block, index, }: { block: ArticleBlock; index: number; }) { // ไล่จังหวะแบบสั้น ๆ แต่ไม่เกิน 3 บล็อกแรก (บล็อกท้าย ๆ จะได้ไม่รอนาน) const delay = 100 + Math.min(index, 3) * 60; if (block.type === "image") { return (
{block.alt} {block.caption ? (
{block.caption}
) : null}
); } return (

{block.text}

); } /** * โครงหน้าบทความที่ใช้ร่วมกัน (สำหรับคนทำโรงหนัง / สำหรับคนรักหนัง) * ภาษาภาพเดียวกับหน้า "เกี่ยวกับเรา": กรอบ 1440 + px-[108px], ฟอนต์เนื้อหา IBM Plex Sans Thai Looped, * การ์ดติดต่อไล่แดงขอบ rgba(169,38,38,0.45) และไอคอนโซเชียลชุดเดียวกับ footer */ export function ArticlePage({ content, backLabel, }: { content: ArticleContent; backLabel: string; }) { const { site } = useContent(); return (
{backLabel}

{content.title}

{content.lead}

{content.blocks.map((block, index) => ( ))}

{content.contactHeading}

{content.contactNote}

{site.footer.length > 0 ? (
{site.footer.map((item) => { const Icon = footerIcon(item.icon_name); return ( ); })}
) : null}
); }