website/js/customElements/header.js

24 lines
865 B
JavaScript
Raw Normal View History

2021-04-13 10:07:16 +02:00
class Header extends HTMLElement {
constructor() {
super();
let pageTitle = this.getAttribute("data-title");
this.innerHTML = `
<header >
<div class="header-wrapper" >
<div class="header-homepage">
<div class="align-holder" >
<h1 onclick="document.getElementById('content').scrollIntoView();">${pageTitle}</h1>
2021-04-13 10:07:16 +02:00
</div >
</div >
<div class="header-separator header-separator-bottom " >
2021-04-14 20:59:16 +02:00
<jl-svg data-name="banner"></jl-svg>
2021-04-13 10:07:16 +02:00
</div >
</div >
2021-11-09 11:54:50 +01:00
<jl-main_menu id = "mainMenu" data-title = "${pageTitle}"></jl-main_menu>
</header>
2021-04-13 10:07:16 +02:00
`;
}
}
2021-11-09 11:54:50 +01:00
customElements.define("jl-header", Header);