diff options
author | zilch40 <wlh233@live.com> | 2020-11-14 18:37:40 +0300 |
---|---|---|
committer | zilch40 <wlh233@live.com> | 2020-11-14 18:37:40 +0300 |
commit | c7e401969102c1c66d8492a0e314d1b71f48223e (patch) | |
tree | edf7a9bc667bac6b687555bb7dd6873e32860a4d /layouts/archives/single.html | |
parent | 9c4508e5afe2d183eeda5224a2da337b475c7440 (diff) |
forgot a lot of files in last commit XD
Diffstat (limited to 'layouts/archives/single.html')
-rw-r--r-- | layouts/archives/single.html | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/layouts/archives/single.html b/layouts/archives/single.html index 18ce343..9cec5f7 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -4,7 +4,6 @@ <body> <div id="main"> - {{- partial "nav.html" . -}} {{- partial "header.html" . -}} <section class="section"> {{- block "archives-main" . }}{{- end }} @@ -19,22 +18,21 @@ {{ define "archives-main" }} <div class="container"> - <div class="box section"> - <div class="content"> - <p>本博客共 {{len (where (where .Site.Pages "Type" "post") "Kind" "page")}} 篇博文</p> - <div class="post-archive"> - {{ range (where (where .Site.Pages "Type" "post") "Kind" "page").GroupByDate "2006" }} - <h2>{{ .Key }}</h2> - <ul class="listing"> - {{ range .Pages }} - <li> - <span class="date">{{ .Date.Format "2006/01/02" }} </span> - <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> - </li> - {{ end }} - </ul> + <div class="box content"> + {{ $count := len (where (where .Site.Pages "Type" "post") "Kind" "page") }} + <p>{{ i18n "archives" (dict "Count" $count) }}</p> + <div class="post-archive"> + {{ range (where (where .Site.Pages "Type" "post") "Kind" "page").GroupByDate "2006" }} + <h2>{{ .Key }}</h2> + <ul class="listing"> + {{ range .Pages }} + <li> + <span class="date">{{ .Date.Format "2006/01/02" }} </span> + <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> + </li> {{ end }} - </div> + </ul> + {{ end }} </div> </div> </div> |