diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-12 18:02:07 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2022-12-12 18:02:07 +0530 |
commit | f04137f841de6fefe4c79fedeb718b252a3b2958 (patch) | |
tree | aa13f85cea086904d29c6dcc8b694b45196e28d4 /templates | |
parent | c165c447685d68c2b0b2293a31937a903394f943 (diff) | |
download | legit-f04137f841de6fefe4c79fedeb718b252a3b2958.tar.gz legit-f04137f841de6fefe4c79fedeb718b252a3b2958.tar.bz2 legit-f04137f841de6fefe4c79fedeb718b252a3b2958.zip |
template: render diff header lines
Diffstat (limited to '')
-rw-r--r-- | templates/commit.html | 5 | ||||
-rw-r--r-- | templates/log.html | 3 |
2 files changed, 6 insertions, 2 deletions
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" . }} <main> <section> - <p>author: {{ .commit.Author.Name }} <{{ .commit.Author.Email}}> on {{ .commit.Author.When }}</p> + <p>author: {{ .commit.Author.Name }} <{{ .commit.Author.Email}}> on {{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</p> <p>commit: <a href="/{{ .name }}/commit/{{ .commit.This }}"> {{ .commit.This }} </a> @@ -41,6 +41,9 @@ {{- if eq .Op.String "-" -}} <span style="color: red">{{ .String }}</span> {{- end -}} + {{- if eq .Op.String " " -}} + <span style="color: gray">{{ .String }}</span> + {{- end -}} {{- end -}} {{- end -}} </pre> 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 }} <p><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}<a> - — {{ .Author.Name }}</p> + — {{ .Author.Name }} + <span title="{{ .Author.When }}">{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</span></p> <p><pre>{{ .Message }}</pre></p> {{ end }} </main> |