gosora/templates/level_list.html
Azareal 0ff56af36f Fix level bar UI.
Reduce boilerplate.
2021-07-28 17:43:38 +10:00

17 lines
692 B
HTML

{{template "header.html" . }}
<main>
<div class="rowblock rowhead">
<div class="rowitem"><h1>{{.Title}}</h1></div>
</div>
{{range .Levels}}
<div class="rowblock">
<div class="rowitem passive rowmsg level_{{.Status}}">
<div class="levelBit"{{if eq .Status "inprogress"}}style="width:{{.Percentage}}%;"{{end}}>{{level .Level}}</div>
<div class="progressWrap"{{/**{{if eq .Status "inprogress"}}style="width:{{.Percentage}}%;"{{end}}**/}}>
<div>{{if eq .Status "inprogress"}}{{$.CurrentUser.Score}} / {{.Score}}{{else if eq .Status "complete"}}{{.Score}} / {{.Score}}{{else}}Next: {{.Score}}{{end}}</div>
</div>
</div>
</div>
{{end}}
</main>
{{template "footer.html" . }}