JSFiddle - React, Tailwind, and code Playground
by joplomacedo
HTML
<iframe src="http://www.madeinebor.com/themes/ultimt/versions/ColourBackground/index.html"></iframe>
<button id="receiverPicksUp" style="position: fixed; bottom: 20px; left: 20px; z-index: 99999999999">Receiver picks up</button>
<!-- http://tinkerbin.com/Gb6AGrEy
http://tinkerbin.com/1kOdYQjr
http://tinkerbin.com/Nda7xLbh
http://tinkerbin.com/BapI4Wos
http://tinkerbin.com/6tgJByep
http://tinkerbin.com/0ui3sUTX
http://tinkerbin.com/6v2aj5Tb
-->
CSS
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700);
iframe {
position: fixed;
z-index: -1;
width: 100%;
height: 100%;
}
.kiwi-superContainer p {
margin-top: 0;
}
.kiwi-userLink {
color: #46B1E2;
text-shadow: 0 1px #fff;
}
.kiwi-userLink:hover {
text-decoration: none;;
}
.kiwi-input {
width: 99%;
padding: 9px 0;
text-indent: 9px;
border: 1px solid #ccc;
box-shadow: inset 0px 1px 2px 0px rgba(0,0,0,0.08);
}
.kiwi-input:focus {
outline: none;
border: 1px solid #7FBF4D;
}
.kiwi-btn {
height: 33px;
margin: 0;
padding: 7px 0 8px 0;
border-radius: 2px;
font-weight: 800;
font-size: 14px;
font-family: inherit;
color: #fff;
text-shadow: 0 -1px 0 rgba(43, 43, 43, 0.42);
cursor: pointer;
}
.kiwi-btn.is-disabled {
background: rgb(241,240,240); /* Old browsers */
background: -moz-linear-gradient(top, rgba(241,240,240,1) 0%, rgba(214,213,213,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(241,240,240,1)), color-stop(100%,rgba(214,213,213,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(241,240,240,1) 0%,rgba(214,213,213,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(241,240,240,1) 0%,rgba(214,213,213,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(241,240,240,1) 0%,rgba(214,213,213,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(241,240,240,1) 0%,rgba(214,213,213,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f0f0', endColorstr='#d6d5d5',GradientType=0 ); /* IE6-9 */
border: 1px solid #CCC;
border-bottom-color: #B6B6B6;
box-shadow: inset 0 1px 0 0 #F7F7F7;
text-shadow: 0 -1px rgba(54, 53, 53, 0.42);
}
.kiwi-btn--fw {
width: 100%;
}
.kiwi-btn--hw {
width: 48%;
}
.kiwi-btn--hw:nth-of-type( 2n - 1 ) {
margin-right: 4%;
}
.kiwi-btn--grey.is-enabled {
...
JavaScript
(function($) {
var utils = {},
app = {};
utils.addClockTo = (function() {
var Clocky = function(node) {
this.node = node;
this.time = 0;
this.secs = 0;
this.minutes = 0;
this.clock_timeout = undefined;
};
Clocky.prototype = {
startClock: function() {
if (!this.clock_timeout) this.clock();
},
stopClock: function() {
if (this.clock_timeout) {
clearTimeout(this.clock_timeout);
this.time--;
this.clock_timeout = undefined;
}
},
resetClock: function() {
if (!this.clock_timeout) {
this.node.text("00:00");
this.time = 0;
}
},
clock: function() {
this.secs = this.time % 60;
this.minutes = (this.time - this.secs) / 60;
//prepend 0 if number is 1 digit long
if (this.secs < 10) this.secs = "0" + this.secs;
if (this.minutes < 10) this.minutes = "0" + this.minutes;
this.node.text(this.minutes + ":" + this.secs);
this.time++;
this.clock_timeout = setTimeout(this.clock.bind(this), 1000);
}
};
return function(node) {
var h = new Clocky(node);
node.startClock = function() {
h.startClock();
};
node.stopClock = function() {
h.stopClock();
};
node.resetClock = function() {
h.resetClock();
};
}; ...