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
@mixin grid($cols: 1, $gutter: 0, $childs: ".item") { | |
width: auto; | |
margin-right: -$gutter; | |
#{$childs} { | |
float: left; | |
width: (100% / $cols); | |
padding-right: $gutter; | |
background-clip: content-box; |
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
{ | |
transitionSpeed: 300, | |
transitionEasing: 'ease', | |
controlElement: '[data-control]', | |
contentElement: '[data-content]', | |
groupElement: '[data-accordion-group]', | |
singleOpen: true | |
} |
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 inputValidations() { | |
function isAlphaNumeric(val) { | |
var letter = /[a-zA-Z]/, | |
number = /[0-9]/; | |
var valid = number.test(val) && letter.test(val); | |
return valid; | |
} | |
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
$(window) | |
.on('scroll', onScroll); | |
function onScroll() { | |
var sticky = $('.js-sticky-nav').filter(':visible'); | |
if (sticky.length) { | |
toggleSticky(sticky); | |
} | |
} |
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 heightEqualizer($row) { | |
var $columns = $row.find('> *'); | |
function calculateHeight($el) { | |
var height = 0; | |
$el.each(function() { | |
var heightVal = $(this).css('height'); | |
$(this).css('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
<?php | |
// Account to get the videos from | |
$username = 'user6002596'; | |
// Do request to Vimeo API | |
$request = 'http://vimeo.com/api/v2/'. $username .'/videos.xml'; | |
// Parse into SimpleXML object | |
$vimeo = simplexml_load_file($request); |
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
$video_url = get_post_meta( get_the_ID(), 'mb_youtube_url', true ); | |
// Parse video ID from given url | |
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $video_url, $match)) { | |
$video_id = $match[1]; // Return video ID | |
} |
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
// Group class for clearing floats | |
.group { | |
&:before, | |
&:after { | |
content: " "; | |
display: table; | |
} | |
&:after { |
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
Avatar Generator from Name | |
-------------------------- | |
A name (first name and surname) is input and output using the initials from the name and a background colour (based on the first name first letter). The background colors are from from http://flatuicolors.com/ |
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 debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); | |
}; | |
var callNow = immediate && !timeout; |
OlderNewer