diff options
Diffstat (limited to 'www')
-rw-r--r-- | www/js/todo.js | 20 | ||||
-rw-r--r-- | www/styles/todo.css | 21 | ||||
-rw-r--r-- | www/todo.html | 5 |
3 files changed, 36 insertions, 10 deletions
diff --git a/www/js/todo.js b/www/js/todo.js index 259c123..88b8aa4 100644 --- a/www/js/todo.js +++ b/www/js/todo.js @@ -37,6 +37,7 @@ rh.ShowList = function(d) { } else { this.current = d; } + this.current_week = get_rd_week(this.current.valueOf()); }; rh.ShowList.prototype.fetch = function() { @@ -83,7 +84,24 @@ rh.ShowListView = function(model) { rh.ShowListView.prototype.render = function() { var hdr = $('#header'); - $('div.date', hdr).text(format_date(this.model.current)); + $('span.date', hdr).text(format_date(this.model.current)); + var weekspan = $('span.week', hdr).removeClass().addClass('week').addClass('label'); + switch(this.model.current_week) { + case 1: + weekspan.addClass('label-info').text('Woche 1'); + break; + case 2: + weekspan.addClass('label-warning').text('Woche 2'); + break; + case 3: + weekspan.addClass('label-success').text('Woche 3'); + break; + case 4: + weekspan.addClass('label-danger').text('Woche 4'); + break; + default: + weekspan.addClass('label-default').text('Fehler'); + } var list = $('#shows'); $('div.show', list).remove(); diff --git a/www/styles/todo.css b/www/styles/todo.css index f31acee..6062a88 100644 --- a/www/styles/todo.css +++ b/www/styles/todo.css @@ -31,25 +31,30 @@ body { background-color: #36373B; width: 100%; color: white; + padding: 0.5em 0.3em 0.25em 5em; + margin-bottom: 0.5em; } -#header div.date { +#header span.date { font-size: 1.2em; font-weight: bold; - padding: 0.3em 1em 0.2em 5em; + padding-right: 0.3em; } - -#shows div.show { - padding: 0.05em 0; +#header span.week { + font-size: 0.6em; + position: relative; + bottom: 0.3em; + padding-bottom: .15em; } -#shows div:nth-child(odd) { - background-color: white; + +#shows div.show { + padding: 0.2em 0; } #shows div:nth-child(even) { - background-color: #E0E0E0; + background-color: #D8D8D8; } div.show span { diff --git a/www/todo.html b/www/todo.html index 8479c98..0b7cdf5 100644 --- a/www/todo.html +++ b/www/todo.html @@ -16,7 +16,10 @@ <body> <div id="container"> <div id="header"> - <div class="date">--.--.----</div> + <div> + <span class="date">--.--.----</span> + <span class="week"></span> + </div> <div id="control"> </div> </div> |