PageSourceSearch

https://transportsimple.com/assets/BlogsPage-DjPmMFxP.js

js transportsimple.com collected 2026-10-01 23:53:02 UTC 9,851 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-ui-A12DDDPJ.js";import{r as o,L as c}from"./vendor-react-zaFybfsY.js";import{s as y,k as w,n as S,ac as k,g as _,C as b,A as C}from"./index-D_1QbJPd.js";import L from"./Footer-D5XUTpnF.js";import B from"./CTABlock-Vm8pfAaA.js";import{B as x}from"./badge-CeN1eeYq.js";import{S as T}from"./search-CROWAjai.js";import{U as j}from"./user-C-pRPf17.js";import{C as v}from"./calendar-DksFYh1d.js";import"./preload-helper-CZ5Qg0oT.js";import"./vendor-supabase-BBbWDq57.js";import"./vendor-i18n-nJJiGX0r.js";const f=s=>{if(!s?.blocks)return 3;const n=s.blocks.map(r=>r.data?.text?r.data.text:r.data?.items?r.data.items.map(l=>typeof l=="string"?l:l.content||"").join(" "):"").join(" ").replace(/<[^>]*>/g,"");return Math.max(1,Math.ceil(n.split(/\s+/).length/200))},E=({blog:s,readTime:n})=>e.jsxs("div",{className:"group bg-card border border-border rounded-xl overflow-hidden hover:shadow-lg transition-all hover:-translate-y-1",children:[e.jsx(c,{to:`/blogs/${s.slug}`,className:"block",children:s.cover_image_url?e.jsx("div",{className:"aspect-video overflow-hidden",children:e.jsx("img",{src:s.cover_image_url,alt:s.title,className:"w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-300",loading:"lazy"})}):e.jsx("div",{className:"aspect-video bg-gradient-to-br from-[hsl(var(--primary)/0.1)] to-[hsl(var(--secondary)/0.1)] flex items-center justify-center",children:e.jsx("span",{className:"text-4xl font-heading font-bold text-primary/20",children:"TS"})})}),e.jsxs("div",{className:"p-5",children:[s.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:s.tags.slice(0,2).map(r=>e.jsx(c,{to:`/blogs/tag/${encodeURIComponent(r.toLowerCase().replace(/\s+/g,"-"))}`,onClick:l=>l.stopPropagation(),className:"no-underline",children:e.jsx(x,{variant:"secondary",className:"text-[10px] font-semibold uppercase tracking-wide bg-[hsl(var(--primary)/0.1)] text-primary border-0 px-2 py-0.5 hover:bg-[hsl(var(--primary)/0.2)] transition-colors",children:r})},r))}),e.jsxs(c,{to:`/blogs/${s.slug}`,className:"block no-underline",children:[e.jsx("h2",{className:"font-heading font-bold text-foreground text-lg mb-2 group-hover:text-primary transition-colors line-clamp-2",children:s.title}),e.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-3",children:s.excerpt}),e.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(j,{className:"w-3.5 h-3.5"})," ",s.author_name]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(b,{className:"w-3.5 h-3.5"})," ",n," min read"]}),s.published_at&&e.jsxs("span",{className:"flex items-center gap-1 hidden sm:flex",children:[e.jsx(v,{className:"w-3.5 h-3.5"}),new Date(s.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),e.jsx(C,{className:"w-4 h-4 text-primary opacity-0 group-hover:opacity-100 transition-opacity"})]})]})]})]}),H=()=>{const[s,n]=o.useState([]),[r,l]=o.useState(!0),[i,p]=o.useState(null),[m,N]=o.useState("");o.useEffect(()=>{y.from("blogs").select("id, title, slug, excerpt, cover_image_url, author_name, published_at, tags, content").eq("is_published",!0).order("published_at",{ascending:!1}).then(({data:t})=>{n(t||[]),l(!1)})},[]);const h=Array.from(new Set(s.flatMap(t=>t.tags))).sort(),d=s.filter(t=>{if(i&&!t.tags.includes(i))return!1;if(m){const u=m.toLowerCase();return t.title.toLowerCase().includes(u)||t.excerpt.toLowerCase().includes(u)}return!0}),a=d[0],g=d.slice(1);return e.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[e.jsx(w,{title:"Fleet Management Blog — TransportSimple",description:"Expert insights, tips and guides on fleet management, logistics optimization, vehicle maintenance and transportation industry best practices.",canonical:"/blogs",jsonLd:[{"@context":"https://schema.org","@type":"CollectionPage",name:"TransportSimple Blog",description:"Expert insights, tips and guides on fleet management, logistics optimization, vehicle maintenance and transportation industry best practices.",url:"https://www.transportsimple.com/blogs",publisher:{"@type":"Organization",name:"Trans
1portSimple",logo:{"@type":"ImageObject",url:"https://www.transportsimple.com/logo.png"}}},{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.transportsimple.com/"},{"@type":"ListItem",position:2,name:"Blog",item:"https://www.transportsimple.com/blogs"}]}]}),e.jsx(S,{}),e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[hsl(var(--primary))] via-[hsl(var(--primary-dark))] to-[hsl(var(--primary))] text-primary-foreground py-20 md:py-28",children:[e.jsx("div",{className:"absolute inset-0 opacity-[0.05] pointer-events-none",style:{backgroundImage:"radial-gradient(circle, #fff 1px, transparent 1px)",backgroundSize:"32px 32px"}}),e.jsx("div",{className:"absolute top-0 right-0 w-[500px] h-[500px] rounded-full bg-white/[0.03] -translate-y-1/2 translate-x-1/3"}),e.jsx("div",{className:"absolute bottom-0 left-0 w-[300px] h-[300px] rounded-full bg-white/[0.04] translate-y-1/2 -translate-x-1/4"}),e.jsxs("div",{className:"max-w-[1400px] mx-auto px-4 text-center relative z-10",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-full px-4 py-1.5 mb-6",children:[e.jsx(k,{className:"w-4 h-4"}),e.jsx("span",{className:"text-sm font-medium",children:"Fleet Management Insights"})]}),e.jsxs("h1",{className:"font-heading text-4xl md:text-5xl lg:text-6xl font-extrabold mb-5 leading-tight",children:["The TransportSimple ",e.jsx("br",{className:"hidden md:block"}),e.jsx("span",{className:"bg-gradient-to-r from-white to-white/70 bg-clip-text text-transparent",children:"Blog"})]}),e.jsx("p",{className:"text-lg md:text-xl text-white/80 max-w-2xl mx-auto leading-relaxed",children:"Expert insights, practical tips and industry updates to help you run a smarter, more efficient fleet."})]})]}),e.jsx("section",{className:"border-b border-border bg-card",children:e.jsx("div",{className:"max-w-[1400px] mx-auto px-4 py-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[e.jsxs("div",{className:"relative flex-1 max-w-sm",children:[e.jsx(T,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(_,{placeholder:"Search articles...",value:m,onChange:t=>N(t.target.value),className:"pl-9 text-sm"})]}),h.length>0&&e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx("button",{onClick:()=>p(null),className:`text-xs px-3 py-1.5 rounded-full font-medium transition-colors ${i?"bg-muted text-muted-foreground hover:bg-muted-foreground/20":"bg-primary text-primary-foreground"}`,children:"All"}),h.map(t=>e.jsx("button",{onClick:()=>p(i===t?null:t),className:`text-xs px-3 py-1.5 rounded-full font-medium transition-colors ${i===t?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted-foreground/20"}`,children:t},t))]})]})})}),e.jsx("section",{className:"py-16 flex-1",children:e.jsx("div",{className:"max-w-[1400px] mx-auto px-4",children:r?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"w-8 h-8 border-2 border-primary border-t-transparent rounded-full animate-spin"})}):d.length===0?e.jsx("p",{className:"text-center text-muted-foreground py-16 text-lg",children:"No blog posts found. Check back soon!"}):e.jsxs(e.Fragment,{children:[a&&e.jsxs(c,{to:`/blogs/${a.slug}`,className:"group grid md:grid-cols-2 gap-6 mb-12 bg-card border border-border rounded-xl overflow-hidden hover:shadow-xl transition-all",children:[e.jsx("div",{className:"aspect-video md:aspect-auto md:max-h-[340px] overflow-hidden",children:a.cover_image_url?e.jsx("img",{src:a.cover_image_url,alt:a.title,className:"w-full h-full object-cover object-center group-hover:scale-105 transition-transform duration-300",loading:"lazy"}):e.jsx("div",{className:"w-full h-full min-h-[250px] bg-gradient-to-br from-[hsl(var(--primary)/0.1)] to-[hsl(var(--secondary)/0.1)] flex items-center justify-center",children:e.jsx("span",{className:"text-6xl font-heading font-bold text-primary/20",children:"TS"})})}),e.jsxs("div",{className:"p-6 md:p-8 flex flex-col justify-center",children:[e.jsx(x,{className:"w-fit mb-3 bg-primary/10 text-primary border-0 text-[11px] font-semibold uppercase",children:"Featured"}),a.tags.length>0&&e.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:a.tags.map(t=>e.jsx(x,{variant:"secondary",className:"text-[10px] uppercase tracking-wide bg-muted border-0",children:t},t))}),e.jsx("h2",{className:"font-heading font-bold text-foreground text-xl md:text-2xl mb-3 group-hover:text-primary transition-colors",children:a.title}),e.jsx("p",{className:"text-muted-foreground text-sm mb-4 line-clamp-3",children:a.excerpt}),e.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(j,{className:"w-3.5 h-3.5"})," ",a.author_name]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(b,{className:"w-3.5 h-3.5"})," ",f(a.content)," min read"]}),a.published_at&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(v,{className:"w-3.5 h-3.5"}),new Date(a.published_at).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]})]})]}),g.length>0&&e.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-8",children:g.map(t=>e.jsx(E,{blog:t,readTime:f(t.content)},t.id))})]})})}),e.jsx(B,{}),e.jsx(L,{})]})};export{H 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.