1import{j as e,H as h,a as i,L as g}from"./app-CYSmw7El.js";import{B as l}from"./badge-DfpGe2rq.js";import{B as n}from"./button-FzTyeHFe.js";import{C as c,c as m}from"./card-D_mDviJW.js";import{G as j}from"./guest-layout-CAXsVeew.js";import{A as f}from"./arrow-left-CgKOWVVi.js";import{c as u}from"./createLucideIcon-GcmTFK3i.js";import{U as p}from"./user-M3Yd_z-3.js";import{C as N}from"./calendar-BqEjaBlt.js";import{C as v}from"./clock-zkyWHu8o.js";import{E as y}from"./eye-DOdwPGON.js";import{B as b}from"./book-open-OH84wI20.js";import"./app-aE9fqYdc.js";import"./index-_gUdCq9-.js";import"./utils-DPt_95Lf.js";import"./Header-DGEYO13M.js";import"./youtube-_-ze53-c.js";import"./map-pin-D2C6U2n1.js";import"./mail-V5VFF_SG.js";import"./index-CD-L0Wmx.js";import"./index-DJ9HdgDw.js";import"./index-C-G4_-4R.js";import"./proxy-Br0g7eV1.js";import"./chevron-down-BsQJQ-iJ.js";import"./ScrollToTop-DOaBQ8Zx.js";import"./use-transform-BDTxqG7b.js";/** 2 * @license lucide-react v0.475.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const w=[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]],k=u("BookMarked",w);function X({posts:t,series:r}){const o=a=>a?a.fileUrl.startsWith("http")?a.fileUrl:`/storage/${a.fileUrl}`:"/placeholder-article.jpg",d=a=>new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return e.jsxs(j,{textDark:!1,children:[e.jsx(h,{title:`${r.name} Series - Njabala Foundation Blog`}),e.jsxs("div",{className:"container mx-auto px-4 py-12",children:[e.jsx("div",{className:"mb-8",children:e.jsxs(n,{variant:"ghost",onClick:()=>i.visit(route("blog.index")),className:"flex items-center gap-2",children:[e.jsx(f,{className:"h-4 w-4"}),"Back to Blog"]})}),e.jsxs("div",{className:"mb-12 text-center",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-center gap-2",children:[e.jsx(k,{className:"h-6 w-6 text-purple-600"}),e.jsx("h1",{className:"text-4xl font-bold tracking-tight text-gray-900",children:r.name})]}),r.description&&e.jsx("p",{className:"mx-auto max-w-2xl text-lg text-gray-600",children:r.description}),e.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[t.total," ",t.total===1?"article":"articles"," in this series"]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-3",children:t.data.map(a=>{var s;return e.jsxs(c,{className:"group overflow-hidden transition-shadow hover:shadow-lg",children:[e.jsx("div",{className:"aspect-video overflow-hidden",children:e.jsx("img",{src:o(a.featureImage),alt:((s=a.featureImage)==null?void 0:s.altText)||a.title,className:"h-full w-full object-cover transition-transform group-hover:scale-105"})}),e.jsxs(m,{className:"p-6",children:[e.jsxs("div",{className:"mb-3 flex items-center gap-2",children:[e.jsx(l,{variant:"outline",className:"bg-purple-100 text-purple-800",children:r.name}),a.pinned&&e.jsx(l,{variant:"secondary",className:"bg-yellow-100 text-yellow-800",children:"Pinned"}),a.featured&&e.jsx(l,{variant:"secondary",className:"bg-blue-100 text-blue-800",children:"Featured"}),a.category&&e.jsx(l,{variant:"outline",children:a.category.name})]}),e.jsx("h3",{className:"mb-2 text-xl leading-tight font-semibold",children:e.jsx(g,{href:route("blog.show",a.slug),className:"text-gray-900 hover:text-blue-600",children:a.title})})," // Accept htmls in excerpt",a.excerpt&&e.jsx("p",{className:"mb-4 line-clamp-3 text-gray-600",dangerouslySetInnerHTML:{__html:a.excerpt}}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[a.authors&&a.authors.length>0&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{className:"h-4 w-4"}),e.jsx("span",{children:a.authors.map(x=>x.fullName).join(", ")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{children:d(a.publishedAt)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(v,{className:"h-4 w-4"}),e.jsx("span",{children:a.readingTime})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"h-4 w-4"}),e.jsx("span",{children:a.viewCount})]})]})]})]},a.id)})}),t.last_page>1&&e.jsx("div",{className:"mt-12 flex justify-center",children:e.jsx("div",{className:"flex gap-2",children:Array.from({length:t.last_page},(a,s)=>s+1).map(a=>e.jsx(n,{variant:a===t.current_page?"default":"outline",onClick:()=>{i.get(route("blog.series",r.slug),{page:a},{preserveState:!0})},children:a},a))})}),t.data.length===0&&e.jsx(c,{children:e.jsxs(m,{className:"flex flex-col items-center justify-center py-12",children:[e.jsx(b,{className:"mb-4 h-12 w-12 text-gray-400"}),e.jsx("h3",{className:"mb-2 text-lg font-semibold",children:"No articles found"}),e.jsxs("p",{className:"text-center text-gray-500",children:['No articles found in the "',r.name,'" series']})]})})]})]})}export{X 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.