mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-02 18:18:39 +00:00
Make UserPage use UserCardPartial
This commit is contained in:
parent
22382efe52
commit
e4cf339394
2 changed files with 31 additions and 43 deletions
|
@ -5,32 +5,30 @@
|
|||
bool showLink = (bool?)ViewData["ShowLink"] ?? false;
|
||||
}
|
||||
|
||||
<div class="ui grid">
|
||||
<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 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>
|
|
@ -3,7 +3,6 @@
|
|||
@using System.Web
|
||||
@using LBPUnion.ProjectLighthouse.Types
|
||||
@using LBPUnion.ProjectLighthouse.Types.Profiles
|
||||
@using LBPUnion.ProjectLighthouse.Types.Settings
|
||||
@model LBPUnion.ProjectLighthouse.Pages.UserPage
|
||||
|
||||
@{
|
||||
|
@ -38,22 +37,13 @@
|
|||
}
|
||||
|
||||
<div class="ui grid">
|
||||
<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>
|
||||
</div>
|
||||
<div class="eight wide column">
|
||||
@await Html.PartialAsync("Partials/UserCardPartial", Model.ProfileUser, new ViewDataDictionary(ViewData)
|
||||
{
|
||||
{
|
||||
"ShowLink", false
|
||||
},
|
||||
})
|
||||
</div>
|
||||
<div class="eight wide right aligned column">
|
||||
<br>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue