diff options
author | rmaguiar <rmaguiar@tuta.io> | 2020-08-10 20:09:16 +0300 |
---|---|---|
committer | rmaguiar <rmaguiar@tuta.io> | 2020-08-10 20:09:16 +0300 |
commit | a7a0189564cdf75708e623ce33a95823d1e92d56 (patch) | |
tree | b068dcdcf4a6eebb49f22071bf73f928cb142d7c /layouts/partials/post-list.html | |
parent | 2e125316f5cc37b69e3ca8081999c338be6237e1 (diff) |
Minor improvement to a11y, caching and minor changes
Diffstat (limited to 'layouts/partials/post-list.html')
-rw-r--r-- | layouts/partials/post-list.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/post-list.html b/layouts/partials/post-list.html new file mode 100644 index 0000000..732bc9c --- /dev/null +++ b/layouts/partials/post-list.html @@ -0,0 +1,22 @@ +{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
+
+<ul class="posts">
+ {{ range $paginator.Pages }}
+
+ {{ $pageDate := "" }}
+
+ {{ if not .Date.IsZero }}
+ {{ $pageDate = .Date.Format "2006-01-02" }}
+ {{ end }}
+
+ <li>
+ <a class="btn" href="{{ .RelPermalink }}" title="{{ .LinkTitle }}{{ with $pageDate }}{{ printf " (%s)" . }}{{ end }}">
+ <p>{{ .LinkTitle | emojify }}</p>
+
+ {{ with $pageDate }}
+ <time datetime="{{ . }}">{{ . }}</time>
+ {{ end }}
+ </a>
+ </li>
+ {{ end }}
+</ul>
|