7th-saga/web/views/exp.pug

26 lines
670 B
Plaintext
Raw Normal View History

2021-02-15 17:18:01 +00:00
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) + '%'