29 lines
863 B
JavaScript
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);
|