PageSourceSearch

https://londonhealthcommission.org.uk/_next/static/chunks/pages/category/[...slug]-b63c70d2b84ba0eb.js

js londonhealthcommission.org.uk collected 2026-10-04 08:39:49 UTC 10,716 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9870],{44251:(e,a,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/category/[...slug]",function(){return n(90732)}])},53662:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(58309).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},87847:(e,a,n)=>{"use strict";n.d(a,{A:()=>t});let t=(0,n(58309).A)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]])},90732:(e,a,n)=>{"use strict";n.r(a),n.d(a,{__N_SSP:()=>S,default:()=>T});var t=n(9329),s=n(6029),r=n(55729),l=n(81278);n(77118);var c=n(37197),o=n(85645),i=n(35987),d=n(56465),u=n(8588),m=n.n(u),g=n(53745),x=n(36980),h=n(86370),p=n(51383),f=n(87847),j=n(58472),N=n(55259),v=n(32769),b=n(28345),y=n(53662),P=n(95672),w=n(77698),A=n(6744),k=n(30490);function I(){let e=(0,t._)(["\n  query GetCategoryWithPosts($slug: ID!, $first: Int!, $after: String) {\n    category(id: $slug, idType: SLUG) {\n      id\n      databaseId\n      name\n      slug\n      description\n      count\n      uri\n      language {\n        code\n      }\n      translations {\n        databaseId\n        name\n        slug\n        uri\n        language {\n          code\n        }\n      }\n      parent {\n        node {\n          id\n          name\n          slug\n          uri\n          language {\n            code\n          }\n          translations {\n            databaseId\n            name\n            slug\n            uri\n            language {\n              code\n            }\n          }\n        }\n      }\n      children(first: 20) {\n        nodes {\n          id\n          name\n          slug\n          count\n          language {\n            code\n          }\n        }\n      }\n      posts(first: $first, after: $after) {\n        pageInfo {\n          hasNextPage\n          hasPreviousPage\n          startCursor\n          endCursor\n        }\n        nodes {\n          id\n          databaseId\n          title\n          uri\n          date\n          excerpt\n          language {\n            code\n          }\n          featuredImage {\n            node {\n              sourceUrl\n              altText\n            }\n          }\n          author {\n            node {\n              name\n              avatar {\n                url\n              }\n            }\n          }\n        }\n      }\n    }\n  }\n"]);return I=function(){return e},e}n(33601);let _={en:"en-US",de:"de-DE",fr:"fr-FR",es:"es-ES",ja:"ja-JP","pt-pt":"pt-PT"};function T(e){var a,n,t,c,u;let{category:I,posts:T=[],parentCategory:S=null,childCategories:U=[],pagination:$={currentPage:1,totalPages:1,hasNextPage:!1,hasPreviousPage:!1},__LANGUAGE__:C}=e,E=(0,l.useRouter)(),F=(null==(a=i.A.siteInfo)?void 0:a.name)||"Site",z=(null==(n=i.A.siteInfo)?void 0:n.siteUrl)||"",{t:B}=(0,k.Bd)(),D=(null==C?void 0:C.code)||(0,w.vM)(E.asPath).language;if(!I)return(0,s.jsxs)("div",{className:"container mx-auto px-4 py-16 text-center",children:[(0,s.jsx)("div",{className:"w-16 h-16 rounded-full bg-muted flex items-center justify-center mx-auto mb-4",children:(0,s.jsx)(f.A,{className:"h-8 w-8 text-muted-foreground"})}),(0,s.jsx)("h1",{className:"text-2xl font-bold mb-4",children:B("categoryNotFound")||"Category Not Found"}),(0,s.jsx)("p",{className:"text-muted-foreground mb-6",children:B("categoryNotFoundDescription")||"The category you're looking for doesn't exist."}),(0,s.jsx)(d.A,{href:"/",children:(0,s.jsxs)(p.$,{children:[(0,s.jsx)(j.A,{className:"h-4 w-4 mr-2"}),B("backToHome")||"Back to Home"]})})]});let q=(e,a)=>{if(!e)return"";let n=(0,P.jT)(e.replace(/<[^>]*>/g,""));return n.length<=a?n:n.slice(0,a).trim()+"..."},M=[{label:B("home")||"Home",href:"/"},{label:B("articles")||"Articles",href:"/articles"}];S&&M.push({label:S.name,href:"/category/".concat(S.slug)}),M.push({label:I.name});let O=T.map((e,a)=>{var n,t;return{name:(0,P.jT)(e.title),url:"".concat(z).concat(e.uri),position:a+1,image:null==(t=e.featuredImage)||null==(n=t.node)?void 0:n.sourceUrl,description:q(e.excerpt,120)}});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(o.Ay,{seo:{title:$.currentPage>1?"".concat(I.name," - Page ").concat($.currentPage," | ").concat(F):"".concat(I.name," | ").concat(F),description:I.description||"Browse ".concat(I.count||T.length," articles in the ").concat(I.name," category.")},pageType:"collection",breadcrumbs:M,listItems:O,totalItems:I.count||T.length,customImage:null==(u=T[0])||null==(c=u.featuredImage)||null==(t=c.node)?void 0:t.sourceUrl,translations:I.translations||[],pagination:{currentPage:$.currentPage,totalPages:$.totalPages,basePath:"/category/".concat(S?"".concat(S.slug,"/"):"").concat(I.slug)}}),(0,s.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,s.jsx)("header",{className:"bg-gradient-to-br from-primary/5 via-background to-background border-b",children:(0,s.jsxs)("div",{className:"container mx-auto px-4 py-12 md:py-16",children:[(0,s.jsx)("nav",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-4 flex-wrap",children:M.map((e,a)=>(0,s.jsxs)(r.Fragment,{children:[a>0&&(0,s.jsx)(N.A,{className:"h-4 w-4 flex-shrink-0"}),e.href?(0,s.jsx)(d.A,{href:e.href,className:"hover:text-primary transition-colors",children:e.label}):(0,s.jsx)("span",{className:"text-foreground font-medium",children:e.label})]},a))}),(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"p-3 rounded-xl bg-primary/10",children:(0,s.jsx)(f.A,{className:"h-6 w-6 text-primary"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-3xl md:text-4xl font-bold tracking-tight",children:I.name}),(0,s.jsxs)("p",{className:"text-muted-foreground",children:[T.length," ",1===T.length?"article":"articles"]})]})]}),I.description&&(0,s.jsx)("p",{className:"text-lg text-muted-foreground max-w-2xl",children:I.description})]})}),(0,s.jsx)("div",{className:"container mx-auto px-4 py-12",children:(0,s.jsxs)("div",{className:"flex flex-col lg:flex-row gap-8",children:[(0,s.jsxs)("main",{className:"flex-1 min-w-0",children:[U.length>0&&(0,s.jsxs)("section",{className:"mb-8",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:B("subcategories")||"Subcategories"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:U.map(e=>(0,s.jsx)(d.A,{href:"/category/".concat(I.slug,"/").concat(e.slug),children:(0,s.jsxs)(x.E,{variant:"secondary",className:"hover:bg-primary hover:text-primary-foreground transition-colors",children:[e.name,e.count>0&&(0,s.jsxs)("span",{className:"ml-1 text-xs opacity-70",children:["(",e.count,")"]})]})},e.id))})]}),T.length>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"grid sm:grid-cols-2 gap-6",children:T.map(e=>{var a,n,t,r,l;return(0,s.jsx)(d.A,{href:e.uri,className:"group block h-full",children:(0,s.jsxs)(g.Zp,{className:"h-full hover:shadow-lg transition-shadow",children:[(0,s.jsx)("div",{className:"relative aspect-[16/9]",children:(null==(n=e.featuredImage)||null==(a=n.node)?void 0:a.sourceUrl)?(0,s.jsx)(m(),{src:e.featuredImage.node.sourceUrl,alt:e.featuredImage.node.altText||e.title,fill:!0,className:"object-cover group-hover:scale-105 transition-transform duration-300",sizes:"(max-width: 640px) 100v
1w, (max-width: 1024px) 50vw, 33vw",loading:"lazy"}):(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-muted to-muted/50 flex items-center justify-center",children:(0,s.jsx)(v.A,{className:"h-10 w-10 text-muted-foreground/40"})})}),(0,s.jsxs)(g.Wu,{className:"p-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-2",children:[(0,s.jsx)(b.A,{className:"h-3 w-3"}),(0,s.jsx)("time",{dateTime:new Date(e.date).toISOString(),children:(e=>{let a=_[D]||"en-US";return new Date(e).toLocaleDateString(a,{month:"long",day:"numeric",year:"numeric"})})(e.date)})]}),(0,s.jsx)("h3",{className:"font-semibold text-lg mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:(0,P.jT)(e.title)}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground line-clamp-2",children:q(e.excerpt,100)}),(null==(t=e.author)?void 0:t.node)&&(0,s.jsxs)("div",{className:"mt-4 pt-4 border-t flex items-center gap-2",children:[(0,s.jsxs)(h.eu,{className:"h-6 w-6",children:[(0,s.jsx)(h.BK,{src:null==(r=e.author.node.avatar)?void 0:r.url,alt:e.author.node.name}),(0,s.jsx)(h.q5,{className:"text-xs",children:(l=e.author.node.name)?l.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"A"})]}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:e.author.node.name})]})]})]})},e.id)})}),$.totalPages>1&&(0,s.jsxs)("nav",{className:"flex items-center justify-center gap-2 mt-12","aria-label":"Pagination",children:[(0,s.jsx)(d.A,{href:2===$.currentPage?"/category/".concat(S?"".concat(S.slug,"/"):"").concat(I.slug):"/category/".concat(S?"".concat(S.slug,"/"):"").concat(I.slug,"?page=").concat($.currentPage-1),className:$.hasPreviousPage?"":"pointer-events-none opacity-50",children:(0,s.jsxs)(p.$,{variant:"outline",size:"sm",disabled:!$.hasPreviousPage,children:[(0,s.jsx)(y.A,{className:"h-4 w-4 mr-1"}),B("previous")||"Previous"]})}),(0,s.jsx)("span",{className:"text-sm text-muted-foreground px-4",children:B("pageOf",{current:$.currentPage,total:$.totalPages})||"Page ".concat($.currentPage," of ").concat($.totalPages)}),(0,s.jsx)(d.A,{href:"/category/".concat(S?"".concat(S.slug,"/"):"").concat(I.slug,"?page=").concat($.currentPage+1),className:$.hasNextPage?"":"pointer-events-none opacity-50",children:(0,s.jsxs)(p.$,{variant:"outline",size:"sm",disabled:!$.hasNextPage,children:[B("next")||"Next",(0,s.jsx)(N.A,{className:"h-4 w-4 ml-1"})]})})]})]}):(0,s.jsxs)("div",{className:"text-center py-16 bg-muted/30 rounded-lg",children:[(0,s.jsx)(f.A,{className:"h-16 w-16 text-muted-foreground/40 mx-auto mb-4"}),(0,s.jsx)("h2",{className:"text-xl font-semibold mb-2",children:B("noArticlesYet")||"No Articles Yet"}),(0,s.jsx)("p",{className:"text-muted-foreground mb-6",children:B("checkBackSoon")||"There are no articles in this category yet. Check back soon!"}),(0,s.jsx)(d.A,{href:"/articles",children:(0,s.jsxs)(p.$,{variant:"outline",children:[(0,s.jsx)(j.A,{className:"h-4 w-4 mr-2"}),B("browseAllArticles")||"Browse All Articles"]})})]})]}),(0,s.jsx)("aside",{className:"lg:w-80",children:(0,s.jsx)(A.A,{language:D})})]})})]})]})}(0,c.J1)(I());var S=!0}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=44251)),_N_E=e.O()}]);

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.