PageSourceSearch

https://avaloniaui.net/assets/index-BrrgDV2Q.js

js avaloniaui.net collected 2026-09-24 17:14:28 UTC 8,067 bytes, 1 lines download raw bytes

1import{r as i,b as h,L as f,w as v,g as y}from"./chunk-LFPYN7LY-BFxOW0GP.js";import{j as t}from"./jsx-runtime-u17CrQMm.js";import{d as b,c as j}from"./analytics-C7906a3W.js";import{B as N,e as S,m as w,M as B,r as k}from"./MarketingLayout-DDrv-W3y.js";import{b as C,c as T}from"./structured-data-BFMMei1x.js";import{M as z}from"./MeshGradientBlue-Ch5fmFGF.js";import{P as W}from"./PillToggle-BUYSIAdE.js";import{B as A}from"./BlogCard-DNbVng7P.js";const L=i.forwardRef(function({activeCategory:a,onCategoryChange:s},o){return t.jsxs("section",{ref:o,className:"relative z-10",children:[t.jsxs("div",{className:"relative md:min-h-[420px]",style:{overflow:"clip"},children:[t.jsx(z,{className:"absolute inset-0"}),t.jsx("div",{className:"absolute inset-x-0 bottom-0 z-[1] pointer-events-none",style:{height:"35%",background:"linear-gradient(to bottom, transparent, var(--color-neutral-20))"}}),t.jsx("div",{className:"relative z-10 mx-auto px-6 md:px-12 lg:px-20",style:{maxWidth:"1400px"},children:t.jsxs("div",{style:{paddingTop:"clamp(120px, 14vw, 200px)",paddingBottom:"clamp(24px, 8vw, 100px)"},children:[t.jsx("h1",{className:"text-snow",style:{fontSize:"clamp(36px, 5vw, 56px)",fontWeight:420,lineHeight:1.15,letterSpacing:"-1.12px"},children:t.jsx("span",{className:"hero-gradient-text",children:"The Avalonia Blog"})}),t.jsx("p",{className:"text-neutral-20",style:{fontSize:"18px",fontWeight:380,lineHeight:"28px",marginTop:"12px",textWrap:"balance"},children:"The latest updates on all Avalonia products and topics"})]})})]}),t.jsx("div",{style:{background:"var(--color-neutral-20)"},children:t.jsx("div",{className:"mx-auto px-6 md:px-12 lg:px-20",style:{maxWidth:"1400px"},children:t.jsx("div",{className:"hidden md:flex overflow-x-auto py-2",children:t.jsx(W,{options:["all",...N],value:a,onChange:c=>s(c),labels:{all:"All"},buttonClassName:"px-5"})})})})]})});function E(e){return new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function I({featuredPost:e}){const a=h(),s=S[e.category]??{bg:"#F1F1F1",text:"#333"};return t.jsx("section",{className:"relative z-10",style:{background:"var(--color-neutral-20)"},children:t.jsx("div",{className:"mx-auto px-6 md:px-12 lg:px-20 py-12 md:py-16",style:{maxWidth:"1400px"},children:t.jsxs(f,{to:`/blog/${e.slug}`,className:"group flex flex-col md:flex-row rounded-2xl overflow-hidden bg-snow transition-all duration-300 hover:shadow-float",style:{border:"1px solid var(--color-neutral-30)"},children:[t.jsx("div",{className:"md:w-1/2 relative overflow-hidden",style:{aspectRatio:"16 / 9"},children:t.jsx("img",{src:e.coverImage,alt:e.title,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-[1.03]",loading:"eager"})}),t.jsxs("div",{className:"md:w-1/2 flex flex-col justify-center",style:{padding:"clamp(24px, 4vw, 48px)"},children:[t.jsx("span",{style:{display:"inline-block",fontSize:"11px",fontWeight:600,letterSpacing:"var(--letter-spacing-label)",padding:"3px 10px",borderRadius:"4px",backgroundColor:s.bg,color:s.text,alignSelf:"flex-start"},children:e.category}),t.jsx("h2",{className:"text-obsidian group-hover:text-brand-40 transition-colors",style:{fontSize:"clamp(22px, 3vw, 32px)",fontWeight:420,lineHeight:1.25,letterSpacing:"-0.5px",marginTop:"16px"},children:e.title}),t.jsx("p",{className:"text-body-text",style:{fontSize:"16px",lineHeight:"26px",fontWeight:380,letterSpacing:"0.32px",marginTop:"12px",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden"},children:e.excerpt}),t.jsxs("div",{role:"link",tabIndex:0,className:"flex items-center gap-3 transition-opacity hover:opacity-70 cursor-pointer",style:{marginTop:"20px",textDecoration:"none"},onClick:o=>{o.stopPropagation(),o.preventDefault(),a(`/blog/authors/${e.author.id}`)},onKeyDown:o=>{o.key==="Enter"&&(o.stopPropagation(),o.preventDefault(),a(`/blog/authors/${e.author.id}`))},children:[t.jsx("img",{src:e.author.avatar,alt:e.author.name,className:"rounded-full object-cover",style:{width:"36px",height:"36px"}}),t.jsxs("div",{children:[t.jsx("p",{style:{fontSize:"14px",fontWeight:500,color:"var(--color-obsidian)"},children:e.author.name}),t.jsx("p",{style:{fontSize:"13px",fontWeight:380,color:"var(--color-muted)"},children:E(e.publishedAt)})]})]}),t.jsx("div",{style:{marginTop:"24px"},children:t.jsxs("span",{className:"text-obsidian",style:{fontSize:"15px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"6px"},children:["Read article",t.jsx("span",{className:"transition-transform duration-200 group-hover:translate-x-1",style:{display:"inline-block"},children:"→"})]})})]})]})})})}function R({posts:e}){return t.jsx("section",{className:"relative z-10",style:{background:"var(--color-neutral-20)"},children:t.jsx("div",{className:"mx-auto px-6 md:px-12 lg:px-20 pb-16 md:pb-24",style:{maxWidth:"1400px"},children:e.length>0?t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-6 gap-y-10",children:e.map(a=>t.jsx(A,{post:a},a.id))}):t.jsx("p",{className:"text-muted py-16 text-center",style:{fontSize:"16px",fontWeight:380},children:"No posts in this category yet."})})})}const m="https://cms.avaloniaui.net",u="3L1rTEOQepw5nDJt9l6fJ0plGDl3k4VV";function D(e){return{id:String(e.id),slug:e.slug,title:e.title,excerpt:e.description,content:e.content,category:w(e.category),coverImage:e.image?`${m}/assets/${e.image}?width=800&quality=92&format=webp`:"",coverImageSocial:b(e.image),author:{id:String(e.author.id),name:e.author.name,avatar:e.author.avatar?`${m}/assets/${e.author.avatar}?width=80&quality=92&format=webp`:"/images/blog/avatars/default.png",title:e.author.t
1itle??null},publishedAt:e.published_at}}function $(){const[e,a]=i.useState([]),[s,o]=i.useState(!0),[c,p]=i.useState(null);return i.useEffect(()=>{let l=!1;async function x(){try{const n={};u&&(n.Authorization=`Bearer ${u}`);const r=await fetch(`${m}/items/posts?fields=*,author.id,author.name,author.avatar,author.title&filter[status][_eq]=published&sort=-published_at&limit=-1`,{headers:n});if(!r.ok)throw new Error(`CMS responded with ${r.status}`);const d=await r.json();if(l)return;const g=d.data??[];a(g.map(D))}catch(n){l||p(n instanceof Error?n.message:"Failed to load blog posts")}finally{l||o(!1)}}return x(),()=>{l=!0}},[]),{posts:e,loading:s,error:c}}function M({posts:e}={}){const a=i.useRef(null),s=$(),o=e??s.posts,c=e?!1:s.loading,p=e?null:s.error,[l,x]=i.useState("all"),n=l==="all"?o:o.filter(g=>g.category===l),r=n[0],d=n.slice(1);return t.jsxs(B,{heroRef:a,children:[t.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify([C([{name:"Home",url:"https://avaloniaui.net"},{name:"Blog",url:"https://avaloniaui.net/blog"}]),T({name:"Avalonia Blog",description:"News, updates, and technical articles from the Avalonia UI team.",url:"https://avaloniaui.net/blog"})])}}),t.jsx(L,{ref:a,activeCategory:l,onCategoryChange:x}),c?t.jsx("section",{className:"flex items-center justify-center py-32",style:{background:"var(--color-neutral-20)"},children:t.jsx("div",{className:"animate-spin rounded-full border-2 border-neutral-30 border-t-brand-40",style:{width:"32px",height:"32px"}})}):p?t.jsx("section",{className:"flex items-center justify-center py-32",style:{background:"var(--color-neutral-20)"},children:t.jsx("p",{className:"text-muted",style:{fontSize:"16px"},children:"Unable to load blog posts. Please try again later."})}):t.jsxs(t.Fragment,{children:[r&&t.jsx(I,{featuredPost:r}),d.length>0&&t.jsx(R,{posts:d})]})]})}async function O({serverLoader:e}){try{return{posts:await k()}}catch{return await e()}}O.hydrate=!0;function K(){return j({title:"Avalonia UI Blog - News, Tutorials & Updates",description:"News, tutorials, case studies, and deep dives on cross-platform .NET UI development from the Avalonia UI team. Stay up to date with the latest from Avalonia.",path:"/blog",ogImage:"https://avaloniaui.net/images/og/blog.png"})}const V=v(function(){const{posts:a}=y();return t.jsx(M,{posts:a})});export{O as clientLoader,V as default,K as meta};

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.