css Audio - Active file-generic CSS - Active Generic - Active HTML - Active JS - Active SVG - Active Text - Active file-generic Video - Active header Love html icon-new-collection icon-person icon-team numbered-list123 pop-out spinner split-screen star tv

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.

              <div class="clock">
<div class="clock-ram">
<div class="clock-display">

  <div class="clock-location">United Kingdom, Manchester</div>
  <div class="clock-main">
    <div class="clock-time"></div>
    <div class="clock-widgets">
      <div class="clock-widget clock-date"></div>
      <div class="clock-widget clock-day"></div>
      <div class="clock-widget clock-temperature">NAN</div>
  </div><!-- /clock-main -->
  <ul class="clock-weekdays">
</div><!-- /display -->
</div><!-- /ram -->
</div> <!-- /clock -->

@mixin clearfix {
  &::after {
    clear: both;
    content: ' ';
    display: table;

*, *:before,*:after {
  box-sizing: border-box;

html {

body { 
  font: 15px/1.3 Arial, sans-serif;
  background: #F0F0F0;
	color: #4f4f4f;

ol {
  list-style: none;
  padding: 0;
  margin: 0;


// Clock
	margin: 20px auto;
  color: #8ae7ff;

// CLock Ram
.clock-ram {
  border: 20px solid #606060;
// CLock Display
.clock-display {
  padding: 30px;
  background-color: #383838;


// CLock Main
.clock-main {
  color: #8ae7ff;
  @include clearfix;

.clock-time {
  width: 70%;
  float: left;
  font-size: 3em;
  font-weight: bold;
  transform: translate(0, 50%);//Here is
.clock-widgets {
  width: 30%;
  float: left;
.clock-widget {
  text-align: center;
  vertical-align: middle;
  padding: 10px;
  border: 1px dotted #ccc;

.clock-weekdays {
  @include clearfix;
  width: 100%;
  display: block;
  text-transform: uppercase;

// Clock Weekdays
.clock-weekdays {
  text-align: center;
.clock-weekdays li {
  display: inline-block;
  margin: 0 1em;
  font-size: 14px;

.clock-weekdays li.active {
  font-weight: bold;
  font-size: 17px;
              // Get te location
// Make the : blink

//var location = document.querySelector('.clock-location');

function abbrev(a,b) {
  return a.substr(0,b);

 function checkTime(i) {
      if (i < 10) {
        i = "0" + i
      return i;

function displayTime() {
  var clockTime = document.querySelector('.clock-time');
  var clockDate = document.querySelector('.clock-date');
  var clockDay = document.querySelector('.clock-day');
  var clockWeekdays = document.querySelector('.clock-weekdays');
  while(clockWeekdays.firstChild) clockWeekdays.removeChild(clockWeekdays.firstChild);
  var date = new Date();
  var weekday = new Array(7);
  weekday[0] = "Sunday";
  weekday[1] = "Monday";
  weekday[2] = "Tuesday";
  weekday[3] = "Wednesday";
  weekday[4] = "Thursday";
  weekday[5] = "Friday";
  weekday[6] = "Saturday";
  var monthNames = ["January", "February", "March", "April", "May", "June",
  "July", "August", "September", "October", "November", "December"

  var singleDay = [];
  for (var i = 0; i < weekday.length; i++) {
    var day = weekday[i];
    var li = document.createElement('li');
    li.textContent = abbrev(day,3);
    if (i === date.getDay()) {
  // Mechanics
  var todayDay = weekday[date.getDay()];
  var h = date.getHours();
  var m = checkTime(date.getMinutes());
  var s = checkTime(date.getSeconds());
  var year = date.getFullYear();
  var month = date.getMonth();
  // Display
  clockDay.textContent = abbrev(todayDay,3);
  clockTime.textContent = h + ":" + m + ":" + s;
  clockDate.textContent = monthNames[month] + " / " +  year;

window.setInterval(displayTime, 1000);


// Get the time

//Loop Throw weekdays - show 3 letters
🕑 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 ..................