Much better

This commit is contained in:
2019-03-28 11:36:32 +01:00
parent 36d26f5004
commit 072a72cedd
7 changed files with 172 additions and 61 deletions
+1
View File
@@ -35,3 +35,4 @@ html(lang='en')
});
}
});
block extrajs
+22
View File
@@ -0,0 +1,22 @@
table.table.is-bordered.is-striped.is-narrow.is-hoverable
tr
th
for ai in data.ais
th.has-text-centered= ai.name
for ai1 in data.ais
tr
th.has-text-centered= ai1.name
for ai2 in data.ais
if ai1.name == ai2.name
td
else if data.battles[ai1.name + "/" + ai2.name] > data.battles[ai2.name + "/" + ai1.name]
td.has-text-centered.has-text-success= data.battles[ai1.name + "/" + ai2.name]
else if data.battles[ai1.name + "/" + ai2.name] < data.battles[ai2.name + "/" + ai1.name]
td.has-text-centered.has-text-danger= data.battles[ai1.name + "/" + ai2.name]
else
td.has-text-centered= data.battles[ai1.name + "/" + ai2.name]
.columns.is-centered
.column.is-narrow
caption
strong All battles
+17 -54
View File
@@ -7,64 +7,27 @@ block content
section.section
.container
if running
.columns.is-centered
.column.is-narrow.is-desktop
h5.title.is-5 Some battles are running...
#running
.columns.is-centered
.column.is-3.is-desktop
h5.title.is-5 Some battles are running
span#dots ...
else
#running(style="display:none")
.columns.is-centered
.column.is-3.is-desktop
h5.title.is-5 Some battles are running
span#dots ...
.columns.is-centered
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-hoverable
tr
th.has-text-centered AI
th.has-text-centered Victories
th.has-text-centered Nulls
th.has-text-centered Defeats
th.has-text-centered Score
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
td.has-text-centered= ai.defeats
td.has-text-centered
strong= ai.score
.columns.is-centered
.column.is-narrow
caption
strong Leaderboard
#leaderboard
include leaderboard
.columns.is-centered
.column.is-narrow.is-desktop
table.table.is-bordered.is-striped.is-narrow.is-hoverable
tr
th
for ai in data.ais
th.has-text-centered= ai.name
for ai1 in data.ais
tr
th.has-text-centered= ai1.name
for ai2 in data.ais
if ai1.name == ai2.name
td
else if data.battles[ai1.name + "/" + ai2.name] > data.battles[ai2.name + "/" + ai1.name]
td.has-text-centered.has-text-success= data.battles[ai1.name + "/" + ai2.name]
else if data.battles[ai1.name + "/" + ai2.name] < data.battles[ai2.name + "/" + ai1.name]
td.has-text-centered.has-text-danger= data.battles[ai1.name + "/" + ai2.name]
else
td.has-text-centered= data.battles[ai1.name + "/" + ai2.name]
.columns.is-centered
.column.is-narrow
caption
strong All battles
#battles
include battles
block extrajs
script(src="static/main.js")
+30
View File
@@ -0,0 +1,30 @@
table.table.is-bordered.is-striped.is-hoverable
tr
th.has-text-centered AI
th.has-text-centered Victories
th.has-text-centered Nulls
th.has-text-centered Defeats
th.has-text-centered Score
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
td.has-text-centered= ai.defeats
td.has-text-centered
strong= ai.score
.columns.is-centered
.column.is-narrow
caption
strong Leaderboard