PageSourceSearch

https://otentecnologia.com.br/assets/Blog-Ck8J_Nyt.js

js otentecnologia.com.br collected 2026-09-30 05:28:12 UTC 5,994 bytes, 1 lines download raw bytes

1import{R as e,j as s}from"./framer-DNXtdBgj.js";import{y as a,b as t,ah as r,v as l,t as o,m as i,S as n,n as c,p as d,e as m}from"./index-XTUkK5WH.js";import{C as g,c as x}from"./card-Bfb46Kgw.js";import{B as p}from"./badge-5FdbKFYY.js";import{C as b}from"./calendar-C5w0UWVn.js";import{f as h,p as u}from"./pt-BR-BhLCzg37.js";import{C as j}from"./clock-BnArT1ze.js";import{B as f}from"./BlogSidebar-COCd6Enh.js";import{S as N}from"./skeleton-Bt0hhFPb.js";import"./supabase-CVkO6afG.js";import"./tag-ob77C-Yn.js";const w=e.forwardRef(({post:e},t)=>s.jsx(g,{ref:t,className:"group overflow-hidden hover:shadow-lg transition-all duration-300 hover:-translate-y-1",children:s.jsxs(a,{to:`/blog/${e.slug}`,children:[s.jsx("div",{className:"overflow-hidden",children:s.jsx("img",{src:e.featured_image||"/assets/blog-case-study-crm-CeF4bVYa.jpg",alt:e.title,className:"w-full h-48 object-cover group-hover:scale-105 transition-transform duration-500"})}),s.jsxs(x,{className:"p-5",children:[e.blog_categories&&s.jsx(p,{variant:"secondary",className:"mb-3",children:e.blog_categories.name}),s.jsx("h3",{className:"text-lg font-bold text-foreground mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:e.title}),e.excerpt&&s.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-2",children:e.excerpt}),s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.published_at&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(b,{className:"w-3 h-3"}),s.jsx("span",{children:h(new Date(e.published_at),"d MMM yyyy",{locale:u})})]}),e.reading_time&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(j,{className:"w-3 h-3"}),s.jsxs("span",{children:[e.reading_time," min"]})]})]})]})]})}));function y(){const{t:e}=t(),[g]=r(),x=g.get("categoria"),{data:p}=l({queryKey:["blog_categories"],queryFn:async()=>{const{data:e,error:s}=await m.from("blog_categories").select("*").order("name");if(s)throw s;return e}}),{data:b,isLoading:h}=l({queryKey:["blog_posts",x],queryFn:async()=>{let e=m.from("blog_posts").select("\n          *,\n          blog_categories (\n            id,\n            name,\n            slug\n          )\n        ").eq("status","published").order("published_at",{ascending:!1});if(x){const s=p?.find(e=>e.slug===x);s&&(e=e.eq("category_id",s.id))}const{data:s,error:a}=await e;if(a)throw a;return s},enabled:!x||!!p}),u=p?.map(e=>e.name)||[],j=p?.map(e=>e.description)||[],{translated:y}=o(u),{translated:v}=o(j),_=b?.map(e=>e.title)||[],k=b?.map(e=>e.excerpt)||[],q=b?.map(e=>e.blog_categories?.name??null)||[],{translated:B}=o(_),{translated:C}=o(k),{translated:$}=o(q),F=(p||[]).map((e,s)=>({...e,name:y[s]||e.name,description:v[s]||e.description})),K=(b||[]).map((e,s)=>({...e,title:B[s]||e.title,excerpt:C[s]||e.excerpt,blog_categories:e.blog_categories?{...e.blog_categories,name:$[s]||e.blog_categories.name}:e.blog_categories})),L=F.find(e=>e.slug===x);return s.jsxs(i,{children:[s.jsx(n,{title:L?`${L.name} - ${e("blog.title")}`:e("blog.seo.title"),description:e("blog.seo.description"),keywords:e("blog.seo.keywords"),canonical:x?`https://www.otentecnologia.com.br/blog?categoria=${x}`:"https://www.otentecnologia.com.br/blog",ogType:"website",alternateLanguages:c("/blog"),jsonLd:[d([{name:"Home",url:"https://www.otentecnologia.com.br/"},{name:e("blog.title")},...L?[{name:L.name}]:[]])]}),s.jsx("section",{className:"gradient-dark py-16 lg:py-20",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-4xl mx-auto text-center",children:[s.jsx("span",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/10 backdrop-blur-sm border border-white/20 text-white text-sm font-medium mb-4",children:e("blog.badge")}),s.jsx("div",{className:"flex justify-center mb-4",children:s.jsxs("h1",{className:"text-4xl md:text-5xl font-bold text-white relative inline-block pb-4",children:[e("blog.heading"),s.jsx("span",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-24 h-1 bg-accent rounded-full"})]})}),s.jsx("p",{className:"text-xl text-white/80 max-w-2xl mx-auto",children:e("blog.description")})]})})}),F.length>0&&s.jsx("section",{className:"border-b border-border bg-card",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"flex items-center gap-2 py-4 overflow-x-auto",children:[s.jsx(a,{to:"/blog",className:"px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors "+(x?"bg-muted hover:bg-muted/80 text-muted-foreground":"bg-primary text-primary-foreground"),children:e("blog.filterAll")}),F.map(e=>s.jsx(a,{to:`/blog?categoria=${e.slug}`,className:"px-4 py-2 rounded-full text-sm font-medium whitespace-nowrap transition-colors "+(x===e.slug?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80 text-muted-foreground"),children:e.name},e.id))]})})}),s.jsx("section",{className:"py-12 lg:py-16 bg-background",children:s.jsxs("div",{className:"container mx-auto px-4",children:[L&&s.jsxs("div",{className:"mb-8",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-2",children:L.name}),L.description&&s.jsx("p",{className:"text-muted-foreground",children:L.description})]}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[s.jsx("div",{className:"lg:col-span-2",children:s.jsx("div",h?{className:"grid md:grid-cols-2 gap-6",children:[1,2,3,4].map(e=>s.jsxs("div",{className:"space-y-4",children:[s.jsx(N,{className:"h-48 w-full rounded-xl"}),s.jsx(N,{className:"h-4 w-3/4"}),s.jsx(N,{className:"h-6 w-full"}),s.jsx(N,{className:"h-4 w-full"})]},e))}:b&&b.length>0?{className:"grid md:grid-cols-2 gap-6",children:K.map(e=>s.jsx(w,{post:e},e.id))}:{className:"text-center py-12",children:s.jsx("p",{className:"text-muted-foreground",children:e("blog.noPosts")})})}),s.jsx("aside",{className:"lg:col-span-1",children:s.jsx(f,{categories:F})})]})]})})]})}w.displayName="BlogPostCard";export{y 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.