cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

            
              <!--Audio is under head settings-->
<div>
  <h1>Pomodoro Clock</h1>
  <br>
  <div class="container text-center">
    <span><strong>BREAK</strong> TIME (min) </span><br>
    <a class="btn btn-primary" id="lessBreak">-</a>
    <a class="btn btn-primary" id="moreBreak">+</a>
    <span class="btn btn-warning" id="breakT">5</span>
    <br><br>
    <span><strong>WORK</strong> TIME (min) </span><br>
    <a class="btn btn-primary" id="lessWork">-</a>
    <a class="btn btn-primary" id="moreWork">+</a>
    <span class="btn btn-warning" id="workT">25</span>
    <br><br>
    <h2 id="timer">25:00</h2>
    <br>
    <a class="btn btn-primary" id="start">Start</a>
    <a class="btn btn-primary" id="reset">Reset</a>
  </div>
</div>


<!--theme below-->
<br><br><br><br><br>
<footer class="text-center">
  <div class="footer-above">
    <div class="container">
      <div class="row">
        <div class="footer-col col-md-4">
          <h3>Location</h3>
          <p>Wherever you need me.<br> Planet Earth</p>
        </div>
        <div class="footer-col col-md-4">
          <h3>SAY HI, IT'S FREE!</h3>
          <ul class="list-inline">
            <li>
              <a href="tel:+32486759717" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-phone"></i></a>
            </li>
            <li>
              <a href="/cdn-cgi/l/email-protection#4924283b2a262d203f2c3b3a20092e24282025672a2624" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-envelope"></i></a>
            </li>
            <li>
              <a href="https://github.com/marcodiversi" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-github"></i></a>
            </li>
            <li>
              <a href="https://twitter.com/marcodiversi" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-twitter"></i></a>
            </li>
            <li>
              <a href="https://www.paypal.me/marcodiversi" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-paypal"></i></a>
            </li>
            <li>
              <a href="https://www.facebook.com/diversimarco/" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-facebook"></i></a>
            </li>
            <li>
              <a href="https://linkedin.com/in/marcodiversi/en" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-linkedin"></i></a>
            </li>
            <li>
              <a href="http://www.marcodiversi.com/" target="_blank" class="btn-social btn-outline"><i class="fa fa-fw fa-globe"></i></a>
            </li>
          </ul>
        </div>
        <div class="footer-col col-md-4">
          <h3>Marco Diversi</h3>
          <p>Feel free to Contact me at any time. <br> &larr; If you like my articles feel free to donate, hit the <a href="https://www.paypal.me/marcodiversi" target="_blank">PayPalMe</a> button. <br>1$ is fine too.
            <a href=""></a>
          </p>
        </div>
      </div>
    </div>
  </div>
  <div class="footer-below">
    <div class="container">
      <div class="row">
        <div class="col-lg-12">
          Copyright &copy; Marco Diversi 2017
        </div>
      </div>
    </div>
  </div>
</footer>
            
          
!
            
              .btn-warning{
 pointer-events: none;
  height: 60px;
  width: 60px; 
   padding-top: 18px;
  padding-bottom: 18px;
}

.btn-primary{
  height: 60px;
  width: 60px;
  margin: auto;
  padding-top: 18px;
  padding-bottom: 18px;
}

h2{
  font-size:120px;
  margin: auto;
}




/*theme below*/

body {
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  background-color:#18BC9C;
}

p {
  font-size: 20px;
}

p.small {
  font-size: 16px;
}

a,
a:hover,
a:focus,
a:active,
a.active {
  color: #18BC9C;
  outline: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
    text-align: center;
}

hr.star-light,
hr.star-primary {
  padding: 0;
  border: none;
  border-top: solid 5px;
  text-align: center;
  max-width: 250px;
  margin: 25px auto 30px;
}

hr.star-light:after,
hr.star-primary:after {
  content: "\f005";
  font-family: FontAwesome;
  display: inline-block;
  position: relative;
  top: -0.8em;
  font-size: 2em;
  padding: 0 0.25em;
}

hr.star-light {
  border-color: white;
}

hr.star-light:after {
  background-color: #18BC9C;
  color: white;
}

