Skip to content

Instantly share code, notes, and snippets.

var instance_skel = require('../../instance_skel');
var debug;
var log;
function instance(system, id, config) {
var self = this;
// super-constructor
instance_skel.apply(this, arguments);
'selectLayerPreset': {
label: 'Select Layer Preset',
options: [
{
type: 'textinput',
label: 'Layer Preset ID',
id: 'lp',
default: '0'
},
{
// Add the following code to the end of functions.php in your Genesis child theme. Don't copy this line.
/** Load scripts for FitVids before closing the body tag */
add_action('genesis_after_footer', 'child_script_managment');
function child_script_managment() {
wp_enqueue_script( 'fitvids', get_stylesheet_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), '', TRUE);
wp_enqueue_script( 'fitvids-xtra', get_stylesheet_directory_uri() . '/js/FitVids.js', array(), '', TRUE);
}
(function($) {
$(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
$(".entry-content p").fitVids();
});
})(jQuery);
@chrisrouse
chrisrouse / LESS margin mixin for pixel and rem values.less
Created December 7, 2013 20:14
LESS mixin for margin that outputs value with pixel and rem values.
.margin-top (@margin1: 16) {
@margin1Value: (@margin1 / 10);
margin-top: (@margin1 / 1px);
margin-top: ~"@{margin1Value}rem";
}
.margin-right (@margin1: 16) {
@margin1Value: (@margin1 / 10);
margin-right: (@margin1 / 1px);
margin-right: ~"@{margin1Value}rem";
@chrisrouse
chrisrouse / padding-with-four-values.less
Created December 7, 2013 18:23
LESS mixins for generating pixel and rem values for padding using one to four values.
.padding-four-values (@padding1: 16; @padding2: 16; @padding3: 16; @padding4: 16;) {
@padding1Value: (@padding1 / 10);
@padding2Value: (@padding2 / 10);
@padding3Value: (@padding3 / 10);
@padding4Value: (@padding4 / 10);
padding: (@padding1 * 1px) (@padding2 * 1px) (@padding3 * 1px) (@padding4 * 1px);
padding: ~"@{padding1Value}rem" ~"@{padding2Value}rem" ~"@{padding3Value}rem" ~"@{padding4Value}rem";
}
usage:
.circle {
border-radius: 50%;
width: 100px;
height: 100px;
line-height:100px;
text-align:center;
border:1px solid black;
/* width and height can be anything, as long as they're equal */
}
.input-focus(@r, @g, @b) {
textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
@chrisrouse
chrisrouse / Show Feature Image on Post Admin
Created May 21, 2013 02:48
This adds a custom column to show the feature image of a post.
<?php
/*
Plugin Name: Featured Image in Post List
Description: This plugin allows you to see the featured image for each post in the Post list.
Version: 0.1
License: GPL
Author: Chris Rouse
Author URI: www.chrisrouse.us
*/