mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-31 17:28:39 +00:00
Add profile pictures
This commit is contained in:
parent
c7909d7151
commit
b41a8d93ab
3 changed files with 52 additions and 32 deletions
|
@ -6,28 +6,31 @@
|
|||
}
|
||||
|
||||
<div class="ui grid">
|
||||
<div class="eight wide column">
|
||||
@if (showLink)
|
||||
{
|
||||
<h2 style="margin-bottom: 2px;">
|
||||
<a href="~/user/@Model.UserId">@Model.Username</a>
|
||||
</h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h1 style="margin-bottom: 2px;">
|
||||
@Model.Username
|
||||
</h1>
|
||||
}
|
||||
<p>
|
||||
<i>@Model.Status</i>
|
||||
</p>
|
||||
<div class="statsUnderTitle">
|
||||
<i class="pink heart icon" title="Hearts"></i> <span>@Model.Hearts</span>
|
||||
<i class="blue comment icon" title="Comments"></i> <span>@Model.Comments</span>
|
||||
<i class="green upload icon" title="Uploaded Levels"></i><span>@Model.UsedSlots / @ServerSettings.Instance.EntitledSlots</span>
|
||||
<i class="purple camera icon" title="Uploaded Photos"></i><span>@Model.PhotosByMe</span>
|
||||
<div class="eight wide column" style="display: flex;">
|
||||
<div style="margin-right: 10px; background-image: url('/gameAssets/@Model.WebsiteAvatarHash'); height: 100px; width: 100px; background-size: cover; background-position: center; border-radius: .28571429rem;">
|
||||
</div>
|
||||
<div style="height: fit-content; vertical-align: center; align-self: center">
|
||||
@if (showLink)
|
||||
{
|
||||
<h2 style="margin-bottom: 2px;">
|
||||
<a href="~/user/@Model.UserId">@Model.Username</a>
|
||||
</h2>
|
||||
}
|
||||
else
|
||||
{
|
||||
<h1 style="margin-bottom: 2px;">
|
||||
@Model.Username
|
||||
</h1>
|
||||
}
|
||||
<p>
|
||||
<i>@Model.Status</i>
|
||||
</p>
|
||||
<div class="statsUnderTitle">
|
||||
<i class="pink heart icon" title="Hearts"></i> <span>@Model.Hearts</span>
|
||||
<i class="blue comment icon" title="Comments"></i> <span>@Model.Comments</span>
|
||||
<i class="green upload icon" title="Uploaded Levels"></i><span>@Model.UsedSlots / @ServerSettings.Instance.EntitledSlots</span>
|
||||
<i class="purple camera icon" title="Uploaded Photos"></i><span>@Model.PhotosByMe</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
|
@ -38,17 +38,21 @@
|
|||
}
|
||||
|
||||
<div class="ui grid">
|
||||
<div class="eight wide column">
|
||||
<h1>@Model.Title</h1>
|
||||
<p>
|
||||
<i>@Model.ProfileUser!.Status</i>
|
||||
</p>
|
||||
<div class="eight wide column" style="display: flex">
|
||||
<div style="margin-right: 10px; background-image: url('/gameAssets/@Model.ProfileUser.WebsiteAvatarHash'); height: 100px; width: 100px; background-size: cover; background-position: center; border-radius: .28571429rem;">
|
||||
</div>
|
||||
<div style="height: fit-content; vertical-align: center; align-self: center">
|
||||
<h1>@Model.Title</h1>
|
||||
<p>
|
||||
<i>@Model.ProfileUser!.Status</i>
|
||||
</p>
|
||||
|
||||
<div class="statsUnderTitle">
|
||||
<i class="pink heart icon" title="Hearts"></i> <span>@Model.ProfileUser.Hearts</span>
|
||||
<i class="blue comment icon" title="Comments"></i> <span>@Model.ProfileUser.Comments</span>
|
||||
<i class="green upload icon" title="Uploaded Levels"></i><span>@Model.ProfileUser.UsedSlots / @ServerSettings.Instance.EntitledSlots</span>
|
||||
<i class="purple camera icon" title="Uploaded Photos"></i><span>@Model.ProfileUser.PhotosByMe</span>
|
||||
<div class="statsUnderTitle">
|
||||
<i class="pink heart icon" title="Hearts"></i> <span>@Model.ProfileUser.Hearts</span>
|
||||
<i class="blue comment icon" title="Comments"></i> <span>@Model.ProfileUser.Comments</span>
|
||||
<i class="green upload icon" title="Uploaded Levels"></i><span>@Model.ProfileUser.UsedSlots / @ServerSettings.Instance.EntitledSlots</span>
|
||||
<i class="purple camera icon" title="Uploaded Photos"></i><span>@Model.ProfileUser.PhotosByMe</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="eight wide right aligned column">
|
||||
|
|
|
@ -25,6 +25,19 @@ public class User
|
|||
/// </summary>
|
||||
public string Biography { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string WebsiteAvatarHash {
|
||||
get {
|
||||
string avatarHash = this.IconHash;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = this.YayHash;
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = this.MehHash;
|
||||
if (string.IsNullOrWhiteSpace(avatarHash)) avatarHash = this.BooHash;
|
||||
|
||||
return avatarHash;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public int Reviews {
|
||||
get {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue