From 8cf6ecf3ca0dba0f30d77fe4abc542d9aad7041e Mon Sep 17 00:00:00 2001 From: "j3s.sh" Date: Wed, 26 Mar 2025 14:59:12 +0000 Subject: [PATCH] add long dates to issue date hover you might wanna vet the format - i didn't test this btw but i think it'll work lmao --- appview/pages/funcmap.go | 3 +++ appview/pages/templates/repo/issues/issue.html | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/appview/pages/funcmap.go b/appview/pages/funcmap.go index 7370c0ed..04b68686 100644 --- a/appview/pages/funcmap.go +++ b/appview/pages/funcmap.go @@ -68,6 +68,9 @@ func funcMap() template.FuncMap { return s }, "timeFmt": humanize.Time, + "longTimeFmt": func(t time.Time) string { + return t.Format("2006-01-02 * 3:04 PM") + }, "shortTimeFmt": func(t time.Time) string { return humanize.CustomRelTime(t, time.Now(), "", "", []humanize.RelTimeMagnitude{ {time.Second, "now", time.Second}, diff --git a/appview/pages/templates/repo/issues/issue.html b/appview/pages/templates/repo/issues/issue.html index c82ea03b..7998981b 100644 --- a/appview/pages/templates/repo/issues/issue.html +++ b/appview/pages/templates/repo/issues/issue.html @@ -29,7 +29,9 @@ >{{ $owner }} - + @@ -69,6 +71,7 @@ href="#{{ .CommentId }}" class="text-gray-500 text-sm hover:text-gray-500 hover:underline no-underline dark:text-gray-400 dark:hover:text-gray-300 dark:hover:bg-gray-800" id="{{ .CommentId }}" + title="{{ .Created | longTimeFmt }}" > {{ .Created | timeFmt }} -- 2.51.2