foss_alternatives/header.js
2024-06-19 08:58:57 +02:00

29 lines
863 B
JavaScript

class Header extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.innerHTML = `
<style>
</style>
<header>
<div class="header-content">
<div class="project-name"><a href="index.html">FOSS alternative</a></div>
<button class="burger-menu" onclick="toggleMenu()">☰</button>
<ul class="menu">
<li><a href="games.html">Games</a></li>
<li><a href="general.html">General</a></li>
<li><a href="tools.html">Tools</a></li>
<li><a href="media.html">Multimedia</a></li>
<li><a href="os.html">OS</a></li>
<li><a href="social-media.html">Social media</a></li>
</ul>
</div>
</header>
`;
}
}
customElements.define('header-component', Header);