diff options
author | Creedowl <creedowl@gmail.com> | 2019-08-01 08:29:45 +0300 |
---|---|---|
committer | Creedowl <creedowl@gmail.com> | 2019-08-01 08:29:45 +0300 |
commit | 3d4c52d75fcd01eb0506fc45cf0acabbfbe742e0 (patch) | |
tree | 7312efdb38cfd599b69f83609685246a59a3722e /layouts | |
parent | 1e16b6a94993e98ec232a5e64d3aaf3bfd692e1f (diff) |
feat(archive): finish the basic framework of archive page
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/archive.html | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/layouts/_default/archive.html b/layouts/_default/archive.html index db4c309..2c7210e 100644 --- a/layouts/_default/archive.html +++ b/layouts/_default/archive.html @@ -5,7 +5,24 @@ <body> {{ partial "header.html" . }} <div id="main" class="archive"> - archive + <h1>Archive</h1> + <div class="archive-list"> + {{ $pages := where (where .Site.RegularPages "Params.hidden" "!=" true) "Type" "==" "posts" }} + <!-- {{ $pages }} --> + {{ range $pages.GroupByDate "2006" }} + <div class="list-grouped-by-year"> + <h2>{{ .Key }}</h2> + <div class="post-grouped-by-year"> + {{ range .Pages }} + <div class="post-item"> + <a href={{ .RelPermalink }}>{{ .Title }}</a> + <span class="post-publish-date">{{ .PublishDate.Format "01-02" }}</span> + </div> + {{ end }} + </div> + </div> + {{ end }} + </div> </div> {{ partial "footer.html" . }} </body> |