48 lines
No EOL
1.5 KiB
Text
48 lines
No EOL
1.5 KiB
Text
@page "/User"
|
|
@using Iceshrimp.Backend.Components.PublicPreview.Attributes
|
|
@attribute [Route("/@{Acct}")]
|
|
@attribute [PublicPreviewRouteFilter]
|
|
@inherits AsyncComponentBase
|
|
|
|
@if (_user is null)
|
|
{
|
|
Context.Response.StatusCode = 404;
|
|
<div>
|
|
<h2>Not found</h2>
|
|
<p>This user doesn't appear to exist on this server</p>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="user">
|
|
<UserComponent User="_user"/>
|
|
@if (_pronouns != null)
|
|
{
|
|
<div class="pronouns">
|
|
@_pronouns
|
|
</div>
|
|
}
|
|
<div class="bio">
|
|
@(_user.Bio ?? new MarkupString("<i>This user hasn't added a bio yet.</i>"))
|
|
</div>
|
|
@if (_user.MovedToUri != null)
|
|
{
|
|
<div class="bio">
|
|
<i>This user has migrated to a <a href="@_user.MovedToUri">different account</a>.</i>
|
|
</div>
|
|
}
|
|
</div>
|
|
<PageTitle>@@@_user.Username - @_instanceName</PageTitle>
|
|
<HeadContent>
|
|
<meta name="twitter:card" content="summary">
|
|
<meta property="og:site_name" content="@_instanceName">
|
|
<meta property="og:title" content="@@@_user.Username">
|
|
@if (_user.Bio is { } bio)
|
|
{
|
|
<meta property="og:description" content="@bio">
|
|
}
|
|
<meta property="og:image" content="@_user.AvatarUrl">
|
|
<link rel="alternate" type="application/activity+json" href="@_user.Uri">
|
|
<VersionedLink rel="stylesheet" href="/css/public-preview.css"/>
|
|
</HeadContent>
|
|
} |