Skip to content

Instantly share code, notes, and snippets.

View cjwd-snippets's full-sized avatar

cjwd-snippets

View GitHub Profile
///*------------------------------------*\
// #COLORS
//\*------------------------------------*/
$color-brand: $brand-color;
$color-pink: $color-brand;
$color-gray: #333;
$color-gray-light: #999;
$color-gray-ui: #ddd;
$color-green: #859900;
///*------------------------------------*\
// #GLOBAL
//\*------------------------------------*/
$brand-color: #000000;
$brand-round: 3px;
$base-round: $brand-round;
///*------------------------------------*\
// #MIXINS
//\*------------------------------------*/
// Spit out vendor prefixes in one go. Very pragmatic, far from perfect.
@mixin vendor($property, $value...) {
-webkit-#{$property}: $value;
-moz-#{$property}: $value;
#{$property}: $value;
}
@cjwd-snippets
cjwd-snippets / main.scss
Last active October 28, 2017 22:33
Main stylesheet starter
/* ==========================================================================
INUITCSS
========================================================================== */
/**
* inuitcss, by @csswizardry
*
* github.com/inuitcss | inuitcss.com
*/
<?php
/*
Description: Adds a taxonomy filter in the admin list page for a custom post type.
Written for: http://wordpress.stackexchange.com/posts/582/
By: Mike Schinkel - http://mikeschinkel.com/custom-workpress-plugins
Instructions: Put this code in your theme's functions.php file or inside your own plugin. Edit to suite your post types and taxonomies. Hope this helps...
*/
add_filter('manage_listing_posts_columns', 'add_businesses_column_to_listing_list');
function add_businesses_column_to_listing_list( $posts_columns ) {
if (!isset($posts_columns['author'])) {
@cjwd-snippets
cjwd-snippets / Footer Markup
Last active August 29, 2015 14:21
Dynamically widgetize wordpress footer
@cjwd-snippets
cjwd-snippets / piklist-custom-post-type.php
Last active September 29, 2017 17:27
Piklist Custom Post Type
add_filter('piklist_post_types', 'register_custom_post_types');
/**
* Register the custom post types
*
* @since 1.0.0
*/
public function register_custom_post_types($post_types) {
$post_types['cw_project'] = [
'labels' => piklist('post_type_labels', 'Projects'),
@cjwd-snippets
cjwd-snippets / Empty Table
Last active December 21, 2015 23:19
Bootstrap Empty Table Markup
<table class="table table-bordered">
<thead>
<tr>
<th></th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@cjwd-snippets
cjwd-snippets / Placeholder Fallback
Created July 15, 2013 16:42
Simple input placeholder fallback
<input id="q" autofocus>
<script>
if (!("autofocus" in document.createElement("input"))) {
document.getElementById("q").focus();
}
</script>
@cjwd-snippets
cjwd-snippets / HTML starter
Last active December 18, 2015 00:58
HTML starter
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">