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

2 lines
1.7 KiB
JavaScript

import{S as s,i,a as n,b as a,s as e,e as t,c as o,n as r,d as l,h as c,p as u,j as h,o as m,r as d}from"./index-01c5cbf1.js";function p(s){let i,n,e,m,d,p,f,b,g,v;return{c(){i=t("header"),n=t("a"),n.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(),p=t("label"),p.innerHTML='<span id="hamb-line"></span>',f=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></ul>',this.c=r,l(n,"id","logo-container"),l(n,"href","/"),l(m,"type","checkbox"),l(m,"id","side-menu"),l(p,"id","hamb"),l(p,"for","side-menu"),l(b,"id","nav"),l(i,"id","navbar")},m(t,o){a(t,i,o),c(i,n),c(i,e),c(i,m),s[3](m),c(i,d),c(i,p),c(i,f),c(i,b),s[4](i),g||(v=u(m,"click",s[2]),g=!0)},p:r,i:r,o:r,d(n){n&&h(i),s[3](null),s[4](null),g=!1,v()}}}function f(s,i,n){let a,e;return m((()=>{})),[a,e,function(){a.checked?n(1,e.style.background="white",e):setTimeout((()=>{n(1,e.style.position="relative",e),n(1,e.style.background="",e),n(1,e.style.boxShadow="",e)}),510)},function(s){d[s?"unshift":"push"]((()=>{a=s,n(0,a)}))},function(s){d[s?"unshift":"push"]((()=>{e=s,n(1,e)}))}]}class b extends s{constructor(s){super(),this.shadowRoot.innerHTML="<style>@import '/css/common.css';@import '/css/navbar.css';</style>",i(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},f,p,e,{},null),s&&s.target&&a(s.target,this,s.anchor)}}customElements.define("navbar-component",b);export{b as default};