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
@@ -0,0 +1,5 @@
|
||||
import{i as e,t}from"./react-B8IZ02wI.js";import{a as n,f as r}from"./components-LggAOTeO.js";import{t as i}from"./jsx-runtime-fBfwind-.js";import{r as a,t as o}from"./messages-nFlHChGW.js";import{t as s}from"./createReactComponent-C-DRqPhY.js";import{t as c}from"./footer-icons-kTf1LTdH.js";import{n as l,t as u}from"./contact-link-BLAvkJkh.js";import{a as d}from"./seo-CukKNP_H.js";import{a as f,f as p,t as m,y as h}from"./cinemas-CTA3vCte.js";var g=s(`outline`,`arrow-down`,`ArrowDown`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 13l-6 6`,key:`svg-1`}],[`path`,{d:`M6 13l6 6`,key:`svg-2`}]]),_=s(`outline`,`arrow-up`,`ArrowUp`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 11l-6 -6`,key:`svg-1`}],[`path`,{d:`M6 11l6 -6`,key:`svg-2`}]]),v=s(`outline`,`grip-vertical`,`GripVertical`,[[`path`,{d:`M8 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M8 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M14 5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M14 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}],[`path`,{d:`M14 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-5`}]]),y=s(`outline`,`photo-up`,`PhotoUp`,[[`path`,{d:`M15 8h.01`,key:`svg-0`}],[`path`,{d:`M12.5 21h-6.5a3 3 0 0 1 -3 -3v-12a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6.5`,key:`svg-1`}],[`path`,{d:`M3 16l5 -5c.928 -.893 2.072 -.893 3 0l3.5 3.5`,key:`svg-2`}],[`path`,{d:`M14 14l1 -1c.679 -.653 1.473 -.829 2.214 -.526`,key:`svg-3`}],[`path`,{d:`M19 22v-6`,key:`svg-4`}],[`path`,{d:`M22 19l-3 -3l-3 3`,key:`svg-5`}]]),b=s(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),x=s(`outline`,`sort-ascending-letters`,`SortAscendingLetters`,[[`path`,{d:`M15 10v-5c0 -1.38 .62 -2 2 -2s2 .62 2 2v5m0 -3h-4`,key:`svg-0`}],[`path`,{d:`M19 21h-4l4 -7h-4`,key:`svg-1`}],[`path`,{d:`M4 15l3 3l3 -3`,key:`svg-2`}],[`path`,{d:`M7 6v12`,key:`svg-3`}]]),S=s(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),C=e(t(),1),w=`w-full rounded-lg border border-[#303030] bg-[#141414] px-3 py-2 text-base text-white outline-none transition focus:border-[#A92626] focus-visible:ring-2 focus-visible:ring-[#A92626]/40 sm:text-sm`,T=`flex flex-col gap-1.5 text-xs text-[#999]`,E=`min-h-11 rounded-lg bg-[#8F0808] px-4 text-sm font-medium transition hover:bg-[#a30a0a] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#D47272]`,D=`min-h-11 rounded-lg border border-[#303030] px-3 text-sm transition hover:border-[#A92626] hover:text-[#D47272] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#A92626]`,O=`min-h-9 rounded-lg border border-[#303030] px-2.5 text-sm text-[#B3B3B3] transition hover:border-[#A92626] hover:text-[#D47272] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#A92626] disabled:opacity-40`,k=i(),A=[{code:`th`,label:`ไทย`},{code:`en`,label:`English`}];function j({value:e,defaults:t,onChange:n,onSave:r,saving:i}){let[a,o]=(0,C.useState)(`th`),s=e[a];function c(t){n({...e,[a]:{...s,...t}})}function l(e,t){c({sections:s.sections.map((n,r)=>r===e?{...n,...t}:n)})}function u(e,t){let n=e+t;if(n<0||n>=s.sections.length)return;let r=[...s.sections],[i]=r.splice(e,1);r.splice(n,0,i),c({sections:r})}function d(){c({sections:[...s.sections,{heading:`หัวข้อที่ ${s.sections.length+1}`,body:``}]})}function f(e){c({sections:s.sections.filter((t,n)=>n!==e)})}function p(){n({...e,[a]:t[a]})}let m=s.title.trim()===``,h=s.lead.length>400;return(0,k.jsxs)(`div`,{className:`px-6 py-5`,children:[(0,k.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,k.jsx)(`div`,{role:`tablist`,"aria-label":`ภาษา`,className:`flex items-center gap-1 rounded-lg border border-[#242424] bg-[#141414] p-1`,children:A.map(e=>(0,k.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":a===e.code,onClick:()=>o(e.code),className:`min-h-9 rounded-md px-4 text-sm transition ${a===e.code?`bg-[#242424] font-semibold text-[#D47272]`:`text-[#999] hover:text-white`}`,children:e.label},e.code))}),(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,k.jsxs)(`button`,{type:`button`,className:D,onClick:p,children:[`คืนค่าตั้งต้น (`,a.toUpperCase(),`)`]}),(0,k.jsx)(`button`,{type:`button`,className:E,onClick:r,disabled:i,children:i?`กำลังบันทึก…`:`บันทึกหน้าเกี่ยวกับเรา`})]})]}),(0,k.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-[minmax(0,1fr)_360px]`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,k.jsxs)(`label`,{className:T,children:[`หัวข้อหลัก (H1)`,(0,k.jsx)(`input`,{classNamLine truncated
|
||||
`),onChange:e=>A({...E,address_lines:e.target.value.split(`
|
||||
`)})})]})]})}),(0,k.jsx)(M,{title:`คำอธิบายโรงหนัง`,description:`ข้อความที่แสดงใต้ชื่อโรง`,badge:E.description?`มีคำอธิบาย`:`ยังไม่มี`,children:(0,k.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,k.jsxs)(`label`,{className:Z,children:[`คำอธิบาย (TH)`,(0,k.jsx)(`textarea`,{className:`${X} h-20`,value:E.description,onChange:e=>A({...E,description:e.target.value})})]}),(0,k.jsxs)(`label`,{className:Z,children:[`คำอธิบาย (EN)`,(0,k.jsx)(`textarea`,{className:`${X} h-20`,value:E.description_en??``,onChange:e=>A({...E,description_en:e.target.value})})]})]})}),(0,k.jsxs)(`div`,{className:`sticky bottom-0 z-10 -mx-1 flex flex-wrap gap-2 rounded-xl border-t border-[#242424] bg-[#0D0D0D]/95 px-1 py-3 backdrop-blur`,children:[(0,k.jsx)(`button`,{type:`button`,className:$,onClick:()=>void O({cinemas:i.cinemas}),children:`บันทึกทั้งหมด`}),(0,k.jsx)(`button`,{type:`button`,className:Q,onClick:()=>{let e={...E,slug:`${E.slug}-copy-${Date.now().toString().slice(-4)}`,name:`${E.name} (สำเนา)`};N([...i.cinemas,e]),m(e.slug),D(`สร้างสำเนาแล้ว — กดบันทึกเพื่อยืนยัน`)},children:`ทำสำเนา`}),(0,k.jsx)(`button`,{type:`button`,className:Q,onClick:()=>{navigator.clipboard.writeText(h),D(`คัดลอก JSON แล้ว`)},children:`คัดลอก JSON`}),(0,k.jsx)(`button`,{type:`button`,className:`${Q} text-[#D47272]`,onClick:()=>{let e=i.cinemas.filter(e=>e.slug!==E.slug);N(e),m(e[0]?.slug??null)},children:`ลบโรงหนังนี้`})]}),(0,k.jsxs)(`details`,{className:`rounded-xl border border-[#242424] p-3`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer text-sm text-[#B3B3B3]`,children:`แก้ไขดิบเป็น JSON (คัดลอก/วางได้)`}),(0,k.jsx)(`textarea`,{className:`${X} mt-3 h-72 font-mono text-xs`,value:h,onChange:e=>g(e.target.value),spellCheck:!1}),(0,k.jsx)(`button`,{type:`button`,className:`${Q} mt-2`,onClick:()=>{try{A(JSON.parse(h)),D(`ใช้ JSON แล้ว — กดบันทึกเพื่อยืนยัน`)}catch{D(`JSON ไม่ถูกต้อง`)}},children:`ใช้ JSON นี้`})]}),(0,k.jsxs)(`details`,{className:`rounded-xl border border-[#242424] p-3`,children:[(0,k.jsx)(`summary`,{className:`cursor-pointer text-sm text-[#B3B3B3]`,children:`วาง JSON เพื่อเพิ่มโรงหนัง (ทับ slug ที่ซ้ำ)`}),(0,k.jsx)(`textarea`,{className:`${X} mt-3 h-40 font-mono text-xs`,value:_,onChange:e=>v(e.target.value),placeholder:`{"slug":"new-cinema","name":"NEW CINEMA","tags":[]}`,spellCheck:!1}),(0,k.jsx)(`button`,{type:`button`,className:`${Q} mt-2`,onClick:async()=>{let e=await fetch(`/api/admin/cinemas/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({raw:_})});if(!e.ok){D((await e.json().catch(()=>({}))).statusMessage??`นำเข้าไม่สำเร็จ`);return}let t=await e.json();a(t.store),v(``),D(`นำเข้า ${t.imported} รายการแล้ว`)},children:`นำเข้า / วางทับ`})]})]}):(0,k.jsx)(`p`,{className:`text-sm text-[#999]`,children:`เลือกโรงหนังหรือเพิ่มใหม่ก่อน`})})]}):null,t===`about`?(0,k.jsx)(j,{value:i.about,defaults:I,onChange:ee,onSave:()=>void O({about:i.about}),saving:w}):null,t===`forCinemas`?(0,k.jsx)(re,{value:i.forCinemas,defaults:oe,onChange:te,onSave:()=>void O({forCinemas:i.forCinemas}),saving:w,saveLabel:`บันทึกหน้าสำหรับคนทำโรงหนัง`}):null,t===`forFilmLovers`?(0,k.jsx)(re,{value:i.forFilmLovers,defaults:L,onChange:ne,onSave:()=>void O({forFilmLovers:i.forFilmLovers}),saving:w,saveLabel:`บันทึกหน้าสำหรับคนรักหนัง`}):null,t===`terms`?(0,k.jsxs)(`div`,{className:`px-6 py-5`,children:[(0,k.jsxs)(`p`,{className:`mb-3 text-sm text-[#999]`,children:[`แก้คำศัพท์ตามภาษา — key เป็นตำแหน่งข้อความในหน้าเว็บ (เช่น`,` `,(0,k.jsx)(`code`,{children:`hero.subtitle`}),`) เว้นว่างไว้แปลว่าใช้ค่าเดิม`]}),(0,k.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,className:$,onClick:()=>void O({site:i.site}),children:`บันทึกคำศัพท์`}),(0,k.jsx)(`button`,{type:`button`,className:Q,onClick:()=>F({...i.site,terms:[...i.site.terms,{key:`custom.term${i.site.terms.length+1}`,values:Object.fromEntries(z.map(e=>[e.code,``]))}]}),children:`+ เพิ่มคำศัพท์`}),f.map(e=>{let t=`venues.${e}`,n=i.site.terms.some(e=>e.key===t);r
Line truncated
|
||||
`),t=new Blob([`query,count,zero_result_count,click_count
|
||||
`+e],{type:`text/csv;charset=utf-8`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`search-stats-${y.range_days}d.csv`,r.click(),URL.revokeObjectURL(n)},children:`ดาวน์โหลด CSV (คำค้นยอดนิยม)`})]})]}),(0,k.jsx)(`p`,{className:`mt-6 text-xs text-[#777]`,children:`เก็บแบบไม่ใช้คุกกี้: ไม่เก็บ IP/User-Agent ดิบ ระบุผู้เข้าชมด้วย hash ที่หมุนเกลือทุกวัน (แนวเดียวกับ Umami)`})]}):(0,k.jsx)(`p`,{className:`text-sm text-[#999]`,children:`กำลังโหลดสถิติ…`})]}):null,t===`footer`?(0,k.jsxs)(`div`,{className:`px-6 py-5`,children:[(0,k.jsx)(`p`,{className:`mb-3 text-sm text-[#999]`,children:`เลือกไอคอนและใส่ลิงก์ของแต่ละอัน — ลำดับตามรายการนี้`}),(0,k.jsxs)(`div`,{className:`mb-3 flex flex-wrap gap-2`,children:[(0,k.jsx)(`button`,{type:`button`,className:$,onClick:()=>void O({site:i.site}),children:`บันทึก Footer`}),(0,k.jsx)(`button`,{type:`button`,className:Q,onClick:()=>F({...i.site,footer:[...i.site.footer,{id:`footer-${Date.now()}`,icon_name:`IconLink`,label:`ลิงก์ใหม่`,href:`https://`}]}),children:`+ เพิ่มไอคอน`})]}),(0,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:i.site.footer.map((e,t)=>(0,k.jsxs)(`div`,{className:`grid gap-2 rounded-xl border border-[#242424] p-3 sm:grid-cols-[180px_1fr_1fr_auto]`,children:[(0,k.jsx)(`select`,{className:X,value:e.icon_name,onChange:e=>{let n=i.site.footer.map((n,r)=>r===t?{...n,icon_name:e.target.value}:n);F({...i.site,footer:n})},children:c.map(e=>(0,k.jsx)(`option`,{value:e,children:e},e))}),(0,k.jsx)(`input`,{className:X,placeholder:`ชื่อที่แสดง`,value:e.label,onChange:e=>{let n=i.site.footer.map((n,r)=>r===t?{...n,label:e.target.value}:n);F({...i.site,footer:n})}}),(0,k.jsx)(`input`,{className:X,placeholder:`https://…`,value:e.href,onChange:e=>{let n=i.site.footer.map((n,r)=>r===t?{...n,href:e.target.value}:n);F({...i.site,footer:n})}}),(0,k.jsx)(`button`,{type:`button`,className:`text-xs text-[#D47272]`,onClick:()=>F({...i.site,footer:i.site.footer.filter((e,n)=>n!==t)}),children:`ลบ`})]},e.id))})]}):null]})});export{Ie as default,Ae as meta};
|
||||
Reference in new issue
Block a user