PageSourceSearch

https://ardora.com/assets/CollectionDetail-DC94Hp8z.js

js ardora.com collected 2026-09-25 01:26:00 UTC 4,439 bytes, 1 lines download raw bytes

1import{j as e,r as o,L as N,e as b,h as j,i as C}from"./index-CrUtuemb.js";import{a as v}from"./format-KilrumaR.js";import{B as P}from"./BookCard-BSCf9hka.js";import{P as k}from"./Pagination-C81xDrke.js";import{O as S}from"./OtherCollections-CP8NhLSr.js";import{S as B}from"./SEO-pgJMXHjt.js";import"./utils-BJMx_d8c.js";function $({collection:s}){return e.jsx("section",{className:"py-8 md:py-12",style:{background:s.color||"#e8d7b8"},children:e.jsx("div",{className:"container-custom",children:e.jsxs("div",{className:"max-w-5xl mx-auto",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-normal text-gray-900 mb-6",children:s.name}),e.jsx("p",{className:"text-lg text-gray-800 leading-relaxed max-w-3xl",children:e.jsx("span",{dangerouslySetInnerHTML:{__html:v(s.description)}})})]})})})}function w({collection:s,books:t,compact:a=!1}){const[n,h]=o.useState(1),[m,l]=o.useState(null),[u,c]=o.useState(!1),d=8,r=Math.ceil(t.length/d),x=(n-1)*d,p=x+d,g=t.slice(x,p),f=i=>{i===n||u||(l(i>n?"left":"right"),c(!0),setTimeout(()=>{h(i),setTimeout(()=>{c(!1),l(null)},50)},300))},y=`${t.length} ${t.length===1?"título":"títulos"} disponibles en tu librería de confianza`;return e.jsx("section",{className:a?"py-6 md:py-8":"py-12 md:py-16",children:e.jsxs("div",{className:"container-custom",children:[e.jsxs("div",{className:a?"mb-6 text-center":"mb-10 text-center",children:[e.jsxs("div",{className:a?"inline-flex items-center gap-3 mb-2":"inline-flex items-center gap-3 mb-3",children:[e.jsx("div",{className:a?"h-[1px] w-6 bg-gradient-to-r from-transparent to-[#138a8a]":"h-[1px] w-8 bg-gradient-to-r from-transparent to-[#138a8a]"}),e.jsx("h2",{className:a?"text-2xl md:text-3xl font-light text-gray-900 tracking-tight":"text-3xl md:text-4xl font-light text-gray-900 tracking-tight",children:"Libros de esta colección"}),e.jsx("div",{className:a?"h-[1px] w-6 bg-gradient-to-l from-transparent to-[#138a8a]":"h-[1px] w-8 bg-gradient-to-l from-transparent to-[#138a8a]"})]}),e.jsx("p",{className:"text-gray-600 text-sm italic",children:y})]}),g.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:`grid grid-cols-2 md:grid-cols-4 gap-10 md:gap-16 max-w-5xl mx-auto transition-all duration-300 ${m==="left"?"opacity-0 translate-x-[-100px]":m==="right"?"opacity-0 translate-x-[100px]":"opacity-100 translate-x-0"}`,children:g.map(i=>e.jsx(P,{book:i,collection:s},i.id))}),e.jsx(k,{currentPage:n,totalPages:r,onPageChange:f})]}):e.jsx("p",{className:"text-gray-600 text-center",children:"No hay libros disponibles."})]})})}function E({slug:s}){return e.jsx("div",{className:"min-h-screen py-12",children:e.jsxs("div",{className:"container-custom text-center",children:[e.jsx("h1",{className:"text-2xl text-gray-900 mb-4",children:"Colección no encontrada"}),e.jsxs("p",{className:"text-gray-600 mb-4",children:["Buscando: ",s]}),e.jsx(N,{to:"/catalogo",className:"link-teal",children:"Ver catálogo"})]})})}function M(){const{slug:s}=b(),[t,a]=o.useState(null),[n,h]=o.useState([]),[m,l]=o.useState(!0);if(o.useEffect(()=>{if(!s){l(!1);return}Promise.all([j(s),j(s).then(r=>r?C(r.id):[])]).then(([r,x])=>{a(r||null);const p=[...x].sort((g,f)=>f.reference.localeCompare(g.reference));h(p)}).finally(()=>l(!1))},[s]),m)return e.jsx("div",{className:"min-h-screen flex justify-center items-center",children:e.jsx("div",{className:"text-gray-500",children:"Cargando colección..."})});if(!t)return e.jsx(E,{slug:s});const u=r=>r.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),c=t.description?u(t.description).substring(0,160)+"...":`Colección ${t.name} de Árdora Ediciones. ${n.length} títulos de poesía y literatura.`,d={"@context":"https://schema.org","@type":"CollectionPage",name:`${t.name} - Árdora Ediciones`,description:c,url:`https://ardora.com/colecciones/${t.slug}`,publisher:{"@type":"Organization",name:"Árdora Ediciones",logo:{"@type":"ImageObject",url:"https://ardora.com/img/logo_ardora.jpg"}},numberOfItems:n.length};return e.jsxs(e.Fragment,{children:[e.jsx(B,{title:`${t.name} | Árdora Ediciones`,description:c,image:t.thumbnail||"https://ardora.com/img/logo_ardora.jpg",url:`https://ardora.com/colecciones/${t.slug}`,keywords:`${t.name}
1, colección, editorial, libros, poesía, literatura, ardora ediciones`,jsonLd:d}),e.jsxs("div",{className:"min-h-screen",children:[e.jsx($,{collection:t}),e.jsx(w,{collection:t,books:n}),e.jsx(S,{currentCollectionId:t.id})]})]})}export{M as CollectionDetail};

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.