Pomodoro Timer
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 - 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> <span class="minus"> - </span> </div> <div class="col-sm-6 text-center"> <h3>Break Length</h3><span class="plus"> + </span> <span class="breaktm"></span> <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> </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'); } }
}

Developer | Sudipta Das |
Username | sdas13 |
Uploaded | January 21, 2023 |
Rating | 3 |
Size | 2,900 Kb |
Views | 4,046 |
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!
Name | Size |
Flipkart Affiliate | 1,903 Kb |
Sorting Algorithms | 2,142 Kb |
OOJS | 1,952 Kb |
Wiki Viewer 1 | 3,298 Kb |
BookHub | 3,872 Kb |
PortFolio | 5,177 Kb |
Local Weather | 2,656 Kb |
Wiki Viewer | 4,181 Kb |
Javascript Calculator | 2,234 Kb |
MS | 2,220 Kb |
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!
Name | Username | Size |
Monochrome Form | AlienPiglet | 3,096 Kb |
Wikipedia Viewer | Odylic | 2,333 Kb |
A Pen by Adrien Clerbois | AClerbois | 6,501 Kb |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
A Pen by Huan Nghiem | Nightshade | 10,646 Kb |
Magnus 3 | ARocketfish | 7,944 Kb |
Cloud upload | Jaflo | 2,774 Kb |
Spinners using Font Icons | Keyamoon | 3,007 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
CSS3 Form Page Design | Rssatnam | 3,613 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!