1import{r as a,j as e}from"./index-Dm6Jzmsq.js";import{B as c,L as d,E as w}from"./App-DQK5p0Zf.js";import{g as h,T as f,U as v}from"./blogImages-856LuIRa.js";import{S as C,c as S}from"./SEOHead-gmtiyKpq.js";import{S as M}from"./search-BeVgjD0Y.js";import{C as _}from"./calendar-CiJCQUlO.js";import{f as o}from"./format-sbWH3_uq.js";import{A as H}from"./arrow-right-DW9GuT89.js";import"./crypto-DFw8Wy1v.js";const k=["All","News","Student Stories","Career Tips","Industry Updates","Events","Announcements"];function U(){const[i,g]=a.useState([]),[p,b]=a.useState(!0),[r,j]=a.useState("All"),[l,y]=a.useState("");a.useEffect(()=>{(async()=>{const{data:n}=await w.from("blog_posts").select("id, title, slug, excerpt, featured_image, category, author, published_at, created_at").eq("status","published").order("published_at",{ascending:!1});n&&g(n),b(!1)})()},[]);const m=i.filter(s=>{var u;const n=r==="All"||s.category===r,N=s.title.toLowerCase().includes(l.toLowerCase())||(((u=s.excerpt)==null?void 0:u.toLowerCase().includes(l.toLowerCase()))??!1);return n&&N}),t=m[0],x=m.slice(1);return e.jsxs("div",{children:[e.jsx(C,{title:"News & Career Tips in Houston, TX | Houston Career Institute Blog",description:"Read career tips, student success stories, and industry news from Houston Career Institute. Stay informed about healthcare and skilled trades careers in Houston.",canonicalPath:"/news",keywords:"career training news Houston, medical assistant tips, HVAC career advice, Houston Career Institute news",jsonLd:S([{name:"Home",url:"/"},{name:"News",url:"/news"}])}),e.jsx("section",{className:"pt-32 pb-16 gradient-hero",children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-heading font-bold text-primary-foreground mb-6",children:"HCI News"}),e.jsx("p",{className:"text-xl text-primary-foreground/90",children:"Career tips, industry updates, student success stories, and more from Houston Career Institute."})]})})}),e.jsx("section",{className:"py-8 bg-muted border-b border-border",children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"flex flex-col md:flex-row items-center justify-between gap-6",children:[e.jsxs("div",{className:"relative w-full md:w-auto",children:[e.jsx(M,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search articles...",value:l,onChange:s=>y(s.target.value),className:"w-full md:w-80 pl-10 pr-4 py-2 rounded-lg border border-border bg-background focus:outline-none focus:ring-2 focus:ring-primary"})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:k.map(s=>e.jsx("button",{onClick:()=>j(s),className:`px-4 py-2 rounded-full text-sm font-medium border transition-colors ${r===s?"bg-secondary text-secondary-foreground border-secondary":"bg-background border-border hover:bg-secondary hover:text-secondary-foreground hover:border-secondary"}`,children:s},s))})]})})}),p?e.jsx("section",{className:"section-padding",children:e.jsx("div",{className:"container-custom text-center py-12",children:e.jsx("p",{className:"text-muted-foreground",children:"Loading posts..."})})}):i.length===0?e.jsx("section",{className:"section-padding",children:e.jsxs("div",{className:"container-custom text-center py-12",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-foreground mb-4",children:"Coming Soon"}),e.jsx("p",{className:"text-muted-foreground mb-6",children:"We're working on some great content. Check back soon for career tips, student stories, and more!"}),e.jsx(c,{asChild:!0,children:e.jsx(d,{to:"/contact",children:"Contact Us"})})]})}):e.jsxs(e.Fragment,{children:[t&&e.jsx("section",{className:"section-padding",children:e.jsx("div",{className:"container-custom",children:e.jsx("div",{className:"bg-muted rounded-2xl overflow-hidden",children:e.jsxs("div",{className:"grid md:grid-cols-2",children:[e.jsx("div",{className:"aspect-video md:aspect-auto overflow-hidden bg-primary/20",children:e.jsx("img",{src:h(t.featured_image,t.title,t.category),alt:t.title,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"p-8 md:p-12 flex flex-col justify-center",children:[e.jsxs("span",{className:"inline-flex items-center gap-2 text-secondary font-semibold text-sm mb-4",children:[e.jsx(f,{className:"w-4 h-4"}),t.category]}),e.jsx("h2",{className:"text-2xl md:text-3xl font-heading font-bold text-foreground mb-4",children:t.title}),e.jsx("p",{className:"text-muted-foreground mb-6",children:t.excerpt}),e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-6",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(v,{className:"w-4 h-4"}),t.author]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(_,{className:"w-4 h-4"}),t.published_at?o(new Date(t.published_at),"MMMM d, yyyy"):o(new Date(t.created_at),"MMMM d, yyyy")]})]}),e.jsx(c,{variant:"secondary",className:"self-start",asChild:!0,children:e.jsxs(d,{to:`/news/${t.slug}`,children:["Read More ",e.jsx(H,{className:"w-4 h-4"})]})})]})]})})})}),x.length>0&&e.jsx("section",{className:"section-padding bg-muted",children:e.jsxs("div",{className:"container-custom",children:[e.jsx("h2",{className:"text-2xl font-heading font-bold text-foreground mb-8",children:r==="All"?"Latest Articles":r}),e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:x.map(s=>e.jsxs(d,{to:`/news/${s.slug}`,className:"bg-background rounded-2xl overflow-hidden shadow-brand-sm card-hover block",children:[e.jsx("div",{className:"aspect-video overflow-hidden bg-primary/10",children:e.jsx("img",{src:h(s.featured_image,s.title,s.category),alt:s.title,className:"w-full h-full object-cover"})}),e.jsxs("div",{className:"p-6",children:[e.jsxs("span",{className:"inline-flex items-center gap-1 text-secondary text-xs font-semibold mb-3",children:[e.jsx(f,{className:"w-3 h-3"}),s.category]}),e.jsx("h3",{className:"text-lg font-heading font-bold text-foreground mb-3 line-clamp-2",children:s.title}),e.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-2",children:s.excerpt}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsx("span",{children:s.author}),e.jsx("span",{children:s.published_at?o(new Date(s.published_at),"MMM d, yyyy"):o(new Date(s.created_at),"MMM d, yyyy")})]})]})]},s.id))})]})})]}),e.jsx("section",{className:"py-20 gradient-hero",children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"max-w-2xl mx-auto text-center",children:[e.jsx("h2",{className:"text-3xl font-heading font-bold text-primary-foreground mb-4",children:"Get Career Tips in Your Inbox"}
1),e.jsx("p",{className:"text-primary-foreground/90 mb-8",children:"Subscribe to our newsletter for the latest career advice, industry news, and HCI updates."}),e.jsxs("form",{className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[e.jsx("input",{type:"email",placeholder:"Enter your email",className:"flex-1 px-4 py-3 rounded-lg border-2 border-primary-foreground/30 bg-primary-foreground/10 text-primary-foreground placeholder:text-primary-foreground focus:outline-none focus:border-secondary"}),e.jsx(c,{variant:"hero",size:"lg",type:"submit",children:"Subscribe"})]})]})})})]})}export{U 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.