Skip to content

Instantly share code, notes, and snippets.

@al-the-x
Created February 10, 2015 15:34
Show Gist options
  • Save al-the-x/e14116d34a595316edd0 to your computer and use it in GitHub Desktop.
Save al-the-x/e14116d34a595316edd0 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<!--bower:css-->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<!--endbower-->
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<!-- Add your site or application content here -->
<date id="displayDate"></date>
<!--bower.js-->
<!--endbower-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="jquery-dateFormat.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<script>
var d = new Date()
, h
, m
, s
, colorTime
function clock () {
console.log('start!');
d.setSeconds(d.getSeconds() + 1);
h = d.getHours();
m = d.getMinutes();
s = d.getSeconds();
hhex = (Math.floor(h * 255/23)).toString(16);
mhex = (Math.floor(m * 255/59)).toString(16);
shex = (Math.floor(s * 255/59)).toString(16);
if(h <= 9) h = '0' + h;
if(m <= 9) m = '0' + m;
if(s <= 9) s = '0' + s;
if(hhex.length < 2) hhex = '0' + hhex;
if(mhex.length < 2) mhex = '0' + mhex;
if(shex.length < 2) shex = '0' + shex;
colorTime = "#" + hhex + mhex + shex;
document.body.style.background = colorTime;
document.getElementById("displayDate").innerHTML = h + ":" + m + ":" + s;
} // END clock
setInterval(clock, 1000);
clock();
</script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment