Skip to content
Snippets Groups Projects
sidebar.js 1.37 KiB
Newer Older
  • Learn to ignore specific revisions
  • vand's avatar
    vand committed
    document.write('\
    <nav class="w3-sidebar w3-collapse w3-white w3-animate-left" style="z-index:3;width:300px;" id="mySidebar"><br>\
      <div class="w3-container">\
        <a href="#" onclick="w3_close()" class="w3-hide-large w3-right w3-jumbo w3-padding w3-hover-grey" title="close menu">\
          <i class="fa fa-remove"></i></a>\
        <a href="http://qim.dk/">\
          <img src="common/logo_name.png" style="width:90%;" class="w3-round"></a>\
        <br><br>\
      </div>\
      <div class="w3-bar-block w3-text-grey">\
        <a href="index.html" onclick="w3_close()" class="w3-bar-item w3-button w3-padding" class="w3-text-grey"><i class="fa fa-home fa-fw w3-margin-right"></i>HOME</a>\
      </div>\
      <div class="w3-bar-block w3-text-grey">\
        <a href="about.html" onclick="w3_close()" class="w3-bar-item w3-button w3-padding" class="w3-text-grey"><i class="fa fa-info fa-fw w3-margin-right"></i>ABOUT</a>\
      </div>\
    </nav>\
    <div class="w3-overlay w3-hide-large w3-animate-opacity" onclick="w3_close()" style="cursor:pointer" title="close side menu" id="myOverlay"></div>\
    ');
    
    // Script to open and close sidebar
    function w3_open() {
        document.getElementById("mySidebar").style.display = "block";
        document.getElementById("myOverlay").style.display = "block";
    }
    
    function w3_close() {
        document.getElementById("mySidebar").style.display = "none";
        document.getElementById("myOverlay").style.display = "none";
    }