Files
web-alterflixhub/assets/SiteShell-DHgUrms6.js
T
Bkk1234 e6c4ebff48 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.
2026-11-22 22:24:36 +07:00

1 line
9.8 KiB
JavaScript

import{i as e,t}from"./react-B8IZ02wI.js";import{u as n}from"./components-LggAOTeO.js";import{a as r,o as i,r as a,t as o}from"./IconCheck-B3jDJthn.js";import{t as s}from"./jsx-runtime-fBfwind-.js";import{n as c}from"./messages-nFlHChGW.js";import{t as l}from"./createReactComponent-C-DRqPhY.js";import{n as u}from"./footer-icons-kTf1LTdH.js";var d=l(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),f=e(t(),1),p=`2000px 0px -6% 0px`,m=.06;function h(e=0){let t=(0,f.useRef)(null),[n,r]=(0,f.useState)(!1);return(0,f.useEffect)(()=>{let e=t.current;if(!e)return;if(typeof IntersectionObserver>`u`){r(!0);return}let n=new IntersectionObserver(e=>{for(let t of e){let e=t.rootBounds?.top??0,i=t.boundingClientRect.bottom<=e;if(!(!t.isIntersecting&&!i)){r(!0),n.disconnect();break}}},{threshold:m,rootMargin:p});return n.observe(e),()=>n.disconnect()},[]),{ref:t,revealed:n,style:{"--fx-delay":`${Math.max(0,e)}ms`}}}var g=s();function _({children:e,kind:t=`rise`,delay:n=0,className:r}){let{ref:i,revealed:a,style:o}=h(n);return(0,g.jsx)(`div`,{ref:i,"data-reveal":t,"data-revealed":a?``:void 0,style:o,className:r,children:e})}var v={background:`#0D0D0D`,surface:`#1B1B1B`,surfaceRaised:`#1F1F1F`,surfaceChip:`#242424`,surfaceMuted:`#E8E8E8`,border:`#332B2B`,borderSubtle:`#303030`,brand:`#8F0808`,brandBright:`#A92626`,brandText:`#D47272`,brandGlow:`#4C0404`,textPrimary:`#FFFFFF`,textMuted:`#B3B3B3`,textSubtle:`#999999`,glowSoft:`rgba(143,8,8,0.4)`,pillGradient:`linear-gradient(180deg, rgba(143,8,8,0.3) 0%, rgba(27,27,27,0) 100%)`,flagGradient:`linear-gradient(#A51931 0 17%, #F4F5F8 17% 34%, #2D2A4A 34% 66%, #F4F5F8 66% 83%, #A51931 83%)`},y={wordmark:`AlterFlixHub`,fontFamily:`'Jersey 15', sans-serif`,color:`#8F0808`,sizes:{sm:`text-2xl`,md:`text-4xl`}};function b(e=`md`){return`font-['Jersey_15'] leading-none ${y.sizes[e]}`}function x({className:e=``,size:t=`md`}){return(0,g.jsx)(`span`,{className:`${b(t)} ${e}`,style:{fontFamily:y.fontFamily,color:y.color},children:y.wordmark})}function S(){let{site:e}=r(),{messages:t}=a();return(0,g.jsx)(`footer`,{className:`relative z-10 mx-auto w-full max-w-[1440px] px-5 pb-6 md:px-[108px]`,children:(0,g.jsxs)(`div`,{className:`flex flex-col items-center gap-3 border-t border-white/10 pt-4 sm:flex-row sm:justify-between`,children:[(0,g.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,g.jsx)(x,{size:`sm`}),(0,g.jsxs)(`nav`,{"aria-label":`เมนูล่าง`,className:`flex items-center gap-3 text-xs`,children:[(0,g.jsx)(i,{to:`/for-film-lovers`,className:`text-[#B3B3B3] transition hover:text-white`,children:t.nav.forFilmLovers}),(0,g.jsx)(i,{to:`/for-cinemas`,className:`text-[#B3B3B3] transition hover:text-white`,children:t.nav.forCinemas}),(0,g.jsx)(i,{to:`/about`,className:`text-[#B3B3B3] transition hover:text-white`,children:t.nav.about})]})]}),(0,g.jsx)(`div`,{className:`flex flex-wrap items-center justify-center gap-1.5`,children:e.footer.map(e=>{let t=u(e.icon_name),n=e.href.startsWith(`http`);return(0,g.jsx)(`a`,{href:e.href||`#`,"aria-label":e.label,title:e.label,target:n?`_blank`:void 0,rel:n?`noreferrer`:void 0,className:`flex size-8 items-center justify-center rounded-full bg-white/90 text-[#0D0D0D] transition hover:bg-white`,children:(0,g.jsx)(t,{size:18})},e.id)})}),(0,g.jsx)(`p`,{className:`text-xs text-[#999]`,children:`Copyright © AlterFlixHub`})]})})}function C(){return(0,g.jsx)(`span`,{className:`block h-4 w-[21px] shrink-0 rounded-[1px]`,style:{background:v.flagGradient}})}function w(){return(0,g.jsxs)(`span`,{className:`relative block h-4 w-[21px] shrink-0 overflow-hidden rounded-[1px]`,style:{background:`#012169`},children:[(0,g.jsx)(`span`,{className:`absolute inset-0`,style:{background:`linear-gradient(45deg, transparent 44%, #F4F5F8 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #F4F5F8 44% 56%, transparent 56%)`}}),(0,g.jsx)(`span`,{className:`absolute inset-0`,style:{background:`linear-gradient(90deg, transparent 40%, #F4F5F8 40% 60%, transparent 60%), linear-gradient(0deg, transparent 33%, #F4F5F8 33% 67%, transparent 67%)`}}),(0,g.jsx)(`span`,{className:`absolute inset-0`,style:{background:`linear-gradient(90deg, transparent 44%, #C8102E 44% 56%, transparent 56%), linear-gradient(0deg, transparent 40%, #C8102E 40% 60%, transparent 60%)`}})]})}var T={th:C,en:w};function E(){let{locale:e,setLocale:t,messages:n}=a(),[r,i]=(0,f.useState)(!1),s=(0,f.useRef)(null),l=(0,f.useRef)(null);(0,f.useEffect)(()=>{if(!r)return;s.current?.querySelector(`[role="menuitemradio"][aria-checked="true"]`)?.focus();function e(e){s.current?.contains(e.target)||i(!1)}function t(e){e.key===`Escape`&&(i(!1),l.current?.focus())}return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[r]);let u=c.find(t=>t.locale===e)??c[0],p=T[u.locale];function m(e){if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=Array.from(s.current?.querySelectorAll(`[role="menuitemradio"]`)??[]);t.length!==0&&t[(t.indexOf(document.activeElement)+(e.key===`ArrowDown`?1:-1)+t.length)%t.length]?.focus()}function h(e){t(e),i(!1),l.current?.focus()}return(0,g.jsxs)(`div`,{ref:s,className:`relative`,children:[(0,g.jsxs)(`button`,{ref:l,type:`button`,"aria-haspopup":`menu`,"aria-expanded":r,"aria-label":`${n.nav.language}: ${u.name}`,title:u.name,onClick:()=>i(e=>!e),className:`flex min-h-10 items-center gap-1.5 rounded-lg px-2 text-sm text-[#B3B3B3] transition hover:text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#A92626] after:absolute after:-inset-y-1 after:-inset-x-0.5 after:content-[''] sm:gap-2`,children:[(0,g.jsx)(p,{}),(0,g.jsx)(`span`,{className:`font-medium leading-none`,children:u.code}),(0,g.jsx)(d,{size:14,"aria-hidden":`true`,className:`transition-transform duration-200 ${r?`rotate-180`:``}`})]}),r?(0,g.jsx)(`div`,{role:`menu`,"aria-label":n.nav.language,onKeyDown:m,className:`absolute right-0 top-[calc(100%+8px)] z-30 flex w-[190px] flex-col gap-1 rounded-xl border border-[#303030] bg-[#141414] p-2 shadow-lg`,children:c.map(t=>{let n=T[t.locale],r=t.locale===e;return(0,g.jsxs)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":r,lang:t.locale,onClick:()=>h(t.locale),className:`flex min-h-11 items-center gap-2 rounded-lg px-2.5 text-sm transition ${r?`bg-[#242424] font-semibold text-[#D47272]`:`text-[#B3B3B3] hover:bg-[#1B1B1B] hover:text-white`}`,children:[(0,g.jsx)(n,{}),(0,g.jsx)(`span`,{className:`flex-1 text-left`,children:t.name}),r?(0,g.jsx)(o,{size:16,"aria-hidden":`true`}):null]},t.locale)})}):null]})}function D({to:e,label:t,isActive:n,variant:r}){return(0,g.jsx)(i,{to:e,"aria-current":n?`page`:void 0,className:r===`bar`?`relative flex items-center rounded-lg border px-3 py-1.5 text-sm transition after:absolute after:-inset-y-2 after:-inset-x-0.5 after:content-[''] ${n?`border-[#A92626] bg-[#8F0808]/20 text-white`:`border-[#303030] text-[#B3B3B3] hover:border-[#A92626]/60 hover:text-white`}`:`flex min-h-11 items-center rounded-lg px-3 text-sm transition ${n?`bg-[#242424] text-white`:`text-[#B3B3B3] hover:bg-[#1B1B1B] hover:text-white`}`,children:t})}function O(){let{messages:e}=a(),{pathname:t}=n(),r=[{to:`/for-film-lovers`,label:e.nav.forFilmLovers},{to:`/for-cinemas`,label:e.nav.forCinemas},{to:`/about`,label:e.nav.about}];return(0,g.jsxs)(`header`,{className:`fx-drop relative z-10 mx-auto flex h-[68px] w-full max-w-[1440px] items-center justify-between gap-3 px-5 md:px-[108px]`,children:[(0,g.jsx)(i,{to:`/`,"aria-label":`AlterFlixHub — ${e.nav.home}`,className:`shrink-0`,children:(0,g.jsx)(x,{})}),(0,g.jsxs)(`div`,{className:`flex items-center gap-1.5 sm:gap-2`,children:[(0,g.jsxs)(`details`,{className:`group relative sm:hidden`,children:[(0,g.jsx)(`summary`,{className:`flex min-h-10 cursor-pointer list-none items-center rounded-lg border border-[#303030] px-3 text-sm text-[#B3B3B3] transition hover:border-[#A92626]/60 hover:text-white [&::-webkit-details-marker]:hidden`,children:e.nav.menu}),(0,g.jsx)(`nav`,{"aria-label":e.nav.menu,className:`absolute right-0 top-[calc(100%+8px)] z-20 flex w-[220px] flex-col gap-1 rounded-xl border border-[#303030] bg-[#141414] p-2 shadow-lg`,children:r.map(e=>(0,g.jsx)(D,{to:e.to,label:e.label,isActive:t.startsWith(e.to),variant:`panel`},e.to))})]}),(0,g.jsx)(`nav`,{"aria-label":e.nav.menu,className:`hidden items-center gap-2 sm:flex`,children:r.map(e=>(0,g.jsx)(D,{to:e.to,label:e.label,isActive:t.startsWith(e.to),variant:`bar`},e.to))}),(0,g.jsx)(E,{})]})]})}var k=`/images/hero.png`;function A({children:e}){return(0,g.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 overflow-hidden`,children:e})}function j(){return(0,g.jsxs)(A,{children:[(0,g.jsx)(`img`,{src:k,alt:``,className:`fx-hero-image pointer-events-none absolute inset-x-0 top-0 h-[553px] w-full object-cover`}),(0,g.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 top-0 h-[553px] bg-gradient-to-b from-transparent via-[#0D0D0D]/60 to-[#0D0D0D]`}),(0,g.jsx)(`div`,{className:`pointer-events-none absolute left-1/2 top-0 size-[382px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-[#8F0808] blur-[237px]`}),(0,g.jsx)(`div`,{className:`pointer-events-none absolute bottom-[-140px] left-1/2 size-[382px] -translate-x-1/2 rounded-full bg-[#4C0404]/70 blur-[237px]`})]})}function M(){return(0,g.jsx)(A,{children:(0,g.jsx)(`div`,{className:`pointer-events-none absolute left-1/2 top-[649px] size-[382px] -translate-x-1/2 rounded-full bg-[#4C0404] opacity-[0.66] blur-[237px]`})})}function N({variant:e,children:t}){return(0,g.jsxs)(`div`,{className:`relative flex min-h-dvh w-full flex-col overflow-x-hidden bg-[#0D0D0D] text-white`,children:[e===`home`?(0,g.jsx)(j,{}):(0,g.jsx)(M,{}),(0,g.jsx)(O,{}),(0,g.jsx)(`div`,{className:`fx-page flex-1`,children:t}),(0,g.jsx)(S,{})]})}export{h as a,_ as i,x as n,v as r,N as t};