Skip to content

Instantly share code, notes, and snippets.

View brianfeister's full-sized avatar
🧙‍♂️

Brian Feister brianfeister

🧙‍♂️
View GitHub Profile
@brianfeister
brianfeister / Bootstrap Sub-theme Engine Function
Last active December 16, 2015 02:48
Bootstrap Sub-theme Iterating Function
//
// Mixins to build sub-themes
// --------------------------------------------------
// call this to build a new theme and create all needed variables in _sub-themes.less
.setThemeColors( @themeName ) {
(~"body.@{themeName}") {
color: ~"@{@{themeName}-PrimarySubdued}";
background-color: ~"@{@{themeName}-AccentColor}";
a {
@brianfeister
brianfeister / gist:4640642
Last active December 11, 2015 18:19
Function for custom display of Timely All-in-One-Calendar long date
/* ========================================================================================
*
* function for custom date range display of Timely ai1ec events
*
* @param $event - you must pass Timely's $event object to this function
* @param $date_format - pass a PHP valid date format for Month & Day (not year!)
* @param $time_format - pass a PHP valid time format, pass FALSE to omit time from output
* @param $echo - defaults to true, in order to return pass FALSE for $echo parameter
* ======================================================================================== */
@brianfeister
brianfeister / attach_heads.js
Created December 15, 2012 13:04
Sub-theming engine for Grunt.js + Roots Theme + Twitter Bootstrap
/**
* Task: attach_heads
* Description: Set the heads for all themes declared in themes.json
*/
module.exports = function(grunt) {
'use strict';
var fs = require('fs');
var path = require('path');
@brianfeister
brianfeister / Bootstrap Sub-theme Engine Vars
Last active October 12, 2015 12:37
Per-theme variable declarations for sub-theming engine for via Twitter Bootstrap
// --------------------------------------------------
//
// SUB-THEME-SPECIFIC VARIABLES
//
// --------------------------------------------------
// Home
// -------------------------
@home-sub-theme-PrimaryColor: @primaryColor;
@home-sub-theme-AccentColor: @accentColor;
@brianfeister
brianfeister / wp-bootstrap-walker-class.php
Created July 19, 2012 16:18 — forked from isGabe/wp-bootstrap-walker-class.php
Extended Walker Class for Twitter Bootsrap Navigation Wordpress Integration
<?php
class Bootstrap_Walker_Nav_Menu extends Walker_Nav_Menu {
function start_lvl( &$output, $depth ) {
//In a child UL, add the 'dropdown-menu' class
$indent = str_repeat( "\t", $depth );
$output .= "\n$indent<ul class=\"dropdown-menu\">\n";