mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Tweak repo sidebar (#32847)
Before and after: <img width="218" alt="Screenshot 2024-12-15 at 04 53 53" src="https://github.com/user-attachments/assets/299b1f0a-ba72-47c6-b662-a9d540d4d741" /> <img width="222" alt="Screenshot 2024-12-15 at 04 53 41" src="https://github.com/user-attachments/assets/5a2b5332-e324-4d20-82e9-21d1c850e826" /> Diff without whitespace: https://github.com/go-gitea/gitea/pull/32847/files?diff=unified&w=1 The `tw-mt-2` is fine even if the element renders empty: <img width="387" alt="image" src="https://github.com/user-attachments/assets/76a976e4-ba2e-48a5-9248-c361552a937a" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
14
templates/repo/release/label.tmpl
Normal file
14
templates/repo/release/label.tmpl
Normal file
@@ -0,0 +1,14 @@
|
||||
{{/*
|
||||
Template Attributes:
|
||||
* Release: the release
|
||||
* IsLatest: boolean indicating whether this is the latest release, optional
|
||||
*/}}
|
||||
{{if .IsLatest}}
|
||||
<span class="ui green label">{{ctx.Locale.Tr "repo.release.latest"}}</span>
|
||||
{{else if .Release.IsDraft}}
|
||||
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>
|
||||
{{else if .Release.IsPrerelease}}
|
||||
<span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
|
||||
{{else if (not .Release.IsTag)}}
|
||||
<span class="ui green label">{{ctx.Locale.Tr "repo.release.stable"}}</span>
|
||||
{{end}}
|
@@ -33,13 +33,7 @@
|
||||
<h4 class="release-list-title tw-break-anywhere">
|
||||
{{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a class="muted" href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}}
|
||||
{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}}
|
||||
{{if $release.IsDraft}}
|
||||
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span>
|
||||
{{else if $release.IsPrerelease}}
|
||||
<span class="ui orange label">{{ctx.Locale.Tr "repo.release.prerelease"}}</span>
|
||||
{{else if (not $release.IsTag)}}
|
||||
<span class="ui green label">{{ctx.Locale.Tr "repo.release.stable"}}</span>
|
||||
{{end}}
|
||||
{{template "repo/release/label" (dict "Release" $release)}}
|
||||
</h4>
|
||||
<div>
|
||||
{{if and $.CanCreateRelease (not $.PageIsSingleTag)}}
|
||||
|
Reference in New Issue
Block a user