PageSourceSearch

https://faf.co.ao/assets/Noticias-DA2_MXO1.js

js faf.co.ao collected 2026-10-02 19:10:45 UTC 4,695 bytes, 1 lines download raw bytes

1import{j as e,r as x,b as u}from"./vendor-react-core-_0sZDOLQ.js";import{v as g,b as n}from"./index-j07E1qHv.js";import{C as h,b,a as p}from"./card-DHmBnTdH.js";import{B as d}from"./badge-BXqwvh8U.js";import{m}from"./vendor-framer-motion-C1oRD-X5.js";import{Z as f,k as j,N as y}from"./vendor-lucide-Ddz0eB7N.js";import{D as N,F as v}from"./vendor-utils-BRu4i-LD.js";import{T as w,a as C,b as l}from"./tabs-BUF6w8PE.js";import{S as _}from"./skeleton-ClHfYp06.js";import"./vendor-radix-CFmJ1img.js";import"./vendor-supabase-Ca6cp8v2.js";function T({noticia:s,onClick:i,index:o=0}){const c=a=>{const t={selecao:"bg-red-100 text-red-800 border-red-200",competicoes:"bg-blue-100 text-blue-800 border-blue-200",infraestrutura:"bg-green-100 text-green-800 border-green-200",formacao:"bg-yellow-100 text-yellow-800 border-yellow-200",geral:"bg-blue-50 text-faf-blue border-blue-100"};return t[a]||t.geral},r=a=>({selecao:"Seleção",competicoes:"Competições",infraestrutura:"Infraestrutura",formacao:"Formação",geral:"Geral"})[a]||a;return e.jsx(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:o*.1,duration:.5},whileHover:{y:-8},onClick:i,className:"cursor-pointer",children:e.jsxs(h,{className:"h-full overflow-hidden hover:shadow-xl transition-shadow duration-300 border-0 bg-white",children:[s.imagem_url&&e.jsxs("div",{className:"relative h-48 overflow-hidden",children:[e.jsx("img",{src:s.imagem_url,alt:s.titulo,className:"w-full h-full object-cover transition-transform duration-500 hover:scale-110"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),s.destaque&&e.jsx("div",{className:"absolute top-4 left-4",children:e.jsx(d,{className:"bg-red-600 text-white border-0 font-semibold",children:"Destaque"})})]}),e.jsxs(b,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(d,{variant:"outline",className:`${c(s.categoria)} border font-medium`,children:r(s.categoria)}),e.jsxs("div",{className:"flex items-center gap-1 text-xs text-gray-500",children:[e.jsx(f,{className:"w-3 h-3"}),N(new Date(s.data_publicacao),"dd 'de' MMMM, yyyy",{locale:v})]})]}),e.jsx("h3",{className:"text-xl font-bold text-gray-900 line-clamp-2 leading-tight",children:s.titulo})]}),e.jsxs(p,{children:[e.jsx("p",{className:"text-gray-600 line-clamp-3 mb-4",children:s.resumo}),e.jsxs("div",{className:"flex items-center text-green-600 font-semibold text-sm hover:text-green-700 transition-colors",children:["Ler mais",e.jsx(j,{className:"w-4 h-4 ml-1"})]})]})]})})}function G(){const[s,i]=x.useState("todas"),{data:o=[],isLoading:c}=u({queryKey:["noticias",s],queryFn:async()=>{const r=g().map(a=>({id:a.id,titulo:a.title,resumo:a.summary,categoria:a.category==="girabola"?"competicoes":a.category,data_publicacao:a.created_date,imagem_url:a.image_url,destaque:a.featured}));try{if(s==="todas"){const t=await n.entities.Noticia.list("-data_publicacao",50);return t.length?t:r}const a=await n.entities.Noticia.filter({categoria:s},"-data_publicacao",50);return a.length?a:r.filter(t=>t.categoria===s)}catch{return s==="todas"?r:r.filter(a=>a.categoria===s)}}});return e.jsx("div",{className:"min-h-screen bg-gray-50 py-12",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(m.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center mb-12",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[e.jsx(y,{className:"w-8 h-8 text-red-600"}),e.jsx("h1",{className:"text-5xl font-bold text-gray-900",children:"Notícias"})]}),e.jsx("p",{className:"text-xl text-gray-600",children:"Acompanhe as últimas novidades do futebol angolano"})]}),e.jsx("div",{className:"flex justify-center mb-12",children:e.jsx(w,{value:s,onValueChange:i,children:e.jsxs(C,{className:"bg-white shadow-sm p-1",children:[e.jsx(l,{value:"todas",children:"Todas"}),e.jsx(l,{value:"selecao",children:"Seleção"}),e.jsx(l,{value:"competicoes",children:"Competições"}),e.jsx(l,{value:"formacao",children:"Formação"}),e.jsx(l,{value:"infraestrutura",children:"Infraestrutura"}),e.jsx(l,{value:"geral",children:"Geral"})]})})}),c?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:[1,2,3,4,5,6].map(r=>e.jsx(_,{className:"h-96 rounded-xl"},r))}):o.length>0?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:o.map((r,a)=>e.jsx(T,{noticia:r,index:a},r.id))}):e.jsx("div",{className:"text-center py-20",children:e.jsx("p",{className:"text-gray-500 text-lg",children:"Nenhuma notícia encontrada nesta categoria"})})]})})}export{G as default};

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.