7th-saga/web/views/exp.pug
2021-02-15 09:18:01 -08:00

26 lines
670 B
Plaintext

extends master.pug
block tab-content
div.row: div.col-12.col-md-6: div.table-responsive
table.table.table-sm.table-borderless.table-hover
thead: tr
+sortHeader('Level')
th Experience
+sortHeader('+ increase')
+sortHeader('% increase')
tbody: each value, i in exp
- const prev = exp[i - 1];
tr
td: strong= i + 1
td: code= value
td
+na(i > 0)
- const increaseAmount = value - prev;
code= increaseAmount
td
+na(i > 0 && prev > 0)
-
const increaseAmount = value - prev;
const increasePercent = increaseAmount / prev;
code= (increasePercent * 100).toFixed(2) + '%'