blob: bb936721943fc22d8d836012a005e2a64da3adf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
<style>
.site-stats-table td {
padding: 0.5rem;
text-align: left;
}
.site-stats-table td:nth-child(2n) {
text-align: right;
}
.number-pill {
text-align: center;
display: inline-block;
line-height: 1.75rem;
box-sizing: border-box;
border-radius: 5px;
padding: 0 0.5rem;
background-color: var(--block-background-color);
font-size: 1rem;
}
</style>
<table class="site-stats-table w-full max-w-[700px] border-collapse mb-6">
<tbody>
<tr>
<td>页面总数</td>
<td><span class="number-pill">{{ len .Site.RegularPages }}</span></td>
<td>总字数</td>
<td>
<span class="number-pill">
{{- $words := 0 -}}
{{- range (where .Site.RegularPages "Section" "!=" "") -}}
{{- $words = add $words .WordCount -}}
{{- end -}}
{{ lang.FormatNumber 0 $words }}
</span>
</td>
</tr>
<tr>
<td>标签总数</td>
<td><span class="number-pill">{{ len .Site.Taxonomies.tags }}</span></td>
<td>文章系列数量</td>
<td><span class="number-pill">{{ len .Site.Taxonomies.categories }}</span></td>
</tr>
</tbody>
</table>
|