1import{b as x,r as c,j as e,L as a,h as m}from"./index-DN3HURa4.js";import{u,Q as h,d as p}from"./useBaseQuery-B2XjJFo9.js";import{S as g}from"./site-header-Bga5iQYB.js";import{S as f}from"./site-footer-BBSEKG_m.js";import{A as b}from"./article-card-z7bXQ8tA.js";import{u as j}from"./useServerFn-CBlGdxrC.js";import{t as o}from"./index-CZY1ze68.js";import"./button-Bn4pXB9f.js";import"./Combination-BaPdqbEk.js";import"./formatDistanceToNow-Ctx6mZEP.js";function N(r,s){return u({...r,enabled:!0,suspense:!0,throwOnError:p,placeholderData:void 0},h)}function v(){const r=j(x),[s,t]=c.useState(""),[l,n]=c.useState(!1);return e.jsxs("div",{className:"bg-ink text-paper p-8 rounded-2xl",children:[e.jsx("h4",{className:"font-serif text-2xl mb-3 text-white",children:"The Success Brief"}),e.jsx("p",{className:"text-white/60 text-sm mb-5",children:"Weekly insights on growth, grit and ground realities of Indian success stories."}),e.jsxs("form",{className:"space-y-3",onSubmit:async i=>{if(i.preventDefault(),!!s){n(!0);try{await r({data:{email:s}}),o.success("Subscribed!"),t("")}catch(d){o.error(d?.message??"Failed")}finally{n(!1)}}},children:[e.jsx("input",{type:"email",required:!0,value:s,onChange:i=>t(i.target.value),placeholder:"Email address",className:"w-full bg-white/10 border border-white/20 rounded-lg px-4 py-3 text-sm text-white placeholder:text-white/40 focus:outline-none focus:border-accent transition-colors"}),e.jsx("button",{disabled:l,className:"w-full bg-accent text-white font-bold text-xs uppercase tracking-widest py-3 rounded-lg hover:brightness-110 transition-all disabled:opacity-50",children:l?"Subscribing...":"Subscribe"})]})]})}function A(){const{data:r}=N(m),s=r.featured;return e.jsxs("div",{className:"min-h-screen flex flex-col bg-paper text-ink",children:[e.jsx(g,{}),e.jsxs("main",{className:"max-w-7xl mx-auto px-6 w-full flex-1",children:[s?e.jsxs("section",{className:"py-12 md:py-20 grid grid-cols-1 lg:grid-cols-12 gap-12 border-b border-ink/5",children:[e.jsxs("div",{className:"lg:col-span-7 flex flex-col justify-center",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[e.jsx("span",{className:"px-2 py-0.5 bg-accent/10 text-accent text-[10px] font-bold uppercase tracking-wider rounded-sm",children:"Featured"}),e.jsxs("span",{className:"text-ink/40 text-xs",children:[s.reading_time??1," min read",s.category&&` ⢠${s.category.name}`]})]}),e.jsx(a,{to:"/article/$slug",params:{slug:s.slug},children:e.jsx("h1",{className:"font-serif text-5xl md:text-7xl leading-[1.05] mb-8 hover:text-accent transition-colors text-balance",children:s.title})}),s.excerpt&&e.jsx("p",{className:"text-xl text-ink/70 leading-relaxed mb-8 max-w-xl",children:s.excerpt}),s.author&&e.jsxs(a,{to:"/author/$username",params:{username:s.author.username},className:"flex items-center gap-4 group/a",children:[e.jsx("div",{className:"size-12 rounded-full bg-stone-200 outline-1 -outline-offset-1 outline-black/5 overflow-hidden",children:s.author.avatar_url&&e.jsx("img",{src:s.author.avatar_url,alt:"",className:"w-full h-full object-cover"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium group-hover/a:text-accent",children:s.author.display_name}),e.jsxs("p",{className:"text-xs text-ink/40",children:["@",s.author.username]})]})]})]}),e.jsx("div",{className:"lg:col-span-5",children:e.jsx(a,{to:"/article/$slug",params:{slug:s.slug},children:e.jsx("div",{className:"w-full aspect-[4/5] rounded-2xl overflow-hidden bg-stone-100 outline-1 -outline-offset-1 outline-black/5",children:s.cover_image_url?e.jsx("img",{src:s.cover_image_url,alt:s.title,className:"w-full h-full object-cover"}):e.jsx("div",{className:"w-full h-full grid place-items-center font-serif text-7xl text-ink/10",children:"HSS"})})})})]}):e.jsxs("section",{className:"py-20 text-center border-b border-ink/5",children:[e.jsxs("h1",{className:"font-serif text-5xl md:text-7xl leading-tight mb-6",children:["Where ideas find their ",e.jsx("span",{className:"italic",children:"voice"})]}),e.jsx("p",{className:"text-xl text-ink/60 max-w-2xl mx-auto mb-8",children:"A premium space for Hindi and English writers to share profound narratives."}),e.jsx(a,{to:"/auth",className:"inline-block bg-ink text-white rounded-full px-6 py-3 text-sm font-medium hover:bg-accent transition-colors",children:"Start writing"})]}),r.trending.length>0&&e.jsxs("section",{className:"py-16",children:[e.jsxs("div",{className:"flex items-center justify-between mb-10",children:[e.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.2em] text-ink/30",children:"Trending on HSS"}),e.jsx("div",{className:"h-px flex-1 mx-8 bg-ink/5"})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-x-12 gap-y-12",children:r.trending.slice(0,6).map((t,l)=>e.jsxs(a,{to:"/article/$slug",params:{slug:t.slug},className:"flex gap-6 group cursor-pointer",children:[e.jsx("span",{className:"text-4xl font-serif text-ink/10 group-hover:text-accent/30 transition-colors",children:String(l+1).padStart(2,"0")}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-serif text-xl leading-tight mb-3 group-hover:text-accent transition-colors text-balance",children:t.title}),e.jsxs("div",{className:"text-xs text-ink/40 flex gap-2",children:[e.jsx("span",{children:t.author?.display_name}),e.jsx("span",{children:"â¢"}),e.jsxs("span",{children:[t.reading_time??1," min"]})]})]})]},t.id))})]}),e.jsxs("section",{className:"py-16 grid grid-cols-1 lg:grid-cols-12 gap-16 border-t border-ink/5",children:[e.jsxs("div",{className:"lg:col-span-8",children:[e.jsx("h2",{className:"text-xl font-serif italic mb-8 border-b border-ink/5 pb-4",children:"Latest Narratives"}),e.jsx("div",{className:"space-y-16",children:r.latest.length===0?e.jsxs("p",{className:"text-ink/50",children:["No articles published yet. ",e.jsx(a,{to:"/auth",className:"text-accent underline",children:"Be the first to write"}),"."]}):r.latest.map(t=>e.jsx(b,{a:t},t.id))})]}),e.jsx("aside",{className:"lg:col-span-4",children:e.jsxs("div",{className:"sticky top-28 space-y-12",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest mb-6 text-ink/40",children:"Top Contributors"}),e.jsx("div",{className:"space-y-4",children:r.topAuthors.map(t=>e.jsxs(a,{to:"/author/$username",params:{username:t.username},className:"flex items-center gap-3 group/a",children:[e.jsx("div",{className:"size-10 rounded-full bg-stone-200 overflow-hidden",children:t.avatar_url&&e.jsx("img",{src:t.avatar_url,alt:"",className:"w-full h-full object-cover"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold group-hover/a:text-accent",children:t.display_name}),e.jsx("p",{className:"text-[10px] text-ink/40",children:t.bio?.slice(0,40)||"Writer"})]})]},t.id))})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-bold uppercase tracking-widest mb-4 text-ink/40",children:"Discover More"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:r.categories.map(t=>e.jsx(a,{to:"/category/$slug",params:{slug:t.slug},className:"px-3 py-1.5 bg-ink/5 text-[11px] font-medium rounded-full hover:bg-ink/10 transition-colors",children:t.name},t.id))})]}),e.jsx(v,{})]})})]})]}),e.jsx(f,{})]})}
1export{A 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.