PageSourceSearch

https://allavedova.it/assets/menu-DYO8Fr5o.js

js allavedova.it collected 2026-10-08 23:14:34 UTC 3,118 bytes, 1 lines download raw bytes

1import{n as e}from"./chunk-Bh1tDfsg.js";import{n as t}from"./menu-api-BfbBJ_2w.js";import{c as n,h as r}from"./index-BnN0qcI4.js";import{t as i}from"./menu-image-url-CR0Te4NP.js";var a=e(r()),o=n();function s(){let[e,n]=(0,a.useState)(null),[r,s]=(0,a.useState)(!1),[c,l]=(0,a.useState)(!0),[u,d]=(0,a.useState)(0),f=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=!1;return t().then(t=>{e||(t?(n(t),s(!1)):s(!0),l(!1))}).catch(()=>{e||(s(!0),l(!1))}),()=>{e=!0}},[]);let p=e=>{d(e),(f.current?.querySelector(`[data-tab="${e}"]`))?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})},m=e?.categorie[u];return(0,o.jsxs)(`div`,{className:`mx-auto max-w-3xl px-4 py-10 md:py-16`,children:[(0,o.jsxs)(`header`,{className:`text-center mb-8`,children:[(0,o.jsx)(`p`,{className:`text-xs uppercase tracking-[0.3em] text-brass mb-3`,children:`La nostra cucina`}),(0,o.jsx)(`h1`,{className:`font-serif text-4xl md:text-5xl`,children:`Il Menù`}),(0,o.jsx)(`div`,{className:`brass-divider mt-6 max-w-xs mx-auto`})]}),c&&(0,o.jsx)(`p`,{className:`text-center text-muted-foreground`,children:`Caricamento del menù…`}),r&&!e&&(0,o.jsx)(`div`,{className:`text-center py-10 rounded-md bg-card soft-shadow`,children:(0,o.jsx)(`p`,{className:`text-ember`,children:`Il menù non è al momento disponibile, riprova tra poco.`})}),e&&m&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`div`,{ref:f,style:{top:`var(--site-header-h, 56px)`},className:`sticky z-30 -mx-4 px-4 py-3 bg-background backdrop-blur mb-10 overflow-x-auto relative before:content-[''] before:absolute before:inset-x-0 before:-top-3 before:h-3 before:bg-background`,children:(0,o.jsx)(`div`,{className:`flex gap-6 md:gap-8 whitespace-nowrap w-max mx-auto`,children:e.categorie.map((e,t)=>(0,o.jsxs)(`button`,{"data-tab":t,onClick:()=>p(t),className:`relative pb-2 text-xs md:text-sm uppercase tracking-[0.2em] transition-colors ${u===t?`text-brass`:`text-foreground/60 hover:text-foreground`}`,children:[e.label??e.title,u===t&&(0,o.jsx)(`span`,{className:`absolute left-0 right-0 -bottom-px h-px bg-brass`})]},e.id??e.label??t))})}),(0,o.jsxs)(`section`,{className:`fade-up`,children:[(0,o.jsx)(`div`,{className:`text-center mb-10`,children:(0,o.jsx)(`h2`,{className:`font-serif text-3xl md:text-4xl italic text-brass`,children:m.label??m.title})}),(0,o.jsxs)(`ul`,{className:`space-y-10`,children:[(m.items??[]).map((e,t)=>(0,o.jsxs)(`li`,{className:`break-inside-avoid flex flex-col gap-3`,children:[e.immagine&&(0,o.jsx)(`img`,{src:i(e.immagine),alt:`Foto di ${e.name}`,loading:`lazy`,className:`h-48 md:h-56 w-full rounded-md object-cover soft-shadow`}),(0,o.jsxs)(`div`,{children:[(0,o.jsx)(`div`,{className:`flex items-baseline`,children:(0,o.jsx)(`span`,{className:`font-serif text-xl text-foreground`,children:e.name})}),e.desc&&(0,o.jsx)(`p`,{className:`mt-1.5 text-sm text-muted-foreground italic leading-relaxed`,children:e.desc})]})]},t)),(!m.items||m.items.length===0)&&(0,o.jsx)(`li`,{className:`text-center text-muted-foreground italic py-8`,children:`Nessun piatto in questa categoria.`})]})]},m.id??m.label)]})]})}export{s as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.