aboutsummaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorKevin Hamer <kevin@imarc.com>2020-10-11 17:35:30 -0400
committerMantas Vilčinskas <hi@mnts.lt>2020-10-27 21:38:46 +0200
commit49c081a97d8442a8267247a98d196fe05d7b3092 (patch)
tree66931542c2c88392a9f7eb5c0b745ca9c4186fd8 /layouts
parentf5e7f886e79241f002cf28a1c8018d81fbd2ee57 (diff)
add .Site.Params.skipSeconds
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/js.html6
1 files changed, 5 insertions, 1 deletions
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 }}
}
/**