Added trophies

This commit is contained in:
Thomas Forgione 2019-03-27 09:35:11 +01:00
parent 046aee03af
commit fcc78a3f9f
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
3 changed files with 16 additions and 1 deletions

View File

@ -97,6 +97,9 @@ function parse(data) {
}
parsed.sortedAis.sort((a, b) => b.score - a.score);
parsed.sortedAis[0].rank = 1;
parsed.sortedAis[1].rank = 2;
parsed.sortedAis[2].rank = 3;
return parsed;
}

View File

@ -4,8 +4,8 @@ html(lang='en')
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-to-fit=no')
link(rel='stylesheet', href='/static/main.css')
body.layout-documentation.page-components
block extracss
body.layout-documentation.page-components
title Pytron
nav.navbar.is-link(role='navigation', aria-label='main navigation')
.container

View File

@ -1,5 +1,8 @@
extends base
block extracss
link(rel="stylesheet", href="https://use.fontawesome.com/releases/v5.8.1/css/all.css", integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf", crossorigin="anonymous")
block content
section.section
.container
@ -19,6 +22,15 @@ block content
for ai in data.sortedAis
tr
td.has-text-centered
if ai.rank === 1
span.icon
i.fas.fa-trophy(style="color:#FFD700")
else if ai.rank === 2
span.icon
i.fas.fa-trophy(style="color:#C0C0C0")
else if ai.rank === 3
span.icon
i.fas.fa-trophy(style="color:#CD7F32")
strong= ai.name
td.has-text-centered= ai.victories
td.has-text-centered= ai.nulls