chore(publish): replace source tree with static export at repo root

Publish the prerendered static export (index.html, 404.html, cinema/,
c/, about/, for-cinemas/, for-film-lovers/, assets/, images/, og/,
sitemap.xml, robots.txt) as the site root and remove the React Router
+ Nitro source tree from this branch. Source remains available in
history at 0548772.

Note: public/sw.js here reports VERSION v2.0.5 while the removed source
tree (v2.1.0) was newer, and .gitignore was not carried over.
This commit is contained in:
Bkk1234 committed 2026-11-22 22:24:36 +07:00
1 parent 05487728a7
commit e6c4ebff48
394 files changed
+3977 -37891

No files matched your search

-129
View File
@@ -1,129 +0,0 @@
import { IconCircleCheck, IconMapPin, IconSearch } from "@tabler/icons-react";
import { useRef, type FormEvent } from "react";
import { Reveal } from "@/components/site/Reveal";
import type { NearMeStatus } from "@/hooks/use-near-me";
import { useI18n } from "@/lib/i18n";
type HeroSectionProps = {
query: string;
onQueryChange: (query: string) => void;
nearMeStatus: NearMeStatus;
onRequestLocation: () => void;
/** เรียกเมื่อผู้ใช้กดปุ่ม "ค้นหา" หรือกด Enter — ใช้เลื่อนไปที่ผลลัพธ์ (การกรองยังทำงานสดขณะพิมพ์) */
onSubmitSearch: () => void;
};
/** ข้อความสถานะของปุ่ม "ใกล้ฉัน" — แสดงเฉพาะตอนกำลังหา/ผิดพลาด/พร้อมใช้ */
function statusMessage(
status: NearMeStatus,
messages: ReturnType<typeof useI18n>["messages"],
) {
switch (status) {
case "locating":
return messages.search.locating;
case "denied":
return messages.search.denied;
case "unsupported":
return messages.search.unsupported;
case "error":
return messages.search.error;
case "ready":
return messages.search.sortedByDistance;
default:
return null;
}
}
/** ฮีโร่หน้าแรก: หัวข้อ + ช่องค้นหา (ค้นทันทีขณะพิมพ์) + ปุ่มหาตำแหน่ง */
export function HeroSection({
query,
onQueryChange,
nearMeStatus,
onRequestLocation,
onSubmitSearch,
}: HeroSectionProps) {
const { messages } = useI18n();
const status = statusMessage(nearMeStatus, messages);
const isReady = nearMeStatus === "ready";
const inputRef = useRef<HTMLInputElement>(null);
/**
* ปุ่ม "ค้นหา" / Enter — ไม่ได้ทำหน้าที่กรอง (กรองสดอยู่แล้วใน onChange)
* หน้าที่คือ: กันหน้าโหลดใหม่, ปิดคีย์บอร์ดมือถือ, แล้วเลื่อนไปที่ผลลัพธ์
*/
function handleSubmit(event: FormEvent<HTMLFormElement>) {
event.preventDefault();
inputRef.current?.blur();
onSubmitSearch();
}
return (
<section className="mx-auto flex max-w-[1016px] flex-col items-center gap-10 pt-24 md:pt-[167px]">
<Reveal
delay={60}
className="flex max-w-[745px] flex-col items-center gap-4 text-center"
>
<h1 className="text-4xl font-bold leading-[1.3] md:text-[56px]">
{messages.hero.titlePrefix}
<span className="text-[#D47272]">{messages.hero.titleHighlight}</span>
{messages.hero.titleSuffix}
</h1>
<p className="text-base md:text-xl">{messages.hero.subtitle}</p>
</Reveal>
<Reveal
delay={200}
className="w-full rounded-2xl border border-[#303030] bg-[#1B1B1B]/80 px-4 py-6 backdrop-blur-[24px] md:px-10"
>
<form
role="search"
onSubmit={handleSubmit}
className="flex h-14 items-center gap-3 rounded-lg border border-[#1B1B1B] bg-[#1F1F1F] px-5 transition-colors duration-300 focus-within:border-[#A92626]/70"
>
<IconSearch size={16} className="shrink-0 text-[#999]" />
<input
ref={inputRef}
value={query}
onChange={(event) => onQueryChange(event.target.value)}
placeholder={messages.search.placeholder}
aria-label={messages.search.placeholder}
type="search"
enterKeyHint="search"
className="min-w-0 flex-1 bg-transparent text-base text-white outline-none placeholder:text-[#8A8A8A] md:text-sm [&::-webkit-search-cancel-button]:hidden"
/>
<button
type="button"
onClick={onRequestLocation}
disabled={nearMeStatus === "locating"}
aria-label={messages.search.nearMe}
className={`relative hidden items-center gap-2 border-l border-[#999] px-4 text-sm transition after:absolute after:-inset-y-3 after:inset-x-0 after:content-[''] disabled:opacity-60 sm:flex ${
isReady ? "text-[#D47272]" : "text-[#999] hover:text-white"
}`}
>
{isReady ? <IconCircleCheck size={16} /> : <IconMapPin size={16} />}
{messages.search.nearMe}
</button>
<button
type="submit"
className="relative h-8 rounded-lg border border-[#8F0808] bg-[#8F0808] px-6 text-sm font-medium transition after:absolute after:-inset-y-1.5 after:-inset-x-1 after:content-[''] hover:bg-[#a30a0a]"
>
{messages.search.submit}
</button>
</form>
{status ? (
<p
role="status"
aria-live="polite"
className={`px-1 pt-3 text-xs ${
nearMeStatus === "ready" ? "text-[#B3B3B3]" : "text-[#D47272]"
}`}
>
{status}
</p>
) : null}
</Reveal>
</section>
);
}