Skip to content

Instantly share code, notes, and snippets.

Mobile Drawer & Navicon Starter

Wanted something simple and straightforward for a drawer and navicon. Navicon is pretty straightforward using t-origin, and the drawer works but I'm sure everything can be improved.

A Pen by John Stewart on CodePen.

License.

@johnstew
johnstew / Playing-with-Skrollr.markdown
Created November 16, 2014 03:54
A Pen by John Stewart.
@johnstew
johnstew / package.json
Created November 15, 2014 21:06
Basic Package.json
{
"name": "Project-Name",
"version": "0.1.0",
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-sass": "^0.8.1",
"grunt-contrib-watch": "^0.6.1"
}
}
@johnstew
johnstew / canvasboredom.html
Created November 4, 2014 15:12
canvasboredom.html
<!DOCTYPE html>
<html>
<head>
<title>Whatever</title>
</head>
<body>
<canvas id="canvas" width="500" height="500" style="display: block; margin: auto; border: 1px solid #000;"></canvas>
<script type="text/javascript">
var canvas = document.getElementById("canvas"),
@johnstew
johnstew / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@johnstew
johnstew / view-content
Created October 17, 2014 20:38
Drupal View Content
<?php $content = $view->style_plugin->rendered_fields; ?>
@johnstew
johnstew / fontsize
Created October 7, 2014 20:12
Mixin for font-size using REM.
@mixin font-size($size){
font-size: $size + px;
font-size: ($size / 16)+ rem;
}
@johnstew
johnstew / SupportedBrowsers
Created October 6, 2014 19:14
Supported Browsers List
IE9+ FF 27.0+ Safari 5+ Chrome 27+ Opera 18+
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);