Skip to content

Commit

Permalink
[program] refs #18 - Activity stats. Shadows in speakers avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
olemis committed Oct 17, 2017
1 parent b1e1427 commit c6c478e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
5 changes: 5 additions & 0 deletions assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,11 @@ h1, h2, h3, h4 {
position: absolute;
}

#speakers .btn-round, #talks .btn-round {
border: 3px #fff solid;
box-shadow: #999 2px 2px 1px 0;
}

#timeline, #analytics {
margin-bottom: 0px;
}
Expand Down
18 changes: 16 additions & 2 deletions assets/js/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,21 @@
$scope.speakers = window.speakers;
$scope.getAuthor = function(id) { return speakers_index[id] }
$scope.activities = window.activities;
$scope.stats = (function() {
var _stats = {}
for (var i = 0; i < window.activities.length; ++i) {
var act = activities[i]
if (act['id']) {
var idx = act.talk_format.indexOf(' (')
var label = (idx == -1)? act.talk_format : act.talk_format.slice(0, idx)
_stats[label] = (_stats[label] || 0) + 1
}
}
var stats = []
for (label in _stats)
stats.push([label, _stats[label]])
return stats
})()
}])
})();

})()

6 changes: 3 additions & 3 deletions program/submissions/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ <h2 class="text-center"> Actividades aceptadas </h2>

<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="talks">
<h3 class="text-center">Actividades aceptadas <small ng-bind="activities.length"></small></h3>
<h3 class="text-center">Actividades aceptadas <br/> <small ng-repeat="stat in stats">{{stat[1]}} {{stat[0]}}s, </small></h3>
<div class="panel-group" id="accepted" role="tablist" aria-multiselectable="true">
<div ng-if="act.id" class="panel panel-info" ng-repeat="act in activities">
<div class="panel-heading" role="tab" id="acth-{{act.id}}">
Expand All @@ -73,7 +73,7 @@ <h4 class="panel-title">
<div class="media-left text-center" ng-repeat="author in [getAuthor(act.author_id)]">
<div>
<a href="#">
<img class="media-object" src="{{author.avatar}}" alt="Profile picture" width="64" />
<img class="media-object btn-round" src="{{author.avatar}}" alt="Profile picture" width="64" height="64" />
</a>
</div>
<div>
Expand Down Expand Up @@ -103,7 +103,7 @@ <h5 class="media-heading" ng-bind="act.talk_format"></h5>
<li class="media" ng-repeat="profile in speakers" id="speaker-{{profile.id}}">
<div class="media-left">
<a href="#">
<img class="media-object img-circle" ng-src="{{profile.avatar}}" alt="Profile picture" width="64" />
<img class="media-object img-circle btn-round" ng-src="{{profile.avatar}}" alt="Profile picture" width="64" height="64"/>
</a>
</div>
<div class="media-body">
Expand Down

0 comments on commit c6c478e

Please sign in to comment.