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 path = window.location.pathname.split('/')[1], | |
lang = /\w\w\-\w\w/.test(path) ? path.split('-')[0] : 'en'; |
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
<snippet> | |
<!-- Example: Hello, ${1:this} is a ${2:snippet}. --> | |
<content><![CDATA[ | |
-webkit-transition: ${1:property} ${2:.25s}; | |
-moz-transition: ${1:property} ${2:.25s}; | |
-o-transition: ${1:property} ${2:.25s}; | |
transition: ${1:property} ${2:.25s}; | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>transition</tabTrigger> |
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
/** | |
* Given a number or string, parses out the number and creates a "pretty" | |
* rounded version. | |
* | |
* @param {Number|String} raw - string or number to parse | |
* @return {Object} information about the passed number | |
* - {Number} number - cleaned up integer | |
* - {String} pretty - "pretty" formated number | |
* - {Number} digits - number of digets | |
*/ |
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
/* | |
* Simple Tooltip Styles | |
* | |
* Note: Works best with short, single-line tooltip content over a target that | |
* doesn't have a solid white background. Ideal for image tooltips. | |
* | |
* Example Markup: | |
* | |
* <div class="tooltip-target"> | |
* <p>This is some content to hover over</p> |
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
// https://api.drupal.org/api/drupal/includes!path.inc/function/drupal_match_path/7 | |
$alias = drupal_get_path_alias(current_path()); | |
$urls = array( | |
'example/url', | |
'example/url/*', | |
); | |
$patterns = implode("\n", $urls); | |
if (drupal_match_path($alias, $patterns)) { |
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
/* Proportionately resize iframes. Add class to a wrapper around the iframe */ | |
.iframe-4-3, | |
.iframe-16-9 { | |
position: relative; | |
padding-bottom: 75%; /* 4:3 */ | |
height: 0; | |
} | |
.iframe-4-3 iframe, | |
.iframe-16-9 iframe { | |
position: absolute; |
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
// Makes a CSS hexagon! based off of http://csshexagon.com/ | |
// Demo: http://sassmeister.com/gist/98fcf3ce163a97d2ef7e | |
@mixin hexagon($size, $color, $border: 0) { | |
position: relative; | |
width: $size; | |
height: ($size * 0.577); | |
background-color: $color; | |
margin: ($size * 0.288) 0; | |
border-left: $border; | |
border-right: $border; |
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="hexagon"> | |
<h2>Sweet hex!</h2> | |
</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
/** | |
* Defer iframe loading. | |
* | |
* Markup: | |
* <div class="defer-iframe" data-src="{SOURCE URL}" data-{ATTR}="{VAL}"></div> | |
*/ | |
$(window).load( function(){ | |
if ($('.defer-iframe').length) { | |
$('.defer-iframe').each( function() { | |
var $iframe = $('<iframe frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'); |
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
{ | |
"name": "kss", | |
"version": "1.3.0", | |
"from": "kss@>=1.3.0 <2.0.0", | |
"resolved": "https://registry.npmjs.org/kss/-/kss-1.3.0.tgz", | |
"dependencies": { | |
"async": { | |
"version": "0.9.0", | |
"from": "async@>=0.9.0 <0.10.0", | |
"resolved": "https://registry.npmjs.org/async/-/async-0.9.0.tgz" |
OlderNewer