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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.host; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" |
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
; css - fuck off and die | |
stylesheets[all][] = twitter-pull-listing.css |
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 | |
$toRemove = array('someClassname', 'anotherDirtyClass'); | |
$vars['classes_array'] = array_values(array_diff($vars['classes_array'], $toRemove)); |
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 | |
/** | |
* Implements hook_addthis_markup_alter. | |
* | |
* @param array $markup | |
* $markup contain an array with the structure of the addthis markup. | |
*/ | |
function gluecode_addthis_markup_alter(&$markup) { | |
// alter markup to add title's that are translatable by Drupal | |
if (!empty($markup['twitter'])) { |
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
/** | |
* Vertical centering with Flexbox + margin fallback | |
* Lea Verou & David Storey | |
*/ | |
html, body { height: 100%; } | |
body { | |
width: 100%; /* needed for FF */ | |
margin: 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
<?php if (isset($tabs['#primary'][0]) || isset($tabs['#secondary'][0])): ?> | |
<nav class="tabs"><?php print render($tabs); ?></nav> | |
<?php endif; ?> |
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 | |
$url = $entity->field_name_link['und']['0']['url']; | |
$imgField = $entity->field_name_image['und']['0']; | |
$config = array( | |
'style_name' => 'i_am_the_name_of_your_image_style', | |
'path' => $imgField['uri'], | |
'title' => $imgField['alt'], | |
'alt' => $imgField['title'], | |
'width' => $imgField['width'], | |
'height' => $imgField['height'] |
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
.island{ | |
padding:1em; | |
> :last-child{ | |
margin-bottom: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
img{ | |
margin:10px; | |
&[style*="float:left"]{ | |
margin-left:0; | |
} | |
&[style*="float:right"]{ | |
margin-right:0; | |
} | |
} |