This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$min = 3; | |
echo $min; | |
function hide_links_after_minimum_in_group($queue) { | |
$return_this_list = '<ol class="article-list">'; | |
foreach ($queue->result as $key => $node) { | |
echo $min; | |
if($key+1 > $min) { | |
$return_this_list .= '<li class="article-link is-hidden">'; | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"folders": | |
[ | |
{ | |
"file_exclude_patterns": | |
[ | |
"README*", | |
"*.css", | |
"config.rb" | |
// "settings.*.php", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: SVG Upload | |
Plugin URI: http://www.lewiscowles.co.uk | |
Description: Super PHP Plugin to add Full SVG Media support to WordPress, I should live in {$webroot}/wp-content/plugins/ folder ;) | |
Author: Lewis Cowles | |
Version: 1.0 | |
Author URI: http://www.lewiscowles.co.uk/ | |
*/ | |
add_action('admin_init', 'add_svg_upload'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Discussion here: https://gist.github.com/csswizardry/c849d22bdc160dc615df | |
// Original gist: http://sassmeister.com/gist/407be8a68649e48abc6b | |
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
$spacing-unit: 24px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.12) | |
// Compass (v1.0.3) | |
// ---- | |
$spacing-unit: 24px; | |
$spacing-unit-tiny: round(0.25 * $spacing-unit); | |
$spacing-unit-small: round(0.5 * $spacing-unit); | |
$spacing-unit-large: round(2 * $spacing-unit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ------------------------------------------------------------ | |
Features | |
1. Keyboard navigation | |
- left/right | |
- escape to close | |
2. cover full screen with white backdrop | |
3. theatre image full screen / edge-to-edge while maintaining aspect ratio | |
4. switching between thumbnails by clicking or keyboard navigation | |
------------------------------------------------------------ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* implementation of hook_panels_layouts | |
*/ | |
// Plugin definition | |
$plugin = array( | |
'title' => t('Updates'), | |
'category' => t('Tesla minipanels'), | |
// 'icon' => 'default_template.png', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window, document, $, Drupal) { | |
"use strict"; | |
Drupal.behaviors.homepage_hero_height = { | |
attach: function (context) { | |
var allHomepageImages = $('.section-hero'), | |
thisHomepageImage; | |
window.onload = function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: there are better ways to do this. needs research | |
// maybe something like this: https://www.drupal.org/project/autoload_js | |
$path_alias = drupal_get_path_alias($_GET["q"]); | |
$theme_path = $base_url . '/' . drupal_get_path('theme', 'tesla_theme'); | |
/** | |
* DESCRIPTION: | |
* page-specific CSS added through this function based on the $path_alias | |
* AUTHOR: eritchey@teslamotors.com | |
*/ |