mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Improve flex list UI (#26970)
1. There is already `gt-ac`, so no need to introduce `flex-item-center` 2. The `flex-item-baseline` and `.flex-item-icon svg { margin-top: 1px }` seem to be a tricky patch, they don't resolve the root problem, and still cause misalignment in some cases. * The root problem is: the "icon" needs to align with the sibling "title" * So, make the "icon" and the "title" both have the same height 3. `flex-text-inline` could only be used if the element is really "inline", otherwise its `vertical-align` would make the box size change. In most cases, `flex-text-block` is good enough.  --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<div class="flex-list">
|
||||
{{range .Members}}
|
||||
{{$isPublic := index $.MembersIsPublicMember .ID}}
|
||||
<div class="flex-item {{if $.PublicOnly}}flex-item-center{{end}}">
|
||||
<div class="flex-item {{if $.PublicOnly}}gt-ac{{end}}">
|
||||
<div class="flex-item-leading">
|
||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 48}}</a>
|
||||
</div>
|
||||
|
@@ -24,7 +24,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="flex-list">
|
||||
{{range .Team.Members}}
|
||||
<div class="flex-item flex-item-center">
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item-leading">
|
||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a>
|
||||
</div>
|
||||
@@ -56,7 +56,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="flex-list">
|
||||
{{range .Invites}}
|
||||
<div class="flex-item flex-item-center">
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item-main">
|
||||
{{.Email}}
|
||||
</div>
|
||||
|
@@ -28,7 +28,7 @@
|
||||
<div class="ui attached segment">
|
||||
<div class="flex-list">
|
||||
{{range .Team.Repos}}
|
||||
<div class="flex-item flex-item-center">
|
||||
<div class="flex-item gt-ac">
|
||||
<div class="flex-item-leading">
|
||||
{{template "repo/icon" .}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user