forgejo_backup/templates/repo/shabox.tmpl
0ko 0dd605a8d3 chore(ui): clean up hashbox CSS, small design changes (#7822)
Co-authored-by: Beowulf <beowulf@beocode.eu>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7822
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Beowulf <beowulf@beocode.eu>
2025-05-25 12:51:27 +02:00

21 lines
737 B
Go HTML Template

{{$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>