site-libsoc/Server/public/js/components/landing-component.js

2 lines
6.6 KiB
JavaScript

import{S as t,i,a as o,b as e,s as r,e as n,n as s,d as m,c as a,o as c,w as p,f as g,g as d,t as l,h as u,j as h,v as f,k as v,l as x,m as w}from"./index-4348483d.js";import{w as b}from"./index-71440b21.js";import{addMarkersGroups as j,groupsMarkersLayer as T}from"../../../../../../../../../js/groups.js";import{addMarkersCoops as y,coopsMarkersLayer as k}from"../../../../../../../../../js/coops.js";import{addMarkersCommunes as U,communesMarkersLayer as z}from"../../../../../../../../../js/communes.js";import{addMarkersParties as N,partiesMarkersLayer as A}from"../../../../../../../../../js/parties.js";import{loadLocaleContent as C}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function B(t){let i,o,r,n,s,a,c,p,b,j,T,y,k,U,z,N,A,C,L,B,E,F,H,M,R,W,D,P,S,Z,_,q,G,I,J,K,O,Q,V,X,Y,$,tt,it,ot,et,rt,nt,st,mt,at,ct,pt,gt,dt,lt,ut,ht,ft,vt,xt,wt,bt,jt,Tt,yt,kt,Ut=t[3].top+"",zt=t[3].groupsTitle+"",Nt=t[3].groupsText+"",At=t[3].communesTitle+"",Ct=t[3].communesText+"",Lt=t[3].cooperativesTitle+"",Bt=t[3].cooperativesText+"",Et=t[3].partiesTitle+"",Ft=t[3].partiesText+"",Ht=t[3].findUs+"",Mt=t[3].whatNow+"",Rt=t[3].joinUs+"",Wt=t[3].talkWithUs+"";return{c(){i=g("div"),o=g("picture"),o.innerHTML='<source srcset="/img/crowd.webp"/> \n <source srcset="/img/crowd.png"/> \n <img id="crowd" alt="crowd"/>',r=d(),n=g("div"),s=g("p"),a=l(Ut),c=d(),p=g("div"),b=g("div"),j=g("a"),T=g("h2"),y=l(zt),k=d(),U=g("img"),N=d(),A=g("p"),C=l(Nt),L=d(),B=g("div"),E=g("a"),F=g("h2"),H=l(At),M=d(),R=g("img"),D=d(),P=g("p"),S=l(Ct),Z=d(),_=g("div"),q=g("a"),G=g("h2"),I=l(Lt),J=d(),K=g("img"),Q=d(),V=g("p"),X=l(Bt),Y=d(),$=g("div"),tt=g("a"),it=g("h2"),ot=l(Et),et=d(),rt=g("img"),st=d(),mt=g("p"),at=l(Ft),ct=d(),pt=g("h1"),gt=l(Ht),dt=d(),lt=g("map-component"),ht=d(),ft=g("h1"),vt=l(Mt),xt=d(),wt=g("div"),bt=g("a"),jt=l(Rt),Tt=d(),yt=g("a"),kt=l(Wt),u(j,"href","/"+t[6]+"/groups"),u(U,"id","groups-img"),h(U.src,z="/img/common/groups.svg")||u(U,"src","/img/common/groups.svg"),u(U,"alt","groups"),u(E,"href","/"+t[6]+"/communes"),u(R,"id","communes-img"),h(R.src,W="/img/common/commune.svg")||u(R,"src","/img/common/commune.svg"),u(R,"alt","communes"),u(q,"href","/"+t[6]+"/coops"),u(K,"id","coops-img"),h(K.src,O="/img/common/coops.svg")||u(K,"src","/img/common/coops.svg"),u(K,"alt","coops"),u(tt,"href","/"+t[6]+"/parties"),u(rt,"id","parties-img"),h(rt.src,nt="/img/common/parties.svg")||u(rt,"src","/img/common/parties.svg"),u(rt,"alt","coops"),u(p,"id","container-grid"),f(p,"--grid-width",t[1]),v(lt,"id","map"),v(lt,"callback",ut=t[9]),v(lt,"colors",["#23AC20","#CA2437","#217BC9","#FFD326"]),u(bt,"class","link-button"),u(bt,"href","/"+t[6]+"/join-us"),u(yt,"class","link-button"),u(yt,"href","https://discord.gg/xAPZmyr8B6"),u(yt,"target","_blank"),u(yt,"rel","noreferrer"),u(wt,"id","action-container"),u(n,"id","text-container"),u(i,"id","container")},m(m,g){e(m,i,g),x(i,o),x(i,r),x(i,n),x(n,s),x(s,a),x(n,c),x(n,p),x(p,b),x(b,j),x(j,T),x(T,y),x(b,k),x(b,U),x(b,N),x(b,A),x(A,C),x(p,L),x(p,B),x(B,E),x(E,F),x(F,H),x(B,M),x(B,R),x(B,D),x(B,P),x(P,S),x(p,Z),x(p,_),x(_,q),x(q,G),x(G,I),x(_,J),x(_,K),x(_,Q),x(_,V),x(V,X),x(p,Y),x(p,$),x($,tt),x(tt,it),x(it,ot),x($,et),x($,rt),x($,st),x($,mt),x(mt,at),t[8](p),x(n,ct),x(n,pt),x(pt,gt),x(n,dt),x(n,lt),x(n,ht),x(n,ft),x(ft,vt),x(n,xt),x(n,wt),x(wt,bt),x(bt,jt),x(wt,Tt),x(wt,yt),x(yt,kt)},p(t,i){8&i&&Ut!==(Ut=t[3].top+"")&&w(a,Ut),8&i&&zt!==(zt=t[3].groupsTitle+"")&&w(y,zt),8&i&&Nt!==(Nt=t[3].groupsText+"")&&w(C,Nt),8&i&&At!==(At=t[3].communesTitle+"")&&w(H,At),8&i&&Ct!==(Ct=t[3].communesText+"")&&w(S,Ct),8&i&&Lt!==(Lt=t[3].cooperativesTitle+"")&&w(I,Lt),8&i&&Bt!==(Bt=t[3].cooperativesText+"")&&w(X,Bt),8&i&&Et!==(Et=t[3].partiesTitle+"")&&w(ot,Et),8&i&&Ft!==(Ft=t[3].partiesText+"")&&w(at,Ft),2&i&&f(p,"--grid-width",t[1]),8&i&&Ht!==(Ht=t[3].findUs+"")&&w(gt,Ht),8&i&&ut!==(ut=t[9])&&v(lt,"callback",ut),8&i&&Mt!==(Mt=t[3].whatNow+"")&&w(vt,Mt),8&i&&Rt!==(Rt=t[3].joinUs+"")&&w(jt,Rt),8&i&&Wt!==(Wt=t[3].talkWithUs+"")&&w(kt,Wt)},d(o){o&&m(i),t[8](null)}}}function E(t){let i,o=6==t[2]&&B(t);return{c(){o&&o.c(),i=n()},m(t,r){o&&o.m(t,r),e(t,i,r)},p(t,e){6==t[2]?o?o.p(t,e):(o=B(t),o.c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d(t){o&&o.d(t),t&&m(i)}}}function F(t){let i,o=t[2],a=E(t);return{c(){a.c(),i=n(),this.c=s},m(t,o){a.m(t,o),e(t,i,o)},p(t,[e]){4&e&&r(o,o=t[2])?(a.d(1),a=E(t),a.c(),a.m(i.parentNode,i)):a.p(t,e)},i:s,o:s,d(t){t&&m(i),a.d(t)}}}function H(t,i,o){let e,r,n,s,m=b(0);a(t,m,(t=>o(2,e=t)));let g=b({});function d(t){o(1,s="1fr 1fr")}a(t,g,(t=>o(3,r=t))),C(g,"groups-component",m),C(g,"communes-component",m),C(g,"cooperatives-component",m),C(g,"parties-component",m),C(g,"countries",m);let l=C(g,"landing-component",m,d);function u(t,i){let o=t([22,0],2);j(o,i),U(o,i),y(o,i),N(o,i);let e={};e[i.groups]=T,e[i.communes]=z,e[i.cooperatives]=k,e[i.parties]=A,L.control.layers(null,e).addTo(o)}d(),c((()=>{}));return[n,s,e,r,m,g,l,u,function(t){p[t?"unshift":"push"]((()=>{n=t,o(0,n)}))},t=>u(t,r)]}class M extends t{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#action-container{display:flex;justify-content:space-between;margin:auto;margin-top:2rem;max-width:34rem}.link-button{display:inline-block;font-size:1.6rem;font-family:var(--sans-serif,sans-serif);width:14rem;line-height:4rem;background:#cb1816;color:white;text-align:center}#map{--margin-top:1rem;--height:30rem;--width:100%;--margin-bottom:3rem}h1{font-size:2rem;text-align:center}#container-grid>div>a>h2{text-align:center}#groups-img,#communes-img,#coops-img,#parties-img{position:absolute;left:50%;transform:translate(-50%);z-index:0;opacity:0.2;height:8rem}#coops-img{margin-top:0.5rem;height:7.5rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}#crowd{width:100%;margin-bottom:2rem}#container{margin:auto;max-width:800px;margin-top:2rem;margin-bottom:5rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}#container-grid{display:grid;grid-template-columns:var(--grid-width);grid-template-rows:var(--grid-width);grid-gap:4rem;row-gap:3rem;margin-top:2rem;margin-bottom:2rem}#container-grid>div{position:relative}#container-grid>div>p{position:relative;margin-top:5rem;z-index:2}@media only screen and (max-width: 1060px){#container-grid{display:flex;flex-direction:column;gap:2rem}#action-container{flex-direction:column;align-items:center;gap:2.5rem}#container-grid>:nth-child(2){height:calc(100% - 2rem)}}</style>",i(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},H,F,r,{},null),t&&t.target&&e(t.target,this,t.anchor)}}customElements.define("landing-component",M);export{M as default};