Skip to content

Commit 4f1fb0f

Browse files
authored
Make user profile image show full image on mobile (#19840)
* Make user profile image show full image on mobile
1 parent 52c2e82 commit 4f1fb0f

File tree

2 files changed

+8
-13
lines changed

2 files changed

+8
-13
lines changed

templates/user/profile.tmpl

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
<div class="ui stackable grid">
55
<div class="ui five wide column">
66
<div class="ui card">
7+
<div id="profile-avatar" class="content df"/>
78
{{if eq .SignedUserName .Owner.Name}}
8-
<a class="image tooltip" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
9+
<a class="image tooltip" href="{{AppSubUrl}}/user/settings" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
910
{{avatar .Owner 290}}
1011
</a>
1112
{{else}}
12-
<span class="image" id="profile-avatar">
13+
<span class="image">
1314
{{avatar .Owner 290}}
1415
</span>
1516
{{end}}
17+
</div>
1618
<div class="content word-break profile-avatar-name">
1719
{{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
1820
<span class="username text center">{{.Owner.Name}}</span>

web_src/less/_user.less

+4-11
Original file line numberDiff line numberDiff line change
@@ -44,27 +44,20 @@
4444
}
4545
}
4646
}
47-
4847
#profile-avatar {
4948
background: none;
5049
padding: 1rem 1rem .25rem;
51-
50+
justify-content: center;
5251
img {
5352
width: 100%;
5453
height: auto;
5554
object-fit: contain;
5655
margin: 0;
57-
}
58-
59-
@media @mediaSm {
60-
height: 250px;
61-
overflow: hidden;
62-
63-
img {
64-
max-height: 767px;
65-
max-width: 767px;
56+
@media @mediaSm {
57+
width: 30vw;
6658
}
6759
}
60+
6861
}
6962

7063
@media @mediaSm {

0 commit comments

Comments
 (0)