1import{_ as V}from"./AppColorModeImage.vue.cgWSLFxL.js";import{_ as q}from"./PageHeader.vue.Dhbjyfcq.js";import{d as F,u as I,w as c,c as J,a as D,b as i,o as n,e as g,f as s,g as E,h as d,_ as H,i as o,l as t,p as h,j as m,m as y,F as x,q as _,U as O,N as P,t as B}from"./entry.Ba7qpYeG.js";import{_ as R}from"./LearnCard.vue.DNKVxUUb.js";import{_ as T,a as K}from"./AppListGrid.ZQ14umIU.js";import{_ as Q}from"./BlogCard.vue.DQ-Fn87U.js";import"./AvatarGroup.Da586dt_.js";import"./Card.8h1THtWR.js";import"./date.ChyPFibr.js";const W={class:"grid grid-cols-1 lg:grid-cols-2 items-center gap-4 lg:gap-16"},X={class:"flex flex-col gap-2"},Y=t("h2",{class:"text-gray-950 dark:text-gray-50 text-xl lg:text-4xl font-bold"}," Find the article you need ",-1),Z=t("p",{class:"text-gray-500 dark:text-gray-400 max-w-lg"}," Our articles are organized into categories to help you find the right content for your needs, from beginner to more advanced topics. ",-1),tt={class:"mt-6 flex"},et={class:"grid grid-cols-2 gap-4 lg:gap-8"},at={class:"md:text-xl font-semibold dark:text-gray-50"},st={class:"mt-1 dark:text-zinc-400"},ot={class:"mt-8 lg:mt-16"},rt={class:"text-gray-950 dark:text-gray-50 text-xl font-semibold"},it=t("span",null," Latest articles ",-1),nt=t("span",{class:"i-heroicons-chevron-right text-primary h-5 w-5"},null,-1),lt={class:"mt-8 lg:mt-16"},ct={class:"text-gray-950 dark:text-gray-50 text-xl font-semibold"},dt=t("span",null," Stay up to date ",-1),_t=t("span",{class:"i-heroicons-chevron-right text-primary h-5 w-5"},null,-1),ut={class:"mt-8 lg:mt-16 py-16 flex flex-col items-center bg-gray-300/20 ring-gray-300 dark:bg-gray-700/20 rounded-lg ring-1 dark:ring-gray-700"},pt=t("h2",{class:"text-gray-950 dark:text-gray-50 text-xl lg:text-4xl font-bold"}," Get started now ",-1),gt=t("p",{class:"mt-8 text-gray-500 dark:text-gray-400 max-w-lg text-center"}," Start learning, improve your JavaScript skills and assemble packages to build better apps, websites and projects. ",-1),ht={class:"mt-12"},$t=F({__name:"index",async setup(mt){var b,k;let a,r;const f=I(),{data:l,error:C}=([a,r]=c(()=>d(f.path,()=>_(f.path).findOne(),"$AyuJ8ybbeq")),a=await a,r(),a);if(C.value)throw J({statusCode:404,message:"Page not found",fatal:!0});D({title:(b=l.value)==null?void 0:b.title,meta:[{name:"description",content:(k=l.value)==null?void 0:k.description}]});const{data:$}=([a,r]=c(()=>d("blog:latest",()=>_("/blog/").only(["_path","title","description","publishedAt","authors","packages","categories"]).sort({publishedAt:-1}).limit(3).find(),{default:()=>[]})),a=await a,r(),a),{data:j}=([a,r]=c(()=>d("learn:latest",()=>_("/learn/articles/").only(["_path","title","description","publishedAt","authors","category"]).sort({publishedAt:-1}).limit(3).find(),{default:()=>[]})),a=await a,r(),a),{data:L}=([a,r]=c(()=>d("learn:random",()=>_("/learn/articles/").only(["_path"]).find(),{transform:u=>u[Math.floor(Math.random()*u.length)]._path})),a=await a,r(),a),N=[{id:"getting-started",label:"Getting Started",description:"Start by the basics of the UnJS ecosystem"},{id:"building-blocks",label:"Building Blocks",description:"Assemble packages and tools to start creating an app"}];return(u,yt)=>{const S=V,z=q,v=O,p=P,G=R,w=K,A=T,M=Q,U=H;return i(l)?(n(),g(U,{key:0},{header:s(()=>[o(z,{title:i(l).title,description:i(l).description},{right:s(()=>[t("div",null,[o(S,{light:"/assets/header/light/learn.png",dark:"/assets/header/dark/learn.png",alt:"Illustration","aria-hidden":"true",class:"absolute left-24 top-0 opacity-70 w-80"})])]),_:1},8,["title","description"])]),default:s(()=>[t("section",W,[t("div",X,[Y,Z,t("div",tt,[o(v,{to:"/learn/articles?utm_source=unjs.io&utm_medium=learn-article-you-need",color:"white",variant:"solid",size:"lg","trailing-icon":"i-heroicons-chevron-right-20-solid"},{default:s(()=>[h(" All articles ")]),_:1})])]),t("ol",et,[(n(),m(x,null,y(N,e=>t("li",{key:e.label,class:"relative p-4 rounded-lg ring-1 ring-gray-300 dark:ring-gray-700 shadow-sm hover:shadow-none hover:ring-primary dark:hover:ring-primary transition ease-in"},[t("h3",at,[o(p,{class:"absolute inset-0",to:`/learn/articles?categories[]=${e.id}&utm_source=unjs.io&utm_medium=learn-category`},null,8,["to"]),h(" "+B(e.label),1)]),t("p",st,B(e.description),1)])),64))])]),t("section",ot,[t("h2",rt,[o(p,{class:"flex items-center",to:"/learn/articles?order=-1&orderBy=publishedAt&utm_source=unjs.io&utm_medium=learn-latest-articles"},{default:s(()=>[it,nt]),_:1})]),o(A,{class:"mt-3"},{default:s(()=>[(n(!0),m(x,null,y(i(j),e=>(n(),g(w,{key:e._path},{default:s(()=>
1[o(G,{path:e._path,title:e.title,description:e.description,"published-at":e.publishedAt,category:e.category,authors:e.authors},null,8,["path","title","description","published-at","category","authors"])]),_:2},1024))),128))]),_:1})]),t("section",lt,[t("h2",ct,[o(p,{class:"flex items-center",to:"/blog?order=-1&orderBy=publishedAt&utm_source=unjs.io&utm_medium=learn-latest-blog"},{default:s(()=>[dt,_t]),_:1})]),o(A,{class:"mt-3"},{default:s(()=>[(n(!0),m(x,null,y(i($),e=>(n(),g(w,{key:e._path},{default:s(()=>[o(M,{path:`${e._path}?utm_source=unjs.io&utm_medium=learn-latest-blog`,title:e.title,description:e.description,"published-at":e.publishedAt,authors:e.authors},null,8,["path","title","description","published-at","authors"])]),_:2},1024))),128))]),_:1})]),t("section",ut,[pt,gt,t("div",ht,[o(v,{to:`${i(L)}/?utm_source=unjs.io&utm_medium=learn-start-now`,color:"primary",variant:"solid",size:"lg",ui:{variant:{solid:"text-gray-950 dark:text-gray-50 bg-primary bg-opacity-40 dark:bg-opacity-30 hover:bg-primary/60 dark:hover:bg-primary/40"}},"trailing-icon":"i-heroicons-chevron-right-20-solid"},{default:s(()=>[h(" Read an article ")]),_:1},8,["to"])])])]),_:1})):E("",!0)}}});export{$t 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.