2021-01-04 19:29:49 +00:00
|
|
|
{{ define "title" }}
|
|
|
|
<title>{{ with .Blog.BlogStats.Title }}{{ . }} - {{ end }}{{ .Blog.Title }}</title>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
|
|
|
<main>
|
|
|
|
{{ with .Blog.BlogStats.Title }}<h1>{{ . }}</h1>{{ end }}
|
|
|
|
{{ with .Blog.BlogStats.Description }}{{ md . }}{{ end }}
|
|
|
|
<table class="p">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2021-02-15 20:35:05 +00:00
|
|
|
<th class="tal">{{ string .Blog.Lang "year" }}</th>
|
2021-04-28 18:03:20 +00:00
|
|
|
<th class="tar">{{ string .Blog.Lang "posts" }}</th>
|
|
|
|
<th class="tar">~{{ string .Blog.Lang "chars" }}</th>
|
|
|
|
<th class="tar">~{{ string .Blog.Lang "words" }}</th>
|
|
|
|
<th class="tar">~{{ string .Blog.Lang "wordsperpost" }}</th>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2021-04-23 18:52:12 +00:00
|
|
|
{{ $months := .Data.months }}
|
|
|
|
{{ range $year := .Data.years }}
|
2021-04-28 18:03:20 +00:00
|
|
|
<tr class="statsyear" data-year="{{ $year.Name }}">
|
|
|
|
<td class="tal">{{ $year.Name }}</td>
|
|
|
|
<td class="tar">{{ $year.Posts }}</td>
|
|
|
|
<td class="tar">{{ $year.Chars }}</td>
|
|
|
|
<td class="tar">{{ $year.Words }}</td>
|
|
|
|
<td class="tar">{{ $year.WordsPerPost }}</td>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
2021-04-28 18:03:20 +00:00
|
|
|
{{ range $month := (index $months $year.Name) }}
|
|
|
|
<tr class="statsmonth hide" data-year="{{ $year.Name }}">
|
|
|
|
<td class="tal">{{ $year.Name }}-{{ $month.Name }}</td>
|
|
|
|
<td class="tar">{{ $month.Posts }}</td>
|
|
|
|
<td class="tar">{{ $month.Chars }}</td>
|
|
|
|
<td class="tar">{{ $month.Words }}</td>
|
|
|
|
<td class="tar">{{ $month.WordsPerPost }}</td>
|
2021-04-23 18:52:12 +00:00
|
|
|
</tr>
|
|
|
|
{{ end }}
|
2021-01-04 19:29:49 +00:00
|
|
|
{{ end }}
|
|
|
|
<tr>
|
2021-04-28 18:03:20 +00:00
|
|
|
<td class="tal">{{ string .Blog.Lang "withoutdate" }}</td>
|
|
|
|
<td class="tar">{{ .Data.withoutdate.Posts }}</td>
|
|
|
|
<td class="tar">{{ .Data.withoutdate.Chars }}</td>
|
|
|
|
<td class="tar">{{ .Data.withoutdate.Words }}</td>
|
|
|
|
<td class="tar">{{ .Data.withoutdate.WordsPerPost }}</td>
|
2021-04-23 18:52:12 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2021-04-28 18:03:20 +00:00
|
|
|
<td class="tal"><b>{{ string .Blog.Lang "total" }}</b></td>
|
|
|
|
<td class="tar">{{ .Data.total.Posts }}</td>
|
|
|
|
<td class="tar">{{ .Data.total.Chars }}</td>
|
|
|
|
<td class="tar">{{ .Data.total.Words }}</td>
|
|
|
|
<td class="tar">{{ .Data.total.WordsPerPost }}</td>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-04-23 18:52:12 +00:00
|
|
|
<script defer src="{{ asset "js/blogstats.js" }}"></script>
|
2021-01-04 19:29:49 +00:00
|
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "blogstats" }}
|
|
|
|
{{ template "base" . }}
|
|
|
|
{{ end }}
|