PageSourceSearch

https://www.centrephotogeneve.ch/_nuxt/BDVi_U19.js

js centrephotogeneve.ch collected 2026-10-02 11:20:13 UTC 5,149 bytes, 1 lines download raw bytes

1import{b as H,d as I,c as T,e as s,o as n,f as i,j as v,g as _,w as S,i as a,_ as j,t as m,F as D,z as L,A as F,u as G,C as P,K as z,r as A,D as N,L as O,E as J}from"./BaWSgs-q.js";import{u as K,_ as Y}from"./ngG9Dssr.js";import{_ as Q}from"./CABWwV6H.js";import"./DlAUqK2U.js";const U={class:""},W={class:"mt-[0px]"},X=["innerHTML"],Z=["innerHTML"],tt={class:"text-xs mt-[5px]"},et={key:0,class:"text-xs mt-[2px]"},nt={class:"flex flex-row"},ot={class:"text-xs"},st={key:0,class:"images opacity-100 md:opacity-0 md:group-hover:opacity-100 transition-all duration-300"},it={__name:"eventBlock",props:{item:{type:Object,required:!0}},setup(o){const{formatExhibitionDates:x,formatExhibitionTimes:k}=K(),{locale:$,setLocale:q}=H(),d=I(),p=T(()=>$.value);return(w,M)=>{const u=j,g=Y,h=Q;return n(),s("div",U,[i("h2",W,[_(u,{to:a(d)({path:`/events/${o.item.slug}`})},{default:S(()=>[o.item.acf.title_en&&a(p)=="en"?(n(),s("span",{key:0,innerHTML:o.item.acf.title_en,class:"text-lgMobile md:text-lg"},null,8,X)):o.item.title.rendered&&a(p)=="fr"?(n(),s("span",{key:1,innerHTML:o.item.title.rendered,class:"text-lgMobile md:text-lg"},null,8,Z)):v("",!0)]),_:1},8,["to"])]),i("div",null,[i("p",tt,m(a(x)(o.item.acf.from,o.item.acf.to,a(p))),1),o.item.acf.start_time&&o.item.acf.end_time?(n(),s("p",et,m(a(k)(o.item.acf.start_time,o.item.acf.end_time)),1)):v("",!0)]),i("div",nt,[i("p",null,[(n(!0),s(D,null,L(o.item.acf.Venue,c=>(n(),s("span",ot,[_(g,{venue:c,class:"text-xs"},null,8,["venue"])]))),256))])]),o.item.acf.media?(n(),s("div",st,[(n(!0),s(D,null,L(o.item.acf.media,(c,B)=>(n(),s("div",null,[c.acf_fc_layout==="image"&&B===0?(n(),F(u,{key:0,to:a(d)({path:`/events/${o.item.slug}`})},{default:S(()=>[_(h,{item:c.image,alt:c.image.alt?c.image.alt:"Image",classes:"h-[25dvh] w-auto object-contain object-left mt-[8px] mb-[0px] "},null,8,["item","alt"])]),_:2},1032,["to"])):v("",!0)]))),256))])):v("",!0)])}}},at={key:0,class:"order-2"},lt={class:"mb-[0px] text-xs px-[5px] py-[18px] z-[1] sticky top-0 bg-lightGray"},ct=["id"],rt={key:1,class:"order-1"},ut={class:"mb-[0px] text-xs px-[5px] py-[18px] z-[1] sticky top-0 bg-lightGray"},mt=["id"],y=55,vt={__name:"index",async setup(o){let x,k;const $=G(),{pending:q,data:d}=([x,k]=P(()=>J("https://admin.centrephotogeneve.ch/wp-json/wp/v2/event?acf_format=standard&per_page=100",{headers:{"Accept-Charset":"utf-8"}},"$n-pVraJqRA")),x=await x,k(),x),p=z("events",()=>d.value||[]);p.value=d.value||[];const w=new Date,M=new Date(w.getFullYear(),w.getMonth(),w.getDate()),u=T(()=>p.value.filter(t=>new Date(t.acf.to)>=M).sort((t,e)=>new Date(t.acf.from)-new Date(e.acf.from))),g=T(()=>p.value.filter(t=>new Date(t.acf.to)<M).sort((t,e)=>new Date(e.acf.to)-new Date(t.acf.to))),h=A(null),c=(t,e=null)=>{const r=h.value;if(!r)return;const l=r.querySelector(`#${t}`);if(!l)return;const f=l.getBoundingClientRect(),C=r.getBoundingClientRect(),E=f.top-C.top+r.scrollTop;let b=0;if(e===null){const R=r.querySelector(".sticky.top-0")||document.querySelector(".sticky.top-0");b=R?R.offsetHeight:0}else b=Number(e)||0;const V=Math.max(0,E-b);r.scrollTo({top:V,behavior:"smooth"})},B=T(()=>$.isMobile);return N(()=>{$.setPanelVisible(!0),setTimeout(()=>{const t=document.getElementById("main-content");t&&!B.value&&t.scrollTo({top:0,behavior:"smooth"})},500),u.value&&u.value.length>0&&O(()=>{const t=h.value;if(!t)return;const e=t.querySelector("#upcoming");if(!e)return;const r=e.getBoundingClientRect(),l=t.getBoundingClientRect(),f=r.top-l.top+t.scrollTop,C=t.querySelector(".sticky.top-0")||document.querySelector(".sticky.top-0"),E=C?C.offsetHeight:y,b=Math.max(0,f-E);t.scrollTo({top:b,behavior:"instant"})})}),(t,e)=>{const r=it;return n(),s("div",{ref_key:"eventList",ref:h,class:"event-list flex flex-col px-[5px] bg-lightGray pb-[5px] min-h-[100dvh] md:min-h-auto md:h-dvh",id:"events-list"},[a(d)&&a(g).length>0?(n(),s("div",at,[i("h2",lt,[i("button",{class:"hidden md:inline-block text-darkGray hover:text-black",onClick:e[0]||(e[0]=l=>c("upcoming",y))},m(t.$t("upcoming_events")),1),e[4]||(e[4]=i("span",{class:"hidden md:inline-block"},"  |  ",-1)),i("button",{onClick:e[1]||(e[1]=l=>c("past",y)),class:"text-black"},m(t.$t("past_events"))+" ("+m(a(g).length)+") ",1)]),(n(!0),s(D,null,L(a(g),(l,f)=>(n(),s("div",{key:l.id,class:"event-item group mb-[5px] border-b-[0px] border-black relative min-h-[25dvh] bg-white p-[5px] rounded-[0px]"},[i("div",{id:f===0?"past":""},[_(r,{item:l},null,8,["item"])],8,ct)]))),128))])):v("",!0),a(d)&&a(u).length>0?(n(),s("div",rt,[i("h2",ut,[i("button",{class:"text-black",onClick:e[2]||(e[2]=l=>c("upcoming",y))},m(t.$t("upcoming_events"))+" ("+m(a(u).length)+")",1),e[5]||(e[5]=i("span",{class:"hidden md:inline-block"},"  |  ",-1)),i("button",{onClick:e[3]||(e[3]=l=>c("past",y)),class:"hidden md:inline-block text-darkGray hover:text-black"},m(t.$t("past_events")),1)]),(n(!0),s(D,null,L(a(u),(l,f)=>(n(),s("div",{key:l.id,class:"event-item group mb-[5px] border-b-[0px] border-black relative bg-white p-[5px] rounded-[0px]"},[i("div",{id:f===0?"upcoming":""},[_(r,{item:l},null,8,["item"])],8,mt)]))),128))])):v("",!0)],512)}}};export{vt 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.