PageSourceSearch

https://bci-edu-6qu8apwz.manus.space/assets/News-CkCL4EQc.js

js bci-edu-6qu8apwz.manus.space collected 2026-10-03 05:00:23 UTC 4,995 bytes, 1 lines download raw bytes

1import{j as e}from"./trpc-vendor-Bv0iaNDN.js";import{t as d,u as x,P as g,a as p,N as o,f as m}from"./index-Bp5xQ-En.js";import{L as r}from"./react-vendor-CGOjsTCb.js";import{T as h}from"./tag-DvlTJ8F7.js";import"./radix-vendor-BsQgJgbQ.js";import"./charts-DUKIMxkY.js";const N={event:{en:"Event",zh:"活动",color:"bg-bci/10 text-bci"},"education-tips":{en:"Education Tips",zh:"教育资讯",color:"bg-amber-100 text-amber-700"},news:{en:"News",zh:"新闻",color:"bg-blue-100 text-blue-700"},announcement:{en:"Announcement",zh:"公告",color:"bg-green-100 text-green-700"},"student-life":{en:"Student Life",zh:"学生生活",color:"bg-purple-100 text-purple-700"}};function u({category:t,lang:l}){if(!t)return null;const c=N[t]||{en:t,zh:t,color:"bg-gray-100 text-gray-600"};return e.jsxs("span",{"data-loc":"client/src/pages/News.tsx:19",className:`inline-flex items-center gap-1 text-xs font-medium px-2 py-0.5 rounded-full ${c.color}`,children:[e.jsx(h,{"data-loc":"client/src/pages/News.tsx:20",size:10}),l==="zh"?c.zh:c.en]})}function y(){const{data:t,isLoading:l}=d.news.getPublished.useQuery({limit:20,offset:0}),{lang:c}=x(),a=c==="zh"?"zh":"en",n=a==="zh"?"新闻与活动":"News & Events",i=a==="zh"?"了解 BCI 的最新动态、校园活动和重要公告。":"Stay up to date with the latest news, events, and announcements from BCI.";return e.jsxs(g,{"data-loc":"client/src/pages/News.tsx:37",title:n,description:i,children:[e.jsx(p,{"data-loc":"client/src/pages/News.tsx:38",bgImage:"https://d2xsxph8kpxj0f.cloudfront.net/310519663100404513/6qu8APwzDMJVA8QczS6noZ/news-mbs_9af5b876.jpg",title:n,subtitle:i,breadcrumb:n}),e.jsx("section",{"data-loc":"client/src/pages/News.tsx:45",className:"py-20 bg-white",children:e.jsx("div",{"data-loc":"client/src/pages/News.tsx:46",className:"container",children:l?e.jsx("div",{"data-loc":"client/src/pages/News.tsx:48",className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3,4,5,6].map(s=>e.jsx("div",{"data-loc":"client/src/pages/News.tsx:50",className:"bg-gray-100 rounded-xl h-72 animate-pulse"},s))}):t&&t.length>0?e.jsx("div",{"data-loc":"client/src/pages/News.tsx:54",className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:t.map(s=>e.jsxs("article",{"data-loc":"client/src/pages/News.tsx:56",className:"bg-white rounded-xl overflow-hidden shadow-sm border border-gray-100 hover:shadow-md hover:border-bci/30 transition-all duration-300 flex flex-col card-interactive",children:[e.jsx(r,{"data-loc":"client/src/pages/News.tsx:57",href:`/news/${s.slug}`,className:"block",children:s.coverImage?e.jsx("div",{"data-loc":"client/src/pages/News.tsx:59",className:"aspect-video overflow-hidden img-zoom",children:e.jsx("img",{"data-loc":"client/src/pages/News.tsx:60",src:s.coverImage,alt:s.title,loading:"lazy",className:"w-full h-full object-cover"})}):e.jsx("div",{"data-loc":"client/src/pages/News.tsx:68",className:"aspect-video bg-gray-100 flex items-center justify-center",children:e.jsx(o,{"data-loc":"client/src/pages/News.tsx:69",size:32,className:"text-gray-300"})})}),e.jsxs("div",{"data-loc":"client/src/pages/News.tsx:73",className:"p-5 flex flex-col flex-1",children:[e.jsxs("div",{"data-loc":"client/src/pages/News.tsx:74",className:"flex items-center justify-between gap-2 mb-3",children:[e.jsx(u,{"data-loc":"client/src/pages/News.tsx:75",category:s.category??"event",lang:a}),e.jsxs("div",{"data-loc":"client/src/pages/News.tsx:76",className:"flex items-center gap-1.5 text-xs text-gray-400",children:[e.jsx(m,{"data-loc":"client/src/pages/News.tsx:77",size:11}),s.publishedAt?new Date(s.publishedAt).toLocaleDateString(a==="zh"?"zh-SG":"en-SG",{day:"numeric",month:"long",year:"numeric"}):""]})]}),e.jsx("h2",{"data-loc":"client/src/pages/News.tsx:86",className:"font-serif text-base font-semibold text-gray-900 mb-2 line-clamp-2 hover:text-bci transition-colors flex-1",children:e.jsx(r,{"data-loc":"client/src/pages/News.tsx:87",href:`/news/${s.slug}`,children:s.title})}),s.excerpt&&e.jsx("p",{"data-loc":"client/src/pages/News.tsx:90",className:"text-sm text-gray-500 line-clamp-2 mb-3",children:s.excerpt}
1),e.jsxs(r,{"data-loc":"client/src/pages/News.tsx:92",href:`/news/${s.slug}`,className:"text-sm text-bci font-medium mt-auto inline-flex items-center gap-1 hover:gap-2 transition-all",children:[a==="zh"?"阅读全文":"Read More"," →"]})]})]},s.id))}):e.jsxs("div",{"data-loc":"client/src/pages/News.tsx:103",className:"text-center py-20",children:[e.jsx(o,{"data-loc":"client/src/pages/News.tsx:104",size:48,className:"text-gray-300 mx-auto mb-4"}),e.jsx("h3",{"data-loc":"client/src/pages/News.tsx:105",className:"font-serif text-xl font-semibold text-gray-700 mb-2",children:a==="zh"?"暂无新闻":"No News Yet"}),e.jsx("p",{"data-loc":"client/src/pages/News.tsx:108",className:"text-gray-500 text-sm",children:a==="zh"?"新闻和公告将在此处显示,请稍后再来查看。":"News and announcements will appear here. Please check back soon."})]})})})]})}export{y 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.