Added trophies
This commit is contained in:
parent
046aee03af
commit
fcc78a3f9f
|
@ -97,6 +97,9 @@ function parse(data) {
|
||||||
}
|
}
|
||||||
|
|
||||||
parsed.sortedAis.sort((a, b) => b.score - a.score);
|
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;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ html(lang='en')
|
||||||
meta(charset='utf-8')
|
meta(charset='utf-8')
|
||||||
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-to-fit=no')
|
meta(name='viewport', content='width=device-width, initial-scale=1, shrink-to-fit=no')
|
||||||
link(rel='stylesheet', href='/static/main.css')
|
link(rel='stylesheet', href='/static/main.css')
|
||||||
body.layout-documentation.page-components
|
|
||||||
block extracss
|
block extracss
|
||||||
|
body.layout-documentation.page-components
|
||||||
title Pytron
|
title Pytron
|
||||||
nav.navbar.is-link(role='navigation', aria-label='main navigation')
|
nav.navbar.is-link(role='navigation', aria-label='main navigation')
|
||||||
.container
|
.container
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
extends base
|
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
|
block content
|
||||||
section.section
|
section.section
|
||||||
.container
|
.container
|
||||||
|
@ -19,6 +22,15 @@ block content
|
||||||
for ai in data.sortedAis
|
for ai in data.sortedAis
|
||||||
tr
|
tr
|
||||||
td.has-text-centered
|
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
|
strong= ai.name
|
||||||
td.has-text-centered= ai.victories
|
td.has-text-centered= ai.victories
|
||||||
td.has-text-centered= ai.nulls
|
td.has-text-centered= ai.nulls
|
||||||
|
|
Loading…
Reference in New Issue