diff --git a/css/main.css b/css/main.css index 86a00c83..61b7d5c1 100644 --- a/css/main.css +++ b/css/main.css @@ -110,6 +110,10 @@ html { color: #aaa; } +.hidden { + display: none; +} + .light { font-family: "HelveticaNeue-UltraLight", sans-serif; } diff --git a/index.php b/index.php index aa0c876f..8ebc134e 100644 --- a/index.php +++ b/index.php @@ -13,8 +13,8 @@ -
+
diff --git a/js/time/time.js b/js/time/time.js index f2a5a286..a38d5511 100644 --- a/js/time/time.js +++ b/js/time/time.js @@ -1,8 +1,8 @@ var time = { timeFormat: config.time.timeFormat || 24, dateLocation: '.date', - timeLocation: '.time', - updateInterval: 1000, + timeLocation: '#time', + updateInterval: 10000, intervalId: null }; @@ -12,10 +12,25 @@ var time = { time.updateTime = function () { var _now = moment(), - _date = _now.format('dddd, LL'); + _date = _now.format('[]dddd,[]LL[]'); + - $(this.dateLocation).html(_date); - $(this.timeLocation).html(_now.format(this._timeFormat+':mm[]ss[]')); + $(this.dateLocation).updateWithText(_date, 1000); + $('.fade').removeClass('fade') + $('#timebuffer').html(_now.format('HH:mm').replace(/./g, "$&")); + $('#timebuffer').children().each(function( index ) { + var _text = $( this ).text(); + var _i = index+1; + var _text2 = $('#time span:nth-child('+_i+')').text(); + if (_text != _text2) { + $('#time span:nth-child('+_i+')').addClass('fade'); + $(this).addClass('fade'); + } + }); + $('.fade').fadeTo(400, 0.25, function() { + $('#time').html($('#timebuffer').html()); + $('#time').children().fadeTo(400, 1).removeClass('fade'); + }); }