0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-02 00:27:24 +01:00

link to commit

This commit is contained in:
silverwind 2025-10-29 19:14:37 +01:00
parent 86bad44824
commit b2e3bbf19d
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443

View File

@ -1,7 +1,7 @@
<div class="code-preview-container file-content">
<div class="code-preview-header">
<a href="{{.FullURL}}" rel="nofollow" class="tw-font-semibold">{{.FilePath}}</a>
{{$link := HTMLFormat `<a href="%s/src/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
{{- if eq .LineStart .LineStop -}}
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
{{- else -}}