PageSourceSearch

https://www.ccvt.fr/build/assets/NotFound-BGSxTEUp.js

js ccvt.fr collected 2026-10-09 17:05:56 UTC 3,645 bytes, 1 lines download raw bytes

1import{R as V,o as r,p as A,w as i,a as x,b as c,h as N,d as t,f as B,g as z,v as C,c as a,t as d,F as g,m as h,i as v,l as _,e as k,G as E,r as u,z as F,j as S,y as U}from"./app-CFYReQIT.js";import{_ as $}from"./GuestLayout-CsmOumC-.js";/* empty css            */import"./usePageUrl-CLpS-X3W.js";const D={class:"container max-w-3xl mx-auto px-4 py-16 md:py-24"},I={class:"flex gap-2"},M={"aria-live":"polite",class:"mb-12"},P={key:0,class:"text-gray-500"},j={key:1,class:"text-gray-500"},G={key:2,class:"divide-y divide-gray-200 border-t border-gray-200"},L=["href"],Q={class:"text-base font-semibold text-primary group-hover:text-secondary"},H={key:0,class:"mt-1 block text-sm text-gray-600 line-clamp-2"},J={"aria-label":"Rubriques principales",class:"border-t border-gray-200 pt-8"},K={class:"flex flex-wrap gap-x-6 gap-y-3"},ee={__name:"NotFound",setup(O){const w=S(),q=U(),p=u(""),y=u(""),o=u([]),m=u(!1),f=u(!1),R=F(()=>(q.props.menuItems||[]).filter(l=>l.page?.full_slug));let n=null;const T=()=>{clearTimeout(n),n=setTimeout(b,350)},b=async()=>{clearTimeout(n);const l=p.value.trim();if(l.length<2){o.value=[],f.value=!1;return}m.value=!0,y.value=l;try{const{data:e}=await E.get("/api/search",{params:{q:l}});o.value=Array.isArray(e)?e.slice(0,8):[]}catch{o.value=[]}finally{m.value=!1,f.value=!0}};return V(()=>clearTimeout(n)),(l,e)=>(r(),A($,null,{default:i(()=>[x(c(N),{title:"Page introuvable"},{default:i(()=>[...e[1]||(e[1]=[t("meta",{name:"robots",content:"noindex, follow","head-key":"robots"},null,-1)])]),_:1}),t("div",D,[e[6]||(e[6]=t("p",{class:"text-sm font-semibold uppercase tracking-widest text-secondary mb-3"}," Erreur 404 ",-1)),e[7]||(e[7]=t("h1",{class:"text-3xl md:text-4xl font-bold text-primary mb-4"}," Cette page n'existe pas ",-1)),e[8]||(e[8]=t("p",{class:"text-lg text-gray-600 mb-10"}," Elle a peut-être été déplacée ou supprimée, ou l'adresse comporte une erreur. Vous pouvez rechercher ce que vous cherchiez, ou repartir d'une des rubriques du site. ",-1)),t("form",{class:"mb-4",onSubmit:B(b,["prevent"])},[e[3]||(e[3]=t("label",{for:"recherche-404",class:"block text-sm font-semibold text-primary mb-2"}," Rechercher sur le site ",-1)),t("div",I,[z(t("input",{id:"recherche-404","onUpdate:modelValue":e[0]||(e[0]=s=>p.value=s),type:"search",autocomplete:"off",placeholder:"Un mot-clé, un service, une actualité…",class:"flex-1 rounded-lg border-2 border-gray-300 px-4 py-3 text-base focus:border-primary focus:outline-none",onInput:T},null,544),[[C,p.value]]),e[2]||(e[2]=t("button",{type:"submit",class:"rounded-lg bg-primary px-6 py-3 font-semibold text-white transition-colors hover:bg-primary-dark"}," Rechercher ",-1))])],32),t("div",M,[m.value?(r(),a("p",P,"Recherche en cours…")):f.value&&o.value.length===0?(r(),a("p",j," Aucun résultat pour « "+d(y.value)+" ». ",1)):o.value.length>0?(r(),a("ul",G,[(r(!0),a(g,null,h(o.value,s=>(r(),a("li",{key:`${s.type}-${s.id}`},[t("a",{href:s.url,class:"block py-4 group"},[t("span",Q,d(s.title),1),s.excerpt?(r(),a("span",H,d(s.excerpt),1)):v("",!0)],8,L)]))),128))])):v("",!0)]),t("nav",J,[e[5]||(e[5]=t("h2",{class:"text-sm font-semibold uppercase tracking-widest text-gray-500 mb-4"}," Aller directement à ",-1)),t("ul",K,[t("li",null,[x(c(_),{href:"/",class:"font-semibold text-primary hover:text-secondary"},{default:i(()=>[...e[4]||(e[4]=[k(" Accueil ",-1)])]),_:1})]),(r(!0),a(g,null,h(R.value,s=>(r(),a("li",{key:s.id},[x(c(_),{href:c(w)("page.show",s.page.full_slug),class:"font-semibold text-primary hover:text-secondary"},{default:i(()=>[k(d(s.label),1)]),_:2},1032,["href"])]))),128))])])])]),_:1}))}};export{ee 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.