Skip to content

Commit a9f949d

Browse files
committed
Clean up various avatar dimensions
1 parent 3075b99 commit a9f949d

File tree

8 files changed

+28
-33
lines changed

8 files changed

+28
-33
lines changed

templates/repo/issue/view_content.tmpl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
<div class="ui timeline">
1212
<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
1313
{{if .Issue.OriginalAuthor}}
14-
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
14+
<span class="timeline-avatar">
15+
<img src="{{AppSubUrl}}/assets/img/avatar_default.png" width="40" height="40">
16+
</span>
1517
{{else}}
1618
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
17-
{{avatar $.Context .Issue.Poster}}
19+
{{avatar $.Context .Issue.Poster 40}}
1820
</a>
1921
{{end}}
2022
<div class="content comment-container">
@@ -33,7 +35,7 @@
3335
</span>
3436
{{else}}
3537
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
36-
{{avatar $.Context .Issue.Poster}}
38+
{{avatar $.Context .Issue.Poster 24}}
3739
</a>
3840
<span class="text grey">
3941
{{template "shared/user/authorlink" .Issue.Poster}}
@@ -93,7 +95,7 @@
9395
{{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
9496
<div class="timeline-item comment form">
9597
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
96-
{{avatar $.Context .SignedUser}}
98+
{{avatar $.Context .SignedUser 40}}
9799
</a>
98100
<div class="content">
99101
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">

templates/repo/issue/view_content/comments.tmpl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
{{if eq .Type 0}}
1616
<div class="timeline-item comment" id="{{.HashTag}}">
1717
{{if .OriginalAuthor}}
18-
<span class="timeline-avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
18+
<span class="timeline-avatar">
19+
<img src="{{AppSubUrl}}/assets/img/avatar_default.png" width="40" height="40">
20+
</span>
1921
{{else}}
2022
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
21-
{{avatar $.Context .Poster}}
23+
{{avatar $.Context .Poster 40}}
2224
</a>
2325
{{end}}
2426
<div class="content comment-container">
@@ -38,7 +40,7 @@
3840
{{else}}
3941
{{if gt .Poster.ID 0}}
4042
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
41-
{{avatar $.Context .Poster}}
43+
{{avatar $.Context .Poster 24}}
4244
</a>
4345
{{end}}
4446
<span class="text grey muted-links">
@@ -375,8 +377,8 @@
375377
{{/* Some timeline avatars need a offset to correctly allign with their speech
376378
bubble. The condition depends on review type and for positive reviews whether
377379
there is a comment element or not */}}
378-
<a class="timeline-avatar{{if or (and (eq .Review.Type 1) (or .Content .Attachments)) (eq .Review.Type 2) (eq .Review.Type 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
379-
{{avatar $.Context .Poster}}
380+
<a class="timeline-avatar{{if or (and (eq .Review.Type 1) (or .Content .Attachments)) (and (eq .Review.Type 2) (or .Content .Attachments)) (eq .Review.Type 3)}} timeline-avatar-offset{{end}}"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
381+
{{avatar $.Context .Poster 40}}
380382
</a>
381383
{{end}}
382384
<span class="badge{{if eq .Review.Type 1}} gt-bg-green gt-text-white{{else if eq .Review.Type 3}} gt-bg-red gt-text-white{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
@@ -413,7 +415,7 @@
413415
<div class="comment-header-left gt-df gt-ac">
414416
{{if gt .Poster.ID 0}}
415417
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
416-
{{avatar $.Context .Poster}}
418+
{{avatar $.Context .Poster 24}}
417419
</a>
418420
{{end}}
419421
<span class="text grey muted-links">
@@ -768,7 +770,7 @@
768770
<div class="timeline-item-group">
769771
<div class="timeline-item event" id="{{.HashTag}}">
770772
<a class="timeline-avatar"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
771-
<img src="{{.Poster.AvatarLink $.Context}}">
773+
<img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40">
772774
</a>
773775
<span class="badge grey">{{svg "octicon-x" 16}}</span>
774776
{{template "shared/user/avatarlink" dict "Context" $.Context "user" .Poster}}
@@ -789,7 +791,7 @@
789791
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top">
790792
{{if gt .Poster.ID 0}}
791793
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}">
792-
{{avatar $.Context .Poster}}
794+
{{avatar $.Context .Poster 24}}
793795
</a>
794796
{{end}}
795797
<span class="text grey muted-links">

templates/repo/issue/view_content/pull.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
{{- else if .Issue.PullRequest.IsChecking}}yellow
116116
{{- else if .Issue.PullRequest.IsEmpty}}grey
117117
{{- else if .Issue.PullRequest.CanAutoMerge}}green
118-
{{- else}}red{{end}}">{{svg "octicon-git-merge" 32}}</a>
118+
{{- else}}red{{end}}">{{svg "octicon-git-merge" 40}}</a>
119119
<div class="content">
120120
{{template "repo/pulls/status" .}}
121121
{{$showGeneralMergeForm := false}}

templates/shared/issuelist.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
<div class="issue-item-icon-right text grey">
154154
{{range .Assignees}}
155155
<a class="ui assignee gt-tdn" href="{{.HomeLink}}" data-tooltip-content="{{.GetDisplayName}}">
156-
{{avatar $.Context .}}
156+
{{avatar $.Context . 20}}
157157
</a>
158158
{{end}}
159159
</div>

web_src/css/base.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,11 +1903,6 @@ img.ui.avatar,
19031903
color: var(--color-text-light);
19041904
}
19051905

