Coffee Clock
How do I make an coffee clock?
What is a coffee clock? How do you make a coffee clock? This script and codes were developed by Nikita Zubarets on 12 September 2022, Monday.
Coffee Clock - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Coffee Clock</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="clock"> <ul> <li class="item hours"> 1 </li> <li class="item hours"> 1 </li> <li class="spacer"> <p>:</p> </li> <li class="item minutes"> 1 </li> <li class="item minutes"> 1 </li> <li class="spacer"> <p>:</p> </li> <li class="item seconds"> 1 </li> <li class="item seconds"> 1 </li> </ul>
</div>
<div id="set_alert"> <input type="text" name="set_hours" value="00" /> <p class="spacer">:</p> <input type="text" name="set_minutes" value="00" /> <p class="spacer">:</p> <input type="text" name="set_seconds" value="00" /> <button>Set alarm</button>
</div> <script src="js/index.js"></script>
</body>
</html>
Coffee Clock - Script Codes CSS Codes
#clock { display: none; overflow: hidden;
}
ul { position: relative; margin: 25px; padding: 0;
}
ul li { display: block; margin: 0; padding: 0; float: left; list-style-type: none; width: 50px; height: 100px; text-align: center; font-size: 55pt; line-height: 100px;
}
ul li.spacer p { padding: 0; margin: -8px 0 0 0; -webkit-animation: blink 1.2s linear 1.2s infinite; -moz-animation: blink 1.2s linear 1.2s infinite; animation: blink 1.2s linear 1.2s infinite;
}
#set_alert { display: block; margin-left: 25px;
}
#set_alert p { display: inline-block; margin: 0; padding: 0;
}
#set_alert input[type=text] { width: 20px; text-align: center;
}
#set_alert button { cursor: pointer;
}
@-webkit-keyframes blink { 0% { opacity: 0; } 100% { opacity: 1; }
}
@-moz-keyframes blink { 0% { opacity: 0; } 100% { opacity: 1; }
}
@-ms-keyframes blink { 0% { opacity: 0; } 100% { opacity: 1; }
}
@keyframes blink { 0% { opacity: 0; } 100% { opacity: 1; }
}
Coffee Clock - Script Codes JS Codes
(function() { var alarm, alarm_btn, alarm_val, clock, hours_block, minutes_block, parse_date, seconds_block, start; clock = document.getElementById('clock'); hours_block = clock.getElementsByClassName('hours'); minutes_block = clock.getElementsByClassName('minutes'); seconds_block = clock.getElementsByClassName('seconds'); start = false; setInterval(function() { var date, hours, minutes, seconds; date = new Date; hours = parse_date(date.getHours()); minutes = parse_date(date.getMinutes()); seconds = parse_date(date.getSeconds()); hours_block[0].innerText = hours.substring(0, 1); hours_block[1].innerText = hours.substring(1, 2); minutes_block[0].innerText = minutes.substring(0, 1); minutes_block[1].innerText = minutes.substring(1, 2); seconds_block[0].innerText = seconds.substring(0, 1); seconds_block[1].innerText = seconds.substring(1, 2); start = true; if (start) { clock.style.display = 'block'; } if (alarm_val !== null && alarm_val[0] === hours && alarm_val[1] === minutes && alarm_val[2] === seconds) { return alert('AHTUNG'); } }, 1000); parse_date = function(number) { if (number <= 9) { return number = '0' + number; } else { return number.toString(); } }; alarm = document.getElementById('set_alert'); alarm_btn = alarm.getElementsByTagName('button'); alarm_val = null; alarm_btn[0].onclick = function() { var i, input, inputs, len; alarm_val = new Array; inputs = alarm.getElementsByTagName('input'); for (i = 0, len = inputs.length; i < len; i++) { input = inputs[i]; alarm_val.push(input.value); } return console.log(alarm_val); };
}).call(this);
Developer | Nikita Zubarets |
Username | snapson |
Uploaded | September 12, 2022 |
Rating | 3 |
Size | 3,622 Kb |
Views | 34,408 |
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 |
JSON from google drive | 1,579 Kb |
Signature | 1,763 Kb |
Resize textarea | 10,634 Kb |
Pace | 12,479 Kb |
My SVG resume | 38,295 Kb |
First lesson task | 2,283 Kb |
Tabs for tm us | 2,798 Kb |
Incremental show img per click | 1,541 Kb |
Work tickets | 14,081 Kb |
JScroll test | 1,493 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 |
Testing Portfolio Page | Sideshowli | 3,395 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
Pure CSS Tooltips | Mobius1 | 2,271 Kb |
Plotting Points with D3.js | Laurakelly | 31,996 Kb |
Background Images | Jooonebug | 2,100 Kb |
A Pen by Malith Hettiarachchi | MalZiiirA | 5,531 Kb |
Sassy Buttons | Elyseholladay | 2,299 Kb |
SVG Animation | Pollardld | 3,133 Kb |
Commuter Line Tokyu 8500 | Pedox | 7,031 Kb |
Working around OS X Dynamic Scrollbars | Jrjenk | 2,279 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!