aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/list
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/list')
-rw-r--r--layouts/partials/list/default.html33
-rw-r--r--layouts/partials/list/pagination.html23
2 files changed, 48 insertions, 8 deletions
diff --git a/layouts/partials/list/default.html b/layouts/partials/list/default.html
index a965ce5..f3fd20e 100644
--- a/layouts/partials/list/default.html
+++ b/layouts/partials/list/default.html
@@ -1,11 +1,28 @@
<article class="flex flex-col gap-1">
- <h1 class="text-xl font-bold hover:underline"> <a href=" {{ .Permalink }} ">{{ .Title }}</a></h1>
- <div class="text-gray-600">
+ <h1>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </h1>
+
+ <span class="date">
+ <time datetime="{{ .PublishDate }}" title='{{ .PublishDate.Format "Mon, Jan 2, 2006, 3:04 PM MST" }}'>
+ {{ .PublishDate.Format "02/01/2006" }}
+ </time>
+ </span>
+
+ <div class="description">
{{ if .Params.description }}
- {{ .Params.description }}
- {{ else if .Summary }}
- {{ .Summary }}
+ {{ .Params.description }}
+ {{ else if .Summary }}
+ {{ .Summary }}
{{ end }}
- </div>
- <div class="mt-2"><a class="inline-flex gap-2 text-sm font-semibold items-center text-emerald-700 hover:text-emerald-600" href="{{ .Permalink }}">Read This Article <span class="w-4 h-4 stroke-2">{{ partial "handler/svg" "arrow-right" }}</span> </a> </div>
-</article> \ No newline at end of file
+ </div>
+
+ <div class="mt-2">
+ <a class="read-more" href="{{ .Permalink }}">
+ {{ i18n "readMore" }}
+ <span class="w-4 h-4 stroke-2">
+ {{ partial "utils/icon" "arrow-right" }}
+ </span>
+ </a>
+ </div>
+</article>
diff --git a/layouts/partials/list/pagination.html b/layouts/partials/list/pagination.html
new file mode 100644
index 0000000..2e9487c
--- /dev/null
+++ b/layouts/partials/list/pagination.html
@@ -0,0 +1,23 @@
+{{ $paginator := .Paginator }}
+
+<div class="pb-10 grid grid-cols-2 font-semibold">
+ <!-- Previous page. -->
+ <div>
+ {{ if $paginator.HasPrev }}
+ <a href="{{ $paginator.Prev.URL }}" class="pagination-button">
+ <span class="h-4 w-4 stroke-2"> {{ partial "utils/icon" "arrow-left" }} </span>
+ Newer Posts
+ </a>
+ {{ end }}
+ </div>
+
+ <!-- Next page. -->
+ <div class="flex justify-end">
+ {{ if $paginator.HasNext }}
+ <a href="{{ $paginator.Next.URL }}" class="pagination-button">
+ Older Posts
+ <span class="h-4 w-4 stroke-2"> {{ partial "utils/icon" "arrow-right" }} </span>
+ </a>
+ {{ end }}
+ </div>
+</div>