From 3742a0775ba7a1c626bdb04d27b4e92e18bb9cd2 Mon Sep 17 00:00:00 2001
From: Jimmy Cai <jimmehcai@gmail.com>
Date: Sun, 6 Sep 2020 20:10:25 +0200
Subject: [PATCH] feat(article/details): better article time display

---
 layouts/partials/article/components/details.html | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html
index fcfba4b..9c2517d 100644
--- a/layouts/partials/article/components/details.html
+++ b/layouts/partials/article/components/details.html
@@ -29,10 +29,12 @@
     </h3>
     {{ end }}
 
+    {{- if not .Date.IsZero -}}
     <footer class="article-time">
         {{ (resources.Get "icons/clock.svg").Content | safeHTML }}
-        <time data-timeago="true" datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>
+        <time class="article-time--published">
             {{- .Date.Format ( or .Site.Params.dateFormat "Jan 02, 2006" ) -}}
         </time>
     </footer>
+    {{- end -}}
 </div>
\ No newline at end of file