This file contains hidden or 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 replace() { | |
var source, template, html; | |
$.getJSON( "/config.json", function( data ) { | |
$('.replace').each(function () { | |
source = $(this).parent().html(); | |
template = Handlebars.compile(source); | |
html = template(data); | |
$(this).parent().html(html); | |
}); | |
}); |
This file contains hidden or 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 | |
$new_width = '640'; | |
$uploadFolder = "images/"; | |
$original_directory = $uploadFolder.'originals/'; | |
// This first loop just moves anything missing over to the originals directory | |
foreach (glob($uploadFolder."*") as $filename) { | |
$file = explode($uploadFolder, $filename); | |
$file = $file[1]; |
This file contains hidden or 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 interaction = (function($, window, undefined) { | |
// These are some global variables. | |
var example_a = ''; | |
// This is a standard document ready from jQuery. It allows the script to self-start. | |
$(document).ready(function(){ | |
interaction.init(); | |
}); | |
return { | |
init: function(){ | |
// These things happen when the page is loaded |
This file contains hidden or 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 test_check = parseInt($('footer').css('border-bottom-width')); | |
if (test_check == '1') { | |
$('body').addClass('mobile'); | |
} else { | |
$('body').addClass('not_mobile'); | |
} |
This file contains hidden or 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 check_image_orientation(image_to_check){ | |
$(image_to_check).load(function(){ | |
function orient_image() { | |
var image_width = parseInt(image_to_check.width()); | |
var image_height = parseInt(image_to_check.height()); | |
if (image_height <= image_width) { | |
$(image_to_check).addClass('horizontal_image'); | |
} else { |