wrap dates in <time> tags with datetime attribute
1 file changed, 8 insertions(+), 1 deletion(-)
changed files
M templates/index.go → templates/index.go
@@ -1,6 +1,8 @@ package templates import ( + "time" + "github.com/dustin/go-humanize" "go.alanpearce.eu/elgit/data" g "go.alanpearce.eu/gomponents"@@ -46,6 +48,11 @@ }, A(Href("/"+repo.Slug), g.Text(repo.Name)), ), Div(Class("desc"), g.Text(repo.Description)), - Div(g.Text(humanize.Time(repo.LastCommit))), + Div( + Time( + DateTime(repo.LastCommit.Format(time.RFC3339)), + g.Text(humanize.Time(repo.LastCommit)), + ), + ), } }