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 PROMPT = { | |
prompt : false, | |
interval : 6000, | |
now : new Date(), | |
init : function() { | |
// Do initial check | |
this.listener(); | |
// console.log(this); |
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
// Get/Set CSS styles with ease | |
function styler(el) { | |
return { | |
/* Get CSS style | |
* @prop : String - CSS property name e.g 'width', 'height' | |
* @int : Boolean | |
*/ | |
get : function(prop, int) { | |
/* TODO: | |
* Get multiple CSS properties. prop could be comma separated list |
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
<!-- Mobile & Fav Icons --> | |
<link rel="shortcut icon" type="image/x-icon" href="{siteurl}/favicon.ico"> | |
<!-- Apple iOS --> | |
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="{siteurl}/favicons/144x144-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="{siteurl}/favicons/114x114-precomposed.png"> | |
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="{siteurl}/favicons/72x72"> | |
<link rel="apple-touch-icon-precomposed" href="{siteurl}/favicons/57x57.png"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<meta name="apple-mobile-web-app-title" content="{page title}"> |
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
<form action="#" class="well"> | |
<fieldset> | |
<legend>Your form</legend> | |
<ul> | |
<li class="form-controlGroup"> | |
<label for="name" class="control-label">Name</label> | |
<div class="controls"> | |
<input type="text" id="name" placeholder="Zander Martineau" class="input-xlarge" /> | |
</div> | |
</li> |
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
Example usage for Kickoff's form markup |
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 (TMW, $) { | |
var theUserAgent = navigator.userAgent.toLowerCase(); | |
TMW.Supports = { | |
userAgent : navigator.userAgent.toLowerCase(), | |
platform : { | |
iOS : theUserAgent.indexOf('iphone') != -1 || theUserAgent.indexOf('ipad') != -1 || theUserAgent.indexOf('ipod') != -1, | |
android : theUserAgent.indexOf('android') != -1, |
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
Example usage for Kickoff's components |
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
- child element | |
e.g. .form-controlGroup > .form-controlGroup-label | |
-- modifier element | |
e.g. .btn.btn--primary | |
.is- element state | |
e.g. .btn.btn--primary | |
aB camel-case descriptors |
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
{ | |
"name": "kickoff", | |
"version": "1.0.0", | |
"dependencies": { | |
"bean": "*", | |
"bonzo": "*", | |
"qwery": "*", | |
"lodash": "*", | |
"domready": "*" | |
}, |
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
String.prototype.substitute = function (object) { | |
return this.replace(/\{(.+?)\}/g, function (match, name) { | |
return name in object ? object[name] : match; | |
}); | |
}; |