Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/rmaguiar/hugo-theme-color-your-world.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrmaguiar <rmaguiar@tuta.io>2020-08-10 20:09:16 +0300
committerrmaguiar <rmaguiar@tuta.io>2020-08-10 20:09:16 +0300
commita7a0189564cdf75708e623ce33a95823d1e92d56 (patch)
treeb068dcdcf4a6eebb49f22071bf73f928cb142d7c /layouts/partials/post-list.html
parent2e125316f5cc37b69e3ca8081999c338be6237e1 (diff)
Minor improvement to a11y, caching and minor changes
Diffstat (limited to 'layouts/partials/post-list.html')
-rw-r--r--layouts/partials/post-list.html22
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>