1906-
.repo-title .avatar {
1907-
width: 32px !important;
1908-
height: 32px !important;
1909-
}
1910-
19111906
.repo-title .labels {
19121907
margin-left: 0.5rem;
19131908
}

web_src/css/organization.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170

171171
.organization.members .list .item .ui.avatar {
172172
width: 48px;
173-
height: auto;
173+
height: 48px;
174174
margin-right: 1rem;
175175
align-self: flex-start;
176176
}

web_src/css/repository.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -788,18 +788,14 @@
788788
left: -68px;
789789
}
790790

791-
.repository.view.issue .comment-list .timeline-item .timeline-avatar img {
792-
width: 40px !important;
793-
height: 40px !important;
794-
}
795-
796791
/* Don't show the mobile oriented avatar ".inline-timeline-avatar" on desktop. Desktop uses the avatar with class ".timeline-avatar" */
797792
.repository.view.issue .comment-list .timeline-item .inline-timeline-avatar {
798793
display: none;
799794
}
800795

801-
.repository.view.issue .comment-list .timeline-item img.avatar,
802-
.repository.view.issue .comment-list .timeline-item .avatar img {
796+
/* size adjustment is necessary until fomantic comment module removal */
797+
.repository.view.issue .comment-list .timeline-item .comment-code-cloud img.avatar,
798+
.repository.view.issue .comment-list .timeline-item .comment-code-cloud .avatar img {
803799
width: 20px;
804800
height: 20px;
805801
vertical-align: middle;
@@ -1094,6 +1090,7 @@
10941090
margin-left: 3em;
10951091
}
10961092

1093+
/* size adjustment is necessary until fomantic comment module removal */
10971094
.repository.view.issue .comment-code-cloud .comment-list .code-comment img.avatar,
10981095
.repository.view.issue .comment-code-cloud .comment-list .comment img.avatar {
10991096
width: 28px;
@@ -1150,6 +1147,10 @@
11501147
text-decoration: line-through;
11511148
}
11521149

1150+
.ui.comments .comment .avatar {
1151+
margin: 0;
1152+
}
1153+
11531154
.repository .comment.form .ui.comments {
11541155
margin-top: -12px;
11551156
max-width: 100%;
@@ -3085,6 +3086,7 @@ td.blob-excerpt {
30853086
}
30863087

30873088
.sidebar-item-link {
3089+
display: inline-flex;
30883090
align-items: center;
30893091
word-break: break-all;
30903092
}
@@ -3260,10 +3262,6 @@ td.blob-excerpt {
32603262
margin-left: 6px;
32613263
margin-right: 2px;
32623264
}
3263-
.repository.view.issue .comment-list .timeline .inline-timeline-avatar img.avatar {
3264-
height: 24px;
3265-
width: 24px;
3266-
}
32673265
.repository.view.issue .comment-list .timeline .comment-header {
32683266
padding-left: 4px;
32693267
}

web_src/css/shared/issuelist.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@
6969
}
7070

7171
.issue.list > .item .assignee img {
72-
width: 20px;
73-
height: 20px;
7472
margin-right: 2px;
7573
}
7674

0 commit comments

Comments
 (0)