website/js/customElements/header.js
2021-04-13 10:07:16 +02:00

25 lines
No EOL
982 B
JavaScript

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>${pageTitle}</h1 >
</div >
</div >
<div class="header-separator header-separator-bottom " >
<svg xmlns = "http://www.w3.org/2000/svg" viewBox = "0 0 1000 100" preserveAspectRatio = "none" >
<path class="svg-white-bg" d = "M737.9,94.7L0,0v100h1000V0L737.9,94.7z" ></path >
</svg >
</div >
</div >
<jl-main_menu id = "mainMenu"></jl-main_menu>
</header >
`;
}
}
customElements.define("jl-header", Header);