Pomodoro Timer

Developer
Size
2,900 Kb
Views
4,048

How do I make an pomodoro timer?

What is a pomodoro timer? How do you make a pomodoro timer? This script and codes were developed by Sudipta Das on 21 January 2023, Saturday.

Pomodoro Timer Previews

Pomodoro Timer - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pomodoro Timer</title> <link href='https://fonts.googleapis.com/css?family=Oswald:700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="row"> <div class="col-sm-12 text-center pt"> Pomodoro Timer </div> </div> <br> <div class="row"> <div class="col-sm-6 text-center"> <h3>Session Length</h3><span class="plus"> + </span> <span class="sessiontm"></span>&nbsp;<span class="minus"> - </span> </div> <div class="col-sm-6 text-center"> <h3>Break Length</h3><span class="plus"> + </span> <span class="breaktm"></span>&nbsp; <span class="minus"> - </span> </div>
</div> <div class="row"> <div class="col-sm-12 text-center"> <div class="circ"><span class="txt"></span><br><span class="hh"></span>:<span class='mm'></span>&nbsp; </div> <br> <button class="btn btn-success start">Start</button> <button class="btn btn-info pause">Pause</button> <button class="btn btn-danger reset">Reset</button> </div> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Pomodoro Timer - Script Codes CSS Codes

.container{margin-top:30px;}
.circ{ border:1px solid orange; width:280px; height:280px; margin:auto; border-radius:100%; padding-top:50px; padding-left:10px;
font-family: 'PT Sans', sans-serif; font-size:45px !important; color:rgb(100,100,100);
}
.pt{font-family: 'Pacifico', cursive;
font-size:40px;
color:#E74C3C;}
.plus,.minus{cursor:pointer;}
.plus,.minus,.sessiontm,.breaktm{font-family: 'PT Sans', sans-serif; font-size:33px !important; color:rgb(53,79,52);
}
h3{font-family: 'Oswald', sans-serif;}
button{ font-family: 'Droid Serif', serif;
}
.btn{ margin:10px;
}

Pomodoro Timer - Script Codes JS Codes

$(document).ready(function(){ $('.sessiontm').html('25'); $('.breaktm').html('1'); $('.hh').html($('.sessiontm').html()); $('.mm').html('00'); $('.txt').html('Session'); $('.start').click(function(){ hhInt=setInterval(sesionmm,250); }) $('.plus').click(function(){ tempx=$(this).next().html(); tempx++; $(this).next().html(tempx); $('.hh').html($(this).next().html()); if($(this).prev().text()=='Session Length') { $('.txt').html('Session');
$('.hh').html($('.sessiontm').html()); $('.mm').html('00'); clearInterval(hhInt); }
if($(this).prev().text()=='Break Length') { $('.txt').html('Break!'); $('.hh').html($('.breaktm').html()); $('.mm').html('00'); clearInterval(hhInt); } }) $('.minus').click(function(){ tempy=$(this).prev().html(); if(tempy!=1) { tempy--; $(this).prev().html(tempy); $('.hh').html($(this).prev().html()); } if($(this).prev().prev().prev().text()=='Session Length') { $('.txt').html('Session');
$('.hh').html($('.sessiontm').html()); $('.mm').html('00'); clearInterval(hhInt); }
if($(this).prev().prev().prev().text()=='Break Length') { $('.txt').html('Break!'); $('.hh').html($('.breaktm').html()); $('.mm').html('00'); clearInterval(hhInt); } }) $('.pause').click(function(){ clearInterval(hhInt); }) $('.reset').click(function(){ $('.txt').html('Session'); $('.sessiontm').html('25'); $('.breaktm').html('1'); $('.hh').html($('.sessiontm').html()); $('.mm').html('00'); clearInterval(hhInt); $('.circ').css({'background-color':'#fff','color':'rgb(100,100,100)'}); })
})
function sesionmm(){ var a=(Math.floor(Math.random() * (255 - 0 + 1)) + 0); var b=(Math.floor(Math.random() * (255 - 0 + 1)) + 0); var c=(Math.floor(Math.random() * (255 - 0 + 1)) + 0); $('.circ').css({'background-color':'rgb('+a+','+b+','+c+')','color':'#fff','border-color':'rgb('+b+','+c+','+a+')'}); var temp=$('.mm').text(); var temp2=$('.hh').text(); if(temp==00 && temp2!=0) { temp=60; temp2--; temp--; $('.hh').html(temp2); $('.mm').html(temp); } else if(temp>=1 && temp<=10) { temp--; $('.mm').html('0'+temp); } else if(temp>10 && temp<=60){ temp--; $('.mm').html(temp); } else if(temp2==0 && temp==00) { if($('.txt').text()=='Session') { $('.txt').html('Break!');
$('.hh').html($('.breaktm').html()); $('.mm').html('00'); } else if($('.txt').text()=='Break!') { $('.txt').html('Session'); $('.hh').html($('.sessiontm').html()); $('.mm').html('00'); } }
}
Pomodoro Timer - Script Codes
Pomodoro Timer - Script Codes
Home Page Home
Developer Sudipta Das
Username sdas13
Uploaded January 21, 2023
Rating 3
Size 2,900 Kb
Views 4,048
Do you need developer help for Pomodoro Timer?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Sudipta Das (sdas13) Script Codes
Name
OOJS
Sorting Algorithms
BookHub
WheatherOnATap
CSS framework
MS
Canvas
Javascript Calculator
Wiki Viewer
Form Submission
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!