Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <link href="https://fonts.googleapis.com/css?family=Arima+Madurai" rel="stylesheet">
<div class="info container-fluid text-center">"The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s.The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks. The method is based on the idea that frequent breaks can improve mental agility" <p class="s">-<a href="https://en.wikipedia.org/wiki/Pomodoro_Technique" target="_blank">Wikipedia</a></div>
</p>
<div class="Container-fluid back center-block"><h1 class="text-center   title"><b>Pomodoro Clock</b></h1>
<div class="row "><div class="col-lg-6 col-md-6 col-xs-6 col-sm-6 text-center tex"><b>Break Length<p class=""><a  class="Bdec">-</a><a class="break"> ph </a><a  class="Binc">+</a></p></div>
  <div class="col-lg-6 col-md-6 col-xs-6 col-sm-6 text-center tex">Session Length<p class=""><a  class="Sdec"> - </a><a class="session"> ph </a><a   class="Sinc"> + </a></p></div>
  </div></b><div class="container-fluid clock text-center"><h1 class="time">00:00</hi></div>
  <div class="timer container-fluid center-block text-center"></div>
  <button class="btn  btn-block sR">Start</button></div></div>
              
            
!

CSS

              
                .info{
  color:#ffffff;
  max-width:700px;
  font-size:20px;
}
.title{
  padding-top:30px;
}
body{
  background-color:#6e3d5d;
  background-image:url(https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-10242.jpg);
  font-family: 'Arima Madurai', cursive;
}
.s{
  text-align:right;
  font-size:15px;
}
.back{
  background-color:#333333;
  max-width:500px;
  min-height:400px;
  margin-top:40px;
  margin-bottom:40px;
  border-style: solid;
  border-width:6px;
  overflow:hidden;
  color:#6e3d5d;
  border-color: #333333;
  box-shadow:0px 0px 50px 10px #222222;
}
.config{
  margin-top:px;
}
.tex{
  margin-top:15px;
  font-size:15px;
}
.timer{ 
  background-image: -webkit-linear-gradient(left, #444444, #444444 100%, #6e3d5d 0%, #6e3d5d 100%);
  margin-bottom:20px;
  margin-left:3px;
  margin-right:3px;
  min-height:50px;
  color:#eeeeee;
  font-size:33px;
  transition-property:background-image,border-radius;
  transition-duration: 1s;
  transition-timing-function: linear;
}
.clock{
  background:#333333;
  color:#eeeeee;
  margin-left:3px;
  margin-right:3px;
}
.b{
  max-width:500px;
  margin-left:-5px;
  margin-right:-5px;
  margin-top:30px;
}

.btn{
  color:#ffffff;
  border-radius:0px;
  background-color:#6e3d5d;
  font-size:30px;
  Overflow:hidden;
  outline:none;
}
.btn:hover,.btn:active,.btn:focus,.btn:active:focus {
  background-color:#7f4e6e;
  color:#ffffff;
  outline:none;
}
a{
  color:#ffffff;
  cursor: pointer;
}
a:hover,a:active,a:focus,a:active:focus{
  text-decoration: none;
  color:#ffffff;
  outline:none;
  cursor: pointer;
}
.time{
  margin-bottom:10px;
}
              
            
!

JS

              
                var col = 100,
  bL = 5,
  sL = 25,
  inter, dec, min, sec, flag = "s";
function tFormat (num){
  if(num<10)
    {
      return "0"+num;
    }
 return num;
}
function reset(){
  if (inter) {
      clearInterval(inter);
    }
  flag ="s";
  $(".sR").html("Start");
}
function decTime() {
  if (sec > 0) {
    sec--;
  } else {
    if (min > 0) {
      min--;
      sec = 60;
    }
  }
}
function Cbr() {
  $(".timer").html("Break");
  min = (bL - 1);
  sec = 60;
  dec = (100) / (bL * 60);
  col = 100;
  if (inter) {
      clearInterval(inter);
    }
  bTime();
}
function Cse() {
  $(".timer").html("Session");
  min = (sL - 1);
  sec = 60;
  dec = (100) / (sL * 60);
  col = 100;
  if (inter) {
      clearInterval(inter);
    }
  session();
}
function session() {
  $(".timer").html("Session");
  inter = window.setInterval(function() {
    if (col>=-1) {
      decTime();
      col -= dec;
      
      $(".timer").css('background-image', "-webkit-linear-gradient(right, #444444, #444444 " + col + "%, #6e3d5d  " + col + "%, #6e3d5d 100%)");
      $(".time").html(tFormat(min) + ":" + tFormat(sec));
    } else {
      
      Cbr();
    }
  }, 1000);
}
function bTime() {
  $(".timer").html("Break");
  inter = window.setInterval(function() {
    if (col>=-1) {
      decTime();
      col -= dec;
      $(".timer").css('background-image', "-webkit-linear-gradient(right, #444444, #444444 " + col + "%, #8e1313  " + col + "%, #8e1313 100%)");
      $(".time").html(tFormat(min) + ":" + tFormat(sec));
    } else {
      Cse();
    }
  }, 1000);
}

$(document).ready(function() {
  $(".break").html("&nbsp; " + bL + "&nbsp; ");
  $(".session").html("&nbsp; " + sL + "&nbsp; ");
});
$(document).on('click', '.sR', function() {
  
  if (flag == "s") {
    flag = "r";
    $(".sR").html("Reset");
    Cse();
  }
  else
    {
      reset();
    }
});
$(document).on('click', '.Bdec', function(){
  if(bL>1)
    {
      bL--;
      $(".break").html("&nbsp; " + bL + "&nbsp; ");
    }
  reset();
});
$(document).on('click', '.Binc', function(){
  if(bL<100)
    {
      bL++;
      $(".break").html("&nbsp; " + bL + "&nbsp; ");
    }
  reset();
});
$(document).on('click', '.Sinc', function(){
  if(sL<100)
    {
      sL++;
      $(".session").html("&nbsp; " + sL + "&nbsp; ");
    }
  reset();
});
$(document).on('click', '.Sdec', function(){
  if(sL>1)
    {
      sL--;
      $(".session").html("&nbsp; " + sL + "&nbsp; ");
    }
  reset();
});
              
            
!
999px

Console