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 lessSourceFiles = '../../static/less/*.less' | |
var cssOutPath = '../../static/css' | |
var gulp = require('gulp') | |
var watch = require('gulp-watch') | |
var less = require('gulp-less-sourcemap') | |
var path = require('path') | |
var gutil = require('gulp-util') | |
var notifier = require('node-notifier') | |
var postcss = require('gulp-postcss') |
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="pt-perspective"> | |
<div class="pt-page"></div> | |
<div class="pt-page"></div> | |
<div class="pt-page"></div> | |
</div> | |
<script> | |
var $pages = $('.pt-page') | |
transition.init($('.pt-page')) | |
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.formatMoney = function formatMoney(money) { | |
money = parseInt(money) | |
money = isFinite(money) ? money : 0 | |
return String(money).replace(/./g, function(c, i, a) { | |
return i && c !== '.' && ((a.length - i) % 3 === 0) ? ' ' + c : c | |
}) | |
} |
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
add_filter('embed_oembed_html', function ($oembed) { | |
return "<div class='video-wrapper'>$oembed</div>"; | |
}, 10); |
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
add_shortcode('template', function ($templates = array()) { | |
$templates_render_result = ''; | |
foreach ($templates AS $key => $template) | |
{ | |
if (is_numeric($key) AND $template) | |
{ | |
$template = sanitize_file_name($template); | |
if ($template_path = get_template_directory() . "/parts/templates/$template.html" AND is_readable($template_path)) |
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 () { | |
function addHtmlClass(klass) { | |
document.documentElement.setAttribute('class', document.documentElement.getAttribute('class') || '' + ' ' + klass + ' ') | |
} | |
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera\s+Mini/i.test(navigator.userAgent)) { | |
window.fullVersionCookieTest = /nomobile\s*=\s*1(;\s*)?/ig | |
window.isFullVersion = fullVersionCookieTest.test(document.cookie) | |
if (!isFullVersion) { |
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
define(['promise'], function () { | |
// Use any Promise polyfill | |
var imgClasses = [HTMLImageElement], | |
imgElementsList = ['img'] | |
if (window.HTMLPictureElement) { | |
imgClasses.push(HTMLPictureElement) | |
imgElementsList.push('picture') | |
} |
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
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
!window.requestAnimationFrame && (window.requestAnimationFrame = null) | |
!window.cancelAnimationFrame && (window.cancelAnimationFrame = null) |
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
#!/usr/bin/env python | |
""" | |
<description> | |
This file is part of ZTC and distributed under the same license. | |
http://bitbucket.org/rvs/ztc/ | |
Copyright (c) 2011 Vladimir Rusinov <vladimir@greenmice.info> | |
""" |
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
/* jQuery throttle https://github.com/cowboy/jquery-throttle-debounce */ | |
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); | |
;(function($){ | |
/** | |
* Scenario - jQuery keyframe animation | |
* Author: Alex Batalov, radist2s@gmail.com | |
* | |
* Usage: | |
* |