Skip to content
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

Turned square avatars into circles and changed the user details to be… #1389

Merged
merged 2 commits into from
Nov 25, 2021
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
27 changes: 23 additions & 4 deletions modules/portal/app/assets/css/portal/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,9 @@ ul.pagination {
}
}

.people-page .pagination {
justify-content: center;
}

// User grid
.user-grid {
Expand All @@ -1041,22 +1044,38 @@ ul.pagination {

.user-grid-item {
margin-bottom: $list-margin-bottom;
align-content: center;

}

.user-info {
.img-container {
width: 6rem;
height: 6rem;
overflow: hidden;
.user-avatar {
border-radius: 50%;
width: 8rem;
height: 8rem;
overflow: hidden;
display: inline-block;
img {
object-fit: cover;
width: 100%;
height: 100%;
}
}
}
text-align: center;
h3 {
margin-top: $margin-sm;
}
}
}

.user-info-details {
margin-left: $margin-md;
font-size: $font-size-sm;
color: $text-muted;
.institution {
font-style: italic;
}
}

.user-img-full {
Expand Down
34 changes: 21 additions & 13 deletions modules/portal/app/views/userProfile/browseUsers.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,37 @@
@if(result.params.isFiltered || result.nonEmpty) {
@helper.form(action = searchAction, 'role -> "form") {
@views.html.common.search.searchBar(result.params, tips = false)

<ul class="user-grid">
@result.page.map { case (user, hit) =>
<div class="people-page">
<ul class="user-grid">
@result.page.map { case (user, hit) =>
<li class="user-grid-item user-info">
<a href="@controllers.portal.social.routes.Social.userProfile(user.id)" class="gravitar img-container">
<span class="helper"></span>
<img alt="Image" width="100%" height="auto" src="@views.Helpers.gravitar(user.data.imageUrl)" />
</a>
<div class="user-info-details">
<a href="@controllers.portal.social.routes.Social.userProfile(user.id)" class="gravitar img-container">
<span class="helper"></span>
<div class="user-avatar">
<img alt="Image" width="100%" height="auto" src="@views.Helpers.gravitar(user.data.imageUrl)" />
</div>
</a>
<h3><a class="name" href="@controllers.portal.social.routes.Social.userProfile(user.id)">@user.toStringLang</a></h3>
@userInfo {
@user.data.role.map { role =>
<li>@role</li>
}
@user.data.institution.map { inst =>
<li>@inst</li>
<li class="institution">@inst</li>
}
@user.data.location.map { loc =>
<li>@loc</li>
@user.data.url.map { url =>
<a href=@url target="_blank">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
}
}
</div>
</li>
}
</ul>
@common.pagination(result.page)
}
</ul>
@common.pagination(result.page)
</div>
}
}
}
Expand Down