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

2 lines
5.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{S as e,i as t,a as n,b as i,s as o,e as a,n as r,d as s,c as m,o as l,f as c,t as g,g as d,h as p,j as h,l as f,m as u,p as b}from"./index-ce8c147b.js";import{w as x}from"./index-f2dbf8ff.js";import{loadLocaleContent as w,getLocale as v}from"../../../../../../../../../js/libraries/serverTools.js";import"../../../../../../../../../js/components/map-component.js";function y(e,t,n){const i=e.slice();return i[5]=t[n],i}function k(e){let t,n,o,a,r,m,l,x,w,v,k,z,D,F,G,E,O,R=e[0].heading+"",S=e[0].p1+"",T=e[0].subheading1+"",_=e[0].subheading2+"",A=e[4],C=[];for(let t=0;t<A.length;t+=1)C[t]=j(y(e,A,t));return{c(){t=c("div"),n=c("div"),o=c("h1"),a=g(R),r=d(),m=c("img"),x=d(),w=c("p"),v=g(S),k=d(),z=c("h3"),D=g(T),F=d(),G=c("h4"),E=g(_),O=d();for(let e=0;e<C.length;e+=1)C[e].c();p(m,"id","hands-img"),h(m.src,l="/img/common/handshake.svg")||p(m,"src","/img/common/handshake.svg"),p(m,"alt","hands"),p(n,"id","text-container"),p(t,"id","container")},m(e,s){i(e,t,s),f(t,n),f(n,o),f(o,a),f(n,r),f(n,m),f(n,x),f(n,w),f(w,v),f(n,k),f(n,z),f(z,D),f(n,F),f(n,G),f(G,E),f(n,O);for(let e=0;e<C.length;e+=1)C[e].m(n,null)},p(e,t){if(1&t&&R!==(R=e[0].heading+"")&&u(a,R),1&t&&S!==(S=e[0].p1+"")&&u(v,S),1&t&&T!==(T=e[0].subheading1+"")&&u(D,T),1&t&&_!==(_=e[0].subheading2+"")&&u(E,_),21&t){let i;for(A=e[4],i=0;i<A.length;i+=1){const o=y(e,A,i);C[i]?C[i].p(o,t):(C[i]=j(o),C[i].c(),C[i].m(n,null))}for(;i<C.length;i+=1)C[i].d(1);C.length=A.length}},d(e){e&&s(t),b(C,e)}}}function j(e){let t,n,o,a,r,m,l,h,b,x,w,v,y,k,j,z,D,F,G,E,O,R,S,T,_,A,C,H,I,L,M,N,W,q,B,J=e[0].name+"",K=e[5].name+"",P=e[0].type+"",Q=e[5].type[e[2][0]]+"",U=e[0].link+"",V=e[5].link+"",X=e[0].description+"",Y=e[5].description[e[2][0]]+"";return{c(){t=c("div"),n=c("div"),o=c("picture"),a=c("source"),r=d(),m=c("source"),l=d(),h=c("img"),b=d(),x=c("div"),w=c("p"),v=c("b"),y=g(J),k=g(": "),j=g(K),z=d(),D=c("p"),F=c("b"),G=g(P),E=g(": "),O=g(Q),R=d(),S=c("p"),T=c("b"),_=g(U),A=g(": "),C=c("a"),H=g(V),I=d(),L=c("p"),M=c("b"),N=g(X),W=g(": "),q=g(Y),B=d(),p(a,"srcset","/img/partners/"+e[5].logo+".webp"),p(m,"srcset","/img/partners/"+e[5].logo+".jpg"),p(h,"class","partner-logo"),p(h,"alt","logo"),p(C,"href",e[5].link),p(C,"target",";_blank;"),p(C,"rel","noreferrer"),p(n,"class","img-general-info"),p(t,"class","location-info")},m(e,s){i(e,t,s),f(t,n),f(n,o),f(o,a),f(o,r),f(o,m),f(o,l),f(o,h),f(n,b),f(n,x),f(x,w),f(w,v),f(v,y),f(v,k),f(w,j),f(x,z),f(x,D),f(D,F),f(F,G),f(F,E),f(D,O),f(x,R),f(x,S),f(S,T),f(T,_),f(T,A),f(S,C),f(C,H),f(t,I),f(t,L),f(L,M),f(M,N),f(M,W),f(L,q),f(t,B)},p(e,t){1&t&&J!==(J=e[0].name+"")&&u(y,J),1&t&&P!==(P=e[0].type+"")&&u(G,P),1&t&&U!==(U=e[0].link+"")&&u(_,U),1&t&&X!==(X=e[0].description+"")&&u(N,X)},d(e){e&&s(t)}}}function z(e){let t,n=0!=Object.keys(e[0]).length,o=n&&k(e);return{c(){o&&o.c(),t=a(),this.c=r},m(e,n){o&&o.m(e,n),i(e,t,n)},p(e,[i]){1&i&&(n=0!=Object.keys(e[0]).length),n?o?o.p(e,i):(o=k(e),o.c(),o.m(t.parentNode,t)):o&&(o.d(1),o=null)},i:r,o:r,d(e){o&&o.d(e),e&&s(t)}}}function D(e,t,n){let i,o,a=[],r=x({});m(e,r,(e=>n(0,i=e))),w(r,"partners-component",o,(e=>v(a,e)));return l((()=>{})),[i,o,a,r,[{name:"Gaia's Fall",type:{en:"a place to discuss and organize",ru:"место для общения и организации"},link:"https://discord.libsoc.org",description:{en:"Gaia's Fall is a server that promotes Solarpunk ideals, environmentalism, anarchism, and anti-capitalism. We encourage civil debates, discussions of theories and possibilities, and the creation of communities focused on shaping a better world. It is our official Discord server where we organize and work together.",ru:"Gaia's Fall — это сервер, который продвигает идеалы соларпанка, защиту окружающей среды, анархизм и антикапитализм. Мы поощряем гражданские дебаты, обсуждение теорий и возможностей, а также создание сообществ, сосредоточенных на формировании лучшего мира. Это наш официальный сервер Discord, на котором мы организуемся и работаем вместе"},logo:"gaias_fall"}]]}class F extends e{constructor(e){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#hands-img{position:absolute;width:10.5rem;left:50%;transform:translate(-50%);z-index:0;opacity:0.2;margin-top:-2rem}#text-container>:nth-child(3){margin-top:6rem}.img-general-info{display:flex;align-content:center;width:100%;gap:1.5rem;align-items:center;margin-bottom:1rem}.img-general-info>:nth-child(2){flex:none}.partner-logo{position:relative;right:0;max-height:6rem;max-width:100%;border-radius:1rem}h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{color:#DD1C1A}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.2rem;text-align:center}h3{margin-bottom:2rem}#container{margin:auto;max-width:800px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{text-align:justify}@media only screen and (max-width: 500px){.img-general-info{display:flex;flex-direction:column;align-content:left;width:100%;gap:1rem;align-items:left;margin-bottom:0rem}.img-general-info>:nth-child(1){width:max-content}.img-general-info>:nth-child(2){width:100%}}</style>",t(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},D,z,o,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("partners-component",F);export{F as default};