new way to show seed/leech
Cette révision appartient à :
Parent
536c403ea1
révision
7eed942741
2 fichiers modifiés avec 22 ajouts et 2 suppressions
|
@ -73,4 +73,10 @@ var FuncMap = template.FuncMap{
|
||||||
"NoEncode": func(str string) template.HTML {
|
"NoEncode": func(str string) template.HTML {
|
||||||
return template.HTML(str)
|
return template.HTML(str)
|
||||||
},
|
},
|
||||||
|
"calcWidthSeed": func(seed uint32, leech uint32) float64 {
|
||||||
|
return float64(float64(seed)/(float64(seed)+float64(leech)))*100
|
||||||
|
},
|
||||||
|
"calcWidthLeech": func(seed uint32, leech uint32) float64 {
|
||||||
|
return float64(float64(leech)/(float64(seed)+float64(leech)))*100
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,22 @@
|
||||||
<p><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a></p>
|
<p><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a></p>
|
||||||
<hr>
|
<hr>
|
||||||
{{end}}
|
{{end}}
|
||||||
<h4>{{T "seeders"}} | {{T "leechers"}} | {{T "completed"}}</h4>
|
<div class="row">
|
||||||
<p>{{.Seeders}} | {{.Leechers}} | {{.Completed}}</p>
|
<div class="col-md-4">{{T "seeders"}}</div>
|
||||||
|
<div class="col-md-4">{{T "leechers"}}</div>
|
||||||
|
<div class="col-md-4">{{T "completed"}}</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-4">{{.Seeders}}</div>
|
||||||
|
<div class="col-md-4">{{.Leechers}}</div>
|
||||||
|
<div class="col-md-4"><span class="completed" style="">{{.Completed}}</span></div>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<div class="proSeedBar">
|
||||||
|
<div class="seeds" style="width: {{ calcWidthSeed .Seeders .Leechers }}%;"></div>
|
||||||
|
<div class="leechs" style="width: {{ calcWidthLeech .Seeders .Leechers }}%;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Référencer dans un nouveau ticket