PageSourceSearch

https://sh-guide.de/_nuxt/7MP02oDl.js

js sh-guide.de collected 2026-10-06 09:58:14 UTC 11,816 bytes, 1 lines download raw bytes

1import{j as P,c as m,n as B,M as O,O as q,q as j,ao as F,a as p,o,d as t,y as L,b as h,g as S,t as v,e as y,B as M,x as G,K as V,h as K,r as I,m as z,C as U,a6 as H,u as b,w as W,F as Z,f as J,cC as E,i as Q,V as X,a8 as D,D as Y,a9 as ee,H as te,I as se,k as re,N as ae}from"./FcYNwMmb.js";import{_ as oe}from"./CvOLBrAg.js";import{u as le}from"./0kj3WwMt.js";import{_ as ne,a as ie}from"./CelBwquY.js";import{u as ce,S as ue,b as de,N as fe,a as pe}from"./B1aWsaaZ.js";import{_ as me}from"./BYFjqsJH.js";import{O as he}from"./AoRtIhGP.js";import{p as ve,E as ge,_ as be}from"./BlWWbSov.js";import{_ as xe}from"./C39TRKFw.js";const we=["href"],ye={class:"border border-grey-700 h-full flex flex-col transition-transform duration-200 hover:-translate-y-1 hover:shadow-lg"},ke={class:"aspect-w-16 aspect-h-9"},_e={key:0,class:"absolute bottom-2 left-2 bg-black bg-opacity-50 text-white text-xs p-1 z-10"},Se={class:"flex flex-col flex-grow p-5 relative"},$e={class:"flex gap-2 h-12 md:h-12 xl:h-20"},Be={class:"font-ptsans font-bold text-customerblack text-base md:text-lg overflow-hidden"},Ie=P({__name:"blogPostScroll",props:{post:Object},setup(i){const c=i,x=m(()=>{const l=c.post?B(c.post,"teaser_titel")??"":"";if(!O(l)){const a=c.post?B(c.post,"title")??"":"";return q(a,40)}return l}),g=m(()=>{const l=c.post?B(c.post,"teaser_text")??"":"";if(!O(l)){const a=c.post?B(c.post,"body")??"":"";return q(a,250)}return l}),u=m(()=>{const l=B(c.post,"teaser_bild"),a=ve(l);return{path:j(a.path),description:a.description,copyright:a.copyright,aiGenerated:a.aiGenerated}}),r=m(()=>u.value.path?{backgroundImage:`url(${u.value.path})`,backgroundPosition:"center center"}:{backgroundImage:"/images/placeholders/placeholder.jpeg",backgroundPosition:"center center"}),d=m(()=>{var a;const l=((a=c.post)==null?void 0:a.id)||"";return F("/blogartikel",l,x.value)});return(l,a)=>{const k=G("SafeHtml");return o(),p("a",{href:d.value,class:"block h-full",style:{"background-color":"#fff"}},[t("div",ye,[t("div",ke,[t("div",{class:"bag-reg-cards w-full h-40 relative",style:L(r.value)},[u.value.copyright?(o(),p("div",_e," © "+v(u.value.copyright),1)):h("",!0),u.value.aiGenerated?(o(),S(ge,{key:1,active:!0,size:"sm"})):h("",!0)],4)]),t("div",Se,[t("div",$e,[t("div",Be,v(x.value),1)]),y(k,{content:g.value,class:"font-firasans font-normal text-customerblack text-sm h-20 lg:h-24"},null,8,["content"]),a[0]||(a[0]=M('<div class="absolute bottom-0 right-0"><div class="triangle-arrow"><svg width="68" height="51" viewBox="0 0 68 51" fill="none" xmlns="http://www.w3.org/2000/svg" class="triangle-bg"><path d="M68 51V4.17647V0L0 51H68Z" fill="#B9096B"></path></svg><div class="arrow-container"><img src="'+be+'" alt="Arrow" width="32" height="20"></div></div></div>',1))])])],8,we)}}}),Ce=["aria-label"],Ne={class:"pl-4 pr-4 md:pl-12 md:pr-12 xl:pl-36 xl:pr-24"},Te={class:"flex gap-2 items-baseline mt-10 flex-wrap"},Ee={class:"text-customblue font-amaticsc text-4xl sm:text-5xl font-bold flex items-baseline"},Re={class:"ml-3 text-gray-500 text-2xl sm:text-3xl"},Ae={class:"w-full"},Oe={key:0,class:"mt-9 flex items-center gap-3 text-gray-500",role:"status","aria-live":"polite"},qe={key:1,class:"mt-9 block"},We={class:"flex items-center"},De=["aria-label"],Me=["aria-label"],Ve={name:"ContentSection"},ze=Object.assign(Ve,{props:{title:{type:String,required:!0},contentTypeId:{type:Number,required:!0},searchWord:{type:String,default:""}},emits:["numberOfResults"],setup(i,{emit:c}){const x=K(),g=i,u=c,r=I([]),d=I(!1),l=m(()=>{const n=r.value.length;return n===1?"1 Treffer":`${n} Treffer`});let a=0;const k=async()=>{const n=(g.searchWord||"").trim();if(n.length<E){r.value=[],d.value=!1,u("numberOfResults",0);return}const s=++a;d.value=!0;const e=Q(g.contentTypeId);e.query.limit=100,e.query.contentTypeId=g.contentTypeId,e.query.view_status=1,e.query.resourceType="teaser",e.query.keyword=n,e.query.selectedAppId=1,e.query.sort=JSON.stringify({prop:"created_at",order:"desc"});try{if(await x.search(e),s!==a)return;r.value=Array.isArray(e.data)?e.data:[],u("numberOfResults",r.value.length)}catch(f){if(s!==a)return;console.error("Error fetching contents:",f),r.value=[],u("numberOfResults",0)}finally{s===a&&(d.value=!1)}};z(()=>g.searchWord,()=>{k()}),U(()=>{k()});const w=de,{loopEnabled:C,showArrows:_}=ce(m(()=>r.value.length),w),$=I(null),N=n=>{$.value=n},R=()=>{var n;(n=$.value)==null||n.slidePrev()},A=()=>{var n;(n=$.value)==null||n.slideNext()};return(n,s)=>d.value||r.value.length>0?(o(),p("section",{key:0,class:"mb-10","aria-label":`${i.title}: ${l.value}`},[t("div",Ne,[t("div",Te,[t("h2",Ee,[H(v(i.title)+" ",1),t("span",Re," ("+v(l.value)+") ",1)])]),t("div",Ae,[d.value?(o(),p("div",Oe,[s[0]||(s[0]=t("svg",{class:"animate-spin h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true"},[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),t("span",null,v(i.title)+" werden geladen …",1)])):r.value.length>
10?(o(),p("div",qe,[t("div",We,[b(_)?(o(),p("button",{key:0,type:"button",class:"nav-arrow shrink-0 pr-2 md:pr-6","aria-label":`${i.title}: vorherige Treffer anzeigen`,onClick:R},s[1]||(s[1]=[t("img",{src:ne,alt:"","aria-hidden":"true",class:"arrow"},null,-1)]),8,De)):h("",!0),y(b(pe),{modules:[b(fe)],loop:b(C),spaceBetween:20,breakpoints:b(w),onSwiper:N,class:"w-full",role:"list","aria-label":`${i.title} Suchergebnisse`},{default:W(()=>[(o(!0),p(Z,null,J(r.value,(e,f)=>(o(),S(b(ue),{key:e.id??`key${f}`,class:"mb-2",role:"listitem"},{default:W(()=>[i.title==="Angebote"?(o(),S(he,{key:0,offer:e},null,8,["offer"])):i.title==="Anbieter"?(o(),S(me,{key:1,institution:e},null,8,["institution"])):i.title==="BlogPosts"?(o(),S(Ie,{key:2,post:e},null,8,["post"])):i.title==="Events"?(o(),S(xe,{key:3,event:e},null,8,["event"])):h("",!0)]),_:2},1024))),128))]),_:1},8,["modules","loop","breakpoints","aria-label"]),b(_)?(o(),p("button",{key:1,type:"button",class:"nav-arrow shrink-0 pl-2 md:pl-6","aria-label":`${i.title}: weitere Treffer anzeigen`,onClick:A},s[2]||(s[2]=[t("img",{src:ie,alt:"","aria-hidden":"true",class:"arrow"},null,-1)]),8,Me)):h("",!0)])])):h("",!0)])])],8,Ce)):h("",!0)}}),T=V(ze,[["__scopeId","data-v-06c3053c"]]),He={class:"search-header w-full mt-20 py-4 bg-regbg relative z-[1]"},Pe={class:"pl-4 pr-4 md:pl-12 md:pr-12 w-full flex flex-col gap-4 md:flex-row md:items-center md:justify-between"},je={class:"flex items-center gap-2 bg-white border border-gray-300 rounded-md px-3 h-12 focus-within:ring-2 focus-within:ring-custompink"},Fe=["aria-describedby"],Le={key:0,id:"search-hint",class:"mt-1 text-sm text-custompink"},Ge={class:"sr-only",role:"status","aria-live":"polite"},Ke={class:"mb-40"},Ue={key:0,class:"mt-10"},Ze={class:"pl-4 pr-4 md:pl-12 md:pr-12 xl:pl-36 xl:pr-24 text-gray-600 text-lg","aria-hidden":"true"},Je={class:"font-bold text-customblue"},Qe={key:0,class:"flex flex-col items-center justify-center text-center px-6 mt-10"},Xe={class:"text-gray-500 text-lg mt-2 max-w-md"},Ye={key:1,class:"flex items-center justify-center min-h-[calc(100vh-260px)]"},et={__name:"search",setup(i){const c=Y(),x=re(),g=X(),u=[1,47,2,33];le({title:"Suche | SH GUIDE",meta:[{name:"description",content:"Durchsuchen Sie alle Angebote, Events, Anbieter und Blog-Beiträge auf SH GUIDE."}]});const r=I(""),d=I(""),l=D({}),a=D({}),k=()=>{for(const s of u)delete l[s],delete a[s]};z(()=>c.query.keyword,s=>{const e=typeof s=="string"?s:"";r.value=e,d.value=e,k()},{immediate:!0});const w=(s,e)=>{l[s]=e,a[s]=!0},C=m(()=>u.every(s=>a[s])),_=m(()=>u.reduce((s,e)=>s+(l[e]||0),0)),$=m(()=>!!r.value&&C.value&&_.value===0),N=m(()=>{const s=d.value.trim().length;return s>0&&s<E}),R=m(()=>r.value?C.value?_.value===0?`Keine Ergebnisse für „${r.value}“ gefunden.`:`${_.value} Ergebnisse für „${r.value}“ gefunden.`:`Suche nach „${r.value}“ läuft …`:""),A=()=>{const s=d.value.trim();s.length<E||(g.setSearchTerm(s),s!==r.value&&x.push({path:"/search",query:{keyword:s}}))},n=()=>{x.back()};return(s,e)=>(o(),p("div",null,[y(ae),t("div",He,[t("div",Pe,[t("div",{class:"flex gap-4 items-center shrink-0"},[t("button",{type:"button",class:"search-back-button","aria-label":"Zurück zur vorherigen Seite",onClick:n},e[5]||(e[5]=[t("img",{src:oe,alt:"","aria-hidden":"true",class:"w-4"},null,-1)])),e[6]||(e[6]=t("h1",{class:"font-ptsans font-bold text-base xl:text-lg"},"Suche",-1))]),t("form",{role:"search",class:"w-full md:max-w-md",onSubmit:ee(A,["prevent"])},[e[9]||(e[9]=t("label",{for:"search-input",class:"sr-only"},"Suchbegriff eingeben",-1)),t("div",je,[e[7]||(e[7]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-gray-500 flex-shrink-0",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[t("path",{"fill-rule":"evenodd",d:"M12.9 14.32a8 8 0 111.414-1.414l4.387 4.387a1 1 0 01-1.414 1.414l-4.387-4.387zM8 14a6 6 0 100-12 6 6 0 000 12z","clip-rule":"evenodd"})],-1)),te(t("input",{id:"search-input","onUpdate:modelValue":e[0]||(e[0]=f=>d.value=f),type:"search",name:"search",placeholder:"Wonach suchen Sie?",autocomplete:"off",class:"text-gray-700 focus:outline-none w-full bg-transparent","aria-describedby":N.value?"search-hint":void 0},null,8,Fe),[[se,d.value]]),e[8]||(e[8]=t("button",{type:"submit",class:"font-montserrat font-bold text-sm text-white bg-custompink px-4 py-2 rounded focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-custombrown"}," Suchen ",-1))]),N.value?(o(),p("p",Le," Bitte geben Sie mindestens "+v(b(E))+" Zeichen ein. ",1)):h("",!0)],32)])]),t("p",Ge,v(R.value),1),t("div",Ke,[r.value?(o(),p("div",Ue,[t("p",Ze,[e[10]||(e[10]=H(" Ergebnisse für ")),t("span",Je,"„"+v(r.value)+"“",1)]),y(T,{title:"Anbieter",searchWord:r.value,contentTypeId:1,onNumberOfResults:e[1]||(e[1]=f=>w(1,f))},null,8,["searchWord"]),y(T,{title:"Angebote",searchWord:r.value,contentTypeId:47,onNumberOfResults:e[2]||(e[2]=f=>w(47,f))},null,8,["searchWord"]),y(T,{title:"Events",searchWord:r.value,contentTypeId:2,onNumberOfResults:e[3]||(e[3]=f=>w(2,f))},null,8,["searchWord"]),y(T,{title:"BlogPosts",searchWord:r.value,contentTypeId:33,onNumberOfResults:e[4]||(e[4]=f=>w(33,f))}
1,null,8,["searchWord"]),$.value?(o(),p("div",Qe,[e[11]||(e[11]=t("svg",{class:"w-24 h-24 mb-6 text-gray-300",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t("circle",{cx:"11",cy:"11",r:"8","stroke-width":"2"}),t("path",{"stroke-linecap":"round","stroke-width":"2",d:"M21 21l-4.35-4.35"})],-1)),e[12]||(e[12]=t("h2",{class:"text-2xl font-bold text-custompink"},"Keine Ergebnisse gefunden",-1)),t("p",Xe," Für „"+v(r.value)+"“ haben wir leider nichts gefunden. Versuchen Sie es mit einem anderen Suchbegriff. ",1)])):h("",!0)])):(o(),p("div",Ye,e[13]||(e[13]=[M('<div class="flex flex-col items-center justify-center p-8 max-w-2xl mx-auto text-center" data-v-0a799f2c><svg class="w-32 h-32 md:w-40 md:h-40 mb-8 text-custompink" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true" data-v-0a799f2c><circle cx="11" cy="11" r="8" stroke-width="2" data-v-0a799f2c></circle><path stroke-linecap="round" stroke-width="2" d="M21 21l-4.35-4.35" data-v-0a799f2c></path></svg><h2 class="text-2xl font-bold text-custompink" data-v-0a799f2c> Bitte geben Sie einen Suchbegriff ein </h2><p class="text-gray-500 text-lg mt-2" data-v-0a799f2c> Finden Sie schnell, wonach Sie suchen – Anbieter, Angebote, Events und Blog-Beiträge. </p></div>',1)])))])]))}},ut=V(et,[["__scopeId","data-v-0a799f2c"]]);export{ut 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.