Empty level bar on 0.

This commit is contained in:
Azareal 2021-07-29 17:09:23 +10:00
parent 0ff56af36f
commit 553e66b590
3 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
<div class="rowitem level_inprogress">
<div class="rowitem level_inprogress{{if eq .CurrentScore 0}} level_zero{{end}}">
<div class="levelBit"{{if ne .CurrentScore 0}}style="width:{{.Percentage}}%;"{{end}}>
<a href="/user/levels/">{{level .CurrentUser.Level}}</a>
</div>

View File

@ -5,8 +5,8 @@
</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="rowitem passive rowmsg level_{{.Status}}{{if eq $.CurrentUser.Score 0}} level_zero{{end}}">
<div class="levelBit"{{if ne $.CurrentUser.Score 0}}{{if eq .Status "inprogress"}}style="width:{{.Percentage}}%;"{{end}}{{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>

View File

@ -13,7 +13,7 @@
</div>
<div class="levelBlock">
<div class="rowitem passive">
<div class="profile_menu_item level_inprogress">
<div class="profile_menu_item level_inprogress{{if eq .CurrentScore 0}} level_zero{{end}}">
<div class="levelBit"{{if ne .CurrentScore 0}}style="width:{{.Percentage}}%"{{end}}>
<a>{{level .ProfileOwner.Level}}</a>
</div>