PageSourceSearch

https://flandreauindianschool.lovable.app/assets/news.index-2lg6uhjK.js

js flandreauindianschool.lovable.app collected 2026-10-03 03:31:55 UTC 8,374 bytes, 1 lines download raw bytes

1import{r as e,t}from"./jsx-runtime-DGeXAQPT.js";import{t as n}from"./react-vt4WmSOl.js";import{t as r}from"./link-CANjTMmb.js";import{t as i}from"./useSuspenseQuery-B1reCCWl.js";import{t as a}from"./arrow-right-5NnnpcNp.js";import{t as o}from"./search-oCh2nbZJ.js";import{t as s}from"./tag-CElmmoff.js";import{B as c,n as l,o as u,r as d,u as f}from"./index-D-qjEhc4.js";var p=e(n()),m=t();function h(e){if(!e)return 1;let t=e.trim().split(/\s+/).length;return Math.max(1,Math.round(t/220))}function g(e){return new Date(e).toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}function _(){let{data:e}=i(f),[t,n]=(0,p.useState)(``),[_,v]=(0,p.useState)(`All`),y=(0,p.useMemo)(()=>{let t=new Set;return e.forEach(e=>e.category&&t.add(e.category)),[`All`,...Array.from(t).sort()]},[e]),b=(0,p.useMemo)(()=>{let n=t.trim().toLowerCase();return e.filter(e=>_===`All`||e.category===_?n?e.title.toLowerCase().includes(n)||(e.excerpt??``).toLowerCase().includes(n)||(e.body??``).toLowerCase().includes(n):!0:!1)},[e,t,_]),x=b[0],S=b.slice(1,3),C=b.slice(3);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(u,{eyebrow:`News`,title:`Stories from campus.`,intro:`Announcements, milestones, and updates from the FIS community — published by our communications team.`,crumbs:[{label:`Home`,to:`/`},{label:`News`}],image:l.alumni}),(0,m.jsx)(`section`,{className:`container-page pt-10`,children:(0,m.jsxs)(`div`,{className:`flex flex-col gap-4 md:flex-row md:items-center md:justify-between`,children:[(0,m.jsxs)(`div`,{className:`relative w-full md:max-w-sm`,children:[(0,m.jsx)(o,{className:`pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground`}),(0,m.jsx)(`input`,{type:`search`,value:t,onChange:e=>n(e.target.value),placeholder:`Search news…`,className:`w-full rounded-full border border-border bg-white py-2.5 pl-10 pr-4 text-sm shadow-sm focus:border-[var(--maroon)] focus:outline-none focus:ring-2 focus:ring-[var(--maroon)]/15`})]}),(0,m.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,m.jsx)(s,{className:`h-4 w-4 text-muted-foreground`}),y.map(e=>(0,m.jsx)(`button`,{type:`button`,onClick:()=>v(e),className:`rounded-full border px-3 py-1 text-xs font-medium uppercase tracking-wider transition-colors ${e===_?`border-[var(--maroon)] bg-[var(--maroon)] text-white`:`border-border bg-white text-foreground hover:border-[var(--maroon)]/40 hover:text-[var(--maroon)]`}`,children:e},e))]})]})}),b.length===0&&(0,m.jsxs)(`section`,{className:`container-page py-24 text-center`,children:[(0,m.jsx)(`h2`,{className:`font-display text-2xl text-[var(--maroon-deep)]`,children:`No stories yet`}),(0,m.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:`Try a different search or category filter.`})]}),x&&(0,m.jsx)(`section`,{className:`container-page py-10`,children:(0,m.jsxs)(`div`,{className:`grid gap-6 lg:grid-cols-3`,children:[(0,m.jsx)(r,{to:`/news/$slug`,params:{slug:x.slug},className:`group lg:col-span-2 overflow-hidden rounded-2xl border bg-card shadow-sm transition-all hover:-translate-y-0.5 hover:shadow-[var(--shadow-card)]`,children:(0,m.jsxs)(`div`,{className:`relative aspect-[16/9] w-full overflow-hidden bg-[var(--cream)]`,children:[(0,m.jsx)(`img`,{src:d(x.category),alt:``,loading:`eager`,className:`h-full w-full object-cover transition-transform duration-500 group-hover:scale-105`}),(0,m.jsx)(`div`,{className:`absolute inset-0 bg-gradient-to-t from-black/60 via-black/10 to-transparent`}),(0,m.jsx)(`div`,{className:`absolute left-5 top-5 inline-flex items-center gap-2 rounded-full bg-[var(--gold)] px-3 py-1 text-[10px] font-semibold uppercase tracking-wider text-[var(--maroon-deep)]`,children:`Featured`}),(0,m.jsxs)(`div`,{className:`absolute inset-x-0 bottom-0 p-6 text-white`,children:[(0,m.jsx)(`div`,{className:`mb-2 text-[10px] font-semibold uppercase tracking-wider text-[var(--gold-soft)]`,children:x.category}),(0,m.jsx)(`h2`,{className:`font-display text-2xl leading-tight md:text-3xl`,children:x.title}),x.excerpt&&(0,m.jsx)(`p`,{className:`mt-2 max-w-2xl text-sm text-white/85 line-clamp-2`,children:x.excerpt}),(0,m.jsxs)(`div`,{className:`mt-3 flex items-center gap-4 text-xs text-white/80`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(c,{className:`h-3.5 w-3.5`}),g(x.published_at)]}),(0,m.jsxs)(`span`,{children:[h(x.body),` min read`]}),(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1 font-semibold text-[var(--gold-soft)] group-hover:gap-2 transition-all`,children:[`Read story `,(0,m.jsx)(a,{className:`h-3.5 w-3.5`})]})]})]})]})}),(0,m.jsx)(`div`,{className:`grid gap-6`,children:S.map(e=>(0,m.jsxs)(r,{to:`/news/$slug`,params:{slug:e.slug},className:`group grid grid-cols-[120px_1fr] gap-4 overflow-hidden rounded-2xl border bg-card p-3 transition-all hover:-translate-y-0.5 hover:shadow-[var(--shadow-card)] sm:grid-cols-[160px_1fr] lg:grid-cols-1 lg:p-0`,children:[(0,m.jsx)(`div`,{className:`aspect-square h-full w-full overflow-hidden rounded-xl bg-[var(--cream)] lg:aspect-[16/10] lg:rounded-none`,children:(0,m.jsx)(`img`,{src:d(e.category),alt:``,loading:`lazy`,className:`h-full w-full object-cover transition-transform duration-500 group-hover:scale-105`})}),(0,m.jsxs)(`div`,{className:`min-w-0 lg:p-5`,children:[(0,m.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-[var(--gold)]`,children:e.category}),(0,m.jsx)(`h3`,{className:`mt-1 font-display text-lg leading-snug group-hover:text-[var(--maroon)] transition-colors`,children:e.title}),(0,m.jsxs)(`div`,{className:`mt-2 text-xs text-muted-foreground`,children:[g(e.published_at),` · `,h(e.body),` min read`]})]})]},e.id))})]})}),C.length>0&&(0,m.jsxs)(`section`,{className:`container-page pb-16`,children:[(0,m.jsxs)(`div`,{className:`mb-6 flex items-end justify-between`,children:[(0,m.jsx)(`h2`,{className:`font-display text-2xl text-[var(--maroon-deep)]`,children:`More stories`}),(0,m.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[b.length,` `,b.length===1?`story`:`stories`]})]}),(0,m.jsx)(`div`,{className:`grid gap-6 md:grid-cols-2 lg:grid-cols-3`,children:C.map(e=>(0,m.jsxs)(r,{to:`/news/$slug`,params:{slug:e.slug},className:`group flex flex-col overflow-hidden rounded-2xl border bg-card transition-all hover:-translate-y-0.5 hover:shadow-[var(--shadow-card)]`,children:[(0,m.jsx)(`div`,{className:`aspect-[16/10] w-full overflow-hidden bg-[var(--cream)]`,children:(0,m.jsx)(`img`,{src:d(e.category),alt:``,loading:`lazy`,className:`h-full w-full object-cover transition-transform duration-500 group-hover:scale-105`})}),(0,m.jsxs)(`div`,{className:`flex flex-1 flex-col p-6`,children:[(0,m.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-wider text-[var(--gold)]`,children:e.category}),(0,m.jsx)(`h3`,{className:`mt-1 font-display text-xl leading-snug group-hover:text-[var(--maroon)] transition-colors`,children:e.title}),e.excerpt&&(0,m.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground line-clamp-3`,children:e.excerpt}),(0,m.jsxs)(`div`,{className:`mt-4 flex items-center justify-between text-xs text-muted-foreground`,children:[(0,m.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,m.jsx)(c,{className:`h-3.5 w-3.5`}),g(e.published_at)]}),(0,m.jsxs)(`span`,{children:[h(e.body),` min read`]})]})]})]},e.id))})]}),(0,m.jsx)(`section`,{className:`bg-[var(--maroon-deep)] text-white`,children:(0,m.jsxs)(`div`,{className:`container-page py-14 grid gap-6 md:grid-cols-[1fr_auto] md:items-center`,children:[(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.2em] text-[var(--gold-soft)]`,children:`Submit a story`}),(0,m.jsx)(`h2`,{className:`mt-2 font-display text-2xl md:text-3xl`,children:`Have news to share with the FIS community?`}),(0,m.jsx)(`p`,{className:`mt-2 max-w-2xl text-sm text-white/80`,children:`Tip our communications team about student achievements, alumni updates, athletic highlights, or campus events. We review every submission.`})]}),(0,m.jsx)(`a`,{href:`/contact`,className:`inline-flex items-center justify-center rounded-md bg-[var(--gold)] px-5 py-3 text-sm font-semibold text-[var(--maroon-deep)] shadow hover:bg-[var(--gold-soft)] transition-colors`,children:`Contact the team`})]})})]})}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.