Skip to content

Instantly share code, notes, and snippets.

@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";
(function($) {
$(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
$(".entry-content p").fitVids();
});
})(jQuery);
// 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);
}
'selectLayerPreset': {
label: 'Select Layer Preset',
options: [
{
type: 'textinput',
label: 'Layer Preset ID',
id: 'lp',
default: '0'
},
{
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);