Skip to content

Instantly share code, notes, and snippets.

View nedzen's full-sized avatar
:octocat:
looking for work

Marius Nedelcu nedzen

:octocat:
looking for work
  • Bucharest
View GitHub Profile
var el = document.querySelector('body');
// https://medium.com/@uistephen/keyboardevent-key-for-cross-browser-key-press-check-61dbad0a067a
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
document.addEventListener('keyup', function (event) {
if (event.defaultPrevented) {
return;
}
var key = event.key || event.keyCode;
//
// Golden Ratio Typography
// --------------------------------------------------
// Golden Ratio Math
//
// Let's do some math so we can build beautiful typography and vertical rhythm.
// For any magic to happen, set the $ContentWidth variable on _variables.scss
// to match your content box width (normally this is 640px, 740px, etc...).
@nedzen
nedzen / SassMeister-input.scss
Created July 19, 2014 01:13
Generated by SassMeister.com.
// ----
// Sass (v3.4.0.rc.1)
// Compass (v1.0.0.alpha.20)
// ----
/**
* Generate the carousel animation
* based on the number of frames
* and the pourcentage of a frame spent static
*
@nedzen
nedzen / _responsive_ads.scss
Last active August 29, 2015 14:02
Add responsive advertisements to your site.
// A simple and practical way to add responsive advertisments to your website
// include the responsive_ads.css into your page or add this code to your SCSS or LESS framework.
// made my mariusnedelcu.com feel free to use, and come with improvements.
// required mixins
@mixin size($width, $height) {
width: $width;
height: $height;
}
@mixin square($size) {