1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-10-15 19:42:04 +00:00
forgejo/templates/repo/shabox.tmpl

22 lines
737 B
Go HTML Template
Raw Normal View History

{{$class := "ui sha label"}}
{{if .signature}}
{{$class = (print $class " isSigned")}}
{{if .verification.Verified}}
{{if eq .verification.TrustStatus "trusted"}}
{{$class = (print $class " isVerified")}}
{{else if eq .verification.TrustStatus "untrusted"}}
{{$class = (print $class " isVerifiedUntrusted")}}
{{else}}
{{$class = (print $class " isVerifiedUnmatched")}}
{{end}}
{{else if .verification.Warning}}
{{$class = (print $class " isWarning")}}
{{end}}
{{end}}
<a {{if .commitLink}}href="{{.commitLink}}"{{end}} rel="nofollow" class="{{$class}}">
<span class="shortsha">{{ShortSha .sha1}}</span>
{{- if .signature -}}
{{template "repo/shabox_badge" dict "verification" .verification}}
{{- end -}}
</a>