Files

28 lines
1.3 KiB
Handlebars
Raw Permalink Normal View History

2024-12-27 21:18:30 +01:00
<div class="latest-commit">
2024-01-15 17:42:15 +01:00
{{if not .LatestCommit}}
2024-12-11 23:54:42 +08:00
2024-01-15 17:42:15 +01:00
{{else}}
<span class="author-wrapper">
{{- if .LatestCommitUser -}}
{{- ctx.AvatarUtils.Avatar .LatestCommitUser 20 "tw-mr-2" -}}
<strong>{{.LatestCommitUser.GetShortDisplayNameLinkHTML}}</strong>
{{- else if .LatestCommit.Author -}}
{{- ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 20 "tw-mr-2" -}}
<strong>{{.LatestCommit.Author.Name}}</strong>
{{- end -}}
</span>
2024-12-27 21:18:30 +01:00
{{template "repo/commit_sign_badge" dict "Commit" .LatestCommit "CommitBaseLink" (print .RepoLink "/commit") "CommitSignVerification" .LatestCommitVerification}}
2024-01-15 17:42:15 +01:00
{{template "repo/commit_statuses" dict "Status" .LatestCommitStatus "Statuses" .LatestCommitStatuses}}
2024-12-27 21:18:30 +01:00
2024-01-15 17:42:15 +01:00
{{$commitLink:= printf "%s/commit/%s" .RepoLink (PathEscape .LatestCommit.ID.String)}}
<span class="grey commit-summary" title="{{.LatestCommit.Summary}}"><span class="message-wrapper">{{ctx.RenderUtils.RenderCommitMessageLinkSubject .LatestCommit.Message $commitLink $.Repository}}</span>
2024-01-15 17:42:15 +01:00
{{if IsMultilineCommitMessage .LatestCommit.Message}}
<button class="ui button ellipsis-button" aria-expanded="false" data-global-click="onRepoEllipsisButtonClick">...</button>
<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .LatestCommit.Message $.Repository}}</pre>
2024-01-15 17:42:15 +01:00
{{end}}
</span>
{{end}}
2024-12-27 21:18:30 +01:00
</div>