hr.star-primary {
  border-color: #2C3E50;
}

hr.star-primary:after {
  background-color: white;
  color: #2C3E50;
}

.img-centered {
  margin: 0 auto;
}

header {
  text-align: center;
  background: #18BC9C;
  color: white;
}

header .container {
  padding-top: 100px;
  padding-bottom: 50px;
}

header img {
  display: block;
  margin: 0 auto 20px;
}

header .intro-text .name {
  display: block;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 2em;
}

header .intro-text .skills {
  font-size: 1.25em;
  font-weight: 300;
}

@media (min-width: 768px) {
  header .container {
    padding-top: 200px;
    padding-bottom: 100px;
  }
  header .intro-text .name {
    font-size: 4.75em;
  }
  header .intro-text .skills {
    font-size: 1.75em;
  }
}

.navbar-custom {
  background: #2C3E50;
  font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-transform: uppercase;
  font-weight: 700;
  border: none;
}

.navbar-custom a:focus {
  outline: none;
}

.navbar-custom .navbar-brand {
  color: white;
}

.navbar-custom .navbar-brand:hover,
.navbar-custom .navbar-brand:focus,
.navbar-custom .navbar-brand:active,
.navbar-custom .navbar-brand.active {
  color: white;
}

.navbar-custom .navbar-nav {
  letter-spacing: 1px;
}

.navbar-custom .navbar-nav li a {
  color: white;
}

.navbar-custom .navbar-nav li a:hover {
  color: #18BC9C;
  outline: none;
}

.navbar-custom .navbar-nav li a:focus,
.navbar-custom .navbar-nav li a:active {
  color: white;
}

.navbar-custom .navbar-nav li.active a {
  color: white;
  background: #18BC9C;
}

.navbar-custom .navbar-nav li.active a:hover,
.navbar-custom .navbar-nav li.active a:focus,
.navbar-custom .navbar-nav li.active a:active {
  color: white;
  background: #18BC9C;
}

.navbar-custom .navbar-toggle {
  color: white;
  text-transform: uppercase;
  font-size: 10px;
  border-color: white;
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
  background-color: #18BC9C;
  color: white;
  border-color: #18BC9C;
}

@media (min-width: 768px) {
  .navbar-custom {
    padding: 25px 0;
    -webkit-transition: padding 0.3s;
    -moz-transition: padding 0.3s;
    transition: padding 0.3s;
  }
  .navbar-custom .navbar-brand {
    font-size: 2em;
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
  }
  .navbar-custom.affix {
    padding: 10px 0;
  }
  .navbar-custom.affix .navbar-brand {
    font-size: 1.5em;
  }
}

section {
  padding: 100px 0;
}

section h2 {
  margin: 0;
  font-size: 3em;
}

section.success {
  background: #18BC9C;
  color: white;
}

@media (max-width: 767px) {
  section {
    padding: 75px 0;
  }
  section.first {
    padding-top: 75px;
  }
}

#portfolio .portfolio-item {
  margin: 0 0 15px;
  right: 0;
}

#portfolio .portfolio-item .portfolio-link {
  display: block;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

#portfolio .portfolio-item .portfolio-link .caption {
  background: rgba(24, 188, 156, 0.9);
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: all ease 0.5s;
  -webkit-transition: all ease 0.5s;
  -moz-transition: all ease 0.5s;
}

#portfolio .portfolio-item .portfolio-link .caption:hover {
  opacity: 1;
}

#portfolio .portfolio-item .portfolio-link .caption .caption-content {
  position: absolute;
  width: 100%;
  height: 20px;
  font-size: 20px;
  text-align: center;
  top: 50%;
  margin-top: -12px;
  color: white;
}

#portfolio .portfolio-item .portfolio-link .caption .caption-content i {
  margin-top: -12px;
}

#portfolio .portfolio-item .portfolio-link .caption .caption-content h3,
#portfolio .portfolio-item .portfolio-link .caption .caption-content h4 {
  margin: 0;
}

#portfolio * {
  z-index: 2;
}

@media (min-width: 767px) {
  #portfolio .portfolio-item {
    margin: 0 0 30px;
  }
}

.floating-label-form-group {
  position: relative;
  margin-bottom: 0;
  padding-bottom: 0.5em;
  border-bottom: 1px solid #eeeeee;
}

.floating-label-form-group input,
.floating-label-form-group textarea {
  z-index: 1;
  position: relative;
  padding-right: 0;
  padding-left: 0;
  border: none;
  border-radius: 0;
  font-size: 1.5em;
  background: none;
  box-shadow: none !important;
  resize: none;
}

.floating-label-form-group label {
  display: block;
  z-index: 0;
  position: relative;
  top: 2em;
  margin: 0;
  font-size: 0.85em;
  line-height: 1.764705882em;
  vertical-align: middle;
  vertical-align: baseline;
  opacity: 0;
  -webkit-transition: top 0.3s ease, opacity 0.3s ease;
  -moz-transition: top 0.3s ease, opacity 0.3s ease;
  -ms-transition: top 0.3s ease, opacity 0.3s ease;
  transition: top 0.3s ease, opacity 0.3s ease;
}

.floating-label-form-group:not(:first-child) {
  padding-left: 14px;
  border-left: 1px solid #eeeeee;
}

.floating-label-form-group-with-value label {
  top: 0;
  opacity: 1;
}

.floating-label-form-group-with-focus label {
  color: #18BC9C;
}

form .row:first-child .floating-label-form-group {
  border-top: 1px solid #eeeeee;
}

footer {
  color: white;
}

footer h3 {
  margin-bottom: 30px;
}

footer .footer-above {
  padding-top: 50px;
  background-color: #2C3E50;
}

footer .footer-col {
  margin-bottom: 50px;
}

footer .footer-below {
  padding: 25px 0;
  background-color: #233140;
}

.btn-outline {
  color: white;
  font-size: 20px;
  border: solid 2px white;
  background: transparent;
  transition: all 0.3s ease-in-out;
  margin-top: 15px;
}

.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active,
.btn-outline.active {
  color: #18BC9C;
  background: white;
  border: solid 2px white;
}

.btn-primary {
  color: white;
  background-color: #2C3E50;
  border-color: #2C3E50;
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
  color: white;
  background-color: #1a242f;
  border-color: #161f29;
}

.btn-primary:active,
.btn-primary.active,
.open .dropdown-toggle.btn-primary {
  background-image: none;
}

.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
  background-color: #2C3E50;
  border-color: #2C3E50;
}

.btn-primary .badge {
  color: #2C3E50;
  background-color: white;
}

.btn-success {
  color: white;
  background-color: #18BC9C;
  border-color: #18BC9C;
  font-weight: 700;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
  color: white;
  background-color: #128f76;
  border-color: #11866f;
}

.btn-success:active,
.btn-success.active,
.open .dropdown-toggle.btn-success {
  background-image: none;
}

.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
  background-color: #18BC9C;
  border-color: #18BC9C;
}

.btn-success .badge {
  color: #18BC9C;
  background-color: white;
}

.btn-social {
  display: inline-block;
  height: 50px;
  width: 50px;
  border: 2px solid white;
  border-radius: 100%;
  text-align: center;
  font-size: 20px;
  line-height: 45px;
}

.btn:focus,
.btn:active,
.btn.active {
  outline: none;
}

.scroll-top {
  position: fixed;
  right: 2%;
  bottom: 2%;
  width: 50px;
  height: 50px;
  z-index: 1049;
}

.scroll-top .btn {
  font-size: 20px;
  width: 50px;
  height: 50px;
  border-radius: 100%;
  line-height: 28px;
}

.scroll-top .btn:focus {
  outline: none;
}

.portfolio-modal .modal-content {
  border-radius: 0;
  background-clip: border-box;
  -webkit-box-shadow: none;
  box-shadow: none;
  border: none;
  min-height: 100%;
  padding: 100px 0;
  text-align: center;
}

.portfolio-modal .modal-content h2 {
  margin: 0;
  font-size: 3em;
}

.portfolio-modal .modal-content img {
  margin-bottom: 30px;
}

.portfolio-modal .modal-content .item-details {
  margin: 30px 0;
}

