1import{k as N,r as a,s as x,j as e,N as n,F as o,L as c,B as l,l as h,P as _,h as v}from"./index-DwD5y2V5.js";import{B as w}from"./badge-tGAspnuj.js";import{p as u}from"./purify.es-D9RiKzGB.js";import{L}from"./loader-circle-D7CA8yYw.js";import{U as E}from"./user-BS5nIxI1.js";import{C as T}from"./calendar-BXlgp5pm.js";import{E as S}from"./eye-BAgy5Ajs.js";const z=()=>{const{slug:r}=N(),[s,g]=a.useState(null),[p,b]=a.useState(!0),[j,d]=a.useState(!1);a.useEffect(()=>{r&&f(r)},[r]);const f=async i=>{try{const{data:t,error:m}=await x.from("blog_posts").select(` 2 id, 3 title, 4 slug, 5 excerpt, 6 content, 7 author_name, 8 published_at, 9 read_time_minutes, 10 featured_image_url, 11 meta_title, 12 meta_description, 13 view_count, 14 final_thoughts, 15 category:blog_categories(name, slug) 16 `).eq("slug",i).eq("status","published").single();m?(console.error("Error fetching blog post:",m),d(!0)):(g(t),await x.from("blog_posts").update({view_count:t.view_count+1}).eq("id",t.id))}catch(t){console.error("Error fetching blog post:",t),d(!0)}finally{b(!1)}},y=i=>new Date(i).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return p?e.jsxs("div",{className:"min-h-screen",children:[e.jsx(n,{}),e.jsx("div",{className:"container mx-auto px-6 py-20",children:e.jsxs("div",{className:"flex justify-center items-center py-20",children:[e.jsx(L,{className:"h-8 w-8 animate-spin text-blue-600"}),e.jsx("span",{className:"ml-2 text-gray-600",children:"Loading article..."})]})}),e.jsx(o,{})]}):j||!s?e.jsxs("div",{className:"min-h-screen",children:[e.jsx(n,{}),e.jsx("div",{className:"container mx-auto px-6 py-20",children:e.jsxs("div",{className:"text-center py-20",children:[e.jsx("h1",{className:"text-4xl font-bold text-gray-900 mb-4",children:"Article Not Found"}),e.jsx("p",{className:"text-gray-600 mb-8",children:"The article you're looking for doesn't exist or has been removed."}),e.jsx(c,{to:"/blog",children:e.jsxs(l,{children:[e.jsx(h,{className:"mr-2 h-4 w-4"}),"Back to Blog"]})})]})}),e.jsx(o,{})]}):e.jsxs("div",{className:"min-h-screen",children:[s&&e.jsxs(e.Fragment,{children:[e.jsx(_,{title:`${s.title} | NetFocus Technologies Blog`,description:s.excerpt||s.title,canonicalPath:`/blog/${s.slug}`,ogImage:s.featured_image_url||void 0,ogType:"article"}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify({"@context":"https://schema.org","@type":"Article",headline:s.title,description:s.excerpt||s.title,image:s.featured_image_url||void 0,datePublished:s.published_at,author:{"@type":"Person",name:s.author_name},publisher:{"@type":"Organization",name:"NetFocus Technologies",url:"https://gonetfocus.com"},mainEntityOfPage:{"@type":"WebPage","@id":`https://gonetfocus.com/blog/${s.slug}`}})}})]}),e.jsx(n,{}),e.jsx("article",{className:"pt-40 pb-20",children:e.jsx("div",{className:"container mx-auto px-6",children:e.jsxs("div",{className:"max-w-4xl mx-auto",children:[e.jsxs(c,{to:"/blog",className:"inline-flex items-center text-blue-600 hover:text-blue-700 mb-8",children:[e.jsx(h,{className:"mr-2 h-4 w-4"}),"Back to Blog"]}),e.jsxs("div",{className:"mb-6",children:[e.jsx(w,{variant:"secondary",className:"bg-blue-100 text-blue-700 mb-4",children:s.category.name}),e.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-gray-900 mb-4",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-xl text-gray-600 mb-6",children:s.excerpt})]}),s.featured_image_url&&e.jsx("div",{className:"mb-6 flex justify-center",children:e.jsx("img",{src:s.featured_image_url,alt:s.title,loading:"lazy",className:"w-full h-64 md:h-96 object-contain rounded-lg bg-gray-50"})}),e.jsxs("div",{className:"flex items-center gap-6 text-gray-500 text-sm mb-8 pb-6 border-b border-gray-200",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(E,{className:"h-4 w-4"}),e.jsx("span",{children:s.author_name})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(T,{className:"h-4 w-4"}),e.jsx("span",{children:s.published_at?y(s.published_at):"Recently published"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(v,{className:"h-4 w-4"}),e.jsxs("span",{children:[s.read_time_minutes," min read"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(S,{className:"h-4 w-4"}),e.jsxs("span",{children:[s.view_count," views"]})]})]}),e.jsx("div",{className:"prose prose-lg max-w-none",children:s.content?e.jsx("div",{dangerouslySetInnerHTML:{__html:u.sanitize(s.content,{ALLOWED_TAGS:["p","br","strong","em","u","h1","h2","h3","h4","ul","ol","li","a","img","blockquote","code","pre","span","div","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","src","alt","title","class","target","rel"]})}}):e.jsx("p",{className:"text-gray-600 italic",children:"Content coming soon..."})}),s.final_thoughts&&e.jsxs("div",{className:"mt-12 p-8 bg-gray-50 rounded-lg border-l-4 border-blue-600",children:[e.jsx("h3",{className:"text-2xl font-bold text-gray-900 mb-4",children:"Our Final Thoughts"}),e.jsx("div",{className:"text-gray-700 mb-6 prose prose-lg max-w-none",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:u.sanitize(s.final_thoughts,{ALLOWED_TAGS:["p","br","strong","em","u","h1","h2","h3","h4","ul","ol","li","a","img","blockquote","code","pre","span","div"],ALLOWED_ATTR:["href","src","alt","title","class","target","rel"]})}})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4",children:[e.jsx(l,{asChild:!0,size:"lg",className:"bg-blue-600 hover:bg-blue-700",children:e.jsx(c,{to:"/contact",children:"Get Expert Consultation"})}),e.jsx(l,{asChild:!0,variant:"outline",size:"lg",children:e.jsx("a",{href:"tel:+15126910417",children:"Call Us: +1-512-691-0417"})})]})]})]})})}),e.jsx("section",{className:"py-16 bg-blue-600 text-white",children:e.jsxs("div",{className:"container mx-auto px-6 text-center",children:[e.jsx("h2",{className:"text-4xl font-bold mb-6",children:"Stay Updated"}),e.jsx("p",{className:"text-xl text-blue-100 mb-8 max-w-2xl mx-auto",children:"Get the latest IT insights, tips, and industry news delivered directly to your inbox."}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 max-w-md mx-auto",children:[e.jsx("input",{type:"email",placeholder:"Enter your email","aria-label":"Email address for newsletter signup",className:"flex-1 px-4 py-3 rounded-lg text-gray-900"}),e.jsx(l,{size:"lg",className:"bg-white text-blue-600 hover:bg-gray-100",children:"Subscribe"})]})]})}),e.jsx(o,{})]})};export{z 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.