SHARE
TWEET

Untitled

a guest Mar 25th, 2019 71 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.           <h1 class = "site-name"> glebogram </h1>
  5.           ${this.isLoggedUser ? `<button class="add-post"><i class="fas fa-plus fa-2x"></i></button>
  6.           <div class = "user-name">gleb9990</div>
  7.           <button id = "log-out"><img src="images/user-image.png" alt="user-image" id = "user-pic"></button>` : ''}
  8.           ${this.isLoggedUser ? '' : '<button id = "sign-in"><span>sign in</span></button>'}`;
  9.     const body = document.getElementsByTagName('body')[0];
  10.     body.parentNode.appendChild(header);
  11.     body.insertAdjacentElement('afterbegin', header);
  12.   }
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