Skip to content

Make user profile image show full image on mobile #19840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions templates/user/profile.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
<div class="ui stackable grid">
<div class="ui five wide column">
<div class="ui card">
<div id="profile-avatar" class="content df"/>
{{if eq .SignedUserName .Owner.Name}}
<a class="image tooltip" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
<a class="image tooltip" href="{{AppSubUrl}}/user/settings" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
{{avatar .Owner 290}}
</a>
{{else}}
<span class="image" id="profile-avatar">
<span class="image">
{{avatar .Owner 290}}
</span>
{{end}}
</div>
<div class="content word-break profile-avatar-name">
{{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
<span class="username text center">{{.Owner.Name}}</span>
Expand Down
15 changes: 4 additions & 11 deletions web_src/less/_user.less
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,20 @@
}
}
}

#profile-avatar {
background: none;
padding: 1rem 1rem .25rem;

justify-content: center;
img {
width: 100%;
height: auto;
object-fit: contain;
margin: 0;
}

@media @mediaSm {
height: 250px;
overflow: hidden;

img {
max-height: 767px;
max-width: 767px;
@media @mediaSm {
width: 30vw;
}
}

}

@media @mediaSm {
Expand Down