PageSourceSearch

https://www.stazionedellarte.com/assets/amministrazione-trasparente_.delibere-CoRr3T9u.js

js stazionedellarte.com collected 2026-10-01 11:56:11 UTC 5,333 bytes, 1 lines download raw bytes

1import{c as u,T as b,r as c,j as e,X as h}from"./index-C3SzbFls.js";import{P as g}from"./PageHero-CxYtnD2f.js";import{F as j}from"./file-text-CxXxdwhu.js";import"./Reveal-DMYHgzQj.js";const f=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],y=u("search",f);function _(){const a=b.useLoaderData(),p=c.useMemo(()=>{const t=new Set;return a.forEach(r=>{const s=r.delibera_date?new Date(r.delibera_date).getFullYear().toString():"-";t.add(s)}),Array.from(t).sort((r,s)=>s.localeCompare(r))},[a]),[n,l]=c.useState("all"),[i,d]=c.useState(""),o=c.useMemo(()=>{const t=i.trim().toLowerCase();return a.filter(r=>{const s=r.delibera_date?new Date(r.delibera_date).getFullYear().toString():"-";return n!=="all"&&s!==n?!1:t?r.title.toLowerCase().includes(t)||(r.description??"").toLowerCase().includes(t)||(r.category??"").toLowerCase().includes(t):!0})},[a,n,i]),x=t=>t?new Date(t).toLocaleDateString("it-IT",{day:"2-digit",month:"short",year:"numeric"}):"";return e.jsxs("div",{className:"grain",children:[e.jsx(g,{eyebrow:"Trasparenza / Delibere",title:"Delibere",lead:"In questa sezione è possibile consultare e scaricare le delibere adottate dagli organi direttivi della Fondazione Stazione dell'Arte. I documenti pubblicati garantiscono trasparenza sulle decisioni amministrative, gestionali e strategiche assunte nell'ambito delle attività museali e culturali. Tutti i file sono disponibili in formato PDF."}),e.jsxs("section",{className:"mx-auto max-w-[1100px] px-6 md:px-10 pb-32 md:pb-48",children:[e.jsx("div",{className:"sticky top-0 z-10 -mx-6 md:-mx-10 px-6 md:px-10 py-4 bg-paper/90 backdrop-blur border-b border-border mb-8",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(y,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-stone-warm pointer-events-none"}),e.jsx("input",{type:"search",value:i,onChange:t=>d(t.target.value),placeholder:"Cerca per titolo, descrizione o categoria…",className:"w-full border border-border bg-transparent pl-10 pr-10 py-3 text-sm focus:outline-none focus:border-ink transition-colors"}),i&&e.jsx("button",{type:"button",onClick:()=>d(""),"aria-label":"Pulisci ricerca",className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-stone-warm hover:text-ink",children:e.jsx(h,{size:16})})]}),e.jsx("div",{className:"sm:hidden",children:e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"sr-only",children:"Filtra per anno"}),e.jsxs("select",{value:n,onChange:t=>l(t.target.value),className:"w-full border border-border bg-paper px-3 py-3 text-sm focus:outline-none focus:border-ink",children:[e.jsxs("option",{value:"all",children:["Tutti gli anni · ",a.length]}),p.map(t=>{const r=a.filter(s=>(s.delibera_date?new Date(s.delibera_date).getFullYear().toString():"-")===t).length;return e.jsxs("option",{value:t,children:[t," · ",r]},t)})]})]})}),e.jsxs("div",{className:"hidden sm:flex items-center flex-wrap gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>l("all"),className:"px-3 py-1.5 text-xs uppercase tracking-[0.16em] border whitespace-nowrap transition-colors "+(n==="all"?"border-ink bg-ink text-paper":"border-border text-stone-warm hover:border-ink hover:text-ink"),children:["Tutti · ",a.length]}),p.map(t=>{const r=a.filter(s=>(s.delibera_date?new Date(s.delibera_date).getFullYear().toString():"-")===t).length;return e.jsxs("button",{type:"button",onClick:()=>l(t),className:"px-3 py-1.5 text-xs uppercase tracking-[0.16em] border whitespace-nowrap transition-colors "+(n===t?"border-ink bg-ink text-paper":"border-border text-stone-warm hover:border-ink hover:text-ink"),children:[t," · ",r]},t)})]}),e.jsx("div",{className:"text-xs text-stone-warm",children:o.length===a.length?`${a.length} delibere`:`${o.length} di ${a.length} delibere`})]})}),o.length===0?e.jsxs("div",{className:"py-16 text-center",children:[e.jsx("p",{className:"text-stone-warm",children:"Nessuna delibera trovata."}),(i||n!=="all")&&e.jsx("button",{type:"button",onClick:()=>{d(""),l("all")},className:"mt-4 text-xs uppercase tracking-[0.18em] underline underline-offset-4",children:"Reimposta filtri"})]}):e.jsx("ul",{className:"divide-y divide-border border-y border-border",children:o.map(t=>e.jsx("li",{children:e.jsxs("a",{href:t.file_url??"#",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between gap-4 py-5 group hover:bg-ink/[0.02] -mx-3 px-3 transition-colors",children:[e.jsxs("span",{className:"flex items-start gap-4 min-w-0",children:[e.jsx(j,{size:18,className:"text-stone-warm shrink-0 mt-1"}),e.jsxs("span",{className:"min-w-0",children:[e.jsx("span",{className:"block text-base md:text-lg truncate group-hover:underline underline-offset-4",children:t.title}),e.jsxs("span",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-stone-warm",children:[t.delibera_date&&e.jsx("span",{children:x(t.delibera_date)}),t.category&&e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,
1children:"·"}),e.jsx("span",{className:"uppercase tracking-[0.14em]",children:t.category})]})]})]})]}),e.jsx("span",{className:"text-xs uppercase tracking-[0.2em] text-stone-warm group-hover:text-ink transition shrink-0",children:"PDF →"})]})},t.id))})]})]})}export{_ 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.