From 49c081a97d8442a8267247a98d196fe05d7b3092 Mon Sep 17 00:00:00 2001 From: Kevin Hamer Date: Sun, 11 Oct 2020 17:35:30 -0400 Subject: add .Site.Params.skipSeconds --- layouts/partials/js.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'layouts/partials/js.html') diff --git a/layouts/partials/js.html b/layouts/partials/js.html index c4c5a85..8465483 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -67,7 +67,11 @@ if (interval > 1) { return interval + ' {{ T "minsAgo" }}'; } - return Math.floor(seconds) + '{{ T "secondsAgo" }}'; + {{ if .Site.Params.skipSeconds }} + return '<1 {{ T "minsAgo" }}' + {{ else }} + return Math.floor(seconds) + '{{ T "secondsAgo" }}'; + {{ end }} } /** -- cgit v1.2.3-70-g09d2