Files
SocialPub/PrivaPub/Web/Pages/Profile.cshtml
T
thepraandClaude Opus 5.5 9ec1f9930b Profile and post pages, NodeInfo 2.1, and FEDERATION.md
/@user and /@user/{id} are Razor pages showing an avatar's or community's
public and unlisted posts: no scripts, a strict CSP, no-referrer, noindex,
and an alternate link to the ActivityPub document. A client asking them
for activity+json is redirected to the actor or note, and the actor and
note redirect browsers here.

NodeInfo answers 2.1 as well as 2.0 (repository, homepage, a link to
FEDERATION.md) and counts only public local posts.

FEDERATION.md (FEP-67ff) lists the protocols, FEPs, route names,
activities and the security rules a peer will notice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
2026-10-01 11:23:03 +02:00

37 lines
863 B
Plaintext

@page "/@{user}"
@model PrivaPub.Web.Pages.ProfileModel
@{
ViewData["Title"] = $"{Model.Actor.Name} (@{Model.Actor.Handle})";
ViewData["Alternate"] = Model.Actor.Uri;
}
<header>
<h1>@Model.Actor.Name</h1>
<div class="handle">@@@Model.Actor.Handle</div>
</header>
<div class="bio">@Html.Raw(Model.BiographyHtml)</div>
@if (Model.Actor.Fields.Count > 0)
{
<dl class="fields">
@foreach (var field in Model.Actor.Fields)
{
<dt>@field.Key</dt>
<dd>@if (Uri.TryCreate(field.Value, UriKind.Absolute, out var link) && link.Scheme is "https" or "http")
{
<a href="@field.Value" rel="nofollow noopener noreferrer me">@field.Value</a>
}
else
{
@field.Value
}</dd>
}
</dl>
}
@foreach (var post in Model.Posts)
{
<partial name="_Post" model="post" />
}
@if (Model.Posts.Count == 0)
{
<p class="meta">Nothing public yet.</p>
}