Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static headerView() {
- const header = document.createElement('header');
- header.innerHTML = `
- <header>
- <h1 class = "site-name"> glebogram </h1>
- ${this.isLoggedUser ? `<button class="add-post"><i class="fas fa-plus fa-2x"></i></button>
- <div class = "user-name">gleb9990</div>
- <button id = "log-out"><img src="images/user-image.png" alt="user-image" id = "user-pic"></button>` : ''}
- <button id = "sign-in"><span>sign in</span></button>
- </header>`;
- const body = document.getElementsByTagName('body')[0];
- body.insertAdjacentElement('afterbegin', header);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement