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
| //styles form padding offset | |
| (function() { | |
| var offset, $input, spanWidth, | |
| $inputs = document.getElementsByClassName('input-wrapper'); | |
| for(var i = 0; i < $inputs.length; i++) { | |
| spanWidth = Math.round($inputs[i].childNodes[0].getBoundingClientRect().width); | |
| inoutTextOffset = (spanWidth + 7) + 'px'; | |
| $input = $inputs[i].childNodes[1]; | |
| $input.style.paddingLeft = inoutTextOffset; |
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
| //styles form padding offset | |
| (function() { | |
| var offset, $input, spanWidth, | |
| $inputs = document.getElementsByClassName('input-wrapper'); | |
| for(var i = 0; i < $inputs.length; i++) { | |
| spanWidth = Math.round($inputs[i].childNodes[0].getBoundingClientRect().width); | |
| inoutTextOffset = (spanWidth + 7) + 'px'; | |
| $input = $inputs[i].childNodes[1]; | |
| $input.style.paddingLeft = inoutTextOffset; |
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
| @mixin total-center { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| -webkit-transform: translateY(-50%) translateX(-50%); | |
| -ms-transform: translateY(-50%) translateX(-50%); | |
| transform: translateY(-50%) translateX(-50%); |
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
| /* | |
| * Author: john.farrow@aerian.com | |
| */ | |
| define([], function() { | |
| var init = function(cfg) { | |
| require.config({ | |
| baseUrl: cfg.baseUrl | |
| }); | |
| require(['./scrubbable'], function(Scrubbable) { | |
| var app = new Scrubbable(); |
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
| .element { | |
| position: relative; | |
| top: 50%; | |
| transform: translateY(-50%); | |
| } | |
| SASS: | |
| @mixin vertical-align { | |
| position: relative; |
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
| /* Hounslow styleguide */ | |
| /* Bootstrap defaults */ | |
| /*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
| article, | |
| aside, | |
| details, | |
| figcaption, | |
| figure, | |
| footer, | |
| header, |
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
| source 'https://rubygems.org' | |
| ruby '2.1.0' | |
| gem 'rails', '4.0.3' | |
| gem 'pg' | |
| gem 'mysql2' | |
| gem 'foreman' | |
| gem 'puma' | |
| gem 'rails_config' |
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
| Backbone.View.prototype.assign = function(set, preventEmpty) { | |
| /* | |
| accepts an object of selectors:arrays of views | |
| maps each of the views to the selector | |
| */ | |
| var self = this; | |
| //store all subviews | |
| self.assignments = _.extend(self.assignments||{},set); |
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
| exports.trimSouthEast = function(files){ | |
| /* | |
| * Trims the bottom and right edges | |
| */ | |
| files.forEach(function(file, i){ | |
| var origFile = __dirname + file; | |
| var tempFile1 = os.tmpDir() + 'image1_' +i+'.png'; | |
| var tempFile2 = os.tmpDir() + 'image2_' +i+'.png'; | |
| exec("convert "+file+" -gravity North -background white -splice 0x1 -background black -splice 0x1 -trim +repage -chop 0x1 "+tempFile1,function(){ |
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 verySimplePreloader = function(images){ | |
| /* | |
| Simply loads images into cache. Accepts a single URL, or an array of URLs | |
| */ | |
| if(!images instanceof Array) | |
| images = [images]; | |
| for (var i = 0; i < images.length; i++){ | |
| new Image().src = images[i]; | |
| } |