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
/** | |
* Replace Panopoly layouts with Radix Layouts | |
* @param $plugin | |
* @param $info | |
*/ | |
function radix_ctools_plugin_post_alter(&$plugin, &$info) { | |
// If Radix Layouts module is installed. | |
// Switch all Panopoly Panels layouts to Radix Layouts. | |
if (module_exists('radix_layouts')) { | |
$radix_layouts_path = drupal_get_path('module', 'radix_layouts'); |
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
/** | |
* Display a day view. | |
*/ | |
function template_preprocess_calendar_day(&$vars) { | |
$vars['view']->style_with_weekno = FALSE; | |
$view = $vars['view']; | |
$rows = $vars['rows']; | |
$item_count = 0; | |
$by_hour_count = 0; |
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
// Creates a UIColor from a Hex string. | |
func colorWithHexString (hex:String) -> UIColor { | |
var cString:String = hex.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceAndNewlineCharacterSet()).uppercaseString | |
if (cString.hasPrefix("#")) { | |
cString = cString.substringFromIndex(1) | |
} | |
if (countElements(cString) != 6) { | |
return UIColor.grayColor() |
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
// Media queries breakpoints | |
// -------------------------------------------------- | |
// Extra small screen / phone | |
// Note: Deprecated $screen-xs and $screen-phone as of v3.0.1 | |
$screen-xs: 1px !default; | |
$screen-xs-min: $screen-xs !default; | |
$screen-phone: $screen-xs-min !default; | |
// Small screen / tablet |
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
<div class="row"> | |
<div class="col-md-4">Column 1</div> | |
<div class="col-md-8">Column 2</div> | |
</div> |
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
Set LSUIElement to YES |
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
// Font faces | |
// -------------------------------------------------- | |
@import "compass/css3/font-face"; | |
$font-faces: ('GothamRnd-Medium', 'GothamRnd-Book'); | |
@each $font-face in $font-faces { | |
@include font-face( | |
'#{$font-face}', | |
font-files( | |
"#{$font-face}.woff", woff, |
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 | |
$value = entity_metadata_wrapper('node', $node)->field_foo_bar->value(); |
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
[class*="col-"]{ | |
margin-bottom: -99999px; | |
padding-bottom: 99999px; | |
} |
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 | |
/** | |
* Helper function to find users with authenticated role only. | |
*/ | |
function _users_with_authenticated_role_only() { | |
return db_query('SELECT uid, name, mail FROM users u WHERE uid > 0 AND NOT EXISTS (SELECT 1 from users_roles ur WHERE u.uid = ur.uid)')->fetchAll(); | |
} |