PageSourceSearch

https://www.foodpowerteam.com/assets/ArticleList-ByfCHIwC.js

js foodpowerteam.com collected 2026-10-07 08:12:59 UTC 3,962 bytes, 1 lines download raw bytes

1import{j as e,m as x}from"./vendor-motion-B4PFTeF3.js";import{r as o,L as d}from"./vendor-react-BJpm5IaU.js";import{c as m}from"./index-FA2nt5wt.js";import{$ as c,ah as p,ai as g,d as h,A as u}from"./vendor-icons-Dpc4Xux7.js";import"./vendor-supabase-CQhNEkDT.js";const b=s=>{if(!s)return"";try{return new Date(s).toLocaleDateString("zh-TW",{timeZone:"Asia/Taipei",year:"numeric",month:"long",day:"numeric"})}catch{return s.slice(0,10)}},w=({articles:s})=>{const[l,r]=o.useState("all"),a=o.useMemo(()=>(s||[]).filter(t=>t.status==="published").sort((t,n)=>String(n.published_at||n.created_at||"").localeCompare(String(t.published_at||t.created_at||""))),[s]),i=l==="all"?a:a.filter(t=>t.category===l);return e.jsxs("div",{className:"pb-20",children:[e.jsx("section",{className:"bg-white border-b py-16 px-4 mb-10",children:e.jsxs("div",{className:"max-w-7xl mx-auto text-center",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full bg-red-50 text-red-600 text-xs font-bold mb-4",children:[e.jsx(c,{size:14})," 專欄"]}),e.jsx("h1",{className:"text-3xl md:text-4xl font-extrabold mb-4 text-gray-900",children:"產業專欄"}),e.jsx("p",{className:"text-gray-500 max-w-2xl mx-auto",children:"產業資訊、專家觀點與協會動態,掌握餐飲與美食產業第一手洞見。"}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-3 mt-8",children:[e.jsx("button",{onClick:()=>r("all"),className:`px-5 py-2 rounded-full font-bold transition-all ${l==="all"?"bg-gray-900 text-white shadow-lg":"bg-gray-100 text-gray-500 hover:bg-gray-200"}`,children:"全部"}),m.map(t=>e.jsx("button",{onClick:()=>r(t),className:`px-5 py-2 rounded-full font-bold transition-all ${l===t?"bg-red-600 text-white shadow-lg":"bg-gray-100 text-gray-500 hover:bg-gray-200"}`,children:t},t))]})]})}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6",children:i.length===0?e.jsx("div",{className:"text-center text-gray-400 py-20",children:"目前尚無文章,敬請期待。"}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:i.map(t=>e.jsx(x.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},children:e.jsxs(d,{to:`/article/${t.slug}`,className:"group block bg-white rounded-2xl border border-gray-100 shadow-sm hover:shadow-xl transition-all overflow-hidden h-full",children:[e.jsxs("div",{className:"relative aspect-[16/9] bg-gray-100 overflow-hidden",children:[t.cover?e.jsx("img",{src:t.cover,alt:t.title,loading:"lazy",className:"w-full h-full object-cover group-hover:scale-105 transition-transform"}):e.jsx("div",{className:"w-full h-full grid place-items-center text-gray-300",children:e.jsx(c,{size:40})}),t.members_only&&e.jsxs("span",{className:"absolute top-2 right-2 inline-flex items-center gap-1 bg-black/70 text-white text-[11px] font-bold px-2 py-1 rounded-full",children:[e.jsx(p,{size:11})," 會員限定"]})]}),e.jsxs("div",{className:"p-5",children:[t.category&&e.jsx("span",{className:"inline-block text-xs font-bold text-red-600 bg-red-50 px-2 py-0.5 rounded-full mb-2",children:t.category}),e.jsx("h2",{className:"text-lg font-bold text-gray-900 leading-snug line-clamp-2 group-hover:text-red-600 transition-colors",children:t.title}),t.excerpt&&e.jsx("p",{className:"text-sm text-gray-500 mt-2 line-clamp-2",children:t.excerpt}),e.jsxs("div",{className:"flex items-center justify-between mt-4 text-xs text-gray-400",children:[e.jsx("span",{className:"flex items-center gap-1",children:t.author_name&&e.jsxs(e.Fragment,{children:[e.jsx(g,{size:12})," ",t.author_name]})}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(h,{size:12})," ",b(t.published_at||t.created_at)]})]}),e.jsxs("div",{className:"mt-3 text-red-600 text-sm font-bold flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:["閱讀全文 ",e.jsx(u,{size:14})]})]})]})},t.id))})})]})};export{w 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.