A copy pass over the Finnish UI. The em-dash aside was doing the work of a second sentence in ten places, so it is a second sentence now, or gone. The sealed-score wording was wrong twice over: it promised "pisteet" when only other people's are hidden, and said "kirjoitat" when the reveal actually happens on save. Both fixed on the queue, the song page and the card badge.
66 lines
2.6 KiB
HTML
66 lines
2.6 KiB
HTML
{{define "songboard"}}
|
||
<section class="board">
|
||
<h2>{{.Title}}</h2>
|
||
{{if .Items}}
|
||
<ol class="board-list">
|
||
{{range .Items}}
|
||
<li>
|
||
<a href="/songs/{{.ID}}">{{.Title}}</a>
|
||
<span class="muted small">{{.Artist}}</span>
|
||
<span class="value">{{if $.Count}}{{.ReviewCount}}{{else}}{{value .Value}}{{end}}</span>
|
||
{{if not $.Count}}<span class="muted small">{{.ReviewCount}} arv.</span>{{end}}
|
||
{{if $.Spread}}
|
||
<!-- Where the scores actually landed: a range says more than a deviation. -->
|
||
<span class="bar range" title="{{.Min}}–{{.Max}}">
|
||
<span class="fill" style="left: {{.MinPct}}%; width: {{.SpanPct}}%"></span>
|
||
</span>
|
||
{{else if not $.Count}}
|
||
<span class="bar"><span class="fill" style="width: {{.Pct}}%"></span></span>
|
||
{{end}}
|
||
</li>
|
||
{{end}}
|
||
</ol>
|
||
{{else}}
|
||
<p class="muted small">Ei vielä tarpeeksi arvosteluja.</p>
|
||
{{end}}
|
||
</section>
|
||
{{end}}
|
||
|
||
{{define "userboard"}}
|
||
<section class="board">
|
||
<h2>{{.Title}}</h2>
|
||
{{if .Items}}
|
||
<ol class="board-list">
|
||
{{range .Items}}
|
||
<li>
|
||
<a href="/profile/{{.ID}}">{{.Name}}</a>
|
||
<span class="value">{{if $.Count}}{{.Count}}{{else}}{{value .Value}}{{end}}</span>
|
||
{{if not $.Count}}<span class="muted small">{{.Count}} kpl</span>{{end}}
|
||
{{if not $.Count}}<span class="bar"><span class="fill" style="width: {{value .Value}}%"></span></span>{{end}}
|
||
</li>
|
||
{{end}}
|
||
</ol>
|
||
{{else}}
|
||
<p class="muted small">Ei vielä tarpeeksi arvosteluja.</p>
|
||
{{end}}
|
||
</section>
|
||
{{end}}
|
||
|
||
{{define "content"}}
|
||
<h1>Tilastot</h1>
|
||
<p class="muted">Kappale pääsee listoille kun sillä on vähintään {{.Data.MinReviews}} arvostelua.
|
||
Tilastot näkyvät kaikille.</p>
|
||
|
||
<div class="boards">
|
||
{{template "songboard" dict "Title" "Parhaat" "Items" .Data.TopSongs}}
|
||
{{template "songboard" dict "Title" "Heikoimmat" "Items" .Data.BottomSongs}}
|
||
{{template "songboard" dict "Title" "Riitaisimmat" "Items" .Data.MostDivisive "Spread" true}}
|
||
{{template "songboard" dict "Title" "Yksimielisimmät" "Items" .Data.MostUnified "Spread" true}}
|
||
{{template "songboard" dict "Title" "Eniten arvosteltu" "Items" .Data.MostReviewed "Count" true}}
|
||
{{template "userboard" dict "Title" "Ankarin arvostelija" "Items" .Data.Harshest}}
|
||
{{template "userboard" dict "Title" "Anteliain" "Items" .Data.MostGenerous}}
|
||
{{template "userboard" dict "Title" "Ahkerin arvostelija" "Items" .Data.MostActive "Count" true}}
|
||
{{template "userboard" dict "Title" "Ahkerin lähettäjä" "Items" .Data.MostProlific "Count" true}}
|
||
</div>
|
||
{{end}}
|