This repository was archived by the owner on Sep 19, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Added scoreboard that ranks countries based on number of events #343
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
68bdcdc
Merge remote-tracking branch 'upstream/master'
ialja a2b6c7c
set up a scoreboard page with count of events per country
ialja 933b812
adding population with countries_plus for scoreboard score
ialja 2698540
cleaning up code
ialja 5056d05
making the scoreboard better looking
ialja 9816dae
Merge remote-tracking branch 'upstream/master'
ialja 107e699
Merge branch 'master' into scoreboard
ialja dcd7ac1
Merge remote-tracking branch 'upstream/master'
ialja b2f456e
Merge branch 'master' into scoreboard
ialja eff7cc7
cleaning up the code
ialja baf99ad
added check for population 0 or null
ialja 425363d
added test for scoreboard results
ialja ffd4a10
simplifying the scoreboard design
ialja 2b4a446
Merge remote-tracking branch 'upstream/master'
ialja bb765ed
Merge branch 'master' into scoreboard
ialja e3f6013
cleaning up events after testing
ialja File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,4 +17,5 @@ | |
background-color: $whitesmoke; | ||
color: $black; | ||
padding-left: 25px; | ||
} | ||
} | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{% extends 'base.html' %} | ||
|
||
{% block title %}- Events Scoreboard{% endblock title %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<h1>#codeEU Events Scoreboard</h1> | ||
<p>Which countries in Europe are buzzing with coding activity? The scoreboard is sorted by the number of listed coding events per population, so don't be surprised to see some of the smaller countries higher up on the list!</p> | ||
{% for country in counts %} | ||
<div class="col-md-6 country{% if forloop.counter < 11 %} highlighted{% endif %}"> | ||
<img src="/static/flags/{{ country.country_code|lower }}.png" alt="{{ country.country_name }}" /> | ||
<span class="icon-flag"> | ||
<span class="country-name">{{ country.country_name }}</span> is participating with | ||
<span class="event-number"><a href="{% url 'web.search_events' %}?country_code={{ country.country_code }}&past=yes">{{ country.events }}</span> event{% if country.events != 1 %}s{% endif %}</a> | ||
</span> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endblock content %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Population can be zero or null & might break the code (division by zero).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, added an extra check!