Skip to content

Instantly share code, notes, and snippets.

View smokeyfro's full-sized avatar

Chris Rault smokeyfro

View GitHub Profile
@smokeyfro
smokeyfro / is_blog.php
Created October 25, 2012 10:59 — forked from wesbos/is_blog.php
WordPress is_blog()
function is_blog () {
global $post;
$posttype = get_post_type($post );
return ( ((is_archive()) || (is_author()) || (is_category()) || (is_home()) || (is_single()) || (is_tag())) && ( $posttype == 'post') ) ? true : false ;
}
Usage:
<?php if (is_blog()) { echo 'You are on a blog page'; } ?>
@smokeyfro
smokeyfro / gist:3964564
Created October 27, 2012 13:06
Features Block - Duke Admissions Custom CSS
/* Duke Admissions Example - Part 1 */
.hwr-features-1 .hwr-feature-title span{
display: block;
width: 64px;
height: 64px;
margin: 0 auto 10px auto;
}
.hwr-features-1 li.color1 h2 span {
background: #0D2E62;
}
<p>Azure Standard, Frontier Wholesale and Bountiful Baskets are some of our sources of organic or non-GMO foods.</p>
<p>We have been ordering bulk spices, herbs and tea from the Frontier co-op for several years.</p>
<h3>Azure Standard</h3>
<p>We recently started to pick up the monthly Azure Standard order for Lake Mead City / Meadview/ Dolan Springs.</p>
<p>Azure is located in Oregon and once a month they deliver via truck to Kingman (among many other stops). To see the prices you have to open a free account at https://www.azurestandard.com</p>
butler_add_action( 'init', 'canva_do_remove_page_comments_support' );
function canva_do_remove_page_comments_support() {
remove_post_type_support( 'page', 'comments' );
}
@smokeyfro
smokeyfro / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@smokeyfro
smokeyfro / css_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@smokeyfro
smokeyfro / javascript_resources.md
Last active August 29, 2015 14:23 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@smokeyfro
smokeyfro / css
Last active September 1, 2015 08:03 — forked from CodeMyUI/css
Sign In/Up Transition By Fabrizio Bianchi : http://codepen.io/fbrz/pen/pvZRNK
@import url(http://fonts.googleapis.com/css?family=Raleway:700,800);
html, body { margin: 0; }
:focus { outline: none; }
::-webkit-input-placeholder { color: #DEDFDF; }
::-moz-placeholder { color: #DEDFDF; }
:-moz-placeholder { color: #DEDFDF; }
::-ms-input-placeholder { color: #DEDFDF; }
@smokeyfro
smokeyfro / gist:0330af8ee3339959035a854ca1fc4117
Created November 21, 2018 11:20
AMP-List Trigger changeToLayoutContainer on input-throttled
<input name="search"
id="search"
type="text"
placeholder="Search by grape or wine name"
on="input-throttled:AMP.setState({
prefs: {
searchTerm: event.value,
view: 'list'
}
}),
@smokeyfro
smokeyfro / winefolly-typo-icon-shortcode.html
Last active January 8, 2019 11:04
Wine Folly Icon Shortcode
[icon type="beer"]