PageSourceSearch

https://repsshield.com/assets/BlogCategoryPage-4WGb97PI.js

js repsshield.com collected 2026-10-02 02:01:10 UTC 5,975 bytes, 1 lines download raw bytes

1import{j as e,P as C,ag as S,e as o,ad as P,N as B,B as u,ae as A,C as p,af as t,d as j,i as L,A as k}from"./index-DGo-vssZ.js";import{b as E,r as R,u as $,L as c}from"./vendor-Qgthw7N1.js";import{u as I}from"./useSEOMetaTags-DuPP1K7p.js";import{u as T,a as F}from"./useBlogPosts-DsWQ2kvn.js";import{B as M}from"./BlogSidebar-CxShR7dj.js";import{C as U}from"./calendar-days-COgXMVIl.js";import"./api-DBoyQ-on.js";const d=6;function O(s){return new Date(s).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})}function _({post:s}){var i;return e.jsx(c,{href:`/blog/${s.slug}`,children:e.jsxs(p,{className:"overflow-hidden cursor-pointer transition-colors hover:border-primary/30 group h-full",children:[s.featuredImageUrl&&e.jsx("div",{className:"aspect-[16/9] overflow-hidden bg-gray-100",children:e.jsx("img",{src:s.featuredImageUrl,alt:s.title,className:"w-full h-full object-cover transition-transform duration-300 group-hover:scale-105",loading:"lazy"})}),e.jsxs(j,{className:"p-5",children:[e.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:s.category&&e.jsx(o,{variant:"secondary",className:"rounded-md",children:s.category.name})}),e.jsx("h3",{className:"text-lg font-semibold mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:s.title}),e.jsx("p",{className:"text-sm text-gray-600 mb-4 line-clamp-3",children:s.excerpt}),e.jsxs("div",{className:"flex items-center gap-3 text-xs text-gray-500 mt-auto",children:[s.author&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-5 h-5 rounded-full bg-gray-200 inline-flex items-center justify-center text-[10px] font-medium text-gray-600",children:((i=s.author.fullName)==null?void 0:i.charAt(0))||"A"}),s.author.fullName]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(U,{className:"w-3.5 h-3.5"}),O(s.publishedAt||s.createdAt)]}),s.readingTime&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(L,{className:"w-3.5 h-3.5"}),s.readingTime," min read"]})]}),e.jsx("div",{className:"mt-4 pt-3 border-t border-gray-100",children:e.jsxs("span",{className:"text-sm font-medium text-primary inline-flex items-center gap-1 group-hover:gap-2 transition-all",children:["Read more ",e.jsx(k,{className:"w-3.5 h-3.5"})]})})]})]})})}function q(){return e.jsxs(p,{className:"overflow-hidden",children:[e.jsx(t,{className:"aspect-[16/9] rounded-none"}),e.jsxs(j,{className:"p-5 space-y-3",children:[e.jsx(t,{className:"h-5 w-20 rounded-md"}),e.jsx(t,{className:"h-6 w-full"}),e.jsx(t,{className:"h-6 w-3/4"}),e.jsx(t,{className:"h-4 w-full"}),e.jsx(t,{className:"h-4 w-5/6"}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx(t,{className:"h-4 w-24"}),e.jsx(t,{className:"h-4 w-20"})]})]})]})}function Q(){const{slug:s}=E(),[i,f]=R.useState(0),[,N]=$(),{data:n}=T(),a=n==null?void 0:n.find(r=>r.slug===s),{data:l,isLoading:y,isFetching:m}=F({category:s,limit:d,offset:i}),x=(l==null?void 0:l.posts)||l||[],v=(l==null?void 0:l.total)||(l==null?void 0:l.totalCount)||0,b=i+d<v;I(a?`${a.name} Articles — REPSShield Blog`:"Blog Category — REPSShield",(a==null?void 0:a.description)||`Browse all articles in the ${(a==null?void 0:a.name)||s} category on the REPSShield blog.`);const w=()=>{f(r=>r+d)};return e.jsx(C,{hideEmailIntake:!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[e.jsxs("div",{className:"mb-10",children:[e.jsxs(c,{href:"/blog",className:"text-sm text-gray-500 hover:text-primary inline-flex items-center gap-1 transition-colors mb-4",children:[e.jsx(S,{className:"w-4 h-4"}),"Back to all articles"]}),a&&e.jsx(o,{variant:"secondary",className:"rounded-md mb-3 text-sm px-3 py-1",children:a.name}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-gray-900",children:(a==null?void 0:a.name)||s}),(a==null?void 0:a.description)&&e.jsx("p",{className:"text-lg text-gray-600 mt-3 max-w-3xl",children:a.description})]}),e.jsxs("div",{className:"lg:hidden space-y-4 mb-8",children:[e.jsxs("form",{onSubmit:r=>{r.preventDefault();const g=(new FormData(r.currentTarget).get("cat-search")||"").trim();N(g?`/blog?search=${encodeURIComponent(g)}`:"/blog")},className:"relative",children:[e.jsx(P,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"}
1),e.jsx(B,{type:"text",name:"cat-search",placeholder:"Search articles...",className:"pl-9"})]}),n&&n.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(c,{href:"/blog",children:e.jsx(o,{variant:"outline",className:"rounded-md cursor-pointer text-sm px-4 py-1.5 hover:bg-gray-100",children:"All"})}),n.map(r=>e.jsx(c,{href:`/blog?category=${r.slug}`,children:e.jsx(o,{variant:s===r.slug?"default":"outline",className:`rounded-md cursor-pointer text-sm px-4 py-1.5 ${s===r.slug?"bg-primary hover:bg-primary/90":"hover:bg-gray-100"}`,children:r.name})},r.id))]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-10",children:[e.jsx("div",{className:"lg:col-span-2",children:y?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:Array.from({length:4}).map((r,h)=>e.jsx(q,{},h))}):x.length===0?e.jsxs("div",{className:"text-center py-20",children:[e.jsx("p",{className:"text-xl text-gray-500 mb-4",children:"No articles in this category yet. Check back soon."}),e.jsx(c,{href:"/blog",children:e.jsx(u,{variant:"outline",className:"rounded-md",children:"View all articles"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:x.map(r=>e.jsx(_,{post:r},r.id))}),b&&e.jsx("div",{className:"text-center mt-10",children:e.jsx(u,{variant:"outline",onClick:w,disabled:m,className:"rounded-md px-8",children:m?e.jsxs(e.Fragment,{children:[e.jsx(A,{className:"w-4 h-4 mr-2 animate-spin"}),"Loading..."]}):"Load More"})})]})}),e.jsx("div",{className:"lg:sticky lg:top-8 lg:self-start",children:e.jsx(M,{activeCategory:s})})]})]})})}export{Q 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.