SHARE
TWEET

Untitled

a guest Mar 25th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static headerView() {
  2.     const header = document.createElement('header');
  3.     header.innerHTML = `
  4.       <header>
  5.           <h1 class = "site-name"> glebogram </h1>
  6.           ${this.isLoggedUser ? `<button class="add-post"><i class="fas fa-plus fa-2x"></i></button>
  7.           <div class = "user-name">gleb9990</div>
  8.           <button id = "log-out"><img src="images/user-image.png" alt="user-image" id = "user-pic"></button>` : ''}
  9.           <button id = "sign-in"><span>sign in</span></button>
  10.       </header>`;
  11.     const body = document.getElementsByTagName('body')[0];
  12.     body.insertAdjacentElement('afterbegin', header);
  13.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top