From f04137f841de6fefe4c79fedeb718b252a3b2958 Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Mon, 12 Dec 2022 18:02:07 +0530 Subject: template: render diff header lines --- templates/commit.html | 5 ++++- templates/log.html | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/commit.html b/templates/commit.html index e6af551..f7a36b4 100644 --- a/templates/commit.html +++ b/templates/commit.html @@ -10,7 +10,7 @@ {{ template "nav" . }}
-

author: {{ .commit.Author.Name }} <{{ .commit.Author.Email}}> on {{ .commit.Author.When }}

+

author: {{ .commit.Author.Name }} <{{ .commit.Author.Email}}> on {{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}

commit: {{ .commit.This }} @@ -41,6 +41,9 @@ {{- if eq .Op.String "-" -}} {{ .String }} {{- end -}} + {{- if eq .Op.String " " -}} + {{ .String }} + {{- end -}} {{- end -}} {{- end -}} diff --git a/templates/log.html b/templates/log.html index 357a5a8..de7b200 100644 --- a/templates/log.html +++ b/templates/log.html @@ -12,7 +12,8 @@ {{ $repo := .name }} {{ range .commits }}

{{ slice .Hash.String 0 8 }} - — {{ .Author.Name }}

+ — {{ .Author.Name }} + {{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}

{{ .Message }}

{{ end }}
-- cgit