diff --git a/app/css/app.css b/app/css/app.css index 230e6d7..5badc44 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -28,12 +28,20 @@ float: left; width: 40px; height: 40px; - background-color: #ddd; + background-repeat: no-repeat; background-position: center; - background-size: 100% auto; + background-size: 100% 100%; margin-right: 10px; border-radius: 2px; } +.info-block .img.repo { + background-size: 30px 40px; + /* Source: https://github.com/github/octicons/blob/master/svg/repo.svg */ + background-image: url(data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjEwMjQiIHdpZHRoPSI3NjgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTMyMCAyNTZoLTY0djY0aDY0di02NHogbTAtMTI4aC02NHY2NGg2NHYtNjR6IG0zODQtMTI4Yy0zMiAwLTYwOCAwLTY0MCAwcy02NCAzMi02NCA2NCAwIDczNiAwIDc2OCAzMiA2NCA2NCA2NCAxMjggMCAxMjggMHYxMjhsOTYtOTYgOTYgOTZ2LTEyOHMyODggMCAzMjAgMCA2NC0zMiA2NC02NCAwLTczNiAwLTc2OC0zMi02NC02NC02NHogbTAgODAwYzAgMTYtMTUgMzItMzIgMzJzLTI4OCAwLTI4OCAwdi02NGgtMTkydjY0cy03OSAwLTk2IDAtMzItMTctMzItMzIgMC05NiAwLTk2aDY0MHMwIDgwIDAgOTZ6IG0wLTE2MGgtNTEydi01NzZoNTEzbC0xIDU3NnogbS0zODQtMTI4aC02NHY2NGg2NHYtNjR6IG0wLTEyOGgtNjR2NjRoNjR2LTY0eiIgLz4KPC9zdmc+); +} +.info-block .img.team { + display: none; +} .info-block h1 { font-size: 30px; diff --git a/app/css/charts.css b/app/css/charts.css index 1dd5b6f..573a7e5 100644 --- a/app/css/charts.css +++ b/app/css/charts.css @@ -21,10 +21,6 @@ .barchart g:hover .bar { opacity: .8; } -.barchart .label { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - font-size: 16px; -} .barchart .label_underlay { fill: rgba(255, 255, 255, .7); } @@ -138,6 +134,7 @@ color: #444; margin-bottom: 20px; line-height: 24px; + height: 72px; /* 3*line-height */ } .whatsgoingon em { diff --git a/app/jsx/app.jsx b/app/jsx/app.jsx index 2a15127..edc85b0 100644 --- a/app/jsx/app.jsx +++ b/app/jsx/app.jsx @@ -8,7 +8,7 @@ var Storage = { get: function(category, key) { var val = window.localStorage.getItem(category +'-'+ key); - return val === null ? null : JSON.parse(val); + return val === null ? {} : JSON.parse(val); } }; @@ -144,12 +144,13 @@ var Dashboard = React.createClass({ render: function(){ var p = this.getParams(), - infoImage, infoTitle, + infoImage, infoImageClass, infoTitle, bcApi, bcItems, sacApi, sacItems; if (p.team) { - infoTitle = p.team; + infoTitle = p.team +' Team'; + infoImageClass = 'team'; bcApi = '/api/stat/teams/top'; bcItems = ['repo', 'user'], sacApi = '/api/stat/teams/activity'; @@ -164,6 +165,7 @@ var Dashboard = React.createClass({ sacItems = ['repo']; } else if (p.repo) { infoTitle = p.repo; + infoImageClass = 'repo'; bcApi = '/api/stat/repos/top'; bcItems = ['user', 'team'], sacApi = '/api/stat/repos/activity'; @@ -180,7 +182,7 @@ var Dashboard = React.createClass({ return (