This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var GH = ['#EEEEEE', '#D6E685', '#8CC665', '#44A340', '#1E6823']; /* previous GH colors */ | |
var GH = ['#EBEDF0', '#C6E48B', '#7BC96F', '#239A3B', '#196127']; | |
var CO = ['#EF4B4D', '#F89B47', '#FAEA20', '#7DC242', '#5D94CE', '#855CA7']; | |
var graph = document.getElementsByClassName('js-calendar-graph-svg')[0]; | |
var days = [].slice.call(graph.getElementsByTagName('rect'), 0); | |
days.forEach(function(rect) { | |
switch(rect.getAttribute('fill').toUpperCase()) { | |
case GH[0]: rect.setAttribute('fill', CO[2]); break; // yellow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin font-face($name, $files, $eot: false, $weight: false, $style: false) { | |
$name: quote($name); | |
@font-face { | |
font-family: $name; | |
@if $eot { | |
src: url($eot); | |
$files: join("#{$eot}", $files); | |
} | |
src: add-font-format($files, $name); | |
@if $weight { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Gemini = require('gemini-scrollbar'); | |
new Gemini({ | |
element: document.querySelector('.scroller-a') | |
}).create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Neonode</title> | |
<link rel="icon" type="image/gif" href="/images/favicon.gif" /> | |
<link rel="stylesheet" href="/build/stylesheets/layout-name.css"> | |
</head> | |
<body> | |
<main class="container"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Gemini = require('gemini-scrollbar'); | |
var A = new Gemini({ | |
element: document.querySelector('.scroller-a') | |
}).create(); | |
var B = new Gemini({ | |
element: document.querySelector('.scroller-b') | |
}).create(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<header> | |
<div class="container"> | |
<h1>Direction-aware hover effect</h1> | |
<p>CSS & bits of JS</p> | |
</div> | |
</header> | |
<div class="container"> | |
<ul> | |
<li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var orderByHSL = function( x, y ) { | |
var hslx, hsly; | |
var pad = function(value) { | |
var l = value.length; | |
while (l < 3) { | |
l += 1; | |
value = "0" + value; | |
} | |
return value; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var N = 216, // total number of items | |
rows = Math.floor( Math.sqrt( N ) ), | |
columns = 0; | |
while ( N % rows != 0 ) { | |
rows = rows - 1; | |
} | |
columns = N / rows; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var colors = [], | |
pattern = ["0","3","6","9","c","f"], | |
plength = pattern.length, | |
a, b, c; | |
for (a = 0; a < plength; a += 1) { | |
for (b = 0; b < plength; b += 1) { | |
for (c = 0; c < plength; c += 1) { | |
colors.push( pattern[a]+pattern[a] + pattern[b]+pattern[b] + pattern[c]+pattern[c] ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"A".charCodeAt(); // => 65 | |
(65).toString(2); // => "1000001" | |
parseInt("100000", 2); // => 65 | |
String.fromCharCode(65); // => "A" |
NewerOlder