mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-04-24 20:47:30 +00:00
feat(ui): make fork related banners more consistent (#7577)
Followup to https://codeberg.org/forgejo/forgejo/pulls/2364 Minor changes to templates. Preview: https://codeberg.org/attachments/993ca087-d163-46c4-a1a3-f023ba0a5a4f https://codeberg.org/attachments/bafb1655-7d64-488b-916a-0198101cea17 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7577 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
parent
f463f97f24
commit
8e49c07187
2 changed files with 12 additions and 11 deletions
10
templates/repo/code/fork_sync_message.tmpl
Normal file
10
templates/repo/code/fork_sync_message.tmpl
Normal file
|
@ -0,0 +1,10 @@
|
|||
{{if .CanSyncFork}}
|
||||
<div class="ui positive message tw-flex tw-items-center">
|
||||
<div class="tw-flex-1">
|
||||
{{ctx.Locale.TrN .ForkCommitsBehind "repo.sync_fork.branch_behind_one" "repo.sync_fork.branch_behind_few" .ForkCommitsBehind (printf "<a href='%s'>%s:%s</a>" .BaseBranchLink .Repository.BaseRepo.FullName .BranchName | SafeHTML)}}
|
||||
</div>
|
||||
<a role="button" class="ui compact positive button tw-m-0" href="{{.SyncForkLink}}">
|
||||
{{ctx.Locale.Tr "repo.sync_fork.button"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
|
@ -3,7 +3,6 @@
|
|||
{{template "repo/header" .}}
|
||||
<div class="ui container {{if .IsBlame}}fluid padded{{end}}">
|
||||
{{template "base/alert" .}}
|
||||
{{template "repo/code/recently_pushed_new_branches" .}}
|
||||
{{if and (not .HideRepoInfo) (not .IsBlame)}}
|
||||
<div class="repo-description">
|
||||
<div id="repo-desc" class="tw-break-anywhere tw-text-16">
|
||||
|
@ -159,16 +158,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{{if .CanSyncFork}}
|
||||
<div class="ui positive message tw-flex tw-items-center">
|
||||
<div class="tw-flex-1">
|
||||
{{ctx.Locale.TrN .ForkCommitsBehind "repo.sync_fork.branch_behind_one" "repo.sync_fork.branch_behind_few" .ForkCommitsBehind (printf "<a href='%s'>%s:%s</a>" .BaseBranchLink .Repository.BaseRepo.FullName .BranchName | SafeHTML)}}
|
||||
</div>
|
||||
<a role="button" class="ui compact positive button tw-m-0" href="{{.SyncForkLink}}">
|
||||
{{ctx.Locale.Tr "repo.sync_fork.button"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{template "repo/code/recently_pushed_new_branches" .}}
|
||||
{{template "repo/code/fork_sync_message" .}}
|
||||
|
||||
{{if .IsViewFile}}
|
||||
{{template "repo/view_file" .}}
|
||||
|
|
Loading…
Add table
Reference in a new issue