Skip to content

Commit 62a9052

Browse files
authoredApr 4, 2023
Org pages style fixes (#23901)
Few fixes/enhancements around org pages: Use flexbox for member and repo lists and tweak rendering of tabs and list: <img width="765" alt="Screenshot 2023-04-03 at 22 54 24" src="https://user-images.githubusercontent.com/115237/229625716-92a834c3-9121-4729-8b9b-3a3973cf9a91.png"> <img width="771" alt="Screenshot 2023-04-03 at 22 55 15" src="https://user-images.githubusercontent.com/115237/229625719-acc08ce8-4489-44a6-a9b9-e36755c55b1d.png"> Vertically center remove/leave buttons, add link to avatar: <img width="1223" alt="Screenshot 2023-04-03 at 21 51 20" src="https://user-images.githubusercontent.com/115237/229612616-b662b795-e754-41a1-a77a-381c267e6104.png">
1 parent 2c585d6 commit 62a9052

File tree

6 files changed

+29
-32
lines changed

6 files changed

+29
-32
lines changed
 

‎templates/org/home.tmpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@
4949
{{$isMember := .IsOrganizationMember}}
5050
{{range .Members}}
5151
{{if or $isMember (call $.IsPublicMember .ID)}}
52-
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">
53-
{{avatar $.Context .}}
54-
</a>
52+
<a href="{{.HomeLink}}" title="{{.Name}}{{if .FullName}} ({{.FullName}}){{end}}">{{avatar $.Context . 48}}</a>
5553
{{end}}
5654
{{end}}
5755
</div>

‎templates/org/member/members.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{range .Members}}
99
<div class="item ui grid">
1010
<div class="ui four wide column" style="display: flex;">
11-
{{avatar $.Context . 48}}
11+
<a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
1212
<div>
1313
<div class="meta"><a href="{{.HomeLink}}">{{.Name}}</a></div>
1414
<div class="meta">{{.FullName}}</div>
@@ -55,7 +55,7 @@
5555
{{end}}
5656
</div>
5757
{{end}}
58-
<div class="ui three wide column">
58+
<div class="ui three wide column gt-df gt-ac gt-je">
5959
<div class="text right">
6060
{{if eq $.SignedUser.ID .ID}}
6161
<form>

‎templates/org/team/members.tmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@
2525
{{end}}
2626
<div class="ui bottom attached table segment members">
2727
{{range .Team.Members}}
28-
<div class="item">
28+
<div class="item gt-df gt-ac gt-fw">
29+
<a href="{{.HomeLink}}">{{avatar $.Context . 48 "gt-mr-3 gt-mb-0"}}</a>
30+
<a class="gt-f1" href="{{.HomeLink}}">
31+
<strong>{{.DisplayName}}</strong>
32+
</a>
2933
{{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
3034
<form>
31-
<button class="ui red button delete-button right" data-modal-id="remove-team-member"
35+
<button class="ui red button delete-button" data-modal-id="remove-team-member"
3236
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
3337
data-name="{{.DisplayName}}"
3438
data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
3539
</form>
3640
{{end}}
37-
<a href="{{.HomeLink}}">
38-
{{avatar $.Context .}}
39-
{{.DisplayName}}
40-
</a>
4141
</div>
4242
{{else}}
4343
<div class="item">

‎templates/org/team/navbar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="ui top attached tabular menu">
1+
<div class="ui top attached tabular menu org-team-navbar">
22
<a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.locale.Tr "org.lower_members"}}</a>
33
<a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.locale.Tr "org.lower_repositories"}}</a>
44
</div>

‎templates/org/team/repositories.tmpl

+13-13
Original file line numberDiff line numberDiff line change
@@ -33,25 +33,25 @@
3333
{{end}}
3434
<div class="ui bottom attached table segment repositories">
3535
{{range .Team.Repos}}
36-
<div class="item">
36+
<div class="item gt-df gt-ac gt-fw">
37+
{{if .IsPrivate}}
38+
{{svg "octicon-lock" 16 "gt-mr-3"}}
39+
{{else if .IsFork}}
40+
{{svg "octicon-repo-forked" 16 "gt-mr-3"}}
41+
{{else if .IsMirror}}
42+
{{svg "octicon-mirror" 16 "gt-mr-3"}}
43+
{{else}}
44+
{{svg "octicon-repo" 16 "gt-mr-3"}}
45+
{{end}}
46+
<a class="member gt-f1" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
47+
<strong>{{$.Org.Name}}/{{.Name}}</strong>
48+
</a>
3749
{{if $canAddRemove}}
3850
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
3951
{{$.CsrfTokenHtml}}
4052
<button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
4153
</form>
4254
{{end}}
43-
<a class="member" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
44-
{{if .IsPrivate}}
45-
{{svg "octicon-lock"}}
46-
{{else if .IsFork}}
47-
{{svg "octicon-repo-forked"}}
48-
{{else if .IsMirror}}
49-
{{svg "octicon-mirror"}}
50-
{{else}}
51-
{{svg "octicon-repo"}}
52-
{{end}}
53-
<strong>{{$.Org.Name}}/{{.Name}}</strong>
54-
</a>
5555
</div>
5656
{{else}}
5757
<div class="item">

‎web_src/css/organization.css

+6-7
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,6 @@
156156
padding: 10px 15px;
157157
}
158158

159-
.organization.teams .members a:hover,
160-
.organization.profile .members a:hover {
161-
text-decoration: none;
162-
}
163-
164159
.organization.teams .members .ui.avatar,
165160
.organization.profile .members .ui.avatar {
166161
width: 48px;
@@ -218,8 +213,7 @@
218213

219214
.organization.teams .repositories .item,
220215
.organization.teams .members .item {
221-
padding: 10px 20px;
222-
line-height: 32px;
216+
padding: 10px 19px;
223217
}
224218

225219
.organization.teams .repositories .item:not(:last-child),
@@ -230,6 +224,7 @@
230224
.organization.teams .repositories .item .button,
231225
.organization.teams .members .item .button {
232226
padding: 9px 10px;
227+
margin: 0;
233228
}
234229

235230
.organization.teams #add-repo-form input,
@@ -248,3 +243,7 @@
248243
.organization.teams #repo-top-segment {
249244
height: 60px;
250245
}
246+
247+
.org-team-navbar .active.item {
248+
background: var(--color-box-body) !important;
249+
}

0 commit comments

Comments
 (0)
Please sign in to comment.