PageSourceSearch

https://radiozona503.com/assets/BlogPostPage-DSaWkkJk.js

js radiozona503.com collected 2026-10-01 23:55:53 UTC 8,675 bytes, 1 lines download raw bytes

1import{c as C,u as E,a as _,r as d,j as e,N as u,F as g,R as N,L as i,S as r,H as P,A}from"./index-CGHuSNT4.js";import h from"./pocketbaseClient-6qBP5-6G.js";import{A as v}from"./arrow-left-DfSjXbgV.js";import{T as U,C as q}from"./tag-CRP-qx__.js";import{m as w}from"./proxy-CMTtMpl5.js";import{U as T}from"./user-moi09VEq.js";const L=C("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]);function O(a){return a?new Date(a).toLocaleDateString("es-SV",{year:"numeric",month:"long",day:"numeric"}):""}function k(a,t=""){if(!a?.cover)return null;const p=t?`?thumb=${t}`:"";return`${h.baseURL}/api/files/${a.collectionId}/${a.id}/${a.cover}${p}`}function J(){const{slug:a}=E();_();const[t,p]=d.useState(null),[j,S]=d.useState([]),[$,b]=d.useState(!0),[I,f]=d.useState(!1);d.useEffect(()=>{b(!0),f(!1),h.collection("blog_posts").getFirstListItem(`slug = '${a}' && status = 'published'`,{requestKey:`post-${a}`}).then(s=>{p(s);const c=s.categories?.split(",").map(m=>m.trim()).filter(Boolean)||[];c.length>0&&h.collection("blog_posts").getList(1,3,{filter:`status = 'published' && id != '${s.id}' && (${c.map(m=>`categories ~ '${m}'`).join(" || ")})`,sort:"-published_at",requestKey:`related-${s.id}`}).then(m=>S(m.items)).catch(()=>{})}).catch(()=>f(!0)).finally(()=>b(!1))},[a]);const y=()=>{navigator.share?navigator.share({title:t.title,text:t.summary,url:window.location.href}):navigator.clipboard.writeText(window.location.href)};if($)return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsx(u,{}),e.jsx("div",{className:"pt-32 pb-16 mx-auto max-w-3xl px-5",children:e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-muted rounded w-3/4"}),e.jsx("div",{className:"h-4 bg-muted rounded w-1/2"}),e.jsx("div",{className:"aspect-[16/9] bg-muted rounded-2xl"}),e.jsx("div",{className:"space-y-2",children:[1,2,3,4,5].map(s=>e.jsx("div",{className:"h-3 bg-muted rounded"},s))})]})}),e.jsx(g,{})]});if(I||!t)return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsx(u,{}),e.jsxs("div",{className:"pt-32 pb-16 mx-auto max-w-3xl px-5 text-center",children:[e.jsx(N,{className:"h-16 w-16 mx-auto mb-6 text-accent/30"}),e.jsx("h1",{className:"font-display text-4xl mb-4",children:"Artículo no encontrado"}),e.jsx("p",{className:"text-muted-foreground mb-8",children:"El artículo que buscas no existe o ha sido eliminado."}),e.jsxs(i,{to:"/blog",className:"inline-flex items-center gap-2 rounded-full bg-primary px-6 py-3 font-semibold text-primary-foreground",children:[e.jsx(v,{className:"h-4 w-4"})," Volver al Blog"]})]}),e.jsx(g,{})]});const o=k(t),n=t.categories?.split(",").map(s=>s.trim()).filter(Boolean)||[],x=`${r.url}blog/${t.slug}`,l=t.published_at||t.created,R={"@context":"https://schema.org","@type":"Article",headline:t.title,description:t.summary,image:o||r.logo,author:{"@type":"Person",name:t.author||"Radio Zona 503"},publisher:{"@type":"Organization",name:r.name,url:r.url,logo:{"@type":"ImageObject",url:r.logo}},datePublished:l,dateModified:t.updated||l,mainEntityOfPage:{"@type":"WebPage","@id":x},keywords:n.join(", "),articleSection:n[0]||"Radio",inLanguage:"es-SV"},B={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Inicio",item:r.url},{"@type":"ListItem",position:2,name:"Blog",item:`${r.url}blog`},{"@type":"ListItem",position:3,name:t.title,item:x}]};return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsxs(P,{children:[e.jsxs("title",{children:[t.title," | Blog Radio Zona 503"]}),e.jsx("meta",{name:"description",content:t.summary||`${t.title} - Blog de Radio Zona 503, La Lokera Total de El Salvador.`}),e.jsx("meta",{name:"keywords",content:n.join(", ")}),e.jsx("link",{rel:"canonical",href:x}),e.jsx("meta",{property:"og:type",content:"article"}),e.jsx("meta",{property:"og:title",content:t.title}),e.jsx("meta",{property:"og:description",content:t.summary}),e.jsx("meta",{property:"og:url",content:x}),o&&e.jsx("meta",{property:"og:image",content:o}),e.jsx("meta",{property:"og:site_name",content:r.name}),e.jsx("meta",{property:"article:published_time",content:l}),e.jsx("meta",{property:"article:author",content:t.author||r.name}),n.map(s=>e.jsx("meta",{property:"article:tag",content:s},s)),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),e.jsx("meta",{name:"twitter:title",content:t.title}),e.jsx("meta",{name:"twitter:description",content:t.summary}),o&&e.jsx("meta",{name:"twitter:image",content:o}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(R)}),e.jsx("script",{type:"application/ld+json",children:JSON.stringify(B)})]}),e.jsx(u,{}),e.jsxs("article",{className:"pt-24 pb-16 mx-auto max-w-3xl px-5",children:[e.jsxs("nav",{className:"flex items-center gap-2 text-xs text-muted-foreground mb-8","aria-label":"Breadcrumb",children:[e.jsx(i,{to:"/",className:"hover:text-foreground transition",children:"Inicio"}),e.jsx("span",{children:"/"}),e.jsx(i,{to:"/blog",className:"hover:text-foreground transition",children:"Blog"}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-foreground line-clamp-1",children:t.title})]}),n.length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:n.map(s=>e.jsxs(i,{to:`/blog?category=${encodeURIComponent(s)}`,className:"inline-flex items-center gap-1 rounded-full bg-accent/10 px-3 py-1 text-xs font-semibold uppercase tracking-wider text-accent hover:bg-accent/20 transition",children:[e.jsx(U,{className:"h-3 w-3"}),s]},s))}),e.jsx(w.h1,{initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},className:"font-display text-3xl sm:text-5xl leading-tight mb-6",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground mb-8 pb-6 border-b border-white/10",children:[t.author&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(T,{className:"h-4 w-4 text-accent"}),t.author]}),l&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(q,{className:"h-4 w-4 text-accent"}),O(l)]}),e.jsxs("button",{onClick:y,className:"ml-auto flex items-center gap-1.5 rounded-full border border-border px-3 py-1 text-xs hover:border-accent/40 transition",children:[e.jsx(L,{className:"h-3.5 w-3.5"})," Compartir"]})]}),o&&e.jsx(w.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},className:"rounded-2xl overflow-hidden mb-10 border border-white/10",children:e.jsx("img",{src:o,alt:t.title,className:"w-full object-cover max-h-[500px]"})}),t.summary&&e.jsx("p",{className:"text-lg text-muted-foreground border-l-2 border-accent pl-4 mb-8 italic",children:t.summary}),e.jsx("div",{className:"prose-blog",dangerouslySetInnerHTML:{__html:t.content}}),e.jsxs("div",{className:"mt-12 pt-8 border-t border-white/10 flex items-center justify-between flex-wrap gap-4",children:[e.jsxs(i,{to:"/blog",className:"inline-flex items-center gap-2 text-sm font-semibold text-accent hover:underline",children:[e.jsx(v,{className:"h-4 w-4"})," Volver al Blog"]}),e.jsxs("button",{onClick:y,className:"inline-flex items-center gap-2 rounded-full border border-border px-4 py-2 text-sm hover:border-accent/40 transition",children:[e.jsx(L,{className:"h-4 w-4"})," Compartir artículo"]})]})]}),j.length>0&&e.jsxs("section",{className:"mx-auto max-w-6xl px-5 pb-16",children:[e.jsx("h2",{className:"font-display text-2xl mb-6",children:"Artículos Relacionados"}),e.jsx("div",{className:"grid gap-6 sm:grid-cols-2 lg:grid-cols-3",children:j.map(s=>{const c=k(s,"400x200");return e.jsxs(i,{to:`/blog/${s.slug}`,className:"group rounded-2xl border border-white/10 bg-card overflow-hidden hover:border-accent/30 hover:-translate-y-1 transition-all duration-300",children:[c?e.jsx("img",{src:c,alt:s.title,className:"w-full aspect-[16/9] object-cover group-hover:scale-105 transition duration-500",loading:"lazy"}):e.jsx("div",{className:"aspect-[16/9] bg-gradient-to-br from-primary/10 to-accent/5 flex items-center justify-center",children:e.jsx(N,{className:"h-8 w-8 text-accent/30"})}),e.jsxs("div",{className:"p-4",children:[e.jsx("h3",{className:"font-semibold text-sm line-clamp-2 group-hover:text-accent transition-colors",children:s.title}),e.jsxs("span",{className:"text-xs text-muted-foreground mt-1 flex items-center gap-1",children:[e.jsx(A,{className:"h-3 w-3"})," Leer más"]})]})]},s.id)})})]}),e.jsx(g,{})]})}export{J 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.