diff options
author | Dillon <dillonzq@outlook.com> | 2019-08-11 20:36:19 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2019-08-11 20:36:19 +0300 |
commit | 9433736edec4e30d31780ca55ce58b433931c202 (patch) | |
tree | dbb80eb3d89aa25a96b55b14ea7b64714125c7a7 /layouts/_default/section.html | |
parent | a8bb44da3a70c4ef8fa916ed26b22e43232f272e (diff) |
feat: new style and faster
Diffstat (limited to 'layouts/_default/section.html')
-rw-r--r-- | layouts/_default/section.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/_default/section.html b/layouts/_default/section.html new file mode 100644 index 0000000..39438fa --- /dev/null +++ b/layouts/_default/section.html @@ -0,0 +1,22 @@ +{{ define "title" }}{{ T "posts" }} - {{ .Site.Title }}{{ end }} + +{{ define "content" }} + {{ $data := .Data }} + <div class="post-warp archive"> + <h2 class="post-title" style="text-align:right;padding-bottom:2em"> + {{ printf "- %s -" (T "posts") }} + </h2> + {{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }} + <h3>{{ .Key }}</h3> + + {{ range .Pages }} + <article class="archive-item"> + <a href="{{ .RelPermalink }}" class="archive-item-link">{{ .Title }}</a> + <span class="archive-item-date"> + {{ .Date.Format (.Site.Params.dateFormatToUse | default "01-02") }} + </span> + </article> + {{ end }} {{ end }} + {{ partial "paginator.html" . }} + </div> +{{end }} |