From 4f7184f01215d348cc4a7b5b7a094cb1a7c6e695 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 9 Apr 2017 19:49:50 +0200 Subject: specials overview is much nicer now diff --git a/www/js/specials.js b/www/js/specials.js index 51d83f1..3591af5 100644 --- a/www/js/specials.js +++ b/www/js/specials.js @@ -56,7 +56,7 @@ rh.ShowList.prototype.fetch = function() { rh.Show = function(show) { this.id = show.id; - this.title = show.title; + this.title = show.title.replace(" (Sondersendung)", ""); this.pv_id = show.pv_id; this.pv_name = show.pv_name; @@ -117,16 +117,17 @@ rh.ShowView = function(model, listView) { this.model = model; this.listView = listView; - this.$el = $('
'); + this.$el = $('
').addClass('row'); }; rh.ShowView.prototype.render = function() { - var id = $('').addClass('show-id').text(this.model.id); - var showlink = $('').attr('href', "https://import.helsinki.at/shows/" + this.model.id) .attr('target', "import").text(this.model.title); var title = $('').addClass('show-title').append(showlink); + var rd = $('
').addClass('col-md-3 col-md-offset-1').append(title); + var tag = $('
').addClass('col-md-1'); + var pv = $('
').addClass('col-md-7'); if(this.model.pv_id >= 0) { var pvlink = $('').attr('href', "https://pv.helsinki.at/admin/program/show/" + this.model.pv_id) .attr('target', "import").text(this.model.pv_name); @@ -141,11 +142,14 @@ rh.ShowView.prototype.render = function() { } var pvtimes = $('').addClass('pv-time').text(start_end); - this.$el.empty().addClass('show').append(id).append(title).append(pvtitle).append(pvtimes); + pv.append(pvtitle).append(pvtimes); + tag.append($('
').addClass('label label-danger').text("used")); } else { - var pv = $('').addClass('pv-unused').text("unused"); - this.$el.empty().addClass('show').append(id).append(title).append(pv); + pv.text("-"); + tag.append($('
').addClass('label label-success').text("free")); } + + this.$el.empty().append(rd).append(tag).append(pv); } diff --git a/www/specials.html b/www/specials.html index db0c8bf..6ace501 100644 --- a/www/specials.html +++ b/www/specials.html @@ -40,7 +40,7 @@
-
+
diff --git a/www/styles/specials.css b/www/styles/specials.css index 82fa640..47b79f2 100644 --- a/www/styles/specials.css +++ b/www/styles/specials.css @@ -23,7 +23,6 @@ body { font-family: "Droid Sans", Helvetica, Arial, Sans; margin: 0 0 200px 0; padding: 0; - font-size: 30px; } @@ -33,6 +32,7 @@ body { color: white; padding: 0.5em 0.3em 0.25em 5em; margin-bottom: 0.5em; + font-size: 30px; } #header h1 { @@ -43,49 +43,45 @@ body { #loading-inner { - width: 60px; + font-size: 50px; + width: 100px; margin-top: 5em; margin-left: auto; margin-right: auto; } - -#shows div.show { - padding: 0.2em 0; +#shows { + font-size: 23px; } -#shows div:nth-child(even) { +#shows div.row:nth-child(even) { background-color: #D8D8D8; } -div.show span { - font-weight: bold; +#shows div.row { + padding: 0.3em 0; } -div.show span.show-id { - font-size: 0.75em; - margin-left: 5em; - margin-right: 1em; +#shows div.label { + font-size: 0.8em; + position: relative; + bottom: 0.15em; } -div.show span.show-title { +span.show-title { white-space:nowrap; overflow:hidden; + font-weight: bold; } -div.show span.pv-title { - margin-left: 0.2em; - margin-right: 1em; -} - -div.show span.pv-time { - font-size: 0.75em; - margin-left: 0.2em; - margin-right: 1em; +span.pv-title { + white-space:nowrap; + overflow:hidden; + font-weight: bold; } -div.show span.pv-unused { - font-size: 0.75em; - margin-left: 0.2em; - margin-right: 1em; +span.pv-time { + white-space:nowrap; + padding-left: 1em; + font-size: 0.7em; } -- cgit v0.10.2