From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/repo/latest_commit.tmpl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 templates/repo/latest_commit.tmpl (limited to 'templates/repo/latest_commit.tmpl') diff --git a/templates/repo/latest_commit.tmpl b/templates/repo/latest_commit.tmpl new file mode 100644 index 0000000..222d582 --- /dev/null +++ b/templates/repo/latest_commit.tmpl @@ -0,0 +1,31 @@ +{{if not .LatestCommit}} +
+{{else}} + {{if .LatestCommitUser}} + {{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "tw-mr-2"}} + {{if and .LatestCommitUser.FullName DefaultShowFullName}} + {{.LatestCommitUser.FullName}} + {{else}} + {{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}} + {{end}} + {{else}} + {{if .LatestCommit.Author}} + {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24 "tw-mr-2"}} + {{.LatestCommit.Author.Name}} + {{end}} + {{end}} + + {{ShortSha .LatestCommit.ID.String}} + {{if .LatestCommit.Signature}} + {{template "repo/shabox_badge" dict "root" $ "verification" .LatestCommitVerification}} + {{end}} + + {{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}} + {{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}} + {{RenderCommitMessageLinkSubject $.Context .LatestCommit.Message $commitLink ($.Repository.ComposeMetas ctx)}} + {{if IsMultilineCommitMessage .LatestCommit.Message}} + +
{{RenderCommitBody $.Context .LatestCommit.Message ($.Repository.ComposeMetas ctx)}}
+ {{end}} +
+{{end}} -- cgit v1.2.3