Created
February 7, 2017 21:14
-
-
Save furball514/8a291ed5c2b231f5740a535c91be099d to your computer and use it in GitHub Desktop.
Pomodoro Work Clock
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
<head> <link href="https://fonts.googleapis.com/css?family=Alfa+Slab+One" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Bungee+Shade" rel="stylesheet"> | |
<link href="https://fonts.googleapis.com/css?family=Monoton" rel="stylesheet"> | |
</head> | |
<body> | |
<h1> <span class="fa fa-clock-o"> <p> Pomodoro Work Clock By </p> <a href="http://codepen.io/furball/" target="_blank"> Karthik </a> </span> | |
<span class="fa fa-clock-o"> </span> </h1> | |
<br> </br> | |
<div class="container text-center jig"> | |
<h2> Work Clock </h2> | |
<div class="clock"> | |
</div> | |
<div class="row well"> | |
<button id="start" class="btn"> <span id="spin" class="fa fa-hourglass-start"> </span> Start </button> | |
<button id="stop" class="btn"> <span class="fa fa-hourglass-start fa-rotate-180"> </span> Stop </button> | |
<button id="reset" class="btn"> <span class="fa fa-undo"> </span> reset </button> | |
</div> | |
</div> | |
</body> |
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 main(){ | |
//var time; | |
var pomo = $(".clock").FlipClock(25*60, { | |
clockFace: 'MinuteCounter', | |
countdown: true, | |
callbacks: { | |
stop: function() { | |
} | |
} | |
}); | |
$("#reset").click(function(){ | |
pomo.setTime(60 * 25); | |
pomo.stop(); | |
alert('Finished Session! Great Work!'); $('#spin').removeClass('fa-pulse'); | |
}); | |
$("#stop").click(function(){ | |
pomo.stop(); | |
$('#spin').removeClass('fa-pulse'); | |
// time=pomo.getTime(); | |
}); | |
$("#start").click(function(){ | |
pomo.setTime(60 * 25); | |
pomo.start(); | |
$('#spin').addClass('fa-pulse'); | |
}); | |
//console.log(pomo.getMinutes); | |
} | |
//OPTIONAL AUDIO | |
/*<audio id="sound" src="http://codingtutorials360.com/14244764.mp3" type="audio/mpeg"></audio> | |
<!-- AUDIO OWNED BY CODING TUTORIALS 360 USER:PIZZAPOKERGUY | |
-->*/ | |
$(document).ready(main); |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.js"></script> |
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
* {margin:0; | |
padding:0; | |
box-sizing:border-box;} | |
body {background-color:#3D9970; | |
color:white;} | |
h1 {text-align:center; | |
color: white;} | |
p {font-family: 'Alfa Slab One',cursive; | |
display:inline;} | |
a {font-family:'Bungee Shade',cursive; | |
color:#FFD700;} | |
.container {font-family:'Monoton'; | |
text-align:center;} | |
.btn{background-color:#3D9970; | |
border:1px solid; | |
padding:5px; | |
box-shadow: 0 3px 0 0 #222121, inset -1px -3px 10px 1px #515151; | |
margin-bottom:10px; | |
font-size:1.5em; | |
} | |
#reset{margin-left:10px;} | |
#stop{margin-left:10px;} | |
.clock{display:inline-block;;} | |
.jig{position: absolute; | |
left: 50%; | |
margin-right: -50%; | |
transform: translate(-50%, -0%); | |
width: auto;} | |
/*input {font-size:;}*/ | |
button:active { | |
transform: translate(0, 3px); | |
box-shadow: none; | |
} | |
button, | |
button:hover, | |
button:active, | |
button:visited { | |
text-decoration: none !important; | |
outline: none !important; | |
} | |
.well{ | |
background-color: rgba(245, 245, 245, 0.18); | |
} | |
/*.fa-pulse { | |
-webkit-animation: fa-pulse 1s infinite linear; | |
animation: fa-pulse 1s infinite linear; | |
}*/ |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" /> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome-animation/0.0.9/font-awesome-animation.min.css" rel="stylesheet" /> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/flipclock/0.7.8/flipclock.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment