diff --git a/content/static/images/30c3_propaganda_180x270.png b/content/static/images/30c3_propaganda_180x270.png new file mode 100644 index 000000000..fd7dcb546 Binary files /dev/null and b/content/static/images/30c3_propaganda_180x270.png differ diff --git a/content/static/script/30c3-countdown-banner.js b/content/static/script/30c3-countdown-banner.js new file mode 100644 index 000000000..fafd2dc02 --- /dev/null +++ b/content/static/script/30c3-countdown-banner.js @@ -0,0 +1,31 @@ +/** + * Original: https://github.com/trailblazr/30c3-countdown-banner-180x270/blob/master/30c3.html + * Heavily Modified + **/ +$(document).ready(function() { + var el = $("
0d
0h
0m
0s
"); + + var padLeft = function(n, l, p) { + n = "" + n; + while(n.length < l) + n = p + n; + return n; + }; + var target = new Date("2013-12-27T10:00:00+01:00").getTime(); + var updateCountDown = function() { + var now = new Date().getTime(); + var left = (target - now) / 1000; + + var setField = function(id, val) { + el.find(id).text(padLeft(val, 2, "0")); + }; + setField('.days', Math.floor(left / 86400)); + setField('.hours', Math.floor(left / 3600) % 24); + setField('.minutes', Math.floor(left / 60) % 60); + setField('.seconds', Math.floor(left) % 60); + } + + setInterval(updateCountDown, 1000); + updateCountDown(); + $('#adspace').empty().append(el); +}); diff --git a/content/static/style/default.css b/content/static/style/default.css index a6929c9d2..46397d183 100644 --- a/content/static/style/default.css +++ b/content/static/style/default.css @@ -787,3 +787,35 @@ article,aside,details,figcaption,figure, footer,header,hgroup,menu,nav,section { display: block; } + +/* -- 30c3-countdown -- */ +.countdown { + display: block; + width:180px; + height:270px; + background-image: url('../images/30c3_propaganda_180x270.png'); + background-size:100%; + background-repeat:no-repeat; + max-width:180px; + margin:auto; + text-align: center; + color:white !important; + font-family:'Source Sans Pro',monospace,Helvetica,Arial,Sans-Serif; + font-size:22px; + font-weight:300; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; + border-radius: 5px; + padding:7px; + border:none; +} +.countdown .countdownElement { + display: inline-block; +} +.countdown .foo { + color:white; + font-size:8px; + font-weight: 100; + white-space: pre; +} diff --git a/xsl/header.xsl b/xsl/header.xsl index 80e9cfe6c..63055d237 100644 --- a/xsl/header.xsl +++ b/xsl/header.xsl @@ -62,6 +62,9 @@ + + +