PageSourceSearch

https://beinbr.com/assets/Blog-BwqpDBLq.js

js beinbr.com collected 2026-10-02 01:24:33 UTC 14,451 bytes, 1 lines download raw bytes

1import{j as e,L as f,r as m,S as w}from"./index-BLKRFDSI.js";import{N as y,F as k,W as C}from"./WhatsAppButton-CpHeau2X.js";import{u as _,f as h,a as S,b as j}from"./blogHelpers-Bug2kv-a.js";import{S as i}from"./skeleton-NyhdGcJx.js";import{U as p}from"./user-BsLgkqr0.js";import{C as N}from"./clock-Bl0MaPT2.js";import{S as B}from"./search-BsJCFE8D.js";import{C as L}from"./chevron-left-DIDsna2w.js";import{C as E}from"./chevron-right-oZM7uQ8V.js";import{b as A}from"./breadcrumbSchema-CJchZEzJ.js";import"./index-DJpUxsIH.js";import"./button-Ct61uh-i.js";import"./arrow-left-Bhydx5GS.js";import"./useMutation-D6SJaGsu.js";const T=()=>e.jsxs("section",{className:"relative h-[50vh]",children:[e.jsx("div",{className:"absolute inset-0 bg-cover bg-center bg-no-repeat",style:{backgroundImage:"url(https://images.unsplash.com/photo-1497215842964-222b430dc094?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=80)",filter:"brightness(0.7)"}}),e.jsx("div",{className:"absolute inset-0 bg-black bg-opacity-50"}),e.jsx("div",{className:"relative z-10 flex items-center justify-center h-full",children:e.jsxs("div",{className:"text-center px-4 sm:px-6 lg:px-8 max-w-4xl mx-auto",children:[e.jsx("h1",{className:"text-3xl md:text-5xl font-medium text-white mb-6 animate-fade-in",children:"Blog Be in"}),e.jsx("p",{className:"text-xl text-white opacity-90 mb-10 animate-fade-in",children:"Insights e tendências sobre espaços de trabalho e produtividade"})]})})]}),$=()=>{const{data:s,isLoading:r,error:a}=_();return r?e.jsx("div",{className:"bg-white shadow-md rounded-lg overflow-hidden",children:e.jsxs("div",{className:"flex flex-col md:flex-row",children:[e.jsx("div",{className:"md:w-1/2 h-64 md:h-auto",children:e.jsx(i,{className:"w-full h-full min-h-[300px]"})}),e.jsxs("div",{className:"md:w-1/2 p-6 md:p-8",children:[e.jsx(i,{className:"h-6 w-32 mb-4"}),e.jsx(i,{className:"h-8 w-full mb-2"}),e.jsx(i,{className:"h-8 w-3/4 mb-4"}),e.jsx(i,{className:"h-4 w-full mb-2"}),e.jsx(i,{className:"h-4 w-2/3 mb-6"}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(i,{className:"h-10 w-10 rounded-full"}),e.jsx(i,{className:"h-4 w-40"})]})]})]})}):a||!s?null:e.jsx("div",{className:"bg-white shadow-md rounded-lg overflow-hidden",children:e.jsxs("div",{className:"flex flex-col md:flex-row",children:[e.jsx("div",{className:"md:w-1/2 h-64 md:h-auto",children:e.jsx("img",{src:s.image_url||"https://images.unsplash.com/photo-1604328698692-f76ea9498e76?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80",alt:s.title,className:"w-full h-full object-cover min-h-[300px]"})}),e.jsxs("div",{className:"md:w-1/2 p-6 md:p-8 flex flex-col justify-between",children:[e.jsxs("div",{children:[s.category&&e.jsx("div",{className:"mb-4",children:e.jsx("span",{className:"inline-block bg-gray-100 text-bein-amber px-3 py-1 text-sm font-medium rounded-full",children:s.category.name})}),e.jsx("h2",{className:"text-2xl md:text-3xl font-medium mb-4",children:s.title}),s.excerpt&&e.jsx("p",{className:"text-gray-600 mb-4",children:s.excerpt})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center mb-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-full bg-gray-200 mr-3 flex items-center justify-center",children:e.jsx(p,{size:20,className:"text-gray-500"})}),e.jsxs("div",{className:"flex items-center text-sm text-gray-500",children:[e.jsx(p,{size:14,className:"mr-1"}),e.jsx("span",{className:"mr-4",children:s.author_name}),s.read_time&&e.jsxs(e.Fragment,{children:[e.jsx(N,{size:14,className:"mr-1"}),e.jsxs("span",{children:[s.read_time," de leitura"]})]})]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-sm text-gray-500",children:s.published_at?h(s.published_at):h(s.created_at)}),e.jsx(f,{to:`/blog/${s.slug}`,className:"btn-primary text-sm","aria-label":`Ler post completo: ${s.title}`,children:"Ler post completo"})]})]})]})]})})},z=({activeCategory:s,onCategoryChange:r})=>{const{data:a,isLoading:l}=S();return l?e.jsx("div",{className:"w-full overflow-x-auto",children:e.jsx("div",{className:"flex space-x-2 pb-3",children:Array.from({length:6}).map((d,o)=>e.jsx(i,{className:"h-9 w-24 rounded-full flex-shrink-0"},o))})}):e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"w-full overflow-x-auto scrollbar-hide",children:e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("button",{className:`whitespace-nowrap px-4 py-2 rounded-full text-sm transition-colors flex-shrink-0 border ${s===null?"bg-[#1d458b] text-white border-[#1d458b]":"bg-transparent border-gray-200 text-gray-700 hover:border-[#1d458b] hover:text-[#1d458b]"}`,onClick:()=>r(null),children:"Todos os artigos"}),a==null?void 0:a.map(d=>e.jsx("button",{className:`whitespace-nowrap px-4 py-2 rounded-full text-sm transition-colors flex-shrink-0 border ${s===d.slug?"bg-[#1d458b] text-white border-[#1d458b]":"bg-transparent border-gray-200 text-gray-700 hover:border-[#1d458b] hover:text-[#1d458b]"}`,onClick:()=>r(d.slug),children:d.name},d.id))]})}),e.jsx("div",{className:"pointer-events-none absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-white to-transparent"})]})},F=({value:s,onChange:r})=>{const[a,l]=m.useState(s);return m.useEffect(()=>{l(s)},[s]),m.useEffect(()=>{const d=setTimeout(()=>{a!==s&&r(a)},300);return()=>clearTimeout(d)},[a]),e.jsxs("div",{className:"relative w-full sm:w-72",children:[e.jsx("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e.jsx(B,{size:18,className:"text-gray-400"})}),e.jsx("input",{type:"text",value:a,onChange:d=>l(d.target.value),className:"block w-full pl-10 pr-3 py-2 border border-gray-200 rounded-md leading-5 bg-gray-50 placeholder-gray-500 focus:outline-none focus:ring-0 focus:border-[#1d458b] focus:bg-white sm:text-sm transition-colors",placeholder:"Pesquisar no blog..."})]})},M=({currentPage:s,totalPages:r,onPageChange:a})=>{if(r<=1)return null;const l=()=>{const o=[],n=c=>o.push(c);if(r<=7){for(let c=1;c<=r;c++)n(c);return o}n(1),s>3&&n("ellipsis");
1const u=Math.max(2,s-1),x=Math.min(r-1,s+1);for(let c=u;c<=x;c++)n(c);return s<r-2&&n("ellipsis"),n(r),o},d=o=>{o<1||o>r||o===s||a(o)};return e.jsx("div",{className:"flex justify-center mt-12",children:e.jsxs("nav",{className:"flex items-center space-x-2",children:[e.jsxs("button",{onClick:()=>d(s-1),disabled:s===1,className:"flex items-center justify-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx(L,{size:16,className:"mr-1"}),"Anterior"]}),l().map((o,n)=>o==="ellipsis"?e.jsx("span",{className:"px-2 text-gray-400 text-sm",children:"…"},`e-${n}`):e.jsx("button",{onClick:()=>d(o),className:`px-4 py-2 rounded-md text-sm font-medium border transition-colors ${o===s?"bg-[#1d458b] text-white border-[#1d458b]":"border-gray-300 text-gray-700 bg-white hover:bg-gray-50"}`,children:o},o)),e.jsxs("button",{onClick:()=>d(s+1),disabled:s===r,className:"flex items-center justify-center px-3 py-2 border border-gray-300 rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-40 disabled:cursor-not-allowed",children:["Próximo",e.jsx(E,{size:16,className:"ml-1"})]})]})})},g=6,q=({categorySlug:s,searchQuery:r})=>{const{data:a,isLoading:l,error:d}=j({categorySlug:s||void 0,search:r||void 0}),o=!!s||!!(r&&r.trim()),[n,u]=m.useState(1);m.useEffect(()=>{u(1)},[s,r]);const x=Math.max(1,Math.ceil(((a==null?void 0:a.length)||0)/g)),c=m.useMemo(()=>{if(!a)return[];const t=(n-1)*g;return a.slice(t,t+g)},[a,n]);m.useEffect(()=>{n>x&&u(x)},[x,n]);const v=t=>
1{if(u(t),typeof document<"u"){const b=document.getElementById("category-filters");b&&b.scrollIntoView({behavior:"smooth",block:"start"})}};return d?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-destructive",children:"Erro ao carregar posts. Tente novamente."})}):l?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-8",children:Array.from({length:6}).map((t,b)=>e.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden",children:[e.jsx(i,{className:"h-48 w-full"}),e.jsxs("div",{className:"p-5",children:[e.jsx(i,{className:"h-5 w-24 mb-3"}),e.jsx(i,{className:"h-6 w-full mb-2"}),e.jsx(i,{className:"h-6 w-3/4 mb-4"}),e.jsx(i,{className:"h-4 w-full mb-2"}),e.jsx(i,{className:"h-4 w-2/3 mb-4"}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx(i,{className:"h-4 w-24"}),e.jsx(i,{className:"h-4 w-16"})]})]})]},b))}):!a||a.length===0?e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-gray-500",children:o?"Nenhum artigo encontrado para os filtros selecionados.":"Nenhum artigo publicado ainda."})}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2 gap-8",children:c.map(t=>e.jsxs("div",{className:"bg-white rounded-lg shadow-md overflow-hidden transition-transform hover:-translate-y-1 hover:shadow-lg",children:[e.jsx(f,{to:`/blog/${t.slug}`,children:e.jsx("div",{className:"h-48 overflow-hidden",children:e.jsx("img",{src:t.image_url||"https://images.unsplash.com/photo-1517502884422-41eaead166d4?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80",alt:t.title,className:"w-full h-full object-cover transition-transform hover:scale-105"})})}),e.jsxs("div",{className:"p-5",children:[t.category&&e.jsx("div",{className:"mb-3",children:e.jsx("span",{className:"inline-block bg-gray-100 text-bein-amber px-3 py-1 text-xs font-medium rounded-full",children:t.category.name})}),e.jsx(f,{to:`/blog/${t.slug}`,className:"block",children:e.jsx("h3",{className:"text-xl font-medium mb-2 hover:text-bein-amber transition-colors",children:t.title})}),t.excerpt&&e.jsx("p",{className:"text-gray-600 text-sm mb-4",children:t.excerpt}),e.jsxs("div",{className:"flex justify-between items-center text-sm text-gray-500",children:[e.jsx("span",{children:t.author_name}),t.read_time&&e.jsxs("div",{className:"flex items-center",children:[e.jsx(N,{size:14,className:"mr-1"}),e.jsx("span",{children:t.read_time})]})]}),e.jsx("div",{className:"mt-3 text-xs text-gray-400",children:t.published_at?h(t.published_at):h(t.created_at)})]})]},t.id))}),e.jsx(M,{currentPage:n,totalPages:x,onPageChange:v})]})},I=["Produtividade","Coworking","Design","Tecnologia","Bem-estar","Workplace","Flexibilidade","Home Office","Biofilia","Arquitetura","Mercado Imobiliário","Sustentabilidade","Liderança","Cultura"],R=()=>{const{data:s,isLoading:r}=j(),a=(s==null?void 0:s.slice(0,3))||[];return e.jsxs("aside",{className:"space-y-8",children:[e.jsxs("div",{className:"bg-gray-50 rounded-lg p-6 shadow-sm",children:[e.jsx("h3",{className:"text-lg font-medium mb-4",children:"Receba nossos conteúdos"}),e.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Assine nossa newsletter e receba conteúdo exclusivo sobre o mercado imobiliário e tendências de espaços de trabalho."}),e.jsxs("form",{className:"space-y-3",children:[e.jsx("div",{children:e.jsx("input",{type:"text",placeholder:"Seu nome",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-1 focus:ring-black focus:border-black"})}),e.jsx("div",{children:e.jsx("input",{type:"email",placeholder:"Seu e-mail corporativo",className:"w-full px-3 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-1 focus:ring-black focus:border-black"})}),e.jsx("button",{type:"submit",className:"w-full btn-primary text-sm",children:"Inscrever-se"})]})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium mb-4 pb-2 border-b border-gray-200",children:"Artigos populares"}),e.jsx("div",{className:"space-y-4",children:r?Array.from({length:3}).map((l,d)=>e.jsxs("div",{className:"flex items-start",children:[e.jsx(i,{className:"w-20 h-20 flex-shrink-0 rounded mr-3"}),e.jsxs("div",{className:"flex-1",children:[e.jsx(i,{className:"h-4 w-full mb-2"}),e.jsx(i,{className:"h-4 w-2/3 mb-2"}),e.jsx(i,{className:"h-3 w-24"})]})]},d)):a.length===0?e.jsx("p",{className:"text-sm text-gray-500",children:"Nenhum artigo publicado ainda."}
1):a.map(l=>e.jsxs(f,{to:`/blog/${l.slug}`,className:"flex items-start group",children:[e.jsx("div",{className:"w-20 h-20 flex-shrink-0 rounded overflow-hidden mr-3",children:e.jsx("img",{src:l.image_url||"https://images.unsplash.com/photo-1600508774634-4e11d34730e2?ixlib=rb-1.2.1&auto=format&fit=crop&w=300&q=80",alt:l.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-medium leading-snug group-hover:text-bein-amber transition-colors",children:l.title}),e.jsx("p",{className:"text-xs text-gray-500 mt-1",children:l.published_at?h(l.published_at):h(l.created_at)})]})]},l.id))})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium mb-4 pb-2 border-b border-gray-200",children:"Tags populares"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:I.map(l=>e.jsx("span",{className:"px-3 py-1 text-xs bg-gray-100 text-gray-800 rounded-full",children:l},l))})]})]})},W=A([{name:"Home",path:"/"},{name:"Blog",path:"/blog"}]),se=()=>{const[s,r]=m.useState(null),[a,l]=m.useState("");return e.jsxs("div",{className:"min-h-screen",children:[e.jsx(w,{title:"Blog - Tendências em Workspace e Coworking | Be in",description:"Acompanhe o blog da Be in: conteúdos sobre workspace, coworking, escritórios sob medida e Built to Suit para empresas em crescimento.",keywords:"blog workspace, coworking dicas, produtividade trabalho, tendências escritório, workspace moderno",canonical:"https://beinbr.com/blog",jsonLd:W}),e.jsx(y,{}),e.jsx(T,{}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12",children:[e.jsx($,{}),e.jsxs("div",{className:"flex flex-col md:flex-row mt-12",children:[e.jsxs("div",{className:"w-full md:w-2/3 md:pr-8",children:[e.jsxs("div",{id:"category-filters",className:"flex flex-col sm:flex-row sm:items-center gap-6 border-b border-gray-200 pb-5 mb-8 scroll-mt-24",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(z,{activeCategory:s,onCategoryChange:r})}),e.jsx("div",{className:"flex-shrink-0",children:e.jsx(F,{value:a,onChange:l})})]}),e.jsx(q,{categorySlug:s,searchQuery:a})]}),e.jsx("div",{className:"w-full md:w-1/3 mt-12 md:mt-0",children:e.jsx(R,{})})]})]}),e.jsx(k,{}),e.jsx(C,{})]})};export{se 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.