PageSourceSearch

https://cdds.pt/build/assets/BlogShow-B5-YHGu2.js

js cdds.pt collected 2026-10-06 04:19:17 UTC 12,588 bytes, 1 lines download raw bytes

1import{s as M,i as K}from"./PostController-ezF868oM.js";import{X,b as J,u as O,_ as Q,a as W,F as Y}from"./useNavigation-B8ayC8Ay.js";import{d as z,o as R,E as Z,c as l,b as t,F as h,r as _,j as N,a as i,T as tt,w,k as s,z as E,u as d,t as m,n as u,f,G as et,g as $,i as S,H as G,l as st,h as at}from"./app-SfmhSMR7.js";import{S as U,a as H}from"./swiper-vue-0qzDDm6P.js";import{N as lt}from"./navigation-DWI3NAwP.js";import{_ as ot}from"./PageBanner.vue_vue_type_script_setup_true_lang-ByELpP9g.js";import{U as L}from"./user-Iv0ybESl.js";import{C as q}from"./calendar-WrGkUaKO.js";import{_ as nt}from"./SocialShare.vue_vue_type_script_setup_true_lang-BjSyAaqE.js";import{_ as it}from"./StructuredData.vue_vue_type_script_setup_true_lang-g8Ieub9E.js";import"./create-element-if-not-defined-DbbrOs_q.js";import"./check-CM5oQ-cJ.js";const rt={key:0,class:"my-8 sm:my-10"},ct={class:"grid grid-cols-2 gap-3 sm:gap-4 md:grid-cols-3 lg:grid-cols-4"},dt=["onClick"],ut=["src","alt"],mt={class:"absolute top-4 left-4 z-60 bg-white/10 px-3 py-1.5 text-sm font-medium text-white backdrop-blur-sm sm:px-4 sm:py-2 sm:text-base"},gt={class:"w-full max-w-6xl"},pt=["src","alt"],ft=["src","alt"],ht=z({__name:"ImageGallery",props:{images:{}},setup(e){const g=e,n=$(!1),a=$(0),c=$(null),y=$(null),k=[lt],I=S(()=>g.images.length<=8);async function T(o){if(a.value=o,n.value=!0,document.body.style.overflow="hidden",await G(),await G(),c.value&&(c.value.update(),c.value.slideTo(o,0)),y.value){y.value.update();try{B(o,0)}catch{y.value.slideTo(o,0)}}}function j(){n.value=!1,document.body.style.overflow=""}function b(o){c.value=o}function v(o){y.value=o}function B(o,x=300){const r=y.value;if(!r)return;let p=Number(r.params.slidesPerView);Number.isFinite(p)||(p=4);const F=Math.floor(p/2);let C=o-F;C<0&&(C=0);const D=Math.max(0,(r.slides?.length??0)-p);C>D&&(C=D),r.slideTo(C,x)}function A(o){a.value=o.activeIndex,B(o.activeIndex)}function P(o){a.value=o,c.value&&c.value.slideTo(o,300),B(o,200)}function V(o){o.key==="Escape"&&n.value&&j(),n.value&&c.value&&(o.key==="ArrowRight"&&c.value.slideNext(),o.key==="ArrowLeft"&&c.value.slidePrev())}return R(()=>{typeof window<"u"&&window.addEventListener("keydown",V)}),Z(()=>{typeof window<"u"&&window.removeEventListener("keydown",V)}),(o,x)=>g.images?.length?(s(),l("section",rt,[x[1]||(x[1]=t("h3",{class:"mb-4 text-xl font-bold text-cdds-black sm:mb-6 sm:text-2xl"}," Galeria de Imagens ",-1)),t("div",ct,[(s(!0),l(h,null,_(g.images,(r,p)=>(s(),l("button",{key:r.id,type:"button",class:"group relative aspect-square cursor-pointer overflow-hidden bg-gray-100 transition-all duration-300 hover:shadow-lg",onClick:F=>T(p)},[t("img",{src:r.url,alt:r.name,class:"h-full w-full object-cover transition-transform duration-300 group-hover:scale-110",loading:"lazy"},null,8,ut),x[0]||(x[0]=t("div",{class:"absolute inset-0 bg-cdds-black/0 transition-all duration-300 group-hover:bg-cdds-black/20"},null,-1))],8,dt))),128))]),(s(),N(et,{to:"body"},[i(tt,{"enter-active-class":"transition-opacity duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"transition-opacity duration-300","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:w(()=>[n.value?(s(),l("div",{key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-cdds-black/95 p-4 select-none",onClick:E(j,["self"]),role:"dialog","aria-modal":"true"},[t("button",{type:"button",class:"absolute top-4 right-4 z-60 flex h-10 w-10 items-center justify-center bg-white/10 text-white transition-all duration-200 hover:bg-white/20 sm:h-12 sm:w-12",onClick:j,"aria-label":"Fechar galeria",ref:"closeButton"},[i(d(X),{class:"h-6 w-6 sm:h-7 sm:w-7"})],512),t("div",mt,m(a.value+1)+" / "+m(g.images.length),1),t("div",gt,[i(d(U),{modules:k,navigation:!0,"space-between":10,class:"lightbox-swiper mb-4",onSwiper:b,onSlideChange:A},{default:w(()=>[(s(!0),l(h,null,_(g.images,r=>(s(),N(d(H),{key:r.id,class:"flex items-center justify-center"},{default:w(()=>[t("img",{src:r.url,alt:r.name,class:"lightbox-image",loading:"lazy"},null,8,pt)]),_:2},1024))),128))]),_:1}),i(d(U),{modules:k,"slides-per-view":4,"space-between":8,"watch-slides-progress":!0,breakpoints:{640:{slidesPerView:6,spaceBetween:12},1024:{slidesPerView:8,spaceBetween:16}},class:u(["thumbs-swiper",{"thumbs-centered":I.value}]),onSwiper:v},{default:w(()=>[(s(!0),l(h,null,_(g.images,(r,p)=>(s(),N(d(H),{key:`thumb-${r.id}`,class:"thumb-slide cursor-pointer",onClick:E(()=>P(p),["prevent"])},{default:w(()=>[t("div",{class:u(["aspect-square overflow-hidden bg-gray-900 transition-all duration-200",p===a.value?"border-2 border-cdds-red opacity-100":"border-2 border-transparent opacity-60 hover:border-white/30 hover:opacity-100"])},[t("img",{src:r.url,alt:r.name,class:"h-full w-full object-cover",loading:"lazy"},null,8,ft)],2)]),_:2},1032,["onClick"]))),128))]),_:1},8,["class"])])])):f("",!0)]),_:1})]))])):f("",!0)}}),yt=J(ht,[["__scopeId","data-v-819c412a"]]),bt={class:"space-y-6"},vt={class:"mb-3 aspect-video w-full overflow-hidden bg-gray-100"},xt=["src"],wt={key:0,class:"mb-2 flex flex-wrap gap-2"},_t={class:"mb-2 line-clamp-2 text-base font-bold text-cdds-black transition-colors group-hover:text-cdds-red sm:text-lg"},kt={class:"flex flex-wrap items-center gap-3 text-sm text-cdds-gray"},$t={class:"flex items-center gap-2"},Tt={class:"flex items-center gap-2"},Ct={key:0,class:"mt-6 border-t border-gray-200"},St=z({__name:"RelatedPosts",props:{relatedPosts:{}},setup(e){return(g,n)=>(s(),l(h,null,[n[0]||(n[0]=t("h2",{class:"mb-6 text-xl font-bold text-cdds-black sm:text-2xl"}
1," Notícias Relacionadas ",-1)),t("div",bt,[(s(!0),l(h,null,_(e.relatedPosts,a=>(s(),l("article",{key:a.id,class:"group"},[i(d(st),{href:d(M).url(a.slug),class:"block focus:outline-none focus-visible:ring-2 focus-visible:ring-cdds-red focus-visible:ring-offset-2",tabindex:"0"},{default:w(()=>[t("div",vt,[t("img",{src:a.image,alt:"",class:"h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"},null,8,xt)]),a.categories&&a.categories.length?(s(),l("div",wt,[(s(!0),l(h,null,_(a.categories,c=>(s(),l("span",{key:c,class:"inline-block bg-cdds-red/10 px-3 py-1 text-xs font-medium text-cdds-red"},m(c),1))),128))])):f("",!0),t("h3",_t,m(a.title),1),t("div",kt,[t("div",$t,[i(d(L),{class:"h-3.5 w-3.5 shrink-0"}),t("span",null,m(a.author),1)]),t("div",Tt,[i(d(q),{class:"h-3.5 w-3.5 shrink-0"}),t("span",null,m(a.date),1)])])]),_:2},1032,["href"]),a.id!==e.relatedPosts[e.relatedPosts.length-1].id?(s(),l("hr",Ct)):f("",!0)]))),128))])],64))}}),It=["content"],jt=["content"],Nt=["content"],Bt=["content"],Mt=["content"],Lt=["content"],zt=["content"],Vt=["content"],Ft=["content"],Dt=["content"],Et=["content"],Gt=["content"],Ut=["href"],Ht={class:"min-h-screen bg-gray-50"},Rt={class:"py-16 lg:py-24"},qt={class:"container mx-auto max-w-7xl px-4 sm:px-6 lg:px-8"},At={class:"grid grid-cols-1 gap-8 lg:grid-cols-3 lg:gap-12"},Pt=["src","alt"],Kt={class:"flex items-center gap-2"},Xt={class:"flex items-center gap-2"},Jt=["innerHTML"],Ot={class:"flex flex-col items-center gap-6 sm:flex-row sm:items-start sm:gap-8"},Qt={class:"mx-auto shrink-0 sm:mx-0"},Wt={class:"flex h-25 w-25 items-center justify-center overflow-hidden rounded-full bg-gray-200"},Yt=["src","alt"],Zt={key:1,class:"flex h-full w-full items-center justify-center rounded-full bg-cdds-red text-white"},te={class:"flex-1 text-center sm:text-left"},ee={class:"mb-3 text-xl font-bold text-cdds-black sm:text-2xl"},se={key:0,class:"text-sm leading-relaxed text-cdds-gray sm:text-base"},fe=z({__name:"BlogShow",props:{post:{},relatedPosts:{},structuredData:{}},setup(e){const{navigationMenus:g}=O(),n=$(!1),a=e,c=S(()=>[{label:"Início",href:"/"},{label:"Notícias",href:K.url()},{label:a.post.title}]),y=S(()=>a.post.title),k=S(()=>a.post.excerpt),I=S(()=>a.post.image),T=$(M.url(a.post.slug));return R(()=>{typeof window<"u"&&window.location&&(T.value=`${window.location.origin}${M.url(a.post.slug)}`),setTimeout(()=>{n.value=!0},50)}),(j,b)=>(s(),l(h,null,[i(d(at),{title:e.post.title},{default:w(()=>[t("meta",{name:"description",content:k.value},null,8,It),t("meta",{name:"author",content:e.post.author},null,8,jt),t("meta",{property:"og:title",content:y.value},null,8,Nt),t("meta",{property:"og:description",content:k.value},null,8,Bt),b[0]||(b[0]=t("meta",{property:"og:type",content:"article"},null,-1)),t("meta",{property:"og:url",content:T.value},null,8,Mt),t("meta",{property:"og:image",content:I.value},null,8,Lt),t("meta",{property:"article:author",content:e.post.author},null,8,zt),t("meta",{property:"article:published_time",content:e.post.dateIso},null,8,Vt),(s(!0),l(h,null,_(e.post.categories,v=>(s(),l("meta",{key:v,property:"article:tag",content:v},null,8,Ft))),128)),b[1]||(b[1]=t("meta",{name:"twitter:card",content:"summary_large_image"},null,-1)),t("meta",{name:"twitter:title",content:y.value},null,8,Dt),t("meta",{name:"twitter:description",content:k.value},null,8,Et),t("meta",{name:"twitter:image",content:I.value},null,8,Gt),t("link",{rel:"canonical",href:T.value},null,8,Ut)]),_:1},8,["title"]),e.structuredData?(s(),N(it,{key:0,data:e.structuredData},null,8,["data"])):f("",!0),t("div",Ht,[i(Q),i(W,{"navigation-menus":d(g),"always-visible":!0,"key-prefix":"blog"},null,8,["navigation-menus"]),i(ot,{title:"Notícias",breadcrumbs:c.value,"background-image":"/images/banners/banner-news.jpg"},null,8,["breadcrumbs"]),t("main",Rt,[t("div",qt,[t("div",At,[t("article",{class:u(["transition-all duration-700 ease-out lg:col-span-2",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[t("div",{class:u(["mb-6 aspect-video overflow-hidden bg-gray-100 transition-all delay-100 duration-700 ease-out sm:mb-8",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])}
1,[t("img",{src:e.post.image,alt:e.post.title,class:"h-full w-full object-cover transition-transform duration-500"},null,8,Pt)],2),e.post.categories&&e.post.categories.length?(s(),l("div",{key:0,class:u(["mb-4 flex flex-wrap gap-2 transition-all delay-200 duration-700 ease-out sm:mb-6",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[(s(!0),l(h,null,_(e.post.categories,v=>(s(),l("span",{key:v,class:"inline-block bg-cdds-red/10 px-4 py-1.5 text-sm font-medium text-cdds-red transition-all duration-300"},m(v),1))),128))],2)):f("",!0),t("h1",{class:u(["mb-6 text-2xl leading-tight font-bold text-cdds-black transition-all delay-300 duration-700 ease-out sm:text-3xl lg:text-4xl",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},m(e.post.title),3),t("div",{class:u(["mb-8 flex flex-wrap items-center gap-3 border-b border-gray-200 pb-6 text-sm text-cdds-gray transition-all delay-400 duration-700 ease-out sm:gap-6 sm:pb-8",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[t("div",Kt,[i(d(L),{class:"h-4 w-4 shrink-0"}),t("span",null,m(e.post.author),1)]),t("div",Xt,[i(d(q),{class:"h-4 w-4 shrink-0"}),t("span",null,m(e.post.date),1)]),f("",!0)],2),t("div",{class:u(["blog-content transition-all delay-500 duration-700 ease-out",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"]),innerHTML:e.post.content},null,10,Jt),e.post.gallery&&e.post.gallery.length>0?(s(),l("div",{key:1,class:u(["transition-all delay-600 duration-700 ease-out",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[i(yt,{images:e.post.gallery},null,8,["images"])],2)):f("",!0),t("div",{class:u(["my-10 transition-all delay-700 duration-700 ease-out",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[i(nt,{title:e.post.title,description:`${e.post.title} - ${e.post.author}`,categories:e.post.categories},null,8,["title","description","categories"])],2),b[2]||(b[2]=t("div",{class:"mb-8 border-t border-gray-200"},null,-1)),t("div",{class:u(["mt-8 bg-gray-50 transition-all delay-800 duration-700 ease-out sm:mt-10",n.value?"translate-y-0 opacity-100":"translate-y-8 opacity-0"])},[t("div",Ot,[t("div",Qt,[t("div",Wt,[e.post.authorImage?(s(),l("img",{key:0,src:e.post.authorImage,alt:e.post.author,class:"rounded-full object-cover"},null,8,Yt)):(s(),l("div",Zt,[i(d(L),{class:"h-10 w-10"})]))])]),t("div",te,[t("h2",ee,m(e.post.author),1),e.post.authorBio?(s(),l("p",se,m(e.post.authorBio),1)):f("",!0)])])],2)],2),t("aside",{class:u(["h-fit space-y-8 self-start transition-all delay-300 duration-700 ease-out lg:sticky lg:top-32",n.value?"translate-x-0 opacity-100":"translate-x-8 opacity-0"])},[i(St,{"related-posts":e.relatedPosts},null,8,["related-posts"])],2)])])]),i(Y)])],64))}});export{fe 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.