Force layout test/experiment with images
Sources:
license: gpl-3.0 |
Force layout test/experiment with images
Sources:
module.exports = function(config) { | |
var _ = require('lodash'); | |
var express = require('express'); | |
var router = express.Router(); | |
var path = require('path'); | |
var fs = require('fs'); | |
var pagespeed = require('../pagespeed'); | |
__dirname = __dirname.replace('routes',''); |
var psi = require('psi'); | |
var testUrl = 'http://www.expedia.com/Cancun-Hotels.d179995.Travel-Guide-Hotels?psislp=1'; | |
module.exports = { | |
getScore: function(cb) { | |
psi(testUrl, function (err, data) { | |
cb(data.score); | |
}); | |
} | |
}; |
/*globals jQuery, $, wotif, wotifConfig */ | |
_.templateSettings = { | |
interpolate: /\{\{(.+?)\}\}/g | |
}; | |
wotif.carousel = (function (utils) { | |
var selectors = { | |
space: '#carousel' | |
}, |
// Switch active card on swipe | |
$(".cards").hammer().bind("swipe", function(ev) { | |
if (ev.direction == "left") { | |
if (!activeCard.is(':first-child')) { | |
$('.card.active').removeClass('active').next('.card').addClass('active'); | |
} | |
} | |
else if (ev.direction == "right") { | |
if (!activeCard.is(':last-child')) { | |
$('.card.active').removeClass('active').prev('.card').addClass('active'); |