Added language statistics to tracking page.

This commit is contained in:
Marvin Blum
2020-06-25 20:42:14 +02:00
committed by Marvin Blum
parent 65d19fdf51
commit 554a8a44c9
8 changed files with 74 additions and 20 deletions

View File

@@ -32,11 +32,33 @@
</section>
{{end}}
<section>
<h2>Languages</h2>
<p>
Here are the top 10 languages used by my visitors.
</p>
<table>
<thead>
<tr>
<th>Language</th>
<th>Absolute</th>
<th>Relative</th>
</tr>
</thead>
<tbody>
{{range $data := .Languages}}
<tr>
<td>{{if $data.Language}}{{$data.Language}}{{else}}(not set){{end}}</td>
<td>{{$data.Visitors}}</td>
<td>{{round (multiply $data.RelativeVisitors 100)}} %</td>
</tr>
{{end}}
</tbody>
</table>
</section>
<!-- TODO -->
<!--<section>
<h2>Languages</h2>
</section>
<section>
<h2>Visitors Per Hour</h2>
</section>-->