Skip to content

Instantly share code, notes, and snippets.

View vpodk's full-sized avatar
💻
Coding ...

Valentin Podkamennyi vpodk

💻
Coding ...
View GitHub Profile
@vpodk
vpodk / clap-nav-index.html
Created April 27, 2020 02:23
Clean Application - Hamburger Menu
<header>
<h1>Header</h1>
<nav id="nav">
<input type="checkbox" aria-label="Toggle menu">
<div class="hamburger"><span></span></div>
<ul class="menu">
<li><a href="./index.html">Home</a></li>
<li><a href="./index.html">About</a></li>
<li><a href="./index.html">Contact</a></li>
</ul>
@vpodk
vpodk / clap-nav.css
Created April 27, 2020 02:24
Clean Application - Hamburger Menu
nav {
display: block;
float: right;
left: -1em;
padding-top: .2em;
position: absolute;
user-select: none;
width: 100%;
z-index: 1;
-webkit-user-select: none;
@vpodk
vpodk / clap-nav-theme.css
Created April 27, 2020 02:25
Clean Application - Hamburger Menu
nav ul,
nav a {
background-color: Indigo;
color: White;
}
nav .menu a.active,
nav .menu a:active,
nav .menu a:hover {
background-color: DarkMagenta;
/**
* Binary search is a search algorithm that finds the position of a target value within a sorted array.
* Binary search has O(log n) complexity.
* @param {!Array} list The sorted array.
* @param {*} item The item to search.
* @return {number} Returns the index of the item in the array.
* @see https://en.wikipedia.org/wiki/Binary_search_algorithm
*/
const binarySearch = (list, item) => {
let low = 0;