diff options
author | Ress | 2020-04-17 23:48:34 +0900 |
---|---|---|
committer | Ress | 2020-04-17 23:48:34 +0900 |
commit | 71e742bbc5ccd3ffb455d514ab788718005d7a6b (patch) | |
tree | 0de9b28bbdaedadd38dfb60ef64da391762680b8 /layouts/_default/archives.html | |
parent | 3834f74b43554cd10de93a15d84953e17b9c995e (diff) | |
download | hugo-theme-fuji-71e742bbc5ccd3ffb455d514ab788718005d7a6b.tar.gz hugo-theme-fuji-71e742bbc5ccd3ffb455d514ab788718005d7a6b.tar.bz2 hugo-theme-fuji-71e742bbc5ccd3ffb455d514ab788718005d7a6b.zip |
Put same code in "baseof.html".
Diffstat (limited to 'layouts/_default/archives.html')
-rw-r--r-- | layouts/_default/archives.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html new file mode 100644 index 0000000..62114b2 --- /dev/null +++ b/layouts/_default/archives.html @@ -0,0 +1,22 @@ +{{ define "main" }} +<div id="page-tag"> + <span>文章总数:{{ len (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}</span> +</div> +<!-- archives range in posts --> +{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) 50 }} +{{ range $paginator.Pages }} +<div id="post-archive"> + <h2 id="post-title-archive"> + <a href="{{ .Permalink }}">{{ .Title }}</a> + </h2> + <div id="post-meta-archive"> + {{ partial "post-meta.html" . }} + </div> +</div> +{{ end }} +{{ if gt $paginator.TotalPages 1 }} +<div id="pagination"> + {{ template "_internal/pagination.html" . }} +</div> +{{ end }} +{{ end }}
\ No newline at end of file |