.portfolio-modal .close-modal {
  position: absolute;
  width: 75px;
  height: 75px;
  background-color: transparent;
  top: 25px;
  right: 25px;
  cursor: pointer;
}

.portfolio-modal .close-modal:hover {
  opacity: 0.3;
}

.portfolio-modal .close-modal .lr {
  height: 75px;
  width: 1px;
  margin-left: 35px;
  background-color: #2C3E50;
  transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  /* IE 9 */
  -webkit-transform: rotate(45deg);
  /* Safari and Chrome */
  z-index: 1051;
}

.portfolio-modal .close-modal .lr .rl {
  height: 75px;
  width: 1px;
  background-color: #2C3E50;
  transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  /* IE 9 */
  -webkit-transform: rotate(90deg);
  /* Safari and Chrome */
  z-index: 1052;
}

.portfolio-modal .modal-backdrop {
  opacity: 0;
  display: none;
}
            
          
!
            
              $(document).ready(function() {


  var audio  = $('#sound')[0] , counter, startBreak;


  $("#start").click(function() {

    // setInterval() won't stop if it gets called twice
    // so we clear old intervals and start new one

    // clear old interval if exist
      clearInterval(counter);
      clearInterval(startBreak);

    // get current user define value
    var workT  = parseInt($('#workT').html());
    var breakT = parseInt($('#breakT').html());
    
    // break time alert hide
      $("#breakTimeAlert").hide();

    // update work time
      workT *= 60;

    
    if (workT % 60 >= 10) {

      $("#timer").html(Math.floor(workT / 60) + ":" + workT % 60);
    } else {

      $("#timer").html(Math.floor(workT / 60) + ":" + "0" + workT % 60);
    }

    counter = setInterval( timer, 1000);

    function timer() {

      workT -= 1;

      if (workT === 0) {

        audio.play();
        
        clearInterval(counter);
        startBreak = setInterval(breakTimer, 1000);

        breakT *= 60;

        if (breakT % 60 >= 10) {

          $("#timer").html(Math.floor(breakT / 60) + ":" + breakT % 60);
        } else {

          $("#timer").html(Math.floor(breakT / 60) + ":" + "0" + breakT % 60);
        }

        $("#breakTimeAlert").show();
      } else if (workT % 60 >= 10) {

        $("#timer").html(Math.floor(workT / 60) + ":" + workT % 60);
      } else {

        $("#timer").html(Math.floor(workT / 60) + ":" + "0" + workT % 60);
      } 

      function breakTimer() {

        breakT -= 1;
        if (breakT === 0) {

          audio.play();
          clearInterval(startBreak);
          $("#timer").html("00:00");
          $("#breakTimeAlert").hide();
        } else if (breakT % 60 >= 10) {

          $("#timer").html(Math.floor(breakT / 60) + ":" + breakT % 60);
        } else {
          $("#timer").html(Math.floor(breakT / 60) + ":" + "0" + breakT % 60);
        } 
      }
    }
  });
  /////// out of functions stuff !!

  $("#reset").click(function() {

    
    $('#breakT').html('5');
    $('#workT').html('25');
    $('#timer').html('25:00');
    $("#breakTimeAlert").hide();

    clearInterval(counter);
    clearInterval(startBreak);
    // window.location.reload();
  });
  $('#lessBreak').on('click', function() {
    var breakT = parseInt($('#breakT').html());
    if (breakT > 1) {

      breakT -= 1;
    }
    $('#breakT').html(breakT);
  });
  $('#moreBreak').on('click', function() {

    var breakT = parseInt($('#breakT').html());
    
    breakT += 1;
    $('#breakT').html(breakT);
  });
  $('#lessWork').on('click', function() {
    var workT  = parseInt($('#workT').html());
    if (workT > 5 ) {
      $('#timer').html(workT-5 +':00');
      workT -= 5;
    }
    $('#workT').html(workT);
  });
  $('#moreWork').on('click', function() {
    var workT  = parseInt($('#workT').html());
    $('#timer').html(workT+5 +':00');
    workT += 5;
    $('#workT').html(workT);
  });
  /////// end out of functions stuff !!
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console