Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/apps/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ def get_context_data(self, *args, **kwargs):

total_competitions = data['count']
public_competitions = data['published_comps']
private_competitions = data['unpublished_comps']
users = User.objects.all().count()
competition_participants = CompetitionParticipant.objects.all().count()
submissions = Submission.objects.all().count()

context['general_stats'] = [
{'label': "Total Competitions", 'count': total_competitions},
{'label': "Public Competitions", 'count': public_competitions},
{'label': "Private Competitions", 'count': private_competitions},
{'label': "Users", 'count': users},
{'label': "Competition Participants", 'count': competition_participants},
{'label': "Submissions", 'count': submissions},
Expand Down
2 changes: 2 additions & 0 deletions src/static/stylus/home.styl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ body

.ui.statistic
flex 1 1 auto
text-align: center
width: 100%

.value
font-weight 800
Expand Down
2 changes: 1 addition & 1 deletion src/templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ <h3 class="ui icon header">
</div>
</div>

<div class="ui six column grid" id="general-stats">
<div class="ui five column grid" id="general-stats">
{% for stat in general_stats %}
<div class="column">
<div class="ui statistic">
Expand Down