<header class="header">
    <nav>
        <div class="leftIcon">
            <img src="images/postit.png" alt="Notes" />
        </div>
        <div class="search-container">
            <input type="text" /><button>Search</button>
        </div>
        <div class="dropdown">
            <image onclick="clickFunction()" class="dropbtn" src="images/me.png" alt="Me">

            </image>
            <div id="myDropdown" class="dropdown-content">
                <a>Dumb User<br />john.doe@example.com</a>
            </div>
        </div>
    </nav>
    <div id="navigate">
        <a href="/login">Log In</a> &nbsp; &nbsp; &nbsp;
        <a href="/posts">Posts </a> &nbsp; &nbsp; &nbsp;
        <a href="/contactus">Contact Us</a>
    </div>
    <script>
        function clickFunction() {
            document.getElementById("myDropdown").classList.toggle("show");
        }

        window.onclick = function(event) {
            if (!event.target.matches('.dropbtn')) {
                var dropdowns = document.getElementsByClassName("dropdown-content");
                var i;
                for (i = 0; i < dropdowns.length; i++) {
                    var openDropdown = dropdowns[i];
                    if (openDropdown.classList.contains('show')) {
                        openDropdown.classList.remove('show');
                    }
                }
            }
        }
    </script>
</header>