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
/* | |
* mQuery, My journey into the world of js libraries | |
* Selectors, Events, DOM, Ajax and Animation | |
*/ | |
var $ = (function() { | |
/*! | |
* Sizzle CSS Selector Engine - v1.0 | |
* Copyright 2009, The Dojo Foundation | |
* Released under the MIT, BSD, and GPL Licenses. |
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
/* 1 - keep js separate */ | |
// these are the same but #2 can be passed around. | |
function myFunc(a) { | |
} | |
var myFunc = function(a) { | |
} |
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
/* Uses a strict URL convention, specifically a language code as an identifier for the root of the site and then the page name. | |
* e.g. http://example.com/cool-site/en/listing/?cool=true | |
* Lang = 'en' | |
* Page = 'listing' | |
* The URL's for the pages and the ajax content are identical, | |
* We just used the X-Requested-With header to serve the content only if it's an ajax request. | |
*/ | |
var History = { | |
lang: 'en|es|de|fr|pt|zh-s|zh-c|ja|ko|id|th|en-us|it', | |
page: 'listing', |
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 Controls = { | |
init: function (container) { | |
// Matches "control-something" | |
var typeRegex = /control-([a-z0-9\-]+)(\s|$)/i; | |
container.select('.init').each(function (el) { | |
var control_name = typeRegex.exec(el.className)[1].camelize().ucfirst(); | |
try { | |
this.createnewControl(control_name, el); |
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 Page = { | |
init: function() { | |
Controls.init(); | |
} | |
} | |
// Lets go | |
var $body = $("body"); | |
$(document).ready(Page.init); |
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
class Job < ActiveRecord::Base | |
translates :title | |
globalize_accessors :locales => I18n.available_locales, :attributes => translated_attribute_names | |
searchable do | |
I18n.available_locales.each do |locale| | |
sym = ("title_" + locale.to_s).to_sym |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Domenico Carbotta</string> | |
<key>name</key> | |
<string>Rogie</string> | |
<key>settings</key> | |
<array> |
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
/* Cute little value previewers */ | |
.previewer { | |
position: absolute; | |
border-radius: 8px; | |
box-shadow: 1px 1px 8px rgba(0,0,0,.7); | |
} | |
/* tick */ | |
.previewer:before { | |
content: ''; |
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
/* #abslength previewer */ | |
#abslength { | |
max-width: 100%; | |
height: 20px; | |
border: 1px solid white; | |
border-radius: 0; | |
transition: .3s; | |
transition-property: width; | |
} |
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
/* #time previewer */ | |
#time { | |
width: 74px; | |
height: 74px; | |
margin-left: -37px; | |
background: linear-gradient(right, | |
hsla(24, 20%, 95%, .4), | |
hsl(24, 20%, 95%) 95%); | |
/* half the width/height for a perfect circle */ | |
border-radius: 37px; |
OlderNewer