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>
|
|
|
|
<th class="tar">{{ string .Blog.Lang "count" }}</th>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{ $counts := .Data.counts }}
|
|
|
|
{{ range $i, $year := .Data.years }}
|
|
|
|
<tr>
|
2021-02-15 20:35:05 +00:00
|
|
|
<td class="tal">{{ $year }}</td>
|
|
|
|
<td class="tar">{{ index $counts $i }}</td>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
|
|
|
{{ end }}
|
|
|
|
<tr>
|
2021-02-15 20:35:05 +00:00
|
|
|
<td class="tal"><b>{{ string .Blog.Lang "total" }}</b></td>
|
|
|
|
<td class="tar">{{ .Data.total }}</td>
|
2021-01-04 19:29:49 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</main>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "blogstats" }}
|
|
|
|
{{ template "base" . }}
|
|
|
|
{{ end }}
|