PageSourceSearch

https://www.bytenote.net/assets/index-Cki2oWRj.js

js bytenote.net collected 2026-09-24 14:25:55 UTC 4,129 bytes, 1 lines download raw bytes

1import{b as x,j as e,a1 as u,ac as h,f as g,c as o}from"./main-DCN7hITS.js";import{L as d}from"./localized-link-BQCmaZ1G.js";import"./useLocale-DtRD0kY_.js";const f=[["path",{d:"M11 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5",key:"1jo35a"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m15 17 5 5",key:"36xl1x"}],["path",{d:"m20 17-5 5",key:"vdz27y"}]],p=x("file-x-corner",f);function j({post:s,categories:a=[]}){const n=new Date(s.date).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),t=s.categories.map(r=>a.find(i=>i.slug===r)?.name??r).filter(Boolean);return e.jsx(d,{to:`/blog/${s.slug}`,className:"block w-full max-w-sm",children:e.jsxs("article",{className:"group w-full transition-transform duration-200 hover:scale-[1.02]",children:[e.jsx("div",{className:"relative w-full aspect-square overflow-hidden rounded-lg bg-muted border",children:s.image?e.jsx(u,{alt:s.title,layout:"fullWidth",className:"object-cover transition-transform duration-300 group-hover:scale-105",src:s.image}):e.jsx("div",{className:"w-full h-full bg-muted"})}),e.jsxs("div",{className:"mt-4",children:[e.jsx("div",{className:"text-sm text-muted-foreground mb-2",children:n}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2 transition-colors line-clamp-2 group-hover:text-black/70 dark:group-hover:text-white/70",children:s.title}),e.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((r,i)=>e.jsx("span",{className:"border border-border px-2 py-1 rounded-full text-xs whitespace-nowrap text-muted-foreground",children:r},i))})]})]})})}function b({posts:s,categories:a=[]}){return s?.length?e.jsx("div",{className:"mx-auto w-full max-w-7xl px-8",children:e.jsx("div",{className:"grid gap-8 grid-cols-1 sm:grid-cols-2 md:grid-cols-3",children:s.map((n,t)=>{const r=n.slug||`post-${t}`;return e.jsx(j,{post:n,categories:a},r)})})}):null}function N({title:s="No posts yet",description:a="Check back soon for new content!"}){return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-4",children:[e.jsx(p,{className:"size-16 text-muted-foreground/50 mb-4"}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:s}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-md",children:a})]})}function y(){const{posts:s,categories:a,paidColumns:n}=h.useLoaderData(),{cat:t}=g({from:"/{-$locale}/_main/_landing/blog/"}),r=[{id:"all",name:"All",slug:"",description:""},...a],i=t?s.filter(l=>l.categories.includes(t)):s;return e.jsxs("main",{tabIndex:-1,className:"relative z-1 outline-none mb-10",children:[e.jsxs("div",{className:o("mx-auto w-full max-w-7xl","px-6 lg:px-8","pt-6 md:pt-10"),children:[e.jsx("h2",{className:o("text-4xl leading-tight font-semibold","sm:text-5xl sm:leading-tight"),children:"Articles"}),e.jsx("nav",{className:"mt-6",children:e.jsx("ul",{className:"flex items-center gap-6 flex-wrap",children:r.map(l=>{const c=(t||"")===l.slug||l.id==="all"&&!t,m=l.slug?`/blog?cat=${l.slug}`:"/blog";return e.jsx("li",{className:"text-lg",children:e.jsx(d,{to:m,"aria-current":c?"page":void 0,className:o(c?"text-foreground":o("text-muted-foreground hover:text-foreground")),children:l.name})},l.id)})})})]}),e.jsx("div",{className:o("mt-12","px-6 lg:px-8"),children:e.jsx("div",{className:"mx-auto w-full max-w-7xl",children:e.jsxs("div",{className:"flex gap-8",children:[e.jsx("div",{className:"flex-1",children:i.length===0?e.jsx(N,{}):e.jsx(b,{posts:i,categories:a})}),n.length>0&&e.jsx("aside",{className:"hidden lg:block w-72 shrink-0",children:e.jsxs("div",{className:"sticky top-24",children:[e.jsx("h3",{className:"text-lg font-semibold mb-4",children:"付费专栏"}),e.jsx("div",{className:"space-y-3",children:n.map(l=>e.jsx("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:o("block p-4 rounded-lg border","bg-card hover:bg-accent","border-border hover:border-primary/50","transition-colors"),children:e.jsx("h4",{className:"text-sm font-medium line-clamp-2",children:l.title})},l.id))})]})})]})})})]})}export{y 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.