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

2 lines
1.8 KiB
JavaScript

import{S as a,i,a as s,b as n,s as e,e as t,c as o,n as r,d as l,g as u,p as c,h,o as m,r as d}from"./index-95aedb1a.js";function f(a){let i,s,e,m,d,f,p,b,g,v;return{c(){i=t("header"),s=t("a"),s.innerHTML='<img src="img/common/flag.png" id="navbar-logo" alt="logo"/> \n <span id="navbar-logo-text">Libertarian socialists</span>',e=o(),m=t("input"),d=o(),f=t("label"),f.innerHTML='<span id="hamb-line"></span>',p=o(),b=t("nav"),b.innerHTML='<ul id="menu"><li><a href="/manifesto">Manifesto</a></li> \n <li><a href="/join-us">Join us</a></li> \n <li><a href="/groups">Groups</a></li> \n <li><a href="/communities">Communities</a></li> \n <li><a href="/cooperatives">Cooperatives</a></li> \n <li><a href="/affiliates">Affiliates</a></li></ul>',this.c=r,l(s,"id","logo-container"),l(s,"href","/"),l(m,"type","checkbox"),l(m,"id","side-menu"),l(f,"id","hamb"),l(f,"for","side-menu"),l(b,"id","nav"),l(i,"id","navbar")},m(t,o){n(t,i,o),u(i,s),u(i,e),u(i,m),a[3](m),u(i,d),u(i,f),u(i,p),u(i,b),a[4](i),g||(v=c(m,"click",a[2]),g=!0)},p:r,i:r,o:r,d(s){s&&h(i),a[3](null),a[4](null),g=!1,v()}}}function p(a,i,s){let n,e;return m((()=>{})),[n,e,function(){n.checked?s(1,e.style.background="white",e):setTimeout((()=>{s(1,e.style.position="relative",e),s(1,e.style.background="",e),s(1,e.style.boxShadow="",e)}),510)},function(a){d[a?"unshift":"push"]((()=>{n=a,s(0,n)}))},function(a){d[a?"unshift":"push"]((()=>{e=a,s(1,e)}))}]}class b extends a{constructor(a){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/navbar.css';</style>",i(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},p,f,e,{},null),a&&a.target&&n(a.target,this,a.anchor)}}customElements.define("navbar-component",b);export{b as default};