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:
1 parent
05487728a7
commit
e6c4ebff48
394 files changed
+3977
-37891
No files matched your search
@@ -1,93 +0,0 @@
|
||||
import { IconMap } from "@tabler/icons-react";
|
||||
|
||||
import { COLORS } from "@/lib/design-tokens";
|
||||
import { cinemaAddressLines, cinemaName, type Cinema } from "@/lib/cinemas";
|
||||
import { useI18n } from "@/lib/i18n";
|
||||
import { mapEmbedUrl, mapOpenUrl } from "@/lib/map-embed";
|
||||
|
||||
/**
|
||||
* การ์ดที่ตั้ง + แผนที่
|
||||
* แผนที่ดึงจากลิงก์ Google Maps ของโรง ถ้าไม่มีจึงใช้พิกัดที่กรอกในหลังบ้าน
|
||||
* ถ้าไม่มีทั้งสองอย่างแสดง "ไม่มีข้อมูล"
|
||||
*/
|
||||
export function LocationPanel({ cinema }: { cinema: Cinema }) {
|
||||
const { locale, messages } = useI18n();
|
||||
const addressLines = cinemaAddressLines(cinema, locale);
|
||||
const embedUrl = mapEmbedUrl(cinema, locale);
|
||||
const openUrl = mapOpenUrl(cinema);
|
||||
|
||||
return (
|
||||
<aside
|
||||
className="flex flex-col gap-6 self-start rounded-xl p-6"
|
||||
style={{ border: `1px solid ${COLORS.border}` }}
|
||||
>
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<h2 className="text-2xl font-semibold leading-[1.3]">
|
||||
{messages.detail.location}
|
||||
</h2>
|
||||
{openUrl ? (
|
||||
<a
|
||||
href={openUrl}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="inline-flex items-center gap-1 text-sm text-[#D47272] transition hover:text-white"
|
||||
>
|
||||
<IconMap size={16} />
|
||||
{messages.detail.openMap}
|
||||
</a>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{embedUrl ? (
|
||||
<div
|
||||
className="relative h-[183px] overflow-hidden rounded-xl"
|
||||
style={{
|
||||
border: `1px solid ${COLORS.border}`,
|
||||
background: COLORS.surfaceMuted,
|
||||
}}
|
||||
>
|
||||
{/* ลายตารางใต้แผนที่ — กันช่องว่างขาวตอน iframe ยังโหลดไม่เสร็จ */}
|
||||
<div
|
||||
aria-hidden="true"
|
||||
className="pointer-events-none absolute inset-0"
|
||||
style={{
|
||||
backgroundImage:
|
||||
"linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px)",
|
||||
backgroundSize: "24px 24px",
|
||||
}}
|
||||
/>
|
||||
<iframe
|
||||
title={`${messages.detail.location} — ${cinemaName(cinema, locale)}`}
|
||||
src={embedUrl}
|
||||
loading="lazy"
|
||||
referrerPolicy="no-referrer-when-downgrade"
|
||||
allowFullScreen
|
||||
className="relative size-full border-0"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<div
|
||||
className="flex h-[183px] items-center justify-center rounded-xl text-sm text-[#777]"
|
||||
style={{
|
||||
border: `1px dashed ${COLORS.border}`,
|
||||
background: COLORS.surfaceMuted,
|
||||
}}
|
||||
>
|
||||
{messages.detail.noData}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<p className="text-sm leading-[1.3] text-[#999]">
|
||||
{addressLines.length > 0
|
||||
? addressLines.map((line) => (
|
||||
<span key={line} className="block">
|
||||
{line}
|
||||
</span>
|
||||
))
|
||||
: messages.detail.addressFallback}
|
||||
</p>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user