Skip to content
Open
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
16 changes: 12 additions & 4 deletions dojo_plugin/api/v1/scoreboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@
SCOREBOARD_CACHE_TIMEOUT_SECONDS = 60 * 60 * 2 # two hours make to cache all scoreboards
scoreboard_namespace = Namespace("scoreboard")

def get_schools():
return ["arizona", "asu", "baylor", "byu", "ucf", "uc",
"colorado", "uh", "iastate", "ku", "ksu", "okstate", "tcu", "ttu", "utah", "wvu"]

def email_symbol_asset(email):
if email.endswith("@asu.edu"):
group = "fork.png"
elif ".edu" in email.split("@")[1]:
group = "student.png"
domain = email.split("@")[1]
if domain.endswith(".edu"):
school = domain[:-len(".edu")]
schools = get_schools()
if school in schools:
group = f"schools/{school}.png"
else:
group = "student.png"
else:
group = "hacker.png"
return url_for("views.themes", path=f"img/dojo/{group}")
Expand Down
2 changes: 2 additions & 0 deletions dojo_theme/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,9 @@ p[data-hide="true"] {

.scoreboard-symbol {
margin: auto;
width: 3em;
height: 3em;
object-fit: contain;
filter: drop-shadow(0px 0px 3px white);
}

Expand Down
Binary file added dojo_theme/static/img/dojo/schools/arizona.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/baylor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/byu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/iastate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/ksu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/ku.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/okstate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/tcu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/ttu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/uc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/ucf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions dojo_theme/static/img/dojo/schools/uh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dojo_theme/static/img/dojo/schools/utah.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions dojo_theme/static/img/dojo/schools/wvu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.