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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!--
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Pomodoro Clock</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
 <!-- 
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta.2/css/bootstrap.css'>
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css'>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Give+You+Glory'>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Amatic+SC:700'>

 	  <link rel="stylesheet" href="amatic_font_700.css">
	  <link rel="stylesheet" href="animate_css_v3.5.css">
	  <link rel="stylesheet" href="bootstrap_v4.css">
	  <link rel="stylesheet" href="Give_You_Glory_font.css">
    <link rel="stylesheet" href="Pomodoro_Clock.css">
  
</head>
-->

<body>
  <div class="spacer"></div>
  <div class="hexagon">
    <div id="heading">
      <h1>Pomodoro</h1>
    </div>
    <div id="progress-bar">
      <div id="workTime" class="text-center">Get Stuff Done
      </div>
    </div>
    <div id="breakWork">
      <!-- Make functional then add labels for Break and Work -->
    </div>
    <div class="text-center text-nowrap" id="buttonsbar">
      <a id="minusBreak" class="myButton">-</a>
      <p1 id="break-text">5 mins</p1>
      <a id="addBreak" class="myButton">+</a>
      <a id="minusWork" class="myButton">-</a>
      <p1 id="work-text">20 mins</p1>
      <a id="addWork" class="myButton">+</a>
    </div>
    <div id="breakKitty"> <img src="http://static.tumblr.com/8ef31be40023e6e0a56e1d7f04ccdc90/s43cs42/SPbobo4l5/tumblr_static_2382j1qgjym80kg8880ko40kc.gif" alt="Sleeping Kitty" height="75" width="75"> </div>
    <div id="kitty"> <img src="https://az650423.vo.msecnd.net/alert-media/alert_image_45603_d64c2439-399b-4b35-9d86-4ff74a2a33e8.gif" alt="Dancing Kitty" height="75" width="75"> </div>
    <div id="breakTag">Party</div>
    <div id="workTag">Grind</div>
    <div id="start">
      <a id="startID">Start</a></div>
  </div>
  <div class="spacer"></div>

</body>

<!--
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js'></script>

    
	<script  src="jQuery_v3.3.js"></script>
	<script  src="bootstrap_v4.js"></script>
    <script  src="Pomodoro_Clock.js"></script>
-->
            
          
!
            
              body {
  background-color: #500000; !important;
  font-family: "Give You Glory", cursive;
  color: #d9d9d9;
  background-size: 100%;
  background-attachment: fixed;
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome and Opera */
}

.spacer {
  height: 10px;
}

.hexagon {
  position: relative;
  width: 320px;
  height: 184.75px;
  background-color: #101010;
  margin: 92.38px auto;
  z-index: 3 !important;
}

.hexagon:before,
.hexagon:after {
  content: "";
  position: absolute;
  width: 0;
  border-left: 160px solid transparent;
  border-right: 160px solid transparent;
}

.hexagon:before {
  bottom: 100%;
  border-bottom: 92.38px solid #101010;
  z-index: 1 !important;
}

.hexagon:after {
  top: 100%;
  width: 0;
  border-top: 92.38px solid #101010;
  z-index: 2 !important;
}

#heading {
  color: #d9d9d9;
  text-align: center;
  cursor: default;
}

#progress-bar {
  height: 54px;
  width: 366px;
  margin: 0px 0px 0px -23px;
  background-color: #00e6e6;
  border: 1px solid black;
  border-radius: 3px;
  -moz-box-shadow: inset 0 0 10px #000000;
  -webkit-box-shadow: inset 0 0 10px #000000;
  box-shadow: inset 0 0 10px #000000;
  color: black;
  cursor: default;
}

#workTime {
  font-size: 25px;
  text-shadow: 0px 0px 1px #d9d9d9;
  font-family: "Amatic SC", cursive;
  cursor: default;
  margin: 8px 1px;
}

.myButton {
  background-color: transparent;
  -moz-border-radius: 4px;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  border: 1px solid #101010;
  display: inline-block;
  cursor: pointer;
  color: #d9d9d9;
  font-family: Arial;
  font-size: 18px;
  padding: 4px 4px;
  text-decoration: none;
  text-shadow: 0px 0px 2px #d9d9d9;
  margin: 25px 10px 25px 12px;
}
.myButton:hover {
  background-color: transparent;
  text-decoration: none;
  color: #d9d9d9;
  text-shadow: 0px 0px 4px #d9d9d9;
}
.myButton:active {
  position: relative;
  top: 1px;
}

#minusBreak {
}

#addBreak {
}

#minusWork {
}

#addWork {
}

#break-text {
  font-size: 25px;
  text-shadow: 0px 0px 1px #d9d9d9;
  font-family: "Amatic SC", cursive;
  cursor: default;
}

#work-text {
  font-size: 25px;
  text-shadow: 0px 0px 1px #d9d9d9;
  font-family: "Amatic SC", cursive;
  cursor: default;
}

#kitty {
  text-decoration: none;
  background-color: #d9d9d9;
  z-index: 99 !important;
  position: absolute;
  left: 120px;
  top: 130px;
  border-radius: 50px;
  -moz-box-shadow: inset 0 0 10px #000000;
  -webkit-box-shadow: inset 0 0 10px #000000;
  box-shadow: inset 0 0 10px #000000;
  cursor: none;
}
#breakKitty {
  text-decoration: none;
  background-color: #d9d9d9;
  z-index: 99 !important;
  position: absolute;
  left: 120px;
  top: 130px;
  border-radius: 50px;
  -moz-box-shadow: inset 0 0 10px #000000;
  -webkit-box-shadow: inset 0 0 10px #000000;
  box-shadow: inset 0 0 10px #000000;
  cursor: none;
}

#breakTag {
  position: absolute;
  top: 163px;
  left: 66px;
  font-size: 17px;
  text-shadow: 0px 0px 1px #d9d9d9;
  font-family: "Amatic SC", cursive;
  cursor: default;
  z-index: 99 !important;
}

#workTag {
  position: absolute;
  top: 163px;
  left: 220px;
  font-size: 17px;
  text-shadow: 0px 0px 1px #d9d9d9;
  font-family: "Amatic SC", cursive;
  cursor: default;
  z-index: 99 !important;
}

#startID {
  text-decoration: none;
  color: #d9d9d9;
  font-size: 32px;
  z-index: 99 !important;
  position: absolute;
  top: 190px;
  left: 39%;
  cursor: pointer;
}

#startID:hover {
  text-decoration: none;
  text-shadow: 0px 0px 0.25px #d9d9d9;
}

            
          
!
            
              $(document).ready(function() {
  //Adding in all elements from html
  $("#kitty, #breakKitty").hide();
  var minusBreak = $("#minusBreak").html();
  var breakText = $("#break-text").html();
  var addBreak = $("#addBreak").html();
  var minusWork = $("#minusWork").html();
  var workText = $("#work-text").html();
  var addWork = $("#addWork").html();
  var startID = $("#startID").html();
  var progressBar = $("#progress-bar").html();
  var workTime = $("#workTime").html();
  var breakCount = 5; // Starting Break Count
  var workCount = 20; // Starting Work Count
  var mins = "mins";
  var doorbell = new Audio(
    "http://campingwithcampbells.com/wp-content/uploads/2018/03/Doorbell-Sound.mp3"
  );

  $("#minusBreak").click(function() {
    //What happens when you click minusBreak
    if (breakCount > 1) {
      breakCount -= 1;
      $("#break-text").html(breakCount + " " + mins);
    } else {
      $("#break-text").html(breakCount + " " + mins);
    }
  });

  $("#addBreak").click(function() {
    //What happens when you click addBreak
    if (breakCount <= 59) {
      breakCount += 1;
      $("#break-text").html(breakCount + " " + mins);
    }
  });

  $("#minusWork").click(function() {
    //What happens when you click minusWork
    if (workCount > 5) {
      workCount -= 5;
      $("#work-text").html(workCount + " " + mins);
    } else {
      $("#work-text").html(workCount + " " + mins);
    }
  });

  $("#addWork").click(function() {
    //What happens when you click addWork
    if (workCount <= 235) {
      workCount += 5;
      $("#work-text").html(workCount + " " + mins);
    }
  });

  $("#startID").click(function() {
    var tempWork = workCount;
    var tempBreak = breakCount;
    workCount = workCount * 60; //Multiplying by 60 for one second count down
    breakCount = breakCount * 60;
    $("#workTime").html(
      "Grind  Time&nbsp; - &nbsp;" +
        Math.floor(workCount / 60) +
        " " +
        "Minutes"
    ); //First thing displayed after clicking start
    $(
      "#addBreak, #minusBreak, #addWork, #minusWork, #break-text, #work-text, #startID, #breakTag"
    ).hide(100);
    $("#kitty").show(500);
    var counter = setInterval(timer, 1000); // Sets a timer interval for a function to be run every second

    function timer() {
      workCount -= 1; //Subtracts 1 from workCount
      if (workCount === 0) {
        //If workCount equals zero clear Interval
        clearInterval(counter);
        doorbell.play();
        $("#kitty, #workTag").hide(500);
        $("#workTime").html(
          "Party  Time&nbsp; - &nbsp;" +
            Math.floor(breakCount / 60) +
            " " +
            "Minutes"
        );
        $("#breakKitty, #breakTag").show(500);

        var breakCounter = setInterval(breakTimer, 1000);
        function breakTimer() {
          breakCount -= 1;
          if (breakCount % 60 >= 10) {
            //if seconds are greater than 10 no zero is added
            $("#workTime").html(
              "Party  Time&nbsp; - &nbsp;" +
                Math.floor(breakCount / 60) +
                ":" +
                breakCount % 60
            );
          } else {
            $("#workTime").html(
              "Party  Time&nbsp; - &nbsp;" +
                Math.floor(breakCount / 60) +
                ":" +
                "0" +
                breakCount % 60
            ); //Add Zero
          }
          $("#breakKitty, #breakTag").show(500);
          if (breakCount === 0) {
            doorbell.play();
            clearInterval(breakCounter);

            $(
              "#addBreak, #minusBreak, #addWork, #minusWork, #break-text, #work-text, #startID, #workTag, #breakTag"
            ).show(300);
            workCount = tempWork; //Loading variables so that after the timer is done it loads original times
            breakCount = tempBreak;
            $("#work-text").html(workCount + " " + mins);
            $("#break-text").html(breakCount + " " + mins);
            $("#breakKitty").hide(500);
            $("#workTime").html("Dream. Believe. Achieve."); //Displayed after break timer is finished
          }
        }
      }
      if (workCount % 60 >= 10) {
        $("#workTime").html(
          "Grind  Time&nbsp; - &nbsp;" +
            Math.floor(workCount / 60) +
            ":" +
            workCount % 60
        ); //If workCount doesn't equal zero output the workCount to the progress bar
      } else {
        $("#workTime").html(
          "Grind  Time&nbsp; - &nbsp;" +
            Math.floor(workCount / 60) +
            ":" +
            "0" +
            workCount % 60
        ); //Add Zero
      }
    }
  });
});

            
          
!
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.

Console