1import{H as p,T as h}from"./DkEhcZiB.js";import{r as m,u as y,c as v,o as b,a as t,e as o,w as n,d as x,F as w,b as k,_ as H,g as a,j as B,f as _}from"./BX97eYXR.js";import{a as T}from"./Cm0UX6qg.js";const F={class:"container pt-10 mx-auto"},N={key:0},j={key:1,class:"flex items-center justify-between max-w-screen-lg gap-12 mx-auto"},E={key:0,class:"w-4/5"},V=["src"],q=["src"],P={__name:"index",setup(C){const s=m([]),r=m(!0);y({title:v(()=>"Entries")});async function f(){try{const d=(await T.post("https://highwizardry.myshopify.com/api/2023-04/graphql",{query:` 2 query { 3 blogByHandle(handle: "news") { 4 articles(first: 10) { 5 edges { 6 node { 7 id 8 title 9 handle 10 contentHtml 11 image{ 12 url 13 } 14 } 15 } 16 } 17 } 18 } 19 `},{headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":"acb69c731fd1191b8208f2b8df4e9384"}})).data.data;s.value=d.blogByHandle.articles.edges.map(l=>l.node),r.value=!1}catch(e){console.error("Error fetching blog posts:",e),r.value=!1}}function i(e){return e.image.url?e.image.url:""}return b(f),(e,d)=>{const l=h,g=p,u=H;return a(),t("div",F,[o(g,null,{default:n(()=>[o(l,null,{default:n(()=>[B(" High Wizardry! | Entries")]),_:1})]),_:1}),r.value?(a(),t("div",N," Loading... ")):(a(),t("div",j,[s.value.length>0?(a(),t("div",E,[o(u,{to:`/entries/${s.value[0].handle}`},{default:n(()=>[_("img",{src:i(s.value[0]),alt:"Featured Image",class:"mb-4"},null,8,V)]),_:1},8,["to"])])):x("",!0),(a(!0),t(w,null,k(s.value.slice(1),c=>(a(),t("div",{key:c.id,class:"w-20 h-20"},[o(u,{to:`/entries/${c.handle}`},{default:n(()=>[_("img",{src:i(c),alt:"Featured Image",class:"object-cover w-full h-full mb-4"},null,8,q)]),_:2},1032,["to"])]))),128))]))])}}};export{P 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.