Skip to content

Instantly share code, notes, and snippets.

View jonbellah's full-sized avatar

Jon Bellah jonbellah

View GitHub Profile
@jonbellah
jonbellah / portfolio-template.php
Created May 15, 2013 18:54
Integrating isotope with custom post types - the HTML
<!-- Begin filter links -->
<div class="portfolio-filters">
<ul id="filters">
<li><a href="#" data-filter="*">All</a></li>
<!-- Begin filter loop -->
<?php
// Create an array and assign the projects taxonomy to it
$args = array( 'taxonomy' => 'skills' );
// Call the categories from this array
@jonbellah
jonbellah / gist:5896071
Created June 30, 2013 17:31
Sass Gradients Mixin
@mixin gradient($from, $to) {
background: $from;
background: -moz-linear-gradient(top, $to 0%, $from 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,$to), color-stop(100%,$from));
background: -webkit-linear-gradient(top, $to 0%, $from 100%);
background: -o-linear-gradient(top, $to 0%, $from 100%);
background: -ms-linear-gradient(top, $to 0%, $from 100%);
background: linear-gradient(to bottom, $to 0%, $from 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='$to', endColorstr='$from',GradientType=0 );
}
@jonbellah
jonbellah / gist:5896100
Created June 30, 2013 17:40
Retina Image Sass Mixin
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {
background-image: url($image);
background-size: $width $height;
}
}
@jonbellah
jonbellah / gist:5896122
Created June 30, 2013 17:43
Border Radius Sass Mixin
@mixin border-radius($property) {
border-radius: $property;
-o-border-radius: $property;
-moz-border-radius: $property;
-webkit-border-radius: $property;
}
@jonbellah
jonbellah / gist:5896145
Created June 30, 2013 17:49
Transition Mixin
@mixin transition($property, $speed) {
transition: $property $speed linear;
-o-transition: $property $speed linear;
-ms-transition: $property $speed linear;
-moz-transition: $property $speed linear;
-webkit-transition: $property $speed linear;
}
@jonbellah
jonbellah / gist:5896196
Created June 30, 2013 18:04
Vendor Prefixes
@mixin prefix($name, $value) {
-webkit-#{$name}: $value;
-moz-#{$name}: $value;
-ms-#{$name}: $value;
-o-#{$name}: $value;
#{$name}: $value;
}
@jonbellah
jonbellah / header.php
Last active December 19, 2015 10:58
Mobile Navigation Toggle: The HTML
<?php if(!is_mobile()) { ?>
<nav id="navigation" class="site-navigation" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
</nav><!-- #site-navigation -->
<?php } else { ?>
<!-- Start mobile nav menu -->
<nav class="mobile-dropdown">
@jonbellah
jonbellah / style.css
Created July 8, 2013 11:46
Mobile Navigation Menu: The CSS
.dropdown {
position: absolute;
z-index: 9999999;
display: none;
}
.dropdown .dropdown-menu,
.dropdown .dropdown-panel {
list-style: none;
background: #FFF;
@jonbellah
jonbellah / gist:5984320
Created July 12, 2013 13:06
Minify with Sass
$ sass --watch style.scss:style.css --style compressed
@jonbellah
jonbellah / gist:5984392
Created July 12, 2013 13:16
Compass Create
$ compass create path/to/your_project