mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-02-03 20:51:07 -05:00
[v14.0/forgejo] fix(ui): improve force-push layout alignment (#10950)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/10939 Followup to https://codeberg.org/forgejo/forgejo/pulls/7746 Replaces https://codeberg.org/forgejo/forgejo/pulls/10938 grid layout (desktop): give the Compare button a wrapper with same height as the first text line so it stays aligned to it (and to timeline badge) inline layout (mobile): give the Compare button left margin so there's a gap between it and the text line Initial fix for grid was proposed by luisadame. Co-authored-by: Luis <luis@adame.dev> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10950 Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org> Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
This commit is contained in:
parent
186664b881
commit
4d7dfe38bf
2 changed files with 13 additions and 1 deletions
|
|
@ -580,7 +580,9 @@
|
|||
}}
|
||||
</span>
|
||||
{{if $.Issue.PullRequest.BaseRepo.Name}}
|
||||
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
<span class="compare">
|
||||
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
|
||||
</span>
|
||||
{{end}}
|
||||
</span>
|
||||
{{else}}
|
||||
|
|
|
|||
|
|
@ -886,6 +886,16 @@ citation-information .tab:not(.active) {
|
|||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
column-gap: 1rem;
|
||||
span.compare {
|
||||
/* Same height as .timeline-item .badge for alignment */
|
||||
height: 34px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767.98px) {
|
||||
.repository.view.issue .comment-list .timeline-item .forced-push span.compare {
|
||||
margin-inline-start: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue