52 lines
No EOL
1.6 KiB
Text
52 lines
No EOL
1.6 KiB
Text
@page
|
|
@attribute [RazorCompiledItemMetadata("RouteTemplate", "/@{user}")]
|
|
@using Microsoft.AspNetCore.Razor.Hosting
|
|
@model UserModel
|
|
|
|
@section styles
|
|
{
|
|
<link rel="stylesheet" href="~/css/public-preview.css"/>
|
|
}
|
|
|
|
@if (Model.User == null)
|
|
{
|
|
Response.StatusCode = 404;
|
|
<div>
|
|
<h2>Not found</h2>
|
|
<p>This user doesn't appear to exist on this server</p>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
ViewData["title"] = $"@{Model.User.Username} - {Model.InstanceName}";
|
|
@section head
|
|
{
|
|
<meta name="twitter:card" content="summary">
|
|
<meta name="og:site_name" content="@Model.InstanceName">
|
|
<meta name="og:title" content="@@@Model.User.Username">
|
|
@if (Model.User.UserProfile?.Description is { } bio)
|
|
{
|
|
<meta name="og:description" content="@bio">
|
|
}
|
|
<meta name="og:image" content="@(Model.User.AvatarUrl ?? Model.User.IdenticonUrlPath)">
|
|
}
|
|
|
|
<div class="user">
|
|
<div class="header">
|
|
<img src="@(Model.User.AvatarUrl)" class="avatar" alt="User avatar"/>
|
|
<div class="title">
|
|
<span>@Html.Raw(Model.DisplayName)</span>
|
|
</div>
|
|
<span class="acct">@@@Model.User.Username<span class="host">@@@Model.User.Host</span></span>
|
|
</div>
|
|
<div class="bio">
|
|
@Html.Raw(Model.Bio ?? "<i>This user hasn't added a bio yet.</i>")
|
|
</div>
|
|
@if (Model.User.MovedToUri is { } target)
|
|
{
|
|
<div class="bio">
|
|
<i>This user has migrated to a <a href="@target">different account</a>.</i>
|
|
</div>
|
|
}
|
|
</div>
|
|
} |