Skip to content

Instantly share code, notes, and snippets.

View christianmagill's full-sized avatar

Christian Magill christianmagill

View GitHub Profile
@christianmagill
christianmagill / reveal-scrollbar-fix.css
Last active March 31, 2019 21:38
Fixes page jump issue with Foundation 6 Reveal component.
body.is-reveal-open {
overflow: visible;
}
.reveal-overlay {
overflow-y: hidden;
}
/* ========================================================================
// Multi Select
// ========================================================================*/
/* ------------------------------------------------------------------------
// Sortable
// ------------------------------------------------------------------------*/
function multiSelectSortableAfterInit(that, container){
@mixin generate-color-classes(){
@each $name, $color in $foundation-palette {
.color-#{$name}{
color: $color;
}
.background-#{$name}{
background-color: $color;
}
}
}
<?php
namespace Roots\Sage\PDF;
use Roots\Sage\Assets;
/*
add_filter( 'query_vars', function ( $query_vars ) {
$query_vars[] = 'pdf';
return $query_vars;
} );
.banner{
position: relative;
// height: 33.1vw;
overflow: hidden;
}
.banner img{
display: none;
width: 100%;
# deploy.rb from https://github.com/roots/bedrock-capistrano modified by FEW Agency, https://github.com/fewagency/
# FEW-comment: from Capistrano doc:
# Here we'd set the name of the application, must be in a format that's safe for
# filenames on your target operating system.
set :application, 'APPLICATIONNAME'
# FEW-comment: use the SSH url for the repo from GitHub
set :repo_url, 'git@github.com:USER/REPO.git'
function acf_form_field_load( $field ) {
$field['choices'] = array();
$forms = RGFormsModel::get_forms( null, 'title' );
$field['choices'][''] = '- Select Form -';
foreach ( $forms as $form ) {
$field['choices'][ $form->id ] = $form->title;
}
return $field;
}
function createFunctionWithTimeout(callback, opt_timeout) {
var called = false;
function fn() {
if (!called) {
called = true;
callback();
}
}
setTimeout(fn, opt_timeout || 1000);
return fn;
@christianmagill
christianmagill / Foundation6-TabToAccordion.js
Created October 26, 2016 23:00 — forked from danrcoull/Foundation6-TabToAccordion.js
Foundation 6 - Convert Tabs to Accordion on small Screens.
## Description Add the below To any Foundation 6 theme and change the iniialUlClass to whatever your tab ul class is.
## Author : Daniel Coull <ttechitsolutions@gmail.com>
var tabsToAccordian = {
initialUlClass: '.easytabs',
accordian: null,
tabs:null,
@christianmagill
christianmagill / cpt-archive-for-taxonomy.php
Created September 23, 2016 01:34
Use a WordPress Custom Post Type Archive for a Given Taxonomy
add_filter('template_include', function(){
if(is_tax('taxonomy-name'))
$template = get_query_template('archive-post-type');
return $template;
});