PageSourceSearch

https://kairval.com/assets/blog-grid-with-pagination-07IldQeR.js

js kairval.com collected 2026-10-04 20:52:49 UTC 2,748 bytes, 1 lines download raw bytes

1import{en as e,tn as t}from"./lucide-vendor-CnY7teGy.js";import{t as n}from"./link-C9TJt848.js";import{t as r}from"./jsx-runtime-e9XBN6jy.js";import{r as i}from"./locale-nav-Cj3W-g0V.js";import{n as a}from"./_index-B9hJZliY.js";import{t as o}from"./blog-grid-CXOVODf5.js";var s=r();function c({categories:e,activeSlug:t}){let r=i();return(0,s.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,s.jsx)(n,{to:r(`/blog`),className:`rounded-full px-4 py-1.5 text-sm font-medium transition ${t?`border border-white/10 text-[var(--sea-ink-soft)] hover:border-amber-500/30 hover:text-amber-500`:`bg-amber-700 text-white`}`,children:a.blog_all()}),e.map(e=>(0,s.jsx)(n,{to:r(`/blog/category/$slug`),params:{slug:e.slug},className:`rounded-full px-4 py-1.5 text-sm font-medium transition ${t===e.slug?`bg-amber-700 text-white`:`border border-white/10 text-[var(--sea-ink-soft)] hover:border-amber-500/30 hover:text-amber-500`}`,children:e.name},e.slug))]})}function l({posts:n,currentPage:r,totalPages:i,routePrefix:a,authors:c,categories:l}){return(0,s.jsxs)(`div`,{children:[(0,s.jsx)(o,{posts:n,authors:c,categories:l}),i>1&&(0,s.jsxs)(`div`,{className:`mt-8 flex items-center justify-center gap-2`,children:[r>1?(0,s.jsx)(u,{to:r===2?`${a}`:`${a}/page/${r-1}`,label:`Previous`,children:(0,s.jsx)(t,{className:`h-4 w-4`})}):(0,s.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 text-[var(--sea-ink-soft)] opacity-50`,children:(0,s.jsx)(t,{className:`h-4 w-4`})}),d(r,i).map((e,t)=>{if(e===`...`)return(0,s.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center text-sm text-[var(--sea-ink-soft)]`,children:`...`},`ellipsis-${t>r?`right`:`left`}`);let n=e===r,i=e===1?`${a}`:`${a}/page/${e}`;return n?(0,s.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-lg bg-amber-500 text-sm font-medium text-white`,children:e},e):(0,s.jsx)(u,{to:i,label:`Page ${e}`,children:e},e)}),r<i?(0,s.jsx)(u,{to:`${a}/page/${r+1}`,label:`Next`,children:(0,s.jsx)(e,{className:`h-4 w-4`})}):(0,s.jsx)(`span`,{className:`flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 text-[var(--sea-ink-soft)] opacity-50`,children:(0,s.jsx)(e,{className:`h-4 w-4`})})]})]})}function u({to:e,label:t,children:r}){return(0,s.jsx)(n,{to:e,"aria-label":t,className:`flex h-9 w-9 items-center justify-center rounded-lg border border-white/10 text-sm text-[var(--sea-ink-soft)] transition hover:border-amber-500/30 hover:text-amber-500`,children:r})}function d(e,t){if(t<=7)return Array.from({length:t},(e,t)=>t+1);let n=[1];e>3&&n.push(`...`);let r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let e=r;e<=i;e++)n.push(e);return e<t-2&&n.push(`...`),n.push(t),n}export{c as n,l as t};

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.