2 lines
6.6 KiB
JavaScript
2 lines
6.6 KiB
JavaScript
import{S as e,i as o,a as t,b as i,s as n,e as a,n as r,d as s,c as l,o as c,f as d,g as m,t as p,h,j as g,l as u,u as b,m as f,x as v,v as k}from"./index-ce8c147b.js";import{loadLocaleContent as w}from"../../../../../../../../../js/libraries/serverTools.js";import{w as x}from"./index-f2dbf8ff.js";function y(e){let o,t,n,a,r,l,c,k,w,x,y,j,z,T,E,H,L,M,N,S,C,O,R,U,I,X,q,A,B,D,F,G,J,K,P,Q,V,W,Y,Z,$,_,ee,oe,te,ie,ne,ae=e[3].orgName+"",re=e[3].manifesto+"",se=e[3].joinUs+"",le=e[3].groups+"",ce=e[3].communities+"",de=e[3].cooperatives+"",me=e[3].partners+"";return{c(){o=d("header"),t=d("input"),n=m(),a=d("label"),a.innerHTML='<span id="hamb-line"></span>',r=m(),l=d("a"),c=d("img"),w=m(),x=d("span"),y=p(ae),j=m(),z=d("nav"),T=d("ul"),E=d("li"),H=d("a"),L=p(re),M=m(),N=d("li"),S=d("a"),C=p(se),O=m(),R=d("li"),U=d("a"),I=p(le),X=m(),q=d("li"),A=d("a"),B=p(ce),D=m(),F=d("li"),G=d("a"),J=p(de),K=m(),P=d("li"),Q=d("a"),V=p(me),W=m(),Y=d("li"),Z=d("button"),Z.innerHTML='<picture><source srcset="/img/common/globe.webp"/> \n <source srcset="/img/common/globe.png"/> \n <img id="locales-img" alt="globe"/></picture>',$=m(),_=d("div"),ee=d("button"),ee.textContent="English",oe=m(),te=d("button"),te.textContent="Русский",h(t,"type","checkbox"),h(t,"id","side-menu"),h(a,"id","hamb"),h(a,"for","side-menu"),g(c.src,k="img/common/flag.png")||h(c,"src","img/common/flag.png"),h(c,"id","navbar-logo"),h(c,"alt","logo"),h(x,"id","navbar-logo-text"),h(l,"id","logo-container"),h(l,"href","/"),h(H,"href","/manifesto"),h(S,"href","/join-us"),h(U,"href","/groups"),h(A,"href","/communities"),h(G,"href","/cooperatives"),h(Q,"href","/partners"),h(Y,"id","locales"),h(_,"id","locales-dropdown"),h(T,"id","menu"),h(z,"id","nav"),h(o,"id","navbar")},m(s,d){i(s,o,d),u(o,t),e[8](t),u(o,n),u(o,a),u(o,r),u(o,l),u(l,c),u(l,w),u(l,x),u(x,y),u(o,j),u(o,z),u(z,T),u(T,E),u(E,H),u(H,L),u(T,M),u(T,N),u(N,S),u(S,C),u(T,O),u(T,R),u(R,U),u(U,I),u(T,X),u(T,q),u(q,A),u(A,B),u(T,D),u(T,F),u(F,G),u(G,J),u(T,K),u(T,P),u(P,Q),u(Q,V),u(T,W),u(T,Y),u(Y,Z),u(T,$),u(T,_),u(_,ee),u(_,oe),u(_,te),e[11](_),e[12](o),ie||(ne=[b(t,"click",e[6]),b(Z,"click",e[7]),b(ee,"click",e[9]),b(te,"click",e[10])],ie=!0)},p(e,o){8&o&&ae!==(ae=e[3].orgName+"")&&f(y,ae),8&o&&re!==(re=e[3].manifesto+"")&&f(L,re),8&o&&se!==(se=e[3].joinUs+"")&&f(C,se),8&o&&le!==(le=e[3].groups+"")&&f(I,le),8&o&&ce!==(ce=e[3].communities+"")&&f(B,ce),8&o&&de!==(de=e[3].cooperatives+"")&&f(J,de),8&o&&me!==(me=e[3].partners+"")&&f(V,me)},d(t){t&&s(o),e[8](null),e[11](null),e[12](null),ie=!1,v(ne)}}}function j(e){let o,t=0!=Object.keys(e[3]).length,n=t&&y(e);return{c(){n&&n.c(),o=a(),this.c=r},m(e,t){n&&n.m(e,t),i(e,o,t)},p(e,[i]){8&i&&(t=0!=Object.keys(e[3]).length),t?n?n.p(e,i):(n=y(e),n.c(),n.m(o.parentNode,o)):n&&(n.d(1),n=null)},i:r,o:r,d(e){n&&n.d(e),e&&s(o)}}}function z(e){localStorage.setItem("locale",e),location.reload()}function T(e,o,t){let i,n,a,r,s,d=x({});l(e,d,(e=>t(3,i=e))),w(d,"navbar-component",s),c((()=>{}));return[n,a,r,i,s,d,function(){n.checked?t(1,a.style.background="white",a):setTimeout((()=>{t(1,a.style.position="relative",a),t(1,a.style.background="",a),t(1,a.style.boxShadow="",a)}),510)},function(){"block"==r.style.display?t(2,r.style.display="none",r):t(2,r.style.display="block",r)},function(e){k[e?"unshift":"push"]((()=>{n=e,t(0,n)}))},()=>z("en"),()=>z("ru"),function(e){k[e?"unshift":"push"]((()=>{r=e,t(2,r)}))},function(e){k[e?"unshift":"push"]((()=>{a=e,t(1,a)}))}]}class E extends e{constructor(e){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';#navbar{position:relative;top:0;width:min(100%,116rem);z-index:1000000000;height:5.26rem}#navbar *{font-family:var(--sans-serif, sans-serif)}#logo-container{display:flex;position:absolute;margin-left:1rem;height:100%;max-height:5.26rem;color:black;z-index:1;flex-direction:row;flex-wrap:nowrap;align-items:center}#navbar-logo{height:3.5rem;width:3.5rem;object-fit:contain;border-radius:10rem}#navbar-logo-text{position:relative;width:auto;height:100%;line-height:400%;white-space:nowrap;text-align:center;font-size:1.4rem;color:#292222;font-family:var(--sans-serif, sans-serif);font-weight:400;padding-left:1.2rem}#nav{position:fixed;width:100%;height:100%;background-color:white;overflow:hidden;z-index:0}#menu a{display:block;padding:1.2rem;padding-top:1rem;padding-bottom:1rem;color:black;font-size:1.4rem}#menu a:hover{background-color:rgb(220, 220, 220)}#menu a:active{background-color:#f7aec0}#menu li{list-style-type:none}#nav{max-height:0}#hamb{position:absolute;cursor:pointer;right:0rem;padding:2.8rem 2rem;z-index:9999}#hamb-line{background:black;display:block;height:2px;position:relative;width:24px}#hamb-line::before,#hamb-line::after{background:black;content:'';display:block;height:100%;position:absolute;transition:all .2s ease-out;width:100%}#hamb-line::before{top:5px}#hamb-line::after{top:-5px}#side-menu{display:none}#side-menu:checked~nav{display:block;max-height:100%;padding-top:5.625rem}#side-menu:checked~#logo-container{position:fixed}#side-menu:checked~#hamb{position:fixed}#side-menu:checked~#logo-container{position:fixed}#side-menu:checked~#hamb #hamb-line{background:transparent}#side-menu:checked~#hamb #hamb-line::before{transform:rotate(-45deg);top:0}#side-menu:checked~#hamb #hamb-line::after{transform:rotate(45deg);top:0}#locales{position:relative}#locales button{width:100%;text-align:left;height:4rem}#locales button:hover{opacity:0.5}#locales-img{position:relative;top:0rem;height:2rem;margin-left:1.2rem}#locales-dropdown{position:absolute;display:none;top:5.6rem;right:1.8rem;border:#404040 solid 0.1rem;padding:1.4rem;background-color:white}#locales-dropdown button{display:block;font-family:var(--sans-serif,sans-serif);font-size:1.3rem;width:100%}#locales-dropdown button:hover{color:rgb(127, 127, 127)}#locales-dropdown>:first-child{padding-bottom:0.5rem}#locales-dropdown>:nth-child(2){padding-top:0.5rem}@media only screen and (min-width: 1500px){#navbar{position:relative;width:min(95%,116rem);left:50%;transform:translateX(-50%)}#nav{max-height:none;top:0;position:relative;float:right;width:fit-content;background-color:transparent;overflow:visible}#side-menu:checked~nav{padding-top:0}#menu li{float:left}#menu a:hover{background-color:transparent;color:rgb(127, 127, 127)}#menu a{padding:1.2rem;padding-top:1.9rem;padding-bottom:1.9rem}#hamb{display:none}#locales{position:relative;margin-right:1.8rem}#locales-img{top:0.9rem}#locales-dropdown{top:5,7rem}}</style>",o(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},T,j,n,{},null),e&&e.target&&i(e.target,this,e.anchor)}}customElements.define("navbar-component",E);export{E as default};
|