From 15af4db187d360d0d48febf0a9ab0772ce265d58 Mon Sep 17 00:00:00 2001 From: Thomas Stromberg Date: Thu, 30 Apr 2020 22:45:55 -0700 Subject: [PATCH] Show age mouseover as time.Duration instead of static date --- pkg/site/site.go | 2 ++ site/collection.tmpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/site/site.go b/pkg/site/site.go index 8356d23..6357c24 100644 --- a/pkg/site/site.go +++ b/pkg/site/site.go @@ -96,6 +96,7 @@ type Page struct { TotalShown int Types string UniqueItems []*hubbub.Conversation + ResultAge time.Duration Player int Players int @@ -276,6 +277,7 @@ func (h *Handlers) Collection() http.HandlerFunc { Warning: warning, UniqueItems: uniqueFiltered, GetVars: getVars, + ResultAge: time.Since(result.Time), } for _, s := range sts { diff --git a/site/collection.tmpl b/site/collection.tmpl index 5fb6bed..c19ef66 100644 --- a/site/collection.tmpl +++ b/site/collection.tmpl @@ -15,7 +15,7 @@