Skip to content

Instantly share code, notes, and snippets.

View nessthehero's full-sized avatar
💭
🍕

Ian Moffitt nessthehero

💭
🍕
View GitHub Profile
@nessthehero
nessthehero / access.html
Last active August 29, 2015 14:04
Awesome Accessibility Navigation
<!-- ACCESSIBILITY NAVIGATION -->
<div class="access">
<h1 id="top">Welcome to the University Website</h1>
<h2>Accessibility Navigation:</h2>
<ul>
<li><a href="#primary-navigation" title="Skip to the primary site navigation" class="skip">Skip to the primary site navigation</a></li>
<li><a href="#main" title="Skip to the main content" class="skip">Skip to the main content</a></li>
<li><a href="#footer" title="Skip to the footer" class="skip">Skip to the footer</a></li>
</ul>
</div><!-- /access -->
@nessthehero
nessthehero / polyfill.js
Created March 20, 2014 18:58
Placeholder polyfill
// Placeholder polyfill
if (!Modernizr.input.placeholder) {
$('input[placeholder]:not(.ph), textarea[placeholder]:not(.ph)').each(function () {
var place = $(this).attr('placeholder');
$(this).attr('value', place);
$(this).bind('focus', function () {
if ($.trim($(this).attr('value')) === place) {
$(this).attr('value', '');
@nessthehero
nessthehero / template.php
Created January 15, 2014 14:11
Drupal template.php file
<?php
/**
* Include our template.whatever.php files
*/
$theme_path = drupal_get_path('theme', 'your_theme');
// Specify the path to our template.php files
// I decided that my template.php files will
// reside in a folder named "php"
$filePath = "$theme_path/php";
// Open the directory
@nessthehero
nessthehero / _module.scss
Last active December 28, 2015 21:09
Example of SASS Module
.module { // Uses Chris Coyier's SASS style guide
// Extends
@extends %module;
// Native styles
background-color: lightpink;
// Includes (mixins and whatnot)
@include transition(all 0.3s ease-out);
@nessthehero
nessthehero / YouTube CKEditor Plugin
Last active December 25, 2015 21:29
YouTube CKEditor Plugin
ckeditor
-plugins
--youtube
---dialogs
----youtube.js
---icons
----youtube.png
---plugin.js
@nessthehero
nessthehero / mixins.scss
Last active December 23, 2015 04:59 — forked from eightdotthree/mixins.scss
Forked again, but with additions to the EM translation functions to include default font size. I found out if you change the font size in an element, then do anything else with EMs in that same element, it changes what an EM actually is. With these additions, you can include the new font size and the widths will end up being the same as they wou…
@mixin bp($point) {
@if $point == print {
@media only print { @content; }
}
}
@mixin em_width($px, $default: 16) { width: #{$px / $default}em; }
@mixin em_height($px, $default: 16) { height: #{$px / $default}em; }
@nessthehero
nessthehero / mixins.scss
Created September 12, 2013 18:33
Mixins
@mixin bp($point) {
@if $point == print {
@media only print { @content; }
}
}
@mixin em_width($px) { width: #{$px / 16}em; }
@mixin em_maxwidth($px) { max-width: #{$px / 16}em; }
# Accordions
Self contained, repeatable, and unpack when there is no JavaScript.
@nessthehero
nessthehero / common.css
Last active December 21, 2015 19:18
Common CSS Reset styles
body * {
word-break: break-word;
word-wrap: break-word;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
-ms-box-sizing: border-box;
box-sizing: border-box;
background-color: transparent;
@nessthehero
nessthehero / boilerplate2.js
Last active December 21, 2015 08:58
Boilerplate.js version 2
// Do everything in a closure, so we don't affect or create any globals.
(function( $, window, document, undefined ) {
"use strict";
var Project = Project || {};
Project.init = function () {