More details version/platform stats

This commit is contained in:
Jakob Borg
2016-05-30 09:52:38 +02:00
parent ed45c43033
commit 82621f250c
3 changed files with 107 additions and 54 deletions

View File

@@ -22,6 +22,12 @@ found in the LICENSE file.
margin: 40px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
tr.main td {
font-weight: bold;
}
tr.child td.first {
padding-left: 2em;
}
</style>
<script type="text/javascript"
src="https://www.google.com/jsapi?autoload={
@@ -144,7 +150,7 @@ found in the LICENSE file.
<div class="row">
<div class="col-md-4">
<div class="col-md-6">
<table class="table table-striped">
<thead>
<tr>
@@ -153,17 +159,26 @@ found in the LICENSE file.
</thead>
<tbody>
{{range .versions}}
<tr>
<td>{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{if gt .Percentage 0.5}}
<tr class="main">
<td>{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{range .Items}}
<tr class="child">
<td class="first">{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{end}}
{{end}}
{{end}}
</tbody>
</table>
</div>
<div class="col-md-4">
<div class="col-md-6">
<table class="table table-striped">
<thead>
<tr>
@@ -172,30 +187,18 @@ found in the LICENSE file.
</thead>
<tbody>
{{range .platforms}}
<tr>
<td>{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<div class="col-md-4">
<table class="table table-striped">
<thead>
<tr>
<th>OS</th><th class="text-right">Devices</th><th class="text-right">Share</th>
</tr>
</thead>
<tbody>
{{range .os}}
<tr>
<td>{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
<tr class="main">
<td>{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{range .Items}}
<tr class="child">
<td class="first">{{.Key}}</td>
<td class="text-right">{{.Count}}</td>
<td class="text-right">{{.Percentage | printf "%.01f"}}%</td>
</tr>
{{end}}
{{end}}
</tbody>
